@shwfed/nuxt 0.7.9 → 0.7.10

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.
Files changed (95) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/app.d.vue.ts +7 -56
  3. package/dist/runtime/components/app.vue +17 -404
  4. package/dist/runtime/components/app.vue.d.ts +7 -56
  5. package/dist/runtime/components/fields.d.vue.ts +154 -132
  6. package/dist/runtime/components/fields.vue +30 -295
  7. package/dist/runtime/components/fields.vue.d.ts +154 -132
  8. package/dist/runtime/components/table.d.vue.ts +63 -59
  9. package/dist/runtime/components/table.vue +52 -617
  10. package/dist/runtime/components/table.vue.d.ts +63 -59
  11. package/dist/runtime/components/ui/app/App.d.vue.ts +86 -0
  12. package/dist/runtime/components/ui/app/App.vue +414 -0
  13. package/dist/runtime/components/ui/app/App.vue.d.ts +86 -0
  14. package/dist/runtime/components/ui/checkbox/Checkbox.vue +6 -2
  15. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +30 -0
  16. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +87 -0
  17. package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +30 -0
  18. package/dist/runtime/components/ui/expression-editor/index.d.ts +1 -0
  19. package/dist/runtime/components/ui/expression-editor/index.js +1 -0
  20. package/dist/runtime/components/ui/field/FieldContent.vue +1 -1
  21. package/dist/runtime/components/ui/field/FieldError.vue +2 -2
  22. package/dist/runtime/components/ui/fields/Fields.d.vue.ts +376 -0
  23. package/dist/runtime/components/ui/fields/Fields.vue +441 -0
  24. package/dist/runtime/components/ui/fields/Fields.vue.d.ts +376 -0
  25. package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.d.vue.ts +163 -0
  26. package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue +363 -0
  27. package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue.d.ts +163 -0
  28. package/dist/runtime/components/ui/input/Input.d.vue.ts +1 -0
  29. package/dist/runtime/components/ui/input/Input.vue +2 -0
  30. package/dist/runtime/components/ui/input/Input.vue.d.ts +1 -0
  31. package/dist/runtime/components/ui/input-group/InputGroupAddon.vue +4 -1
  32. package/dist/runtime/components/ui/input-group/InputGroupCombobox.d.vue.ts +8 -3
  33. package/dist/runtime/components/ui/input-group/InputGroupCombobox.vue +8 -3
  34. package/dist/runtime/components/ui/input-group/InputGroupCombobox.vue.d.ts +8 -3
  35. package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.d.vue.ts +8 -1
  36. package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.vue +10 -1
  37. package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.vue.d.ts +8 -1
  38. package/dist/runtime/components/ui/input-group/InputGroupNumberField.d.vue.ts +5 -2
  39. package/dist/runtime/components/ui/input-group/InputGroupNumberField.vue +9 -3
  40. package/dist/runtime/components/ui/input-group/InputGroupNumberField.vue.d.ts +5 -2
  41. package/dist/runtime/components/ui/input-group/index.js +1 -1
  42. package/dist/runtime/components/ui/locale/Locale.d.vue.ts +20 -0
  43. package/dist/runtime/components/ui/locale/Locale.vue +291 -0
  44. package/dist/runtime/components/ui/locale/Locale.vue.d.ts +20 -0
  45. package/dist/runtime/components/ui/locale/index.d.ts +1 -0
  46. package/dist/runtime/components/ui/locale/index.js +1 -0
  47. package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +1 -0
  48. package/dist/runtime/components/ui/native-select/NativeSelectOption.vue +4 -1
  49. package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +1 -0
  50. package/dist/runtime/components/ui/number-field/NumberFieldInput.vue +1 -1
  51. package/dist/runtime/components/ui/switch/Switch.vue +1 -1
  52. package/dist/runtime/components/ui/table/Table.d.vue.ts +81 -0
  53. package/dist/runtime/components/ui/table/Table.vue +792 -0
  54. package/dist/runtime/components/ui/table/Table.vue.d.ts +81 -0
  55. package/dist/runtime/components/ui/table/schema.d.ts +48 -0
  56. package/dist/runtime/components/ui/table/schema.js +126 -0
  57. package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.d.vue.ts +62 -0
  58. package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.vue +2233 -0
  59. package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.vue.d.ts +62 -0
  60. package/dist/runtime/components/ui/table-configurator/menu.d.ts +37 -0
  61. package/dist/runtime/components/ui/table-configurator/menu.js +227 -0
  62. package/dist/runtime/components/ui/tabs/Tabs.d.vue.ts +24 -0
  63. package/dist/runtime/components/ui/tabs/Tabs.vue +30 -0
  64. package/dist/runtime/components/ui/tabs/Tabs.vue.d.ts +24 -0
  65. package/dist/runtime/components/ui/tabs/TabsContent.d.vue.ts +18 -0
  66. package/dist/runtime/components/ui/tabs/TabsContent.vue +23 -0
  67. package/dist/runtime/components/ui/tabs/TabsContent.vue.d.ts +18 -0
  68. package/dist/runtime/components/ui/tabs/TabsList.d.vue.ts +18 -0
  69. package/dist/runtime/components/ui/tabs/TabsList.vue +25 -0
  70. package/dist/runtime/components/ui/tabs/TabsList.vue.d.ts +18 -0
  71. package/dist/runtime/components/ui/tabs/TabsTrigger.d.vue.ts +18 -0
  72. package/dist/runtime/components/ui/tabs/TabsTrigger.vue +27 -0
  73. package/dist/runtime/components/ui/tabs/TabsTrigger.vue.d.ts +18 -0
  74. package/dist/runtime/components/ui/tabs/index.d.ts +4 -0
  75. package/dist/runtime/components/ui/tabs/index.js +4 -0
  76. package/dist/runtime/components/ui/textarea/Textarea.d.vue.ts +1 -0
  77. package/dist/runtime/components/ui/textarea/Textarea.vue +3 -1
  78. package/dist/runtime/components/ui/textarea/Textarea.vue.d.ts +1 -0
  79. package/dist/runtime/components/ui/toggle/Toggle.d.vue.ts +34 -0
  80. package/dist/runtime/components/ui/toggle/Toggle.vue +32 -0
  81. package/dist/runtime/components/ui/toggle/Toggle.vue.d.ts +34 -0
  82. package/dist/runtime/components/ui/toggle/index.d.ts +7 -0
  83. package/dist/runtime/components/ui/toggle/index.js +22 -0
  84. package/dist/runtime/composables/useTableRenderers.d.ts +2 -1
  85. package/dist/runtime/composables/useTableRenderers.js +2 -1
  86. package/dist/runtime/style.css +1 -1
  87. package/dist/runtime/table-renderers/builtins.js +213 -98
  88. package/dist/runtime/table-renderers/registry.d.ts +1 -0
  89. package/dist/runtime/table-renderers/registry.js +3 -0
  90. package/dist/runtime/utils/coders.d.ts +27 -2
  91. package/dist/runtime/utils/coders.js +27 -2
  92. package/package.json +3 -1
  93. /package/dist/runtime/components/{logo.d.vue.ts → ui/logo/Logo.d.vue.ts} +0 -0
  94. /package/dist/runtime/components/{logo.vue → ui/logo/Logo.vue} +0 -0
  95. /package/dist/runtime/components/{logo.vue.d.ts → ui/logo/Logo.vue.d.ts} +0 -0
@@ -0,0 +1,62 @@
1
+ import { type LocaleValue } from '../../../utils/coders.js';
2
+ import type { TableConfig } from '../table/schema.js';
3
+ type __VLS_Props = {
4
+ config: TableConfig;
5
+ };
6
+ type __VLS_ModelProps = {
7
+ 'open'?: boolean;
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:open": (value: boolean) => any;
12
+ confirm: (args_0: Readonly<{
13
+ getRowId?: import("../table/schema.js").Expression;
14
+ getSubRows?: import("../table/schema.js").Expression;
15
+ enableRowSelection?: import("../table/schema.js").Expression;
16
+ enableMultiRowSelection?: import("../table/schema.js").Expression;
17
+ columns: readonly Readonly<{
18
+ id?: string;
19
+ title?: LocaleValue;
20
+ accessor?: import("../table/schema.js").Accessor;
21
+ renderer?: import("../table/schema.js").Render;
22
+ tooltip?: LocaleValue;
23
+ size?: number;
24
+ enableSorting?: boolean;
25
+ enableMultiSorting?: boolean;
26
+ enablePinning?: boolean;
27
+ columns?: readonly Readonly</*elided*/ any>[];
28
+ grow?: boolean;
29
+ }>[];
30
+ cellStyles?: import("../table/schema.js").Expression;
31
+ props?: Omit<import("@tanstack/table-core").TableOptions<unknown>, "columns" | "data" | "getRowId" | "getCoreRowModel">;
32
+ paginationLeft?: import("../table/schema.js").Markdown;
33
+ paginationRight?: import("../table/schema.js").Markdown;
34
+ }>) => any;
35
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
36
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
37
+ onConfirm?: ((args_0: Readonly<{
38
+ getRowId?: import("../table/schema.js").Expression;
39
+ getSubRows?: import("../table/schema.js").Expression;
40
+ enableRowSelection?: import("../table/schema.js").Expression;
41
+ enableMultiRowSelection?: import("../table/schema.js").Expression;
42
+ columns: readonly Readonly<{
43
+ id?: string;
44
+ title?: LocaleValue;
45
+ accessor?: import("../table/schema.js").Accessor;
46
+ renderer?: import("../table/schema.js").Render;
47
+ tooltip?: LocaleValue;
48
+ size?: number;
49
+ enableSorting?: boolean;
50
+ enableMultiSorting?: boolean;
51
+ enablePinning?: boolean;
52
+ columns?: readonly Readonly</*elided*/ any>[];
53
+ grow?: boolean;
54
+ }>[];
55
+ cellStyles?: import("../table/schema.js").Expression;
56
+ props?: Omit<import("@tanstack/table-core").TableOptions<unknown>, "columns" | "data" | "getRowId" | "getCoreRowModel">;
57
+ paginationLeft?: import("../table/schema.js").Markdown;
58
+ paginationRight?: import("../table/schema.js").Markdown;
59
+ }>) => any) | undefined;
60
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
61
+ declare const _default: typeof __VLS_export;
62
+ export default _default;
@@ -0,0 +1,37 @@
1
+ export type TableConfiguratorColumnSource<T> = Readonly<{
2
+ columns?: ReadonlyArray<T>;
3
+ }>;
4
+ export type TableConfiguratorDraftColumnNode<T extends TableConfiguratorColumnSource<T>> = Readonly<{
5
+ itemId: string;
6
+ parentItemId?: string;
7
+ childItemIds: Array<string>;
8
+ column: T;
9
+ }>;
10
+ export type TableConfiguratorDraftColumnTree<T extends TableConfiguratorColumnSource<T>> = Readonly<{
11
+ rootItemIds: Array<string>;
12
+ nodes: Array<TableConfiguratorDraftColumnNode<T>>;
13
+ }>;
14
+ export type TableConfiguratorFlattenedColumnItem<T extends TableConfiguratorColumnSource<T>> = Readonly<{
15
+ itemId: string;
16
+ depth: number;
17
+ column: T;
18
+ }>;
19
+ export declare function createTableConfiguratorDraftColumnNode<T extends TableConfiguratorColumnSource<T>>(column: T, options?: Readonly<{
20
+ createItemId?: () => string;
21
+ parentItemId?: string;
22
+ childItemIds?: Array<string>;
23
+ }>): TableConfiguratorDraftColumnNode<T>;
24
+ export declare function buildTableConfiguratorColumnTree<T extends TableConfiguratorColumnSource<T>>(columns: ReadonlyArray<T>, options?: Readonly<{
25
+ createItemId?: () => string;
26
+ }>): TableConfiguratorDraftColumnTree<T>;
27
+ export declare function getTableConfiguratorColumnNode<T extends TableConfiguratorColumnSource<T>>(tree: TableConfiguratorDraftColumnTree<T>, itemId: string): TableConfiguratorDraftColumnNode<T> | undefined;
28
+ export declare function getTableConfiguratorColumnAncestorItemIds<T extends TableConfiguratorColumnSource<T>>(tree: TableConfiguratorDraftColumnTree<T>, itemId: string): Array<string>;
29
+ export declare function getTableConfiguratorColumnDescendantItemIds<T extends TableConfiguratorColumnSource<T>>(tree: TableConfiguratorDraftColumnTree<T>, itemId: string): Array<string>;
30
+ export declare function flattenTableConfiguratorColumnTree<T extends TableConfiguratorColumnSource<T>>(tree: TableConfiguratorDraftColumnTree<T>): Array<TableConfiguratorFlattenedColumnItem<T>>;
31
+ export declare function updateTableConfiguratorColumnNode<T extends TableConfiguratorColumnSource<T>>(tree: TableConfiguratorDraftColumnTree<T>, itemId: string, update: (column: T) => T): TableConfiguratorDraftColumnTree<T>;
32
+ export declare function insertTableConfiguratorRootColumnNode<T extends TableConfiguratorColumnSource<T>>(tree: TableConfiguratorDraftColumnTree<T>, node: TableConfiguratorDraftColumnNode<T>, index?: number): TableConfiguratorDraftColumnTree<T>;
33
+ export declare function moveTableConfiguratorColumnNodeToParent<T extends TableConfiguratorColumnSource<T>>(tree: TableConfiguratorDraftColumnTree<T>, itemId: string, parentItemId: string, index?: number): TableConfiguratorDraftColumnTree<T>;
34
+ export declare function moveTableConfiguratorColumnNodeAfterItem<T extends TableConfiguratorColumnSource<T>>(tree: TableConfiguratorDraftColumnTree<T>, itemId: string, targetItemId: string): TableConfiguratorDraftColumnTree<T>;
35
+ export declare function moveTableConfiguratorColumnSibling<T extends TableConfiguratorColumnSource<T>>(tree: TableConfiguratorDraftColumnTree<T>, parentItemId: string | undefined, oldIndex: number, newIndex: number): TableConfiguratorDraftColumnTree<T>;
36
+ export declare function removeTableConfiguratorColumnSubtree<T extends TableConfiguratorColumnSource<T>>(tree: TableConfiguratorDraftColumnTree<T>, itemId: string): TableConfiguratorDraftColumnTree<T>;
37
+ export declare function materializeTableConfiguratorColumnTree<T extends TableConfiguratorColumnSource<T>>(tree: TableConfiguratorDraftColumnTree<T>): Array<T>;
@@ -0,0 +1,227 @@
1
+ function stripNestedColumns(column) {
2
+ return {
3
+ ...column,
4
+ columns: void 0
5
+ };
6
+ }
7
+ function insertItemId(itemIds, itemId, index = itemIds.length) {
8
+ const nextItemIds = itemIds.slice();
9
+ const normalizedIndex = Math.min(Math.max(index, 0), nextItemIds.length);
10
+ nextItemIds.splice(normalizedIndex, 0, itemId);
11
+ return nextItemIds;
12
+ }
13
+ function moveItemId(itemIds, oldIndex, newIndex) {
14
+ if (oldIndex < 0 || newIndex < 0 || oldIndex >= itemIds.length || newIndex >= itemIds.length) {
15
+ return itemIds.slice();
16
+ }
17
+ const nextItemIds = itemIds.slice();
18
+ const movedItemId = nextItemIds[oldIndex];
19
+ if (!movedItemId) {
20
+ return itemIds.slice();
21
+ }
22
+ nextItemIds.splice(oldIndex, 1);
23
+ nextItemIds.splice(newIndex, 0, movedItemId);
24
+ return nextItemIds;
25
+ }
26
+ function replaceNode(tree, itemId, update) {
27
+ return {
28
+ ...tree,
29
+ nodes: tree.nodes.map((node) => node.itemId === itemId ? update(node) : node)
30
+ };
31
+ }
32
+ function updateSiblingIds(tree, parentItemId, update) {
33
+ if (!parentItemId) {
34
+ return {
35
+ ...tree,
36
+ rootItemIds: update(tree.rootItemIds)
37
+ };
38
+ }
39
+ return replaceNode(tree, parentItemId, (node) => ({
40
+ ...node,
41
+ childItemIds: update(node.childItemIds)
42
+ }));
43
+ }
44
+ function detachColumnNode(tree, itemId) {
45
+ const node = getTableConfiguratorColumnNode(tree, itemId);
46
+ if (!node) {
47
+ return tree;
48
+ }
49
+ const detachedTree = updateSiblingIds(
50
+ tree,
51
+ node.parentItemId,
52
+ (itemIds) => itemIds.filter((currentItemId) => currentItemId !== itemId)
53
+ );
54
+ return replaceNode(detachedTree, itemId, (currentNode) => ({
55
+ ...currentNode,
56
+ parentItemId: void 0
57
+ }));
58
+ }
59
+ function attachColumnNode(tree, itemId, parentItemId, index = Number.POSITIVE_INFINITY) {
60
+ if (parentItemId) {
61
+ const parentNode = getTableConfiguratorColumnNode(tree, parentItemId);
62
+ if (!parentNode) {
63
+ return tree;
64
+ }
65
+ }
66
+ const attachedTree = updateSiblingIds(
67
+ tree,
68
+ parentItemId,
69
+ (itemIds) => insertItemId(itemIds, itemId, index)
70
+ );
71
+ return replaceNode(attachedTree, itemId, (currentNode) => ({
72
+ ...currentNode,
73
+ parentItemId
74
+ }));
75
+ }
76
+ export function createTableConfiguratorDraftColumnNode(column, options) {
77
+ return {
78
+ itemId: options?.createItemId?.() ?? crypto.randomUUID(),
79
+ parentItemId: options?.parentItemId,
80
+ childItemIds: options?.childItemIds?.slice() ?? [],
81
+ column: stripNestedColumns(column)
82
+ };
83
+ }
84
+ export function buildTableConfiguratorColumnTree(columns, options) {
85
+ const nodes = [];
86
+ function visit(column, parentItemId) {
87
+ const itemId = options?.createItemId?.() ?? crypto.randomUUID();
88
+ const childItemIds = (column.columns ?? []).map((childColumn) => visit(childColumn, itemId));
89
+ nodes.push({
90
+ itemId,
91
+ parentItemId,
92
+ childItemIds,
93
+ column: stripNestedColumns(column)
94
+ });
95
+ return itemId;
96
+ }
97
+ return {
98
+ rootItemIds: columns.map((column) => visit(column)),
99
+ nodes
100
+ };
101
+ }
102
+ export function getTableConfiguratorColumnNode(tree, itemId) {
103
+ return tree.nodes.find((node) => node.itemId === itemId);
104
+ }
105
+ export function getTableConfiguratorColumnAncestorItemIds(tree, itemId) {
106
+ const ancestorItemIds = [];
107
+ let currentNode = getTableConfiguratorColumnNode(tree, itemId);
108
+ while (currentNode?.parentItemId) {
109
+ ancestorItemIds.push(currentNode.parentItemId);
110
+ currentNode = getTableConfiguratorColumnNode(tree, currentNode.parentItemId);
111
+ }
112
+ return ancestorItemIds;
113
+ }
114
+ export function getTableConfiguratorColumnDescendantItemIds(tree, itemId) {
115
+ const node = getTableConfiguratorColumnNode(tree, itemId);
116
+ if (!node) {
117
+ return [];
118
+ }
119
+ const descendantItemIds = [];
120
+ for (const childItemId of node.childItemIds) {
121
+ descendantItemIds.push(childItemId);
122
+ descendantItemIds.push(...getTableConfiguratorColumnDescendantItemIds(tree, childItemId));
123
+ }
124
+ return descendantItemIds;
125
+ }
126
+ export function flattenTableConfiguratorColumnTree(tree) {
127
+ function visit(itemId, depth) {
128
+ const node = getTableConfiguratorColumnNode(tree, itemId);
129
+ if (!node) {
130
+ return [];
131
+ }
132
+ return [
133
+ {
134
+ itemId: node.itemId,
135
+ depth,
136
+ column: node.column
137
+ },
138
+ ...node.childItemIds.flatMap((childItemId) => visit(childItemId, depth + 1))
139
+ ];
140
+ }
141
+ return tree.rootItemIds.flatMap((itemId) => visit(itemId, 0));
142
+ }
143
+ export function updateTableConfiguratorColumnNode(tree, itemId, update) {
144
+ return replaceNode(tree, itemId, (node) => ({
145
+ ...node,
146
+ column: stripNestedColumns(update(node.column))
147
+ }));
148
+ }
149
+ export function insertTableConfiguratorRootColumnNode(tree, node, index = tree.rootItemIds.length) {
150
+ return {
151
+ rootItemIds: insertItemId(tree.rootItemIds, node.itemId, index),
152
+ nodes: [...tree.nodes, node]
153
+ };
154
+ }
155
+ export function moveTableConfiguratorColumnNodeToParent(tree, itemId, parentItemId, index = Number.POSITIVE_INFINITY) {
156
+ if (itemId === parentItemId) {
157
+ return tree;
158
+ }
159
+ const node = getTableConfiguratorColumnNode(tree, itemId);
160
+ if (!node) {
161
+ return tree;
162
+ }
163
+ const descendantItemIds = getTableConfiguratorColumnDescendantItemIds(tree, itemId);
164
+ if (descendantItemIds.includes(parentItemId)) {
165
+ return tree;
166
+ }
167
+ const detachedTree = detachColumnNode(tree, itemId);
168
+ return attachColumnNode(detachedTree, itemId, parentItemId, index);
169
+ }
170
+ export function moveTableConfiguratorColumnNodeAfterItem(tree, itemId, targetItemId) {
171
+ if (itemId === targetItemId) {
172
+ return tree;
173
+ }
174
+ const movingNode = getTableConfiguratorColumnNode(tree, itemId);
175
+ const targetNode = getTableConfiguratorColumnNode(tree, targetItemId);
176
+ if (!movingNode || !targetNode) {
177
+ return tree;
178
+ }
179
+ const descendantItemIds = getTableConfiguratorColumnDescendantItemIds(tree, itemId);
180
+ if (descendantItemIds.includes(targetItemId)) {
181
+ return tree;
182
+ }
183
+ const detachedTree = detachColumnNode(tree, itemId);
184
+ const siblingItemIds = targetNode.parentItemId ? getTableConfiguratorColumnNode(detachedTree, targetNode.parentItemId)?.childItemIds ?? [] : detachedTree.rootItemIds;
185
+ const targetIndex = siblingItemIds.findIndex((currentItemId) => currentItemId === targetItemId);
186
+ const insertIndex = targetIndex < 0 ? siblingItemIds.length : targetIndex + 1;
187
+ return attachColumnNode(detachedTree, itemId, targetNode.parentItemId, insertIndex);
188
+ }
189
+ export function moveTableConfiguratorColumnSibling(tree, parentItemId, oldIndex, newIndex) {
190
+ return updateSiblingIds(tree, parentItemId, (itemIds) => moveItemId(itemIds, oldIndex, newIndex));
191
+ }
192
+ export function removeTableConfiguratorColumnSubtree(tree, itemId) {
193
+ const node = getTableConfiguratorColumnNode(tree, itemId);
194
+ if (!node) {
195
+ return tree;
196
+ }
197
+ const removedItemIds = [itemId, ...getTableConfiguratorColumnDescendantItemIds(tree, itemId)];
198
+ const detachedTree = updateSiblingIds(
199
+ tree,
200
+ node.parentItemId,
201
+ (itemIds) => itemIds.filter((currentItemId) => currentItemId !== itemId)
202
+ );
203
+ return {
204
+ ...detachedTree,
205
+ nodes: detachedTree.nodes.filter((currentNode) => !removedItemIds.includes(currentNode.itemId))
206
+ };
207
+ }
208
+ export function materializeTableConfiguratorColumnTree(tree) {
209
+ function visit(itemId) {
210
+ const node = getTableConfiguratorColumnNode(tree, itemId);
211
+ if (!node) {
212
+ return void 0;
213
+ }
214
+ const childColumns = node.childItemIds.flatMap((childItemId) => {
215
+ const childColumn = visit(childItemId);
216
+ return childColumn ? [childColumn] : [];
217
+ });
218
+ return {
219
+ ...node.column,
220
+ columns: childColumns.length > 0 ? childColumns : void 0
221
+ };
222
+ }
223
+ return tree.rootItemIds.flatMap((itemId) => {
224
+ const column = visit(itemId);
225
+ return column ? [column] : [];
226
+ });
227
+ }
@@ -0,0 +1,24 @@
1
+ import type { TabsRootProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = TabsRootProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_8: {
7
+ modelValue: string | number | undefined;
8
+ };
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_8) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (payload: string | number) => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,30 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { TabsRoot, useForwardPropsEmits } from "reka-ui";
4
+ import { cn } from "../../../utils/cn";
5
+ const props = defineProps({
6
+ defaultValue: { type: null, required: false },
7
+ orientation: { type: String, required: false },
8
+ dir: { type: String, required: false },
9
+ activationMode: { type: String, required: false },
10
+ modelValue: { type: null, required: false },
11
+ unmountOnHide: { type: Boolean, required: false },
12
+ asChild: { type: Boolean, required: false },
13
+ as: { type: null, required: false },
14
+ class: { type: null, required: false }
15
+ });
16
+ const emits = defineEmits(["update:modelValue"]);
17
+ const delegatedProps = reactiveOmit(props, "class");
18
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
19
+ </script>
20
+
21
+ <template>
22
+ <TabsRoot
23
+ v-slot="slotProps"
24
+ data-slot="tabs"
25
+ v-bind="forwarded"
26
+ :class="cn('flex flex-col gap-2', props.class)"
27
+ >
28
+ <slot v-bind="slotProps" />
29
+ </TabsRoot>
30
+ </template>
@@ -0,0 +1,24 @@
1
+ import type { TabsRootProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = TabsRootProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_8: {
7
+ modelValue: string | number | undefined;
8
+ };
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_8) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ "update:modelValue": (payload: string | number) => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ "onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,18 @@
1
+ import type { TabsContentProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = TabsContentProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_8: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_8) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,23 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { TabsContent } from "reka-ui";
4
+ import { cn } from "../../../utils/cn";
5
+ const props = defineProps({
6
+ value: { type: [String, Number], required: true },
7
+ forceMount: { type: Boolean, required: false },
8
+ asChild: { type: Boolean, required: false },
9
+ as: { type: null, required: false },
10
+ class: { type: null, required: false }
11
+ });
12
+ const delegatedProps = reactiveOmit(props, "class");
13
+ </script>
14
+
15
+ <template>
16
+ <TabsContent
17
+ data-slot="tabs-content"
18
+ v-bind="delegatedProps"
19
+ :class="cn('flex-1', props.class)"
20
+ >
21
+ <slot />
22
+ </TabsContent>
23
+ </template>
@@ -0,0 +1,18 @@
1
+ import type { TabsContentProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = TabsContentProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_8: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_8) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,18 @@
1
+ import type { TabsListProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = TabsListProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_8: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_8) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,25 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { TabsList } from "reka-ui";
4
+ import { cn } from "../../../utils/cn";
5
+ const props = defineProps({
6
+ loop: { type: Boolean, required: false },
7
+ asChild: { type: Boolean, required: false },
8
+ as: { type: null, required: false },
9
+ class: { type: null, required: false }
10
+ });
11
+ const delegatedProps = reactiveOmit(props, "class");
12
+ </script>
13
+
14
+ <template>
15
+ <TabsList
16
+ data-slot="tabs-list"
17
+ v-bind="delegatedProps"
18
+ :class="cn(
19
+ 'inline-flex h-9 w-fit items-center justify-center gap-1 rounded-md border border-[color-mix(in_srgb,black_10%,white)] bg-[color-mix(in_srgb,black_6%,white)] p-1',
20
+ props.class
21
+ )"
22
+ >
23
+ <slot />
24
+ </TabsList>
25
+ </template>
@@ -0,0 +1,18 @@
1
+ import type { TabsListProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = TabsListProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_8: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_8) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,18 @@
1
+ import type { TabsTriggerProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = TabsTriggerProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_8: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_8) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,27 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { TabsTrigger, useForwardProps } from "reka-ui";
4
+ import { cn } from "../../../utils/cn";
5
+ const props = defineProps({
6
+ value: { type: [String, Number], required: true },
7
+ disabled: { type: Boolean, required: false },
8
+ asChild: { type: Boolean, required: false },
9
+ as: { type: null, required: false },
10
+ class: { type: null, required: false }
11
+ });
12
+ const delegatedProps = reactiveOmit(props, "class");
13
+ const forwardedProps = useForwardProps(delegatedProps);
14
+ </script>
15
+
16
+ <template>
17
+ <TabsTrigger
18
+ data-slot="tabs-trigger"
19
+ v-bind="forwardedProps"
20
+ :class="cn(
21
+ 'inline-flex h-7 flex-1 items-center justify-center gap-1.5 rounded-sm border border-transparent bg-transparent px-3 py-1 text-sm font-medium whitespace-nowrap text-zinc-600 transition-colors duration-180 disabled:pointer-events-none disabled:opacity-50 hover:border-[color-mix(in_srgb,black_12%,white)] hover:bg-[color-mix(in_srgb,black_4%,white)] hover:text-(--primary) data-[state=active]:border-[color-mix(in_srgb,var(--primary)_28%,white)] data-[state=active]:bg-[color-mix(in_srgb,var(--primary)_14%,white)] data-[state=active]:text-(--primary)',
22
+ props.class
23
+ )"
24
+ >
25
+ <slot />
26
+ </TabsTrigger>
27
+ </template>
@@ -0,0 +1,18 @@
1
+ import type { TabsTriggerProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = TabsTriggerProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_8: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_8) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,4 @@
1
+ export { default as Tabs } from './Tabs.vue.js';
2
+ export { default as TabsContent } from './TabsContent.vue.js';
3
+ export { default as TabsList } from './TabsList.vue.js';
4
+ export { default as TabsTrigger } from './TabsTrigger.vue.js';
@@ -0,0 +1,4 @@
1
+ export { default as Tabs } from "./Tabs.vue";
2
+ export { default as TabsContent } from "./TabsContent.vue";
3
+ export { default as TabsList } from "./TabsList.vue";
4
+ export { default as TabsTrigger } from "./TabsTrigger.vue";
@@ -3,6 +3,7 @@ type __VLS_Props = {
3
3
  class?: HTMLAttributes['class'];
4
4
  defaultValue?: string | number;
5
5
  modelValue?: string | number;
6
+ placeholder?: string;
6
7
  };
7
8
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
9
  "update:modelValue": (payload: string | number) => any;
@@ -4,7 +4,8 @@ import { cn } from "../../../utils/cn";
4
4
  const props = defineProps({
5
5
  class: { type: null, required: false },
6
6
  defaultValue: { type: [String, Number], required: false },
7
- modelValue: { type: [String, Number], required: false }
7
+ modelValue: { type: [String, Number], required: false },
8
+ placeholder: { type: String, required: false }
8
9
  });
9
10
  const emits = defineEmits(["update:modelValue"]);
10
11
  const modelValue = useVModel(props, "modelValue", emits, {
@@ -17,6 +18,7 @@ const modelValue = useVModel(props, "modelValue", emits, {
17
18
  <textarea
18
19
  v-model="modelValue"
19
20
  data-slot="textarea"
21
+ :placeholder="props.placeholder"
20
22
  :class="cn('border-zinc-200 placeholder:text-zinc-400 focus-visible:border-(--primary) aria-invalid:border-red-400 dark:bg-zinc-200/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', props.class)"
21
23
  />
22
24
  </template>
@@ -3,6 +3,7 @@ type __VLS_Props = {
3
3
  class?: HTMLAttributes['class'];
4
4
  defaultValue?: string | number;
5
5
  modelValue?: string | number;
6
+ placeholder?: string;
6
7
  };
7
8
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
9
  "update:modelValue": (payload: string | number) => any;