@weconstudio/nuxt 0.0.0-stage → 1.72.0

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 (208) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +115 -2
  3. package/dist/module.d.mts +7 -0
  4. package/dist/module.json +12 -0
  5. package/dist/module.mjs +250 -0
  6. package/dist/runtime/components/We/Autocomplete.d.vue.ts +13 -0
  7. package/dist/runtime/components/We/Autocomplete.vue +91 -0
  8. package/dist/runtime/components/We/Autocomplete.vue.d.ts +13 -0
  9. package/dist/runtime/components/We/BoldText.d.vue.ts +17 -0
  10. package/dist/runtime/components/We/BoldText.vue +29 -0
  11. package/dist/runtime/components/We/BoldText.vue.d.ts +17 -0
  12. package/dist/runtime/components/We/ColorPicker.d.vue.ts +11 -0
  13. package/dist/runtime/components/We/ColorPicker.vue +199 -0
  14. package/dist/runtime/components/We/ColorPicker.vue.d.ts +11 -0
  15. package/dist/runtime/components/We/ConfirmDialog.d.vue.ts +104 -0
  16. package/dist/runtime/components/We/ConfirmDialog.vue +143 -0
  17. package/dist/runtime/components/We/ConfirmDialog.vue.d.ts +104 -0
  18. package/dist/runtime/components/We/Datatable.d.vue.ts +40 -0
  19. package/dist/runtime/components/We/Datatable.vue +87 -0
  20. package/dist/runtime/components/We/Datatable.vue.d.ts +40 -0
  21. package/dist/runtime/components/We/DatatableInternal.d.vue.ts +194 -0
  22. package/dist/runtime/components/We/DatatableInternal.vue +638 -0
  23. package/dist/runtime/components/We/DatatableInternal.vue.d.ts +194 -0
  24. package/dist/runtime/components/We/DatePicker.d.vue.ts +51 -0
  25. package/dist/runtime/components/We/DatePicker.vue +901 -0
  26. package/dist/runtime/components/We/DatePicker.vue.d.ts +51 -0
  27. package/dist/runtime/components/We/Dt/Actions.d.vue.ts +51 -0
  28. package/dist/runtime/components/We/Dt/Actions.vue +106 -0
  29. package/dist/runtime/components/We/Dt/Actions.vue.d.ts +51 -0
  30. package/dist/runtime/components/We/Dt/BooleanFormatter.d.vue.ts +8 -0
  31. package/dist/runtime/components/We/Dt/BooleanFormatter.vue +26 -0
  32. package/dist/runtime/components/We/Dt/BooleanFormatter.vue.d.ts +8 -0
  33. package/dist/runtime/components/We/Dt/CardFilterContainer.d.vue.ts +17 -0
  34. package/dist/runtime/components/We/Dt/CardFilterContainer.vue +60 -0
  35. package/dist/runtime/components/We/Dt/CardFilterContainer.vue.d.ts +17 -0
  36. package/dist/runtime/components/We/Dt/CheckboxFilter.d.vue.ts +16 -0
  37. package/dist/runtime/components/We/Dt/CheckboxFilter.vue +47 -0
  38. package/dist/runtime/components/We/Dt/CheckboxFilter.vue.d.ts +16 -0
  39. package/dist/runtime/components/We/Dt/ChipGroupSelect.d.vue.ts +7 -0
  40. package/dist/runtime/components/We/Dt/ChipGroupSelect.vue +35 -0
  41. package/dist/runtime/components/We/Dt/ChipGroupSelect.vue.d.ts +7 -0
  42. package/dist/runtime/components/We/Dt/ClusterFilter.d.vue.ts +18 -0
  43. package/dist/runtime/components/We/Dt/ClusterFilter.vue +68 -0
  44. package/dist/runtime/components/We/Dt/ClusterFilter.vue.d.ts +18 -0
  45. package/dist/runtime/components/We/Dt/DatasetFormatter.d.vue.ts +19 -0
  46. package/dist/runtime/components/We/Dt/DatasetFormatter.vue +65 -0
  47. package/dist/runtime/components/We/Dt/DatasetFormatter.vue.d.ts +19 -0
  48. package/dist/runtime/components/We/Dt/DaterangeFilter.d.vue.ts +28 -0
  49. package/dist/runtime/components/We/Dt/DaterangeFilter.vue +140 -0
  50. package/dist/runtime/components/We/Dt/DaterangeFilter.vue.d.ts +28 -0
  51. package/dist/runtime/components/We/Dt/Filter.d.vue.ts +7 -0
  52. package/dist/runtime/components/We/Dt/Filter.vue +234 -0
  53. package/dist/runtime/components/We/Dt/Filter.vue.d.ts +7 -0
  54. package/dist/runtime/components/We/Dt/Filters.d.vue.ts +6 -0
  55. package/dist/runtime/components/We/Dt/Filters.vue +24 -0
  56. package/dist/runtime/components/We/Dt/Filters.vue.d.ts +6 -0
  57. package/dist/runtime/components/We/Dt/LuxonFormatter.d.vue.ts +12 -0
  58. package/dist/runtime/components/We/Dt/LuxonFormatter.vue +23 -0
  59. package/dist/runtime/components/We/Dt/LuxonFormatter.vue.d.ts +12 -0
  60. package/dist/runtime/components/We/Dt/SelectFilter.d.vue.ts +60 -0
  61. package/dist/runtime/components/We/Dt/SelectFilter.vue +333 -0
  62. package/dist/runtime/components/We/Dt/SelectFilter.vue.d.ts +60 -0
  63. package/dist/runtime/components/We/Dt/SelectResourceFilter.d.vue.ts +43 -0
  64. package/dist/runtime/components/We/Dt/SelectResourceFilter.vue +127 -0
  65. package/dist/runtime/components/We/Dt/SelectResourceFilter.vue.d.ts +43 -0
  66. package/dist/runtime/components/We/Dt/dt.types.d.ts +8 -0
  67. package/dist/runtime/components/We/EndpointSwitcher.d.vue.ts +12 -0
  68. package/dist/runtime/components/We/EndpointSwitcher.vue +256 -0
  69. package/dist/runtime/components/We/EndpointSwitcher.vue.d.ts +12 -0
  70. package/dist/runtime/components/We/Import.d.vue.ts +118 -0
  71. package/dist/runtime/components/We/Import.vue +730 -0
  72. package/dist/runtime/components/We/Import.vue.d.ts +118 -0
  73. package/dist/runtime/components/We/ImportDefaultValues.d.vue.ts +3666 -0
  74. package/dist/runtime/components/We/ImportDefaultValues.vue +115 -0
  75. package/dist/runtime/components/We/ImportDefaultValues.vue.d.ts +3666 -0
  76. package/dist/runtime/components/We/ImportMatchColumns.d.vue.ts +66 -0
  77. package/dist/runtime/components/We/ImportMatchColumns.vue +172 -0
  78. package/dist/runtime/components/We/ImportMatchColumns.vue.d.ts +66 -0
  79. package/dist/runtime/components/We/ImportPreviewResults.d.vue.ts +38 -0
  80. package/dist/runtime/components/We/ImportPreviewResults.vue +165 -0
  81. package/dist/runtime/components/We/ImportPreviewResults.vue.d.ts +38 -0
  82. package/dist/runtime/components/We/ImportSelectStart.d.vue.ts +47 -0
  83. package/dist/runtime/components/We/ImportSelectStart.vue +106 -0
  84. package/dist/runtime/components/We/ImportSelectStart.vue.d.ts +47 -0
  85. package/dist/runtime/components/We/Notification.d.vue.ts +7 -0
  86. package/dist/runtime/components/We/Notification.vue +49 -0
  87. package/dist/runtime/components/We/Notification.vue.d.ts +7 -0
  88. package/dist/runtime/components/We/S3Dropzone.d.vue.ts +17 -0
  89. package/dist/runtime/components/We/S3Dropzone.vue +527 -0
  90. package/dist/runtime/components/We/S3Dropzone.vue.d.ts +17 -0
  91. package/dist/runtime/components/We/Select.d.vue.ts +39 -0
  92. package/dist/runtime/components/We/Select.vue +354 -0
  93. package/dist/runtime/components/We/Select.vue.d.ts +39 -0
  94. package/dist/runtime/components/We/TipTap.d.vue.ts +26 -0
  95. package/dist/runtime/components/We/TipTap.vue +362 -0
  96. package/dist/runtime/components/We/TipTap.vue.d.ts +26 -0
  97. package/dist/runtime/components/We/datatable.props.d.ts +57 -0
  98. package/dist/runtime/components/We/datatable.props.js +60 -0
  99. package/dist/runtime/composables/datatable/useAutoFillHeight.d.ts +31 -0
  100. package/dist/runtime/composables/datatable/useAutoFillHeight.js +57 -0
  101. package/dist/runtime/composables/datatable/useDataTable.d.ts +33 -0
  102. package/dist/runtime/composables/datatable/useDataTable.js +161 -0
  103. package/dist/runtime/composables/datatable/useDatatableColumns.d.ts +12 -0
  104. package/dist/runtime/composables/datatable/useDatatableColumns.js +96 -0
  105. package/dist/runtime/composables/useApi.d.ts +56 -0
  106. package/dist/runtime/composables/useApi.js +230 -0
  107. package/dist/runtime/composables/useApiFetch.d.ts +2 -0
  108. package/dist/runtime/composables/useApiFetch.js +9 -0
  109. package/dist/runtime/composables/useApiUrl.d.ts +10 -0
  110. package/dist/runtime/composables/useApiUrl.js +37 -0
  111. package/dist/runtime/composables/useAuth.d.ts +9 -0
  112. package/dist/runtime/composables/useAuth.js +22 -0
  113. package/dist/runtime/composables/useBus.d.ts +8 -0
  114. package/dist/runtime/composables/useBus.js +18 -0
  115. package/dist/runtime/composables/useDateRangePresets.d.ts +21 -0
  116. package/dist/runtime/composables/useDateRangePresets.js +90 -0
  117. package/dist/runtime/composables/useForm.d.ts +29 -0
  118. package/dist/runtime/composables/useForm.js +74 -0
  119. package/dist/runtime/composables/useFormLock.d.ts +11 -0
  120. package/dist/runtime/composables/useFormLock.js +8 -0
  121. package/dist/runtime/composables/useFormWrapper.d.ts +16 -0
  122. package/dist/runtime/composables/useFormWrapper.js +36 -0
  123. package/dist/runtime/composables/useImportJob.d.ts +55 -0
  124. package/dist/runtime/composables/useImportJob.js +94 -0
  125. package/dist/runtime/composables/useLux.d.ts +1 -0
  126. package/dist/runtime/composables/useLux.js +8 -0
  127. package/dist/runtime/composables/useNotify.d.ts +12 -0
  128. package/dist/runtime/composables/useNotify.js +24 -0
  129. package/dist/runtime/composables/usePaginatedFetch.d.ts +24 -0
  130. package/dist/runtime/composables/usePaginatedFetch.js +154 -0
  131. package/dist/runtime/composables/useServerErrors.d.ts +16 -0
  132. package/dist/runtime/composables/useServerErrors.js +60 -0
  133. package/dist/runtime/composables/useValidators.d.ts +18 -0
  134. package/dist/runtime/composables/useValidators.js +56 -0
  135. package/dist/runtime/generator/code/dt.d.ts +8 -0
  136. package/dist/runtime/generator/code/dt.js +97 -0
  137. package/dist/runtime/generator/code/edit.d.ts +4 -0
  138. package/dist/runtime/generator/code/edit.js +41 -0
  139. package/dist/runtime/generator/code/form.d.ts +6 -0
  140. package/dist/runtime/generator/code/form.js +229 -0
  141. package/dist/runtime/generator/code/i18n.d.ts +5 -0
  142. package/dist/runtime/generator/code/i18n.js +43 -0
  143. package/dist/runtime/generator/code/index.d.ts +11 -0
  144. package/dist/runtime/generator/code/index.js +90 -0
  145. package/dist/runtime/generator/components/CodeSnippet.d.vue.ts +14 -0
  146. package/dist/runtime/generator/components/CodeSnippet.vue +49 -0
  147. package/dist/runtime/generator/components/CodeSnippet.vue.d.ts +14 -0
  148. package/dist/runtime/generator/components/Configuration.d.vue.ts +16 -0
  149. package/dist/runtime/generator/components/Configuration.vue +154 -0
  150. package/dist/runtime/generator/components/Configuration.vue.d.ts +16 -0
  151. package/dist/runtime/generator/components/GeneratorPage.d.vue.ts +50 -0
  152. package/dist/runtime/generator/components/GeneratorPage.vue +226 -0
  153. package/dist/runtime/generator/components/GeneratorPage.vue.d.ts +50 -0
  154. package/dist/runtime/generator/fs.d.ts +16 -0
  155. package/dist/runtime/generator/fs.js +79 -0
  156. package/dist/runtime/generator/index.d.vue.ts +52 -0
  157. package/dist/runtime/generator/index.vue +17 -0
  158. package/dist/runtime/generator/index.vue.d.ts +52 -0
  159. package/dist/runtime/internals/api.d.ts +3 -0
  160. package/dist/runtime/internals/api.js +16 -0
  161. package/dist/runtime/internals/bus.d.ts +1 -0
  162. package/dist/runtime/internals/bus.js +2 -0
  163. package/dist/runtime/internals/dt.d.ts +24 -0
  164. package/dist/runtime/internals/dt.js +57 -0
  165. package/dist/runtime/lang/en.json +211 -0
  166. package/dist/runtime/lang/it.json +211 -0
  167. package/dist/runtime/mixins/formValidator.d.ts +38 -0
  168. package/dist/runtime/mixins/formValidator.js +118 -0
  169. package/dist/runtime/plugins/api-legacy.d.ts +76 -0
  170. package/dist/runtime/plugins/api-legacy.js +11 -0
  171. package/dist/runtime/plugins/auth-legacy.d.ts +22 -0
  172. package/dist/runtime/plugins/auth-legacy.js +14 -0
  173. package/dist/runtime/plugins/bus-legacy.d.ts +6 -0
  174. package/dist/runtime/plugins/bus-legacy.js +9 -0
  175. package/dist/runtime/plugins/notify-legacy.d.ts +25 -0
  176. package/dist/runtime/plugins/notify-legacy.js +35 -0
  177. package/dist/runtime/plugins/portal.d.ts +2 -0
  178. package/dist/runtime/plugins/portal.js +5 -0
  179. package/dist/runtime/plugins/update-sanctum-app-config.d.ts +2 -0
  180. package/dist/runtime/plugins/update-sanctum-app-config.js +44 -0
  181. package/dist/runtime/plugins/vuetify-nuxt-icon.d.ts +4 -0
  182. package/dist/runtime/plugins/vuetify-nuxt-icon.js +30 -0
  183. package/dist/runtime/types/app-config.d.ts +24 -0
  184. package/dist/runtime/types/app-config.js +1 -0
  185. package/dist/runtime/types/icons.d.ts +82 -0
  186. package/dist/runtime/types/icons.js +84 -0
  187. package/dist/runtime/types/index.d.ts +2 -0
  188. package/dist/runtime/types/index.js +2 -0
  189. package/dist/runtime/types/module-options.d.ts +29 -0
  190. package/dist/runtime/types/module-options.js +0 -0
  191. package/dist/runtime/types/runtime-hooks.d.ts +17 -0
  192. package/dist/runtime/types/runtime-hooks.js +1 -0
  193. package/dist/runtime/utils/color.d.ts +10 -0
  194. package/dist/runtime/utils/color.js +38 -0
  195. package/dist/runtime/utils/file.d.ts +17 -0
  196. package/dist/runtime/utils/file.js +108 -0
  197. package/dist/runtime/utils/format.d.ts +1 -0
  198. package/dist/runtime/utils/format.js +14 -0
  199. package/dist/runtime/utils/make-enum.d.ts +15 -0
  200. package/dist/runtime/utils/make-enum.js +27 -0
  201. package/dist/runtime/utils/mergeDefaults.d.ts +1 -0
  202. package/dist/runtime/utils/mergeDefaults.js +18 -0
  203. package/dist/runtime/utils/object-to-formdata.d.ts +10 -0
  204. package/dist/runtime/utils/object-to-formdata.js +82 -0
  205. package/dist/runtime/utils/uuid.d.ts +1 -0
  206. package/dist/runtime/utils/uuid.js +9 -0
  207. package/dist/types.d.mts +9 -0
  208. package/package.json +92 -4
@@ -0,0 +1,51 @@
1
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
2
+ export default _default;
3
+ type __VLS_WithSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import("vue").DefineComponent<{}, {
7
+ $emit: (event: "update:modelValue", ...args: any[]) => void;
8
+ type: string;
9
+ locale: string;
10
+ mode: string;
11
+ rules: unknown[];
12
+ clearable: boolean;
13
+ readonly: boolean;
14
+ disabled: boolean;
15
+ color: string;
16
+ position: string;
17
+ max: string | Date;
18
+ min: string | Date;
19
+ range: boolean | Record<string, any>;
20
+ multiCalendars: string | number | boolean;
21
+ showSeconds: boolean;
22
+ minDate: string | Date;
23
+ maxDate: string | Date;
24
+ minTime: string | Date;
25
+ maxTime: string | Date;
26
+ startDate: string | Date;
27
+ monthChangeOnArrows: boolean;
28
+ disableDate: boolean;
29
+ title?: string | undefined;
30
+ modelValue?: string | unknown[] | null | undefined;
31
+ displayFormat?: string | undefined;
32
+ modelFormat?: string | undefined;
33
+ allowedDates?: unknown[] | undefined;
34
+ disabledDates?: unknown[] | undefined;
35
+ presetDates?: unknown[] | undefined;
36
+ textColor?: string | undefined;
37
+ $props: any;
38
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
39
+ type __VLS_Slots = {
40
+ activator?: ((props: {
41
+ sheet: boolean;
42
+ readonly: any;
43
+ disabled: any;
44
+ }) => any) | undefined;
45
+ } & {
46
+ activator?: ((props: {
47
+ sheet: boolean;
48
+ readonly: any;
49
+ disabled: any;
50
+ }) => any) | undefined;
51
+ };
@@ -0,0 +1,51 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ selection: {
3
+ type: ArrayConstructor;
4
+ default: () => never[];
5
+ };
6
+ actions: {
7
+ type: ArrayConstructor;
8
+ default: () => never[];
9
+ };
10
+ loading: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ extraActions: {
15
+ type: ArrayConstructor;
16
+ default: () => never[];
17
+ };
18
+ }>, {}, {}, {
19
+ mobile(): false;
20
+ bulk(): boolean;
21
+ label(): string;
22
+ allActions(): unknown[];
23
+ items(): any[];
24
+ }, {
25
+ action(a: any): void;
26
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "action"[], "action", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
27
+ selection: {
28
+ type: ArrayConstructor;
29
+ default: () => never[];
30
+ };
31
+ actions: {
32
+ type: ArrayConstructor;
33
+ default: () => never[];
34
+ };
35
+ loading: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
39
+ extraActions: {
40
+ type: ArrayConstructor;
41
+ default: () => never[];
42
+ };
43
+ }>> & Readonly<{
44
+ onAction?: ((...args: any[]) => any) | undefined;
45
+ }>, {
46
+ loading: boolean;
47
+ actions: unknown[];
48
+ extraActions: unknown[];
49
+ selection: unknown[];
50
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
51
+ export default _default;
@@ -0,0 +1,106 @@
1
+ <script>
2
+ export default {
3
+ // mixins: [mobileMixinFrom, i18nMixin],
4
+ props: {
5
+ selection: {
6
+ type: Array,
7
+ default: () => []
8
+ },
9
+ actions: {
10
+ type: Array,
11
+ default: () => []
12
+ },
13
+ loading: {
14
+ type: Boolean,
15
+ default: false
16
+ },
17
+ extraActions: {
18
+ type: Array,
19
+ default: () => []
20
+ }
21
+ },
22
+ emits: ["action"],
23
+ computed: {
24
+ mobile() {
25
+ return false;
26
+ },
27
+ bulk() {
28
+ return this.selection.length === 0;
29
+ },
30
+ label() {
31
+ if (this.bulk) {
32
+ return this.$t("dt.actions");
33
+ }
34
+ const l = this.selection.length;
35
+ return this.$t("dt.itemsSelected", l);
36
+ },
37
+ allActions() {
38
+ const notOnServerExtraActions = this.extraActions.filter((ea) => !this.actions.find((a) => a.id === ea.id));
39
+ return this.actions.concat(
40
+ notOnServerExtraActions.map((a) => ({ ...a, extra: true }))
41
+ );
42
+ },
43
+ items() {
44
+ const items = this.allActions.filter((a) => {
45
+ if (this.bulk) {
46
+ return a.bulk;
47
+ }
48
+ return a.multiple;
49
+ });
50
+ return items.map((i) => {
51
+ const iconProps = { color: i.color };
52
+ const itemContentProps = {
53
+ class: {
54
+ [`text-${i.color}`]: !!i.color
55
+ }
56
+ };
57
+ const label = this.bulk ? i.bulk_label || i.label : i.label;
58
+ return { ...i, iconProps, itemContentProps, label };
59
+ });
60
+ }
61
+ },
62
+ methods: {
63
+ action(a) {
64
+ this.$emit("action", a);
65
+ }
66
+ }
67
+ };
68
+ </script>
69
+
70
+ <template>
71
+ <v-menu v-if="items.length">
72
+ <template #activator="{ props }">
73
+ <v-btn
74
+ :loading="loading"
75
+ :class="!mobile ? 'mr-2' : 'mt-2 order-last flex-grow-1'"
76
+ variant="outlined"
77
+ v-bind="props"
78
+ >
79
+ {{ label }} <v-icon end>
80
+ $dropdown
81
+ </v-icon>
82
+ </v-btn>
83
+ </template>
84
+ <v-list density="compact">
85
+ <v-list-item
86
+ v-for="(item, index) in items"
87
+ :key="index"
88
+ @click="action(item)"
89
+ >
90
+ <template
91
+ v-if="item.icon"
92
+ #prepend
93
+ >
94
+ <v-icon v-bind="item.iconProps">
95
+ {{ item.icon }}
96
+ </v-icon>
97
+ </template>
98
+ <v-list-item-title
99
+ v-bind="item.itemContentProps"
100
+ >
101
+ {{ item.label }}
102
+ </v-list-item-title>
103
+ </v-list-item>
104
+ </v-list>
105
+ </v-menu>
106
+ </template>
@@ -0,0 +1,51 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ selection: {
3
+ type: ArrayConstructor;
4
+ default: () => never[];
5
+ };
6
+ actions: {
7
+ type: ArrayConstructor;
8
+ default: () => never[];
9
+ };
10
+ loading: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ extraActions: {
15
+ type: ArrayConstructor;
16
+ default: () => never[];
17
+ };
18
+ }>, {}, {}, {
19
+ mobile(): false;
20
+ bulk(): boolean;
21
+ label(): string;
22
+ allActions(): unknown[];
23
+ items(): any[];
24
+ }, {
25
+ action(a: any): void;
26
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "action"[], "action", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
27
+ selection: {
28
+ type: ArrayConstructor;
29
+ default: () => never[];
30
+ };
31
+ actions: {
32
+ type: ArrayConstructor;
33
+ default: () => never[];
34
+ };
35
+ loading: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
39
+ extraActions: {
40
+ type: ArrayConstructor;
41
+ default: () => never[];
42
+ };
43
+ }>> & Readonly<{
44
+ onAction?: ((...args: any[]) => any) | undefined;
45
+ }>, {
46
+ loading: boolean;
47
+ actions: unknown[];
48
+ extraActions: unknown[];
49
+ selection: unknown[];
50
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
51
+ export default _default;
@@ -0,0 +1,8 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ offColor: string;
3
+ value?: string | number | boolean | Record<string, any> | undefined;
4
+ item?: Record<string, any> | undefined;
5
+ field?: Record<string, any> | undefined;
6
+ $props: any;
7
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ export default _default;
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <v-icon
3
+ :icon="icon"
4
+ :color="color"
5
+ size="large"
6
+ />
7
+ </template>
8
+
9
+ <script setup>
10
+ import { computed } from "vue";
11
+ const props = defineProps({
12
+ item: Object,
13
+ value: [Object, String, Number, Boolean],
14
+ field: Object,
15
+ offColor: {
16
+ type: String,
17
+ default: "grey-lighten-1"
18
+ }
19
+ });
20
+ const color = computed(() => {
21
+ return props.value ? "success" : props.offColor;
22
+ });
23
+ const icon = computed(() => {
24
+ return props.value ? "$booleanOn" : "$booleanOff";
25
+ });
26
+ </script>
@@ -0,0 +1,8 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ offColor: string;
3
+ value?: string | number | boolean | Record<string, any> | undefined;
4
+ item?: Record<string, any> | undefined;
5
+ field?: Record<string, any> | undefined;
6
+ $props: any;
7
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ export default _default;
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ density?: 'default' | 'comfortable' | 'compact';
3
+ };
4
+ declare var __VLS_10: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_10) => any;
7
+ };
8
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
9
+ density: "default" | "comfortable" | "compact";
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <v-card
3
+ v-bind="$attrs"
4
+ variant="flat"
5
+ :class="containerClass"
6
+ border="sm"
7
+ >
8
+ <v-defaults-provider :defaults>
9
+ <slot />
10
+ </v-defaults-provider>
11
+ </v-card>
12
+ </template>
13
+
14
+ <script setup>
15
+ import { computed } from "vue";
16
+ import { useDefaults } from "vuetify";
17
+ const props = defineProps({
18
+ density: { type: String, required: false, default: "default" }
19
+ });
20
+ const { density } = useDefaults(props, "WeDtCardFilterContainer");
21
+ const containerClass = computed(() => ({
22
+ "d-flex align-center cursor-pointer": true,
23
+ "we-dt-card-filter-container": true,
24
+ [`we-dt-card-filter-container--density-${density}`]: !!density
25
+ }));
26
+ const defaults = computed(() => {
27
+ return {
28
+ VBtn: {
29
+ density
30
+ },
31
+ VChip: {
32
+ density
33
+ }
34
+ };
35
+ });
36
+ </script>
37
+
38
+ <style>
39
+ .we-dt-card-filter-container {
40
+ overflow: hidden;
41
+ min-height: 48px;
42
+ max-height: 53px;
43
+ }
44
+ .we-dt-card-filter-container.we-dt-card-filter-container--density-comfortable {
45
+ min-height: 40px;
46
+ max-height: 45px;
47
+ }
48
+ .we-dt-card-filter-container.we-dt-card-filter-container--density-comfortable > .v-card-text {
49
+ padding-left: 8px;
50
+ padding-right: 8px;
51
+ }
52
+ .we-dt-card-filter-container.we-dt-card-filter-container--density-compact {
53
+ min-height: 32px;
54
+ max-height: 37px;
55
+ }
56
+ .we-dt-card-filter-container.we-dt-card-filter-container--density-compact > .v-card-text {
57
+ padding-left: 8px;
58
+ padding-right: 8px;
59
+ }
60
+ </style>
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ density?: 'default' | 'comfortable' | 'compact';
3
+ };
4
+ declare var __VLS_10: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_10) => any;
7
+ };
8
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
9
+ density: "default" | "comfortable" | "compact";
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ label: string;
3
+ emitRawValue?: boolean;
4
+ trueValue?: unknown;
5
+ falseValue?: unknown;
6
+ };
7
+ declare const model: import("vue").ModelRef<any, string, any, any>;
8
+ type __VLS_PublicProps = __VLS_Props & {
9
+ modelValue?: typeof model['value'];
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ "update:modelValue": (value: any) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
14
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ export default _default;
@@ -0,0 +1,47 @@
1
+ <template>
2
+ <WeDtCardFilterContainer
3
+ class="pa-1 ga-1 pr-3"
4
+ @click="toggle"
5
+ >
6
+ <v-checkbox-btn
7
+ style="font-size: 1rem;"
8
+ :model-value="isSelected"
9
+ @click.stop="toggle"
10
+ />
11
+
12
+ <WeBoldText
13
+ :bold="isSelected"
14
+ class="text-body-2"
15
+ :class="{
16
+ 'text-primary': isSelected
17
+ }"
18
+ >
19
+ {{ label }}
20
+ </WeBoldText>
21
+ </WeDtCardFilterContainer>
22
+ </template>
23
+
24
+ <script setup>
25
+ import { computed } from "vue";
26
+ const { label, emitRawValue = false, trueValue = true, falseValue = null } = defineProps({
27
+ label: { type: String, required: true },
28
+ emitRawValue: { type: Boolean, required: false },
29
+ trueValue: { type: null, required: false },
30
+ falseValue: { type: null, required: false }
31
+ });
32
+ const model = defineModel({
33
+ type: [Object, String, Number, Boolean, null],
34
+ default: () => null
35
+ });
36
+ const isSelected = computed(() => {
37
+ const val = emitRawValue ? model.value : model.value?.value;
38
+ return val === trueValue;
39
+ });
40
+ function toggle() {
41
+ const val = isSelected.value ? falseValue : trueValue;
42
+ model.value = emitRawValue ? val : {
43
+ operator: "=",
44
+ value: val
45
+ };
46
+ }
47
+ </script>
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ label: string;
3
+ emitRawValue?: boolean;
4
+ trueValue?: unknown;
5
+ falseValue?: unknown;
6
+ };
7
+ declare const model: import("vue").ModelRef<any, string, any, any>;
8
+ type __VLS_PublicProps = __VLS_Props & {
9
+ modelValue?: typeof model['value'];
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ "update:modelValue": (value: any) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
14
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ export default _default;
@@ -0,0 +1,7 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ items: unknown[];
3
+ itemValue: string;
4
+ itemText: string;
5
+ $props: any;
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
+ export default _default;
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <v-chip-group
3
+ v-bind="$attrs"
4
+ filter
5
+ column
6
+ >
7
+ <v-chip
8
+ v-for="i in item"
9
+ :key="i[itemValue]"
10
+ :value="i[itemValue]"
11
+ variant="outlined"
12
+ >
13
+ {{ i[itemText] }}
14
+ </v-chip>
15
+ </v-chip-group>
16
+ </template>
17
+
18
+ <script setup>
19
+ import { ref } from "vue";
20
+ const props = defineProps({
21
+ items: {
22
+ type: Array,
23
+ required: true
24
+ },
25
+ itemText: {
26
+ type: String,
27
+ default: "text"
28
+ },
29
+ itemValue: {
30
+ type: String,
31
+ default: "value"
32
+ }
33
+ });
34
+ const item = ref(props.items);
35
+ </script>
@@ -0,0 +1,7 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ items: unknown[];
3
+ itemValue: string;
4
+ itemText: string;
5
+ $props: any;
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import type { DtFilterSelectItem } from './dt.types.js';
2
+ type __VLS_Props = {
3
+ items?: DtFilterSelectItem[];
4
+ all?: boolean | string;
5
+ emitRawValue?: boolean;
6
+ allIcon?: string;
7
+ showIcons?: boolean;
8
+ };
9
+ declare const model: import("vue").ModelRef<any, string, any, any>;
10
+ type __VLS_PublicProps = __VLS_Props & {
11
+ modelValue?: typeof model['value'];
12
+ };
13
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ "update:modelValue": (value: any) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
16
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ export default _default;
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <WeDtCardFilterContainer
3
+ class="pa-1 ga-1 d-flex flex-nowrap overflow-x-auto"
4
+ >
5
+ <v-chip
6
+ v-for="item in allItems"
7
+ :key="item.value"
8
+ size="large"
9
+ rounded="lg"
10
+ :variant="isSelected(item) ? 'tonal' : 'text'"
11
+ :color="isSelected(item) ? item.color ?? 'primary' : void 0"
12
+ :prepend-icon="showIcons ? item.icon : void 0"
13
+ @click="select(item)"
14
+ >
15
+ <WeBoldText
16
+ class="text-body-2"
17
+ :bold="isSelected(item)"
18
+ >
19
+ {{ itemLabel(item) }}
20
+ </WeBoldText>
21
+ </v-chip>
22
+ </WeDtCardFilterContainer>
23
+ </template>
24
+
25
+ <script setup>
26
+ import { useI18n } from "#imports";
27
+ import { computed } from "vue";
28
+ const { items = [], all = true, emitRawValue = false, allIcon = void 0, showIcons = false } = defineProps({
29
+ items: { type: Array, required: false },
30
+ all: { type: [Boolean, String], required: false },
31
+ emitRawValue: { type: Boolean, required: false },
32
+ allIcon: { type: String, required: false },
33
+ showIcons: { type: Boolean, required: false }
34
+ });
35
+ const { t } = useI18n();
36
+ const model = defineModel({
37
+ type: [Object, String],
38
+ default: () => null
39
+ });
40
+ const allItems = computed(() => {
41
+ if (all === false) {
42
+ return items;
43
+ }
44
+ const allItem = {
45
+ text: typeof all === "string" ? all : t("dt.clusterFilter.all"),
46
+ value: null,
47
+ color: void 0,
48
+ icon: allIcon
49
+ };
50
+ return [allItem, ...items];
51
+ });
52
+ function itemLabel(s) {
53
+ return s.title ?? s.text;
54
+ }
55
+ function select(s) {
56
+ model.value = emitRawValue ? s.value : {
57
+ operator: Array.isArray(s.value) ? "in" : "=",
58
+ value: s.value
59
+ };
60
+ }
61
+ function isSelected(item) {
62
+ const selectedValue = (emitRawValue ? model.value : model.value?.value) ?? null;
63
+ if (Array.isArray(selectedValue) && Array.isArray(item.value)) {
64
+ return selectedValue.every((s) => item.value.includes(s));
65
+ }
66
+ return selectedValue === item.value;
67
+ }
68
+ </script>
@@ -0,0 +1,18 @@
1
+ import type { DtFilterSelectItem } from './dt.types.js';
2
+ type __VLS_Props = {
3
+ items?: DtFilterSelectItem[];
4
+ all?: boolean | string;
5
+ emitRawValue?: boolean;
6
+ allIcon?: string;
7
+ showIcons?: boolean;
8
+ };
9
+ declare const model: import("vue").ModelRef<any, string, any, any>;
10
+ type __VLS_PublicProps = __VLS_Props & {
11
+ modelValue?: typeof model['value'];
12
+ };
13
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ "update:modelValue": (value: any) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
16
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ export default _default;
@@ -0,0 +1,19 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ item: ObjectConstructor;
3
+ value: (ObjectConstructor | ArrayConstructor | NumberConstructor | StringConstructor)[];
4
+ field: ObjectConstructor;
5
+ }>, {}, {}, {
6
+ dataset(): any;
7
+ component(): any;
8
+ props(): any;
9
+ values(): {
10
+ value: any;
11
+ text: any;
12
+ props: any;
13
+ }[];
14
+ }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ item: ObjectConstructor;
16
+ value: (ObjectConstructor | ArrayConstructor | NumberConstructor | StringConstructor)[];
17
+ field: ObjectConstructor;
18
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
19
+ export default _default;