quasar-ui-danx 0.0.42 → 0.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quasar-ui-danx",
3
- "version": "0.0.42",
3
+ "version": "0.0.43",
4
4
  "author": "Dan <dan@flytedesk.com>",
5
5
  "description": "DanX Vue / Quasar component library",
6
6
  "license": "MIT",
@@ -56,12 +56,14 @@
56
56
  :style="getColumnStyle(rowProps.col)"
57
57
  @click="() => rowProps.col.onClick && rowProps.col.onClick(rowProps.row)"
58
58
  >
59
+ <RenderVNode
60
+ v-if="rowProps.col.vnode"
61
+ :vnode="rowProps.col.vnode(rowProps.row)"
62
+ />
59
63
  <RenderComponent
60
- v-if="rowProps.col.component"
64
+ v-else-if="rowProps.col.component"
61
65
  :params="[rowProps.row]"
62
66
  :component="rowProps.col.component"
63
- :text="rowProps.value"
64
- @action="action => $emit('action', {action,target: rowProps.row})"
65
67
  />
66
68
  <div v-else-if="rowProps.col.fieldList">
67
69
  <div v-for="field in rowProps.col.fieldList" :key="field">
@@ -95,10 +97,10 @@ import { ref } from 'vue';
95
97
  import { getItem, setItem } from '../../helpers';
96
98
  import { DragHandleIcon as RowResizeIcon } from '../../svg';
97
99
  import { HandleDraggable } from '../DragAndDrop';
98
- import { ActionInputComponent, mapSortBy, RenderComponent } from '../index';
100
+ import { ActionInputComponent, mapSortBy, RenderComponent, RenderVNode } from '../index';
99
101
  import { ActionMenu, EmptyTableState, registerStickyScrolling, TableSummaryRow } from './index';
100
102
 
101
- defineEmits(['action', 'filter', 'update:quasar-pagination', 'update:selected-rows']);
103
+ defineEmits(['action', 'update:quasar-pagination', 'update:selected-rows']);
102
104
  const props = defineProps({
103
105
  name: {
104
106
  type: String,
@@ -259,11 +259,11 @@ export function useListControls(name: string, {
259
259
  * Opens the item's form with the given item and tab
260
260
  *
261
261
  * @param item
262
- * @param tab
262
+ * @param panel
263
263
  */
264
- function openItemForm(item, tab) {
264
+ function activatePanel(item, panel) {
265
265
  activeItem.value = item;
266
- activePanel.value = tab;
266
+ activePanel.value = panel;
267
267
  }
268
268
 
269
269
  /**
@@ -336,7 +336,7 @@ export function useListControls(name: string, {
336
336
  loadMore,
337
337
  refreshAll,
338
338
  getNextItem,
339
- openItemForm,
339
+ activatePanel,
340
340
  applyFilterFromUrl,
341
341
  setItemInPagedList
342
342
  };
@@ -25,17 +25,13 @@ const props = defineProps({
25
25
  type: Array,
26
26
  default: () => []
27
27
  },
28
- text: {
29
- type: String,
30
- default: undefined
31
- },
32
28
  overrideProps: {
33
29
  type: Object,
34
30
  default: () => ({})
35
31
  }
36
32
  });
37
33
 
38
- const content = computed(() => resolvedComponent.value?.value || resolvedComponent.value?.props?.text || props.text);
34
+ const content = computed(() => resolvedComponent.value?.value || resolvedComponent.value?.props?.text);
39
35
  const resolvedComponent = computed(() => {
40
36
  if (typeof props.component === 'function') {
41
37
  return props.component(...props.params);
@@ -0,0 +1,6 @@
1
+ <script>
2
+ const RenderVNode = (props) => props.vnode;
3
+ RenderVNode.props = { vnode: { type: Object, required: true } };
4
+ RenderVNode.emits = ['action'];
5
+ export default RenderVNode;
6
+ </script>
@@ -1,2 +1,3 @@
1
1
  export { default as ActionInputComponent } from "./ActionInputComponent.vue";
2
2
  export { default as RenderComponent } from "./RenderComponent.vue";
3
+ export { default as RenderVNode } from "./RenderVNode.vue";
@@ -183,6 +183,5 @@ async function onConfirmAction(action: ActionOptions, target: object[] | object,
183
183
  action.onFinish(result, target, input);
184
184
  }
185
185
 
186
- console.log("onConrirm result", result);
187
186
  return result;
188
187
  }