@vc-shell/framework 1.0.39 → 1.0.40

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 (212) hide show
  1. package/core/composables/usePermissions/index.ts +1 -1
  2. package/core/composables/useSettings/index.ts +31 -5
  3. package/core/types/index.ts +12 -12
  4. package/dist/core/composables/useSettings/index.d.ts +10 -1
  5. package/dist/core/composables/useSettings/index.d.ts.map +1 -1
  6. package/dist/core/types/index.d.ts.map +1 -1
  7. package/dist/framework.js +69 -69
  8. package/dist/framework.js.map +1 -1
  9. package/dist/index.d.ts +3 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/shared/blade-navigation/types/index.d.ts.map +1 -1
  12. package/dist/style.css +1 -1
  13. package/dist/tsconfig.tsbuildinfo +1 -1
  14. package/dist/ui/components/atoms/vc-badge/index.d.ts +5 -0
  15. package/dist/ui/components/atoms/vc-badge/index.d.ts.map +1 -0
  16. package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts +28 -0
  17. package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts.map +1 -0
  18. package/dist/{components → ui/components}/atoms/vc-badge/vc-badge.stories.d.ts +0 -0
  19. package/dist/ui/components/atoms/vc-badge/vc-badge.stories.d.ts.map +1 -0
  20. package/dist/ui/components/atoms/vc-button/index.d.ts +5 -0
  21. package/dist/ui/components/atoms/vc-button/index.d.ts.map +1 -0
  22. package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts +28 -0
  23. package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts.map +1 -0
  24. package/dist/{components → ui/components}/atoms/vc-button/vc-button.stories.d.ts +0 -0
  25. package/dist/ui/components/atoms/vc-button/vc-button.stories.d.ts.map +1 -0
  26. package/dist/{components → ui/components}/atoms/vc-checkbox/vc-checkbox.stories.d.ts +0 -0
  27. package/dist/ui/components/atoms/vc-checkbox/vc-checkbox.stories.d.ts.map +1 -0
  28. package/dist/{components → ui/components}/atoms/vc-container/vc-container.stories.d.ts +0 -0
  29. package/dist/ui/components/atoms/vc-container/vc-container.stories.d.ts.map +1 -0
  30. package/dist/{components → ui/components}/atoms/vc-hint/vc-hint.stories.d.ts +0 -0
  31. package/dist/ui/components/atoms/vc-hint/vc-hint.stories.d.ts.map +1 -0
  32. package/dist/{components → ui/components}/atoms/vc-icon/vc-icon.stories.d.ts +0 -0
  33. package/dist/ui/components/atoms/vc-icon/vc-icon.stories.d.ts.map +1 -0
  34. package/dist/{components → ui/components}/atoms/vc-image/vc-image.stories.d.ts +0 -0
  35. package/dist/ui/components/atoms/vc-image/vc-image.stories.d.ts.map +1 -0
  36. package/dist/{components → ui/components}/atoms/vc-label/vc-label.stories.d.ts +0 -0
  37. package/dist/ui/components/atoms/vc-label/vc-label.stories.d.ts.map +1 -0
  38. package/dist/{components → ui/components}/atoms/vc-link/vc-link.stories.d.ts +0 -0
  39. package/dist/ui/components/atoms/vc-link/vc-link.stories.d.ts.map +1 -0
  40. package/dist/{components → ui/components}/atoms/vc-progress/vc-progress.stories.d.ts +0 -0
  41. package/dist/ui/components/atoms/vc-progress/vc-progress.stories.d.ts.map +1 -0
  42. package/dist/{components → ui/components}/atoms/vc-status/vc-status.stories.d.ts +0 -0
  43. package/dist/ui/components/atoms/vc-status/vc-status.stories.d.ts.map +1 -0
  44. package/dist/{components → ui/components}/atoms/vc-switch/vc-switch.stories.d.ts +0 -0
  45. package/dist/ui/components/atoms/vc-switch/vc-switch.stories.d.ts.map +1 -0
  46. package/dist/{components → ui/components}/index.d.ts +4 -3
  47. package/dist/ui/components/index.d.ts.map +1 -0
  48. package/dist/{components → ui/components}/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts +0 -0
  49. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts.map +1 -0
  50. package/dist/{components → ui/components}/molecules/vc-form/vc-form.stories.d.ts +0 -0
  51. package/dist/ui/components/molecules/vc-form/vc-form.stories.d.ts.map +1 -0
  52. package/dist/ui/components/molecules/vc-input/index.d.ts +5 -0
  53. package/dist/ui/components/molecules/vc-input/index.d.ts.map +1 -0
  54. package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts +140 -0
  55. package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts.map +1 -0
  56. package/dist/ui/components/molecules/vc-input-currency/index.d.ts +5 -0
  57. package/dist/ui/components/molecules/vc-input-currency/index.d.ts.map +1 -0
  58. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts +124 -0
  59. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts.map +1 -0
  60. package/dist/{components → ui/components}/molecules/vc-pagination/vc-pagination.stories.d.ts +0 -0
  61. package/dist/ui/components/molecules/vc-pagination/vc-pagination.stories.d.ts.map +1 -0
  62. package/dist/{components → ui/components}/molecules/vc-rating/vc-rating.stories.d.ts +0 -0
  63. package/dist/ui/components/molecules/vc-rating/vc-rating.stories.d.ts.map +1 -0
  64. package/dist/ui/components/molecules/vc-select/index.d.ts +5 -0
  65. package/dist/ui/components/molecules/vc-select/index.d.ts.map +1 -0
  66. package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts +207 -0
  67. package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts.map +1 -0
  68. package/dist/{components → ui/components}/molecules/vc-textarea/vc-textarea.stories.d.ts +0 -0
  69. package/dist/ui/components/molecules/vc-textarea/vc-textarea.stories.d.ts.map +1 -0
  70. package/dist/{components → ui/components}/organisms/vc-app/vc-app.stories.d.ts +0 -0
  71. package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts.map +1 -0
  72. package/dist/{components → ui/components}/organisms/vc-blade/vc-blade.stories.d.ts +0 -0
  73. package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts.map +1 -0
  74. package/dist/{components → ui/components}/organisms/vc-login-form/vc-login-form.stories.d.ts +0 -0
  75. package/dist/ui/components/organisms/vc-login-form/vc-login-form.stories.d.ts.map +1 -0
  76. package/dist/{components → ui/components}/organisms/vc-popup/vc-popup.stories.d.ts +0 -0
  77. package/dist/ui/components/organisms/vc-popup/vc-popup.stories.d.ts.map +1 -0
  78. package/dist/{components → ui/components}/organisms/vc-table/vc-table.stories.d.ts +0 -0
  79. package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts.map +1 -0
  80. package/dist/ui/types/index.d.ts +13 -0
  81. package/dist/ui/types/index.d.ts.map +1 -0
  82. package/dist/ui/types/ts-helpers.d.ts +13 -0
  83. package/dist/ui/types/ts-helpers.d.ts.map +1 -0
  84. package/dist/vite.config.d.ts.map +1 -1
  85. package/package.json +27 -10
  86. package/shared/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +9 -9
  87. package/shared/assets/components/assets-details/assets-details.vue +12 -12
  88. package/shared/blade-navigation/composables/useBladeNavigation/index.ts +4 -4
  89. package/shared/blade-navigation/types/index.ts +25 -25
  90. package/tailwind.config.js +4 -3
  91. package/ui/components/atoms/vc-badge/index.ts +7 -0
  92. package/ui/components/atoms/vc-badge/vc-badge-model.ts +30 -0
  93. package/{components → ui/components}/atoms/vc-badge/vc-badge.stories.ts +0 -0
  94. package/ui/components/atoms/vc-badge/vc-badge.vue +57 -0
  95. package/ui/components/atoms/vc-button/index.ts +7 -0
  96. package/ui/components/atoms/vc-button/vc-button-model.ts +30 -0
  97. package/{components → ui/components}/atoms/vc-button/vc-button.stories.ts +0 -0
  98. package/{components → ui/components}/atoms/vc-button/vc-button.vue +54 -54
  99. package/{components → ui/components}/atoms/vc-card/vc-card.vue +15 -15
  100. package/{components → ui/components}/atoms/vc-checkbox/vc-checkbox.stories.ts +0 -0
  101. package/{components → ui/components}/atoms/vc-checkbox/vc-checkbox.vue +21 -21
  102. package/{components → ui/components}/atoms/vc-col/vc-col.vue +2 -2
  103. package/{components → ui/components}/atoms/vc-container/vc-container.stories.ts +0 -0
  104. package/{components → ui/components}/atoms/vc-container/vc-container.vue +21 -19
  105. package/{components → ui/components}/atoms/vc-hint/vc-hint.stories.ts +0 -0
  106. package/{components → ui/components}/atoms/vc-hint/vc-hint.vue +1 -1
  107. package/{components → ui/components}/atoms/vc-icon/vc-icon.stories.ts +0 -0
  108. package/{components → ui/components}/atoms/vc-icon/vc-icon.vue +1 -1
  109. package/{components → ui/components}/atoms/vc-image/vc-image.stories.ts +0 -0
  110. package/{components → ui/components}/atoms/vc-image/vc-image.vue +9 -9
  111. package/{components → ui/components}/atoms/vc-info-row/vc-info-row.vue +3 -3
  112. package/{components → ui/components}/atoms/vc-label/vc-label.stories.ts +0 -0
  113. package/{components → ui/components}/atoms/vc-label/vc-label.vue +6 -6
  114. package/{components → ui/components}/atoms/vc-link/vc-link.stories.ts +0 -0
  115. package/{components → ui/components}/atoms/vc-link/vc-link.vue +3 -3
  116. package/ui/components/atoms/vc-loading/vc-loading.vue +33 -0
  117. package/{components → ui/components}/atoms/vc-progress/vc-progress.stories.ts +0 -0
  118. package/{components → ui/components}/atoms/vc-progress/vc-progress.vue +2 -2
  119. package/{components → ui/components}/atoms/vc-row/vc-row.vue +1 -1
  120. package/{components → ui/components}/atoms/vc-status/vc-status.stories.ts +0 -0
  121. package/{components → ui/components}/atoms/vc-status/vc-status.vue +4 -4
  122. package/{components → ui/components}/atoms/vc-status-icon/vc-status-icon.vue +3 -3
  123. package/{components → ui/components}/atoms/vc-switch/vc-switch.stories.ts +0 -0
  124. package/{components → ui/components}/atoms/vc-switch/vc-switch.vue +10 -10
  125. package/{components → ui/components}/atoms/vc-widget/vc-widget.vue +12 -12
  126. package/{components → ui/components}/index.ts +4 -3
  127. package/{components → ui/components}/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue +17 -17
  128. package/{components → ui/components}/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.ts +0 -0
  129. package/{components → ui/components}/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +1 -1
  130. package/{components/molecules/vc-input → ui/components/molecules/vc-currency-input}/vc-input.vue +30 -37
  131. package/{components → ui/components}/molecules/vc-editor/vc-editor.vue +4 -4
  132. package/{components → ui/components}/molecules/vc-file-upload/vc-file-upload.vue +6 -6
  133. package/{components → ui/components}/molecules/vc-form/vc-form.stories.ts +0 -0
  134. package/{components → ui/components}/molecules/vc-form/vc-form.vue +0 -0
  135. package/ui/components/molecules/vc-input/index.ts +8 -0
  136. package/ui/components/molecules/vc-input/vc-input-model.ts +150 -0
  137. package/ui/components/molecules/vc-input/vc-input.vue +324 -0
  138. package/ui/components/molecules/vc-input-currency/index.ts +8 -0
  139. package/ui/components/molecules/vc-input-currency/vc-input-currency-model.ts +128 -0
  140. package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +86 -0
  141. package/{components → ui/components}/molecules/vc-multivalue/vc-multivalue.vue +41 -41
  142. package/{components → ui/components}/molecules/vc-notification/vc-notification.vue +5 -5
  143. package/{components → ui/components}/molecules/vc-pagination/vc-pagination.stories.ts +0 -0
  144. package/{components → ui/components}/molecules/vc-pagination/vc-pagination.vue +24 -24
  145. package/{components → ui/components}/molecules/vc-rating/vc-rating.stories.ts +0 -0
  146. package/{components → ui/components}/molecules/vc-rating/vc-rating.vue +6 -6
  147. package/ui/components/molecules/vc-select/index.ts +7 -0
  148. package/ui/components/molecules/vc-select/vc-select-model.ts +216 -0
  149. package/ui/components/molecules/vc-select/vc-select.vue +727 -0
  150. package/{components → ui/components}/molecules/vc-slider/vc-slider.vue +12 -12
  151. package/{components → ui/components}/molecules/vc-textarea/vc-textarea.stories.ts +0 -0
  152. package/{components → ui/components}/molecules/vc-textarea/vc-textarea.vue +17 -17
  153. package/{components → ui/components}/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +20 -16
  154. package/{components → ui/components}/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +31 -31
  155. package/{components → ui/components}/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +9 -9
  156. package/{components → ui/components}/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +11 -11
  157. package/{components → ui/components}/organisms/vc-app/vc-app.stories.ts +0 -0
  158. package/{components → ui/components}/organisms/vc-app/vc-app.vue +9 -11
  159. package/{components → ui/components}/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +10 -10
  160. package/{components → ui/components}/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +17 -17
  161. package/{components → ui/components}/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +4 -4
  162. package/{components → ui/components}/organisms/vc-blade/vc-blade.stories.ts +0 -0
  163. package/{components → ui/components}/organisms/vc-blade/vc-blade.vue +5 -5
  164. package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +426 -0
  165. package/{components → ui/components}/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +12 -12
  166. package/{components → ui/components}/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +9 -9
  167. package/{components → ui/components}/organisms/vc-gallery/vc-gallery.vue +6 -6
  168. package/{components → ui/components}/organisms/vc-login-form/vc-login-form.stories.ts +6 -6
  169. package/{components → ui/components}/organisms/vc-login-form/vc-login-form.vue +5 -5
  170. package/{components → ui/components}/organisms/vc-popup/vc-popup.stories.ts +0 -0
  171. package/{components → ui/components}/organisms/vc-popup/vc-popup.vue +13 -13
  172. package/{components → ui/components}/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +6 -6
  173. package/{components → ui/components}/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue +3 -3
  174. package/{components → ui/components}/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +13 -13
  175. package/{components → ui/components}/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +23 -23
  176. package/{components → ui/components}/organisms/vc-table/vc-table.stories.ts +3 -3
  177. package/{components → ui/components}/organisms/vc-table/vc-table.vue +42 -42
  178. package/ui/types/index.ts +38 -0
  179. package/ui/types/ts-helpers.ts +46 -0
  180. package/components/atoms/vc-badge/vc-badge.vue +0 -63
  181. package/components/atoms/vc-loading/vc-loading.vue +0 -30
  182. package/components/molecules/vc-input/vc-input.stories.ts +0 -26
  183. package/components/molecules/vc-select/vc-select.stories.ts +0 -25
  184. package/components/molecules/vc-select/vc-select.vue +0 -402
  185. package/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +0 -292
  186. package/dist/components/atoms/vc-badge/vc-badge.stories.d.ts.map +0 -1
  187. package/dist/components/atoms/vc-button/vc-button.stories.d.ts.map +0 -1
  188. package/dist/components/atoms/vc-checkbox/vc-checkbox.stories.d.ts.map +0 -1
  189. package/dist/components/atoms/vc-container/vc-container.stories.d.ts.map +0 -1
  190. package/dist/components/atoms/vc-hint/vc-hint.stories.d.ts.map +0 -1
  191. package/dist/components/atoms/vc-icon/vc-icon.stories.d.ts.map +0 -1
  192. package/dist/components/atoms/vc-image/vc-image.stories.d.ts.map +0 -1
  193. package/dist/components/atoms/vc-label/vc-label.stories.d.ts.map +0 -1
  194. package/dist/components/atoms/vc-link/vc-link.stories.d.ts.map +0 -1
  195. package/dist/components/atoms/vc-progress/vc-progress.stories.d.ts.map +0 -1
  196. package/dist/components/atoms/vc-status/vc-status.stories.d.ts.map +0 -1
  197. package/dist/components/atoms/vc-switch/vc-switch.stories.d.ts.map +0 -1
  198. package/dist/components/index.d.ts.map +0 -1
  199. package/dist/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts.map +0 -1
  200. package/dist/components/molecules/vc-form/vc-form.stories.d.ts.map +0 -1
  201. package/dist/components/molecules/vc-input/vc-input.stories.d.ts +0 -7
  202. package/dist/components/molecules/vc-input/vc-input.stories.d.ts.map +0 -1
  203. package/dist/components/molecules/vc-pagination/vc-pagination.stories.d.ts.map +0 -1
  204. package/dist/components/molecules/vc-rating/vc-rating.stories.d.ts.map +0 -1
  205. package/dist/components/molecules/vc-select/vc-select.stories.d.ts +0 -7
  206. package/dist/components/molecules/vc-select/vc-select.stories.d.ts.map +0 -1
  207. package/dist/components/molecules/vc-textarea/vc-textarea.stories.d.ts.map +0 -1
  208. package/dist/components/organisms/vc-app/vc-app.stories.d.ts.map +0 -1
  209. package/dist/components/organisms/vc-blade/vc-blade.stories.d.ts.map +0 -1
  210. package/dist/components/organisms/vc-login-form/vc-login-form.stories.d.ts.map +0 -1
  211. package/dist/components/organisms/vc-popup/vc-popup.stories.d.ts.map +0 -1
  212. package/dist/components/organisms/vc-table/vc-table.stories.d.ts.map +0 -1
@@ -0,0 +1,207 @@
1
+ import { VNode } from "vue";
2
+ export type OptionProp = ((option: string | Record<string, unknown>) => string) | string | undefined;
3
+ export interface VcSelectProps {
4
+ /**
5
+ * Name of select
6
+ */
7
+ name?: string | undefined;
8
+ /**
9
+ * Model of the component; Must be Array if using 'multiple' prop; Use this property with a listener for 'update:modelValue' event OR use v-model directive
10
+ */
11
+ modelValue: any;
12
+ /**
13
+ * Try to map labels of model from 'options' Array; If you are using emit-value you will probably need to use map-options to display the label text in the select field rather than the value;
14
+ * Default value: true
15
+ */
16
+ mapOptions?: boolean | undefined;
17
+ /**
18
+ * Does field have validation errors?
19
+ */
20
+ error?: boolean | undefined;
21
+ /**
22
+ * Validation error message (gets displayed only if 'error' is set to 'true')
23
+ */
24
+ errorMessage?: string | undefined;
25
+ /**
26
+ * Select label
27
+ */
28
+ label?: string | undefined;
29
+ /**
30
+ * Select description (hint) text below input component
31
+ */
32
+ hint?: string | undefined;
33
+ /**
34
+ * Prefix
35
+ */
36
+ prefix?: string | undefined;
37
+ /**
38
+ * Suffix
39
+ */
40
+ suffix?: string | undefined;
41
+ /**
42
+ * Signals the user a process is in progress by displaying a spinner
43
+ */
44
+ loading?: boolean | undefined;
45
+ /**
46
+ * Appends clearable icon when a value is set;
47
+ * When clicked, model becomes null
48
+ */
49
+ clearable?: boolean | undefined;
50
+ /**
51
+ * Put component in disabled mode
52
+ */
53
+ disabled?: boolean | undefined;
54
+ /**
55
+ * Allow multiple selection; Model must be Array
56
+ */
57
+ multiple?: boolean | undefined;
58
+ /**
59
+ * Available options that the user can select from.
60
+ * Default value: []
61
+ */
62
+ options?: ((keyword?: string, skip?: number, ids?: string[]) => Promise<{
63
+ results?: Record<string, unknown>[];
64
+ totalCount?: number;
65
+ }>) | any[] | undefined;
66
+ /**
67
+ * Property of option which holds the 'value'
68
+ * Default value: id
69
+ * @param option The current option being processed
70
+ * @returns Value of the current option
71
+ */
72
+ optionValue?: OptionProp;
73
+ /**
74
+ * Property of option which holds the 'label'
75
+ * Default value: title
76
+ * @param option The current option being processed
77
+ * @returns Label of the current option
78
+ */
79
+ optionLabel?: OptionProp;
80
+ /**
81
+ * Update model with the value of the selected option instead of the whole option
82
+ */
83
+ emitValue?: boolean | undefined;
84
+ /**
85
+ * Debounce the search input update with an amount of milliseconds
86
+ * Default value: 500
87
+ */
88
+ debounce?: number | string | undefined;
89
+ /**
90
+ * Input placeholder text
91
+ */
92
+ placeholder?: string | undefined;
93
+ /**
94
+ * Input tooltip information
95
+ */
96
+ tooltip?: string | undefined;
97
+ /**
98
+ * Input required state
99
+ */
100
+ required?: boolean | undefined;
101
+ /**
102
+ * Input search activation
103
+ */
104
+ searchable?: boolean | undefined;
105
+ }
106
+ export interface VcSelectEmits {
107
+ /**
108
+ * Emitted when the component needs to change the model; Is also used by v-model
109
+ * @param event Emitted event name
110
+ * @param value New model value
111
+ */
112
+ (event: "update:modelValue", value: any): void;
113
+ /**
114
+ * Emitted when user wants to filter a value
115
+ * @param event Emitted event name
116
+ * @param inputValue What the user typed
117
+ */
118
+ (event: "search", inputValue: string): void;
119
+ /**
120
+ * Emitted when the select options list is hidden
121
+ * @param event Emitted event name
122
+ */
123
+ (event: "close"): void;
124
+ }
125
+ export interface VcSelectSlots {
126
+ /**
127
+ * Custom select control
128
+ */
129
+ control: (scope: {
130
+ toggleHandler: () => void;
131
+ }) => VNode[];
132
+ /**
133
+ * Prepend inner field
134
+ */
135
+ "prepend-inner": () => VNode[];
136
+ /**
137
+ * Append to inner field
138
+ */
139
+ "append-inner": () => VNode[];
140
+ /**
141
+ * Prepend outer field
142
+ */
143
+ prepend: () => VNode[];
144
+ /**
145
+ * Append outer field
146
+ */
147
+ append: () => VNode[];
148
+ /**
149
+ * What should the menu display after filtering options and none are left to be displayed
150
+ * @param scope
151
+ */
152
+ "no-option": () => VNode[];
153
+ /**
154
+ * Slot for errors
155
+ */
156
+ error: () => VNode[];
157
+ /**
158
+ * Slot for hint text
159
+ */
160
+ hint: () => VNode[];
161
+ /**
162
+ * Override default selection slot
163
+ * @param scope
164
+ */
165
+ "selected-item": (scope: {
166
+ /**
167
+ * Selection index
168
+ */
169
+ index: number;
170
+ /**
171
+ * Selected option -- its value is taken from model
172
+ */
173
+ opt: any;
174
+ /**
175
+ * Always true -- passed as prop
176
+ */
177
+ selected: boolean;
178
+ /**
179
+ * Remove selected option located at specific index
180
+ * @param index Index at which to remove selection
181
+ */
182
+ removeAtIndex: (index: number) => void;
183
+ }) => VNode[];
184
+ /**
185
+ * Override default selection slot;
186
+ */
187
+ option: (scope: {
188
+ /**
189
+ * Option index
190
+ */
191
+ index: number;
192
+ /**
193
+ * Option -- its value is taken from 'options' prop
194
+ */
195
+ opt: any;
196
+ /**
197
+ * Is option selected?
198
+ */
199
+ selected: boolean;
200
+ /**
201
+ * Add/remove option from model
202
+ * @param opt Option to add to model
203
+ */
204
+ toggleOption: (opt: any) => void;
205
+ }) => VNode[];
206
+ }
207
+ //# sourceMappingURL=vc-select-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vc-select-model.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-select/vc-select-model.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vc-textarea.stories.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-textarea/vc-textarea.stories.ts"],"names":[],"mappings":";;;;AAOA,wBAGE;AAUF,eAAO,MAAM,QAAQ,KAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vc-app.stories.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-app/vc-app.stories.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAOA,wBAeE;AAUF,eAAO,MAAM,GAAG,KAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vc-blade.stories.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-blade/vc-blade.stories.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAOA,wBAOE;AAWF,eAAO,MAAM,KAAK,KAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vc-login-form.stories.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-login-form/vc-login-form.stories.ts"],"names":[],"mappings":";;;;AASA,wBAGE;AAqCF,eAAO,MAAM,SAAS,KAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vc-popup.stories.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-popup/vc-popup.stories.ts"],"names":[],"mappings":";;;;AAOA,wBAGE;AAUF,eAAO,MAAM,KAAK,KAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vc-table.stories.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-table/vc-table.stories.ts"],"names":[],"mappings":";;;;AASA,wBAGE;AAwBF,eAAO,MAAM,KAAK,KAAoB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { GlobalComponentConstructor } from "./ts-helpers";
2
+ import { VcInputEmits, VcInputProps, VcInputSlots } from "../components/molecules/vc-input/vc-input-model";
3
+ import { VcSelectEmits, VcSelectProps, VcSelectSlots } from "../components/molecules/vc-select/vc-select-model";
4
+ import { VcInputCurrencyProps, VcInputCurrencyEmits, VcInputCurrencySlots } from "@/ui/components/molecules/vc-input-currency/vc-input-currency-model";
5
+ declare module "@vue/runtime-core" {
6
+ interface GlobalComponents {
7
+ VcInput: GlobalComponentConstructor<VcInputProps, VcInputSlots, VcInputEmits>;
8
+ VcInputCurrency: GlobalComponentConstructor<VcInputCurrencyProps, VcInputCurrencySlots, VcInputCurrencyEmits>;
9
+ VcSelect: GlobalComponentConstructor<VcSelectProps, VcSelectSlots, VcSelectEmits>;
10
+ }
11
+ }
12
+ export {};
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ui/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,YAAY,EACb,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACd,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,qEAAqE,CAAC;AAE7E,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,gBAAgB;QACxB,OAAO,EAAE,0BAA0B,CACjC,YAAY,EACZ,YAAY,EACZ,YAAY,CACb,CAAC;QACF,eAAe,EAAE,0BAA0B,CACzC,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,CACrB,CAAC;QACF,QAAQ,EAAE,0BAA0B,CAClC,aAAa,EACb,aAAa,EACb,aAAa,CACd,CAAC;KACH;CACF;AAED,OAAO,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { ComponentOptions, ComponentPublicInstance, ComputedOptions, EmitsOptions, MethodOptions, VNodeProps } from "vue";
2
+ export type PublicProps = VNodeProps;
3
+ export type ComponentConstructor<Component extends ComponentPublicInstance<Props, RawBindings, D, C, M, E> = ComponentPublicInstance<any>, Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions = EmitsOptions> = {
4
+ new (): Component;
5
+ } & ComponentOptions<Props, RawBindings, D, C, M, any, any, E>;
6
+ export type GlobalComponentConstructor<Props = {}, Slots = {}, Emits = {}> = {
7
+ new (): {
8
+ $props: PublicProps & Props;
9
+ $slots: Slots;
10
+ $emit: EmitsOptions & Emits;
11
+ };
12
+ };
13
+ //# sourceMappingURL=ts-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts-helpers.d.ts","sourceRoot":"","sources":["../../../ui/types/ts-helpers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,UAAU,EACX,MAAM,KAAK,CAAC;AAEb,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC;AAErC,MAAM,MAAM,oBAAoB,CAC9B,SAAS,SAAS,uBAAuB,CACvC,KAAK,EACL,WAAW,EACX,CAAC,EACD,CAAC,EACD,CAAC,EACD,CAAC,CACF,GAAG,uBAAuB,CAAC,GAAG,CAAC,EAChC,KAAK,GAAG,GAAG,EACX,WAAW,GAAG,GAAG,EACjB,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,eAAe,GAAG,eAAe,EAC3C,CAAC,SAAS,aAAa,GAAG,aAAa,EACvC,CAAC,SAAS,YAAY,GAAG,YAAY,IACnC;IAAE,QAAQ,SAAS,CAAA;CAAE,GAAG,gBAAgB,CAC1C,KAAK,EACL,WAAW,EACX,CAAC,EACD,CAAC,EACD,CAAC,EACD,GAAG,EACH,GAAG,EACH,CAAC,CACF,CAAC;AAGF,MAAM,MAAM,0BAA0B,CAAC,KAAK,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,IAAI;IAC3E,QAAQ;QACN,MAAM,EAAE,WAAW,GAAG,KAAK,CAAC;QAC5B,MAAM,EAAE,KAAK,CAAC;QACd,KAAK,EAAE,YAAY,GAAG,KAAK,CAAC;KAC7B,CAAC;CACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../vite.config.ts"],"names":[],"mappings":";AAKA,wBA+BE"}
1
+ {"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../vite.config.ts"],"names":[],"mappings":";AAKA,wBA2CE"}
package/package.json CHANGED
@@ -1,25 +1,41 @@
1
1
  {
2
2
  "name": "@vc-shell/framework",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "main": "./dist/framework.js",
5
+ "module": "./dist/framework.js",
5
6
  "types": "./dist/index.d.ts",
6
7
  "style": "./dist/style.css",
7
8
  "files": [
8
- "dist/*",
9
+ "dist",
9
10
  "tailwind.config.js",
10
- "components",
11
+ "ui",
11
12
  "core",
12
13
  "shared"
13
14
  ],
15
+ "exports": {
16
+ ".": {
17
+ "import": "./dist/framework.js",
18
+ "require": "./dist/framework.js",
19
+ "types": "./dist/index.d.ts"
20
+ },
21
+ "./client": {
22
+ "types": "./dist/ui/types/index.d.ts"
23
+ },
24
+ "./dist/style.css": "./dist/style.css",
25
+ "./tailwind.config": "./tailwind.config.js",
26
+ "./*": "./*"
27
+ },
14
28
  "scripts": {
15
29
  "build": "vite build",
30
+ "development": "vite build --watch -m development",
16
31
  "watch": "vite build --watch"
17
32
  },
18
33
  "dependencies": {
19
34
  "@popperjs/core": "^2.11.0",
20
35
  "@vee-validate/rules": "^4.5.5",
21
- "@vueuse/core": "^6.0.0",
22
- "@vueuse/integrations": "^6.0.0",
36
+ "@vueuse/components": "^9.9.0",
37
+ "@vueuse/core": "^9.9.0",
38
+ "@vueuse/integrations": "^9.9.0",
23
39
  "client-oauth2": "^4.3.3",
24
40
  "moment": "^2.29.1",
25
41
  "normalize.css": "^8.0.1",
@@ -34,21 +50,22 @@
34
50
  "devDependencies": {
35
51
  "@originjs/vite-plugin-commonjs": "^1.0.3",
36
52
  "@rollup/plugin-commonjs": "^21.0.2",
37
- "@vc-shell/api-client-generator": "^1.0.39",
38
- "@vc-shell/config-generator": "^1.0.39",
53
+ "@vc-shell/api-client-generator": "^1.0.40",
54
+ "@vc-shell/config-generator": "^1.0.40",
55
+ "@vue-macros/volar": "^0.5.7",
39
56
  "sass": "^1.49.0",
40
57
  "typescript": "^4.6.2",
58
+ "unplugin-vue-macros": "^1.1.1",
41
59
  "url-pattern": "^1.0.3"
42
60
  },
43
61
  "peerDependencies": {
44
62
  "vee-validate": "^4.7.3",
45
63
  "vue": "^3.0.0",
46
- "vue-router": "^4.1.6",
47
- "yup": "^0.32.11"
64
+ "vue-router": "^4.1.6"
48
65
  },
49
66
  "publishConfig": {
50
67
  "access": "public",
51
68
  "registry": "https://registry.npmjs.org/"
52
69
  },
53
- "gitHead": "efe2745d6854e48ac60e18a7e571ab5bb0827a7f"
70
+ "gitHead": "826168937f288def939c0a249181bc3fcc87d7f2"
54
71
  }
@@ -1,36 +1,36 @@
1
1
  <template>
2
2
  <div
3
- class="relative h-full flex items-center justify-center ml-2 mr-[15px] shrink-0"
3
+ class="tw-relative tw-h-full tw-flex tw-items-center tw-justify-center tw-ml-2 tw-mr-[15px] tw-shrink-0"
4
4
  v-click-outside="onClose"
5
5
  >
6
6
  <button
7
- class="hover:[&>img] hover:[&_div]:bg-[color:var(--app-bar-button-color-hover)]"
7
+ class="hover:[&>img] hover:[&_div]:tw-bg-[color:var(--app-bar-button-color-hover)]"
8
8
  @click.stop="toggleAppSwitch"
9
9
  >
10
10
  <div
11
- class="h-[22px] w-[22px] [mask:url(/assets/app-select.svg)] bg-[color:var(--app-bar-button-color)] duration-200"
11
+ class="tw-h-[22px] tw-w-[22px] [mask:url(/assets/app-select.svg)] tw-bg-[color:var(--app-bar-button-color)] tw-duration-200"
12
12
  />
13
13
  </button>
14
14
 
15
15
  <div
16
16
  v-if="isVisible && appsList && appsList.length"
17
- class="px-4 py-3.5 bg-white drop-shadow-[4px_4px_20px_rgba(47,86,108,0.25)] absolute z-[10000] rounded top-[var(--app-bar-height)] left-0"
17
+ class="tw-px-4 tw-py-3.5 tw-bg-white tw-drop-shadow-[4px_4px_20px_rgba(47,86,108,0.25)] tw-absolute tw-z-[10000] tw-rounded tw-top-[var(--app-bar-height)] tw-left-0"
18
18
  >
19
- <ul class="flex flex-col gap-3 overflow-hidden">
19
+ <ul class="tw-flex tw-flex-col tw-gap-3 tw-overflow-hidden">
20
20
  <li
21
21
  v-for="item in appsList"
22
22
  :key="item.id"
23
23
  @click="switchApp(item)"
24
- class="flex flex-row items-center cursor-pointer group"
25
- :class="{ '[&>p]:font-extrabold': locationHandler(item.relativeUrl) }"
24
+ class="tw-flex tw-flex-row tw-items-center tw-cursor-pointer tw-group"
25
+ :class="{ '[&>p]:tw-font-extrabold': locationHandler(item.relativeUrl) }"
26
26
  >
27
27
  <img
28
28
  :src="imageUrl(item.iconUrl)"
29
29
  :alt="`icon_${item.id}`"
30
- class="w-5 h-5 mr-2 shrink-0"
30
+ class="tw-w-5 tw-h-5 tw-mr-2 tw-shrink-0"
31
31
  />
32
32
  <p
33
- class="font-normal text-sm text-[#727C87] truncate group-hover:opacity-80"
33
+ class="tw-font-normal tw-text-sm tw-text-[#727C87] tw-truncate group-hover:tw-opacity-80"
34
34
  >
35
35
  {{ item.title }}
36
36
  </p>
@@ -8,38 +8,38 @@
8
8
  @close="$emit('close:blade')"
9
9
  >
10
10
  <!-- Blade contents -->
11
- <div class="flex grow-1 border-t border-solid border-t-[#eaedf3]">
12
- <div class="assets-details__content grow basis-0">
11
+ <div class= "tw-flex tw-grow-1 tw-border-t tw-border-solid tw-border-t-[#eaedf3]">
12
+ <div class="assets-details__content tw-grow tw-basis-0">
13
13
  <VcContainer :no-padding="true">
14
- <div class="p-4">
14
+ <div class="tw-p-4">
15
15
  <VcForm>
16
16
  <VcImage
17
- class="mb-4"
17
+ class="tw-mb-4"
18
18
  :src="localImage.url"
19
19
  size="xl"
20
20
  :bordered="true"
21
21
  ></VcImage>
22
22
  <VcInput
23
- class="mb-4"
23
+ class="tw-mb-4"
24
24
  :label="$t('ASSETS.PAGES.DETAILS.FIELDS.NAME.TITLE')"
25
25
  v-model="localImage.name"
26
- :clearable="true"
27
- is-required
26
+ clearable
27
+ required
28
28
  :placeholder="
29
29
  $t('ASSETS.PAGES.DETAILS.FIELDS.NAME.PLACEHOLDER')
30
30
  "
31
31
  ></VcInput>
32
32
  <VcInput
33
- class="mb-4"
33
+ class="tw-mb-4"
34
34
  :label="$t('ASSETS.PAGES.DETAILS.FIELDS.ALT.TITLE')"
35
35
  v-model="localImage.altText"
36
- :clearable="true"
36
+ clearable
37
37
  :placeholder="$t('ASSETS.PAGES.DETAILS.FIELDS.ALT.PLACEHOLDER')"
38
38
  :tooltip="$t('ASSETS.PAGES.DETAILS.FIELDS.ALT.TOOLTIP')"
39
- is-required
39
+ required
40
40
  ></VcInput>
41
41
  <VcTextarea
42
- class="mb-4"
42
+ class="tw-mb-4"
43
43
  :label="$t('ASSETS.PAGES.DETAILS.FIELDS.DESCRIPTION.TITLE')"
44
44
  v-model="localImage.description"
45
45
  :placeholder="
@@ -66,7 +66,7 @@ import {
66
66
  VcImage,
67
67
  VcInput,
68
68
  VcTextarea,
69
- } from "@/components";
69
+ } from "@/ui/components";
70
70
 
71
71
  interface ILocalImage {
72
72
  url: string;
@@ -88,7 +88,9 @@ export default (): IUseBladeNavigation => {
88
88
  try {
89
89
  await navigationCb();
90
90
  } catch (e) {
91
- throw "Navigation failure";
91
+ console.log(e);
92
+ } finally {
93
+ console.debug(`Navigated to: ${parent.url}`);
92
94
  }
93
95
  } else if (!navigationCb) {
94
96
  await router.push(parent.url);
@@ -175,9 +177,7 @@ export default (): IUseBladeNavigation => {
175
177
  );
176
178
 
177
179
  if (index >= 0) {
178
- const currentParent = unref(
179
- bladesRefs.value[bladesRefs.value.length - 2]
180
- );
180
+ const currentParent = unref(bladesRefs.value[index]);
181
181
 
182
182
  if (currentParent) {
183
183
  if (args.method && typeof currentParent[args.method] === "function") {
@@ -1,52 +1,52 @@
1
- import {Component, ComponentPublicInstance} from "vue";
2
- import {IMenuItems} from "@/core/types";
3
- import {NavigationFailure} from "vue-router";
1
+ import { Component, ComponentPublicInstance } from "vue";
2
+ import { IMenuItems } from "@/core/types";
3
+ import { NavigationFailure } from "vue-router";
4
4
 
5
5
  /* onParentCall event interface */
6
6
  export interface IParentCallArgs {
7
- method: string;
8
- args?: unknown;
9
- callback?: (args: unknown) => void;
7
+ method: string;
8
+ args?: unknown;
9
+ callback?: (args: unknown) => void;
10
10
  }
11
11
 
12
12
  /* extended component */
13
13
  export type ExtendedComponent = Component & {
14
- url?: string;
15
- permissions?: string | string[];
16
- idx?: number;
14
+ url?: string;
15
+ permissions?: string | string[];
16
+ idx?: number;
17
17
  };
18
18
 
19
19
  /* blade interface for navigation */
20
- export interface IBladeContainer extends IBladeEvent{
21
- idx?: number;
20
+ export interface IBladeContainer extends IBladeEvent {
21
+ idx?: number;
22
22
  }
23
23
 
24
24
  /* blade exposed methods */
25
25
  export interface IBladeElement extends ComponentPublicInstance {
26
- onBeforeClose?: () => Promise<boolean>;
27
- title?: string;
28
- reloadParent?: () => void;
29
- openDashboard?: () => void;
26
+ onBeforeClose?: () => Promise<boolean>;
27
+ title?: string;
28
+ reloadParent?: () => void;
29
+ openDashboard?: () => void;
30
30
  }
31
31
 
32
32
  /* emitted blade event */
33
33
  export interface IBladeEvent {
34
- parentBlade?: ExtendedComponent;
35
- component?: ExtendedComponent;
36
- bladeOptions?: Record<string, unknown>;
37
- param?: string;
38
- onOpen?: () => void;
39
- onClose?: () => void;
34
+ parentBlade?: ExtendedComponent;
35
+ component?: ExtendedComponent;
36
+ bladeOptions?: Record<string, unknown>;
37
+ param?: string;
38
+ onOpen?: () => void;
39
+ onClose?: () => void;
40
40
  }
41
41
 
42
42
  /* menu item event */
43
43
  export interface IMenuClickEvent {
44
- item: IMenuItems
45
- navigationCb: () => Promise<void | NavigationFailure>
44
+ item: IMenuItems;
45
+ navigationCb: () => Promise<void | NavigationFailure>;
46
46
  }
47
47
 
48
48
  /* openBlade args interface */
49
49
  export interface IOpenBlade extends IBladeEvent {
50
- id?: number
51
- navigationCb?: () => Promise<void | NavigationFailure>
50
+ id?: number;
51
+ navigationCb?: () => Promise<void | NavigationFailure>;
52
52
  }
@@ -1,6 +1,7 @@
1
1
  /** @type { import('tailwindcss').Config } */
2
2
  module.exports = {
3
- content: ["./components/**/*.{vue,js,ts,jsx,tsx}"],
3
+ prefix: 'tw-',
4
+ content: ["./ui/components/**/*.{vue,js,ts,jsx,tsx}"],
4
5
  theme: {
5
6
  fontFamily: {
6
7
  roboto: ["Roboto", "sans-serif"],
@@ -37,12 +38,12 @@ module.exports = {
37
38
  to: {
38
39
  "background-position": '30px 0, left'
39
40
  }
40
- }
41
+ },
41
42
  },
42
43
  animation: {
43
44
  loadingMarker: "loadingMarker 3s infinite",
44
45
  loadingMarkers: "loadingMarkers 3s infinite",
45
- loadingProgress: "loadingProgress 1s linear infinite"
46
+ loadingProgress: "loadingProgress 1s linear infinite",
46
47
  }
47
48
  },
48
49
  },
@@ -0,0 +1,7 @@
1
+ import { ComponentPublicInstance } from "vue";
2
+ import { VcBadgeProps } from "./vc-badge-model";
3
+ import { ComponentConstructor } from "@/ui/types/ts-helpers";
4
+ import Badge from "./vc-badge.vue";
5
+ export const VcBadge: ComponentConstructor<
6
+ ComponentPublicInstance<VcBadgeProps>
7
+ > = Badge;
@@ -0,0 +1,30 @@
1
+ import { VNode } from "vue";
2
+
3
+ export interface VcBadgeProps {
4
+ /**
5
+ * Badge active state
6
+ * */
7
+ active?: boolean | undefined;
8
+ /**
9
+ * Put component in disabled state
10
+ * */
11
+ disabled?: boolean | undefined;
12
+ /**
13
+ * Is badge clickable?
14
+ * */
15
+ clickable?: boolean | undefined;
16
+ }
17
+
18
+ export interface VcBadgeEmits {
19
+ /**
20
+ * Emitted when component is clicked
21
+ * */
22
+ (event: "click"): void;
23
+ }
24
+
25
+ export interface VcBadgeSlots {
26
+ /**
27
+ * Slot for component content
28
+ * */
29
+ default: () => VNode[];
30
+ }