@ramathibodi/nuxt-commons 0.1.74 → 4.0.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 (243) hide show
  1. package/README.md +9 -2
  2. package/dist/module.json +4 -4
  3. package/dist/module.mjs +4 -4
  4. package/dist/runtime/bridges/authentication.d.ts +21 -0
  5. package/dist/runtime/bridges/authentication.js +20 -0
  6. package/dist/runtime/bridges/graphql.d.ts +17 -0
  7. package/dist/runtime/bridges/graphql.js +45 -0
  8. package/dist/runtime/components/Alert.d.vue.ts +3 -0
  9. package/dist/runtime/components/Alert.vue +17 -26
  10. package/dist/runtime/components/Alert.vue.d.ts +3 -0
  11. package/dist/runtime/components/BarcodeReader.d.vue.ts +9 -0
  12. package/dist/runtime/components/BarcodeReader.vue +56 -81
  13. package/dist/runtime/components/BarcodeReader.vue.d.ts +9 -0
  14. package/dist/runtime/components/ExportCSV.d.vue.ts +55 -0
  15. package/dist/runtime/components/ExportCSV.vue +39 -76
  16. package/dist/runtime/components/ExportCSV.vue.d.ts +55 -0
  17. package/dist/runtime/components/FileBtn.d.vue.ts +53 -0
  18. package/dist/runtime/components/FileBtn.vue +23 -50
  19. package/dist/runtime/components/FileBtn.vue.d.ts +53 -0
  20. package/dist/runtime/components/ImportCSV.d.vue.ts +52 -0
  21. package/dist/runtime/components/ImportCSV.vue +60 -111
  22. package/dist/runtime/components/ImportCSV.vue.d.ts +52 -0
  23. package/dist/runtime/components/MrzReader.d.vue.ts +19 -0
  24. package/dist/runtime/components/MrzReader.vue +69 -109
  25. package/dist/runtime/components/MrzReader.vue.d.ts +19 -0
  26. package/dist/runtime/components/SplitterPanel.d.vue.ts +15 -0
  27. package/dist/runtime/components/SplitterPanel.vue +18 -35
  28. package/dist/runtime/components/SplitterPanel.vue.d.ts +15 -0
  29. package/dist/runtime/components/TabsGroup.d.vue.ts +19 -0
  30. package/dist/runtime/components/TabsGroup.vue +8 -20
  31. package/dist/runtime/components/TabsGroup.vue.d.ts +19 -0
  32. package/dist/runtime/components/TextBarcode.d.vue.ts +12 -0
  33. package/dist/runtime/components/TextBarcode.vue +22 -45
  34. package/dist/runtime/components/TextBarcode.vue.d.ts +12 -0
  35. package/dist/runtime/components/device/IdCardButton.d.vue.ts +57 -0
  36. package/dist/runtime/components/device/IdCardButton.vue +30 -67
  37. package/dist/runtime/components/device/IdCardButton.vue.d.ts +57 -0
  38. package/dist/runtime/components/device/IdCardWebSocket.d.vue.ts +55 -0
  39. package/dist/runtime/components/device/IdCardWebSocket.vue +104 -165
  40. package/dist/runtime/components/device/IdCardWebSocket.vue.d.ts +55 -0
  41. package/dist/runtime/components/device/Scanner.d.vue.ts +66 -0
  42. package/dist/runtime/components/device/Scanner.vue +97 -178
  43. package/dist/runtime/components/device/Scanner.vue.d.ts +66 -0
  44. package/dist/runtime/components/dialog/Confirm.d.vue.ts +37 -0
  45. package/dist/runtime/components/dialog/Confirm.vue +30 -59
  46. package/dist/runtime/components/dialog/Confirm.vue.d.ts +37 -0
  47. package/dist/runtime/components/dialog/Host.d.vue.ts +9 -0
  48. package/dist/runtime/components/dialog/Host.vue +34 -57
  49. package/dist/runtime/components/dialog/Host.vue.d.ts +9 -0
  50. package/dist/runtime/components/dialog/Index.d.vue.ts +24 -0
  51. package/dist/runtime/components/dialog/Index.vue +20 -40
  52. package/dist/runtime/components/dialog/Index.vue.d.ts +24 -0
  53. package/dist/runtime/components/dialog/Loading.d.vue.ts +21 -0
  54. package/dist/runtime/components/dialog/Loading.vue +12 -29
  55. package/dist/runtime/components/dialog/Loading.vue.d.ts +21 -0
  56. package/dist/runtime/components/dialog/default/Confirm.d.vue.ts +40 -0
  57. package/dist/runtime/components/dialog/default/Confirm.vue +29 -62
  58. package/dist/runtime/components/dialog/default/Confirm.vue.d.ts +40 -0
  59. package/dist/runtime/components/dialog/default/Loading.d.vue.ts +23 -0
  60. package/dist/runtime/components/dialog/default/Loading.vue +12 -29
  61. package/dist/runtime/components/dialog/default/Loading.vue.d.ts +23 -0
  62. package/dist/runtime/components/dialog/default/Notify.d.vue.ts +23 -0
  63. package/dist/runtime/components/dialog/default/Notify.vue +19 -48
  64. package/dist/runtime/components/dialog/default/Notify.vue.d.ts +23 -0
  65. package/dist/runtime/components/dialog/default/Printing.d.vue.ts +21 -0
  66. package/dist/runtime/components/dialog/default/Printing.vue +13 -29
  67. package/dist/runtime/components/dialog/default/Printing.vue.d.ts +21 -0
  68. package/dist/runtime/components/dialog/default/VerifyUser.d.vue.ts +29 -0
  69. package/dist/runtime/components/dialog/default/VerifyUser.vue +44 -82
  70. package/dist/runtime/components/dialog/default/VerifyUser.vue.d.ts +29 -0
  71. package/dist/runtime/components/document/Form.d.vue.ts +9 -0
  72. package/dist/runtime/components/document/Form.vue +27 -42
  73. package/dist/runtime/components/document/Form.vue.d.ts +9 -0
  74. package/dist/runtime/components/document/TemplateBuilder.d.vue.ts +24 -0
  75. package/dist/runtime/components/document/TemplateBuilder.vue +154 -194
  76. package/dist/runtime/components/document/TemplateBuilder.vue.d.ts +24 -0
  77. package/dist/runtime/components/form/ActionPad.d.vue.ts +114 -0
  78. package/dist/runtime/components/form/ActionPad.vue +48 -85
  79. package/dist/runtime/components/form/ActionPad.vue.d.ts +114 -0
  80. package/dist/runtime/components/form/Birthdate.d.vue.ts +38 -0
  81. package/dist/runtime/components/form/Birthdate.vue +44 -76
  82. package/dist/runtime/components/form/Birthdate.vue.d.ts +38 -0
  83. package/dist/runtime/components/form/CheckboxGroup.d.vue.ts +41 -0
  84. package/dist/runtime/components/form/CheckboxGroup.vue +34 -64
  85. package/dist/runtime/components/form/CheckboxGroup.vue.d.ts +41 -0
  86. package/dist/runtime/components/form/CodeEditor.d.vue.ts +25 -0
  87. package/dist/runtime/components/form/CodeEditor.vue +18 -36
  88. package/dist/runtime/components/form/CodeEditor.vue.d.ts +25 -0
  89. package/dist/runtime/components/form/Date.d.vue.ts +86 -0
  90. package/dist/runtime/components/form/Date.vue +109 -162
  91. package/dist/runtime/components/form/Date.vue.d.ts +86 -0
  92. package/dist/runtime/components/form/DateTime.d.vue.ts +36 -0
  93. package/dist/runtime/components/form/DateTime.vue +94 -143
  94. package/dist/runtime/components/form/DateTime.vue.d.ts +36 -0
  95. package/dist/runtime/components/form/Dialog.d.vue.ts +69 -0
  96. package/dist/runtime/components/form/Dialog.vue +60 -96
  97. package/dist/runtime/components/form/Dialog.vue.d.ts +69 -0
  98. package/dist/runtime/components/form/EditPad.d.vue.ts +113 -0
  99. package/dist/runtime/components/form/EditPad.vue +49 -85
  100. package/dist/runtime/components/form/EditPad.vue.d.ts +113 -0
  101. package/dist/runtime/components/form/File.d.vue.ts +65 -0
  102. package/dist/runtime/components/form/File.vue +112 -186
  103. package/dist/runtime/components/form/File.vue.d.ts +65 -0
  104. package/dist/runtime/components/form/Hidden.d.vue.ts +12 -0
  105. package/dist/runtime/components/form/Hidden.vue +17 -34
  106. package/dist/runtime/components/form/Hidden.vue.d.ts +12 -0
  107. package/dist/runtime/components/form/Iterator.d.vue.ts +279 -0
  108. package/dist/runtime/components/form/Iterator.vue +162 -252
  109. package/dist/runtime/components/form/Iterator.vue.d.ts +279 -0
  110. package/dist/runtime/components/form/Login.d.vue.ts +32 -0
  111. package/dist/runtime/components/form/Login.vue +23 -55
  112. package/dist/runtime/components/form/Login.vue.d.ts +32 -0
  113. package/dist/runtime/components/form/Pad.d.vue.ts +674 -0
  114. package/dist/runtime/components/form/Pad.vue +166 -265
  115. package/dist/runtime/components/form/Pad.vue.d.ts +674 -0
  116. package/dist/runtime/components/form/SignPad.d.vue.ts +62 -0
  117. package/dist/runtime/components/form/SignPad.vue +80 -126
  118. package/dist/runtime/components/form/SignPad.vue.d.ts +62 -0
  119. package/dist/runtime/components/form/System.d.vue.ts +34 -0
  120. package/dist/runtime/components/form/System.vue +18 -32
  121. package/dist/runtime/components/form/System.vue.d.ts +34 -0
  122. package/dist/runtime/components/form/Table.d.vue.ts +221 -0
  123. package/dist/runtime/components/form/Table.vue +123 -182
  124. package/dist/runtime/components/form/Table.vue.d.ts +221 -0
  125. package/dist/runtime/components/form/TableData.d.vue.ts +102 -0
  126. package/dist/runtime/components/form/TableData.vue +109 -139
  127. package/dist/runtime/components/form/TableData.vue.d.ts +102 -0
  128. package/dist/runtime/components/form/Time.d.vue.ts +49 -0
  129. package/dist/runtime/components/form/Time.vue +64 -99
  130. package/dist/runtime/components/form/Time.vue.d.ts +49 -0
  131. package/dist/runtime/components/form/images/Capture.d.vue.ts +96 -0
  132. package/dist/runtime/components/form/images/Capture.vue +104 -147
  133. package/dist/runtime/components/form/images/Capture.vue.d.ts +96 -0
  134. package/dist/runtime/components/form/images/Edit.d.vue.ts +29 -0
  135. package/dist/runtime/components/form/images/Edit.vue +57 -81
  136. package/dist/runtime/components/form/images/Edit.vue.d.ts +29 -0
  137. package/dist/runtime/components/form/images/Field.d.vue.ts +27 -0
  138. package/dist/runtime/components/form/images/Field.vue +136 -205
  139. package/dist/runtime/components/form/images/Field.vue.d.ts +27 -0
  140. package/dist/runtime/components/form/images/Pad.d.vue.ts +13 -0
  141. package/dist/runtime/components/form/images/Pad.vue +23 -40
  142. package/dist/runtime/components/form/images/Pad.vue.d.ts +13 -0
  143. package/dist/runtime/components/label/Date.d.vue.ts +13 -0
  144. package/dist/runtime/components/label/Date.vue +13 -29
  145. package/dist/runtime/components/label/Date.vue.d.ts +13 -0
  146. package/dist/runtime/components/label/DateAgo.d.vue.ts +20 -0
  147. package/dist/runtime/components/label/DateAgo.vue +43 -75
  148. package/dist/runtime/components/label/DateAgo.vue.d.ts +20 -0
  149. package/dist/runtime/components/label/DateCount.d.vue.ts +22 -0
  150. package/dist/runtime/components/label/DateCount.vue +58 -105
  151. package/dist/runtime/components/label/DateCount.vue.d.ts +22 -0
  152. package/dist/runtime/components/label/Field.d.vue.ts +38 -0
  153. package/dist/runtime/components/label/Field.vue +18 -40
  154. package/dist/runtime/components/label/Field.vue.d.ts +38 -0
  155. package/dist/runtime/components/label/FormatMoney.d.vue.ts +12 -0
  156. package/dist/runtime/components/label/FormatMoney.vue +12 -28
  157. package/dist/runtime/components/label/FormatMoney.vue.d.ts +12 -0
  158. package/dist/runtime/components/label/Mask.d.vue.ts +10 -0
  159. package/dist/runtime/components/label/Mask.vue +21 -38
  160. package/dist/runtime/components/label/Mask.vue.d.ts +10 -0
  161. package/dist/runtime/components/label/Object.d.vue.ts +8 -0
  162. package/dist/runtime/components/label/Object.vue +10 -20
  163. package/dist/runtime/components/label/Object.vue.d.ts +8 -0
  164. package/dist/runtime/components/master/Autocomplete.d.vue.ts +70 -0
  165. package/dist/runtime/components/master/Autocomplete.vue +25 -34
  166. package/dist/runtime/components/master/Autocomplete.vue.d.ts +70 -0
  167. package/dist/runtime/components/master/Combobox.d.vue.ts +70 -0
  168. package/dist/runtime/components/master/Combobox.vue +26 -35
  169. package/dist/runtime/components/master/Combobox.vue.d.ts +70 -0
  170. package/dist/runtime/components/master/RadioGroup.d.vue.ts +51 -0
  171. package/dist/runtime/components/master/RadioGroup.vue +44 -59
  172. package/dist/runtime/components/master/RadioGroup.vue.d.ts +51 -0
  173. package/dist/runtime/components/master/Select.d.vue.ts +68 -0
  174. package/dist/runtime/components/master/Select.vue +25 -34
  175. package/dist/runtime/components/master/Select.vue.d.ts +68 -0
  176. package/dist/runtime/components/master/label.d.vue.ts +24 -0
  177. package/dist/runtime/components/master/label.vue +22 -42
  178. package/dist/runtime/components/master/label.vue.d.ts +24 -0
  179. package/dist/runtime/components/model/Autocomplete.d.vue.ts +82 -0
  180. package/dist/runtime/components/model/Autocomplete.vue +50 -49
  181. package/dist/runtime/components/model/Autocomplete.vue.d.ts +82 -0
  182. package/dist/runtime/components/model/Combobox.d.vue.ts +82 -0
  183. package/dist/runtime/components/model/Combobox.vue +51 -49
  184. package/dist/runtime/components/model/Combobox.vue.d.ts +82 -0
  185. package/dist/runtime/components/model/Pad.d.vue.ts +72 -0
  186. package/dist/runtime/components/model/Pad.vue +50 -65
  187. package/dist/runtime/components/model/Pad.vue.d.ts +72 -0
  188. package/dist/runtime/components/model/Select.d.vue.ts +72 -0
  189. package/dist/runtime/components/model/Select.vue +42 -44
  190. package/dist/runtime/components/model/Select.vue.d.ts +72 -0
  191. package/dist/runtime/components/model/Table.d.vue.ts +272 -0
  192. package/dist/runtime/components/model/Table.vue +121 -145
  193. package/dist/runtime/components/model/Table.vue.d.ts +272 -0
  194. package/dist/runtime/components/model/iterator.d.vue.ts +321 -0
  195. package/dist/runtime/components/model/iterator.vue +148 -183
  196. package/dist/runtime/components/model/iterator.vue.d.ts +321 -0
  197. package/dist/runtime/components/model/label.d.vue.ts +26 -0
  198. package/dist/runtime/components/model/label.vue +25 -43
  199. package/dist/runtime/components/model/label.vue.d.ts +26 -0
  200. package/dist/runtime/components/pdf/Print.d.vue.ts +17 -0
  201. package/dist/runtime/components/pdf/Print.vue +27 -50
  202. package/dist/runtime/components/pdf/Print.vue.d.ts +17 -0
  203. package/dist/runtime/components/pdf/View.d.vue.ts +52 -0
  204. package/dist/runtime/components/pdf/View.vue +58 -95
  205. package/dist/runtime/components/pdf/View.vue.d.ts +52 -0
  206. package/dist/runtime/composables/api.js +4 -2
  207. package/dist/runtime/composables/assetFile.js +4 -2
  208. package/dist/runtime/composables/dialog.d.ts +1 -1
  209. package/dist/runtime/composables/document/template.js +3 -3
  210. package/dist/runtime/composables/document/templateFormTable.js +1 -0
  211. package/dist/runtime/composables/graphql.d.ts +2 -2
  212. package/dist/runtime/composables/graphql.js +5 -5
  213. package/dist/runtime/composables/graphqlModel.d.ts +6 -6
  214. package/dist/runtime/composables/graphqlModelItem.d.ts +4 -4
  215. package/dist/runtime/composables/graphqlModelOperation.d.ts +6 -6
  216. package/dist/runtime/composables/graphqlModelOperation.js +2 -1
  217. package/dist/runtime/composables/graphqlOperation.js +5 -1
  218. package/dist/runtime/composables/hostAgentWs.d.ts +1 -1
  219. package/dist/runtime/composables/lookupListMaster.js +3 -3
  220. package/dist/runtime/composables/menu.js +2 -2
  221. package/dist/runtime/composables/userPermission.d.ts +1 -1
  222. package/dist/runtime/composables/utils/fuzzy.d.ts +2 -1
  223. package/dist/runtime/labs/Calendar.d.vue.ts +35 -0
  224. package/dist/runtime/labs/Calendar.vue +47 -75
  225. package/dist/runtime/labs/Calendar.vue.d.ts +35 -0
  226. package/dist/runtime/labs/form/EditMobile.d.vue.ts +12 -0
  227. package/dist/runtime/labs/form/EditMobile.vue +19 -36
  228. package/dist/runtime/labs/form/EditMobile.vue.d.ts +12 -0
  229. package/dist/runtime/labs/form/TextFieldMask.d.vue.ts +21 -0
  230. package/dist/runtime/labs/form/TextFieldMask.vue +19 -25
  231. package/dist/runtime/labs/form/TextFieldMask.vue.d.ts +21 -0
  232. package/dist/runtime/plugins/dialogManager.js +2 -2
  233. package/dist/runtime/plugins/permission.js +3 -3
  234. package/dist/runtime/types/bridge.d.ts +14 -0
  235. package/dist/runtime/utils/datetime.js +1 -1
  236. package/dist/types.d.mts +2 -6
  237. package/package.json +71 -58
  238. package/scripts/ci-release.mjs +125 -0
  239. package/scripts/release-version.mjs +68 -0
  240. package/scripts/release.mjs +49 -0
  241. package/dist/module.cjs +0 -5
  242. package/dist/module.d.ts +0 -8
  243. package/dist/types.d.ts +0 -7
@@ -1,54 +1,25 @@
1
- <script lang="ts" setup>
2
- /**
3
- * DialogDefaultNotify is a default dialog content component used by the dialog host for common runtime prompts and feedback.
4
- * This doc block is consumed by vue-docgen for generated API documentation.
5
- */
6
- import { ref, watch, type Ref } from 'vue'
7
-
8
- interface DialogProps {
9
- title?: string // Title text displayed in the component header or dialog.
10
- modelValue: boolean // Bound value for v-model synchronization with the parent component.
11
- message?: string // main message body shown in UI
12
- buttonText?: string // Label text displayed on the primary action button.
13
- type?: 'primary' | 'success' | 'warning' | 'info' | 'error' // visual variant controlling color and intent semantics
14
- width?: string // dialog/component width in CSS-compatible units
15
- }
16
-
17
- /**
18
- * Public props accepted by DialogDefaultNotify.
19
- * Document each prop field with intent, defaults, and side effects for clear generated docs.
20
- */
21
- const props = withDefaults(defineProps<DialogProps>(), {
22
- title: 'Notice',
23
- message: 'Something happened.',
24
- buttonText: 'OK',
25
- type: 'primary',
26
- width: 'auto',
27
- })
28
-
29
- /**
30
- * Custom events emitted by DialogDefaultNotify.
31
- * Parents can listen to these events to react to user actions and internal state changes.
32
- */
33
- const emit = defineEmits<{
34
- (e: 'update:modelValue', value: boolean): void
35
- (e: 'resolve', value: boolean): void
36
- }>()
37
-
38
- const dialogVisible: Ref<boolean> = ref(props.modelValue)
39
-
1
+ <script setup>
2
+ import { ref, watch } from "vue";
3
+ const props = defineProps({
4
+ title: { type: String, required: false, default: "Notice" },
5
+ modelValue: { type: Boolean, required: true },
6
+ message: { type: String, required: false, default: "Something happened." },
7
+ buttonText: { type: String, required: false, default: "OK" },
8
+ type: { type: String, required: false, default: "primary" },
9
+ width: { type: String, required: false, default: "auto" }
10
+ });
11
+ const emit = defineEmits(["update:modelValue", "resolve"]);
12
+ const dialogVisible = ref(props.modelValue);
40
13
  watch(() => props.modelValue, (val) => {
41
- dialogVisible.value = val
42
- })
43
-
14
+ dialogVisible.value = val;
15
+ });
44
16
  watch(dialogVisible, (val) => {
45
- if (!val) emit('update:modelValue', false)
46
- })
47
-
17
+ if (!val) emit("update:modelValue", false);
18
+ });
48
19
  const handleClose = () => {
49
- dialogVisible.value = false
50
- emit('resolve', true)
51
- }
20
+ dialogVisible.value = false;
21
+ emit("resolve", true);
22
+ };
52
23
  </script>
53
24
 
54
25
  <template>
@@ -0,0 +1,23 @@
1
+ interface DialogProps {
2
+ title?: string;
3
+ modelValue: boolean;
4
+ message?: string;
5
+ buttonText?: string;
6
+ type?: 'primary' | 'success' | 'warning' | 'info' | 'error';
7
+ width?: string;
8
+ }
9
+ declare const __VLS_export: import("vue").DefineComponent<DialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
+ "update:modelValue": (value: boolean) => any;
11
+ resolve: (value: boolean) => any;
12
+ }, string, import("vue").PublicProps, Readonly<DialogProps> & Readonly<{
13
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
14
+ onResolve?: ((value: boolean) => any) | undefined;
15
+ }>, {
16
+ message: string;
17
+ width: string;
18
+ title: string;
19
+ type: "primary" | "success" | "warning" | "info" | "error";
20
+ buttonText: string;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
@@ -0,0 +1,21 @@
1
+ interface DialogProps {
2
+ modelValue: boolean;
3
+ color?: string;
4
+ }
5
+ declare var __VLS_20: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_20) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<DialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:modelValue": (...args: any[]) => void;
11
+ }, string, import("vue").PublicProps, Readonly<DialogProps> & Readonly<{
12
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -1,33 +1,17 @@
1
- <script setup lang="ts">
2
- /**
3
- * DialogDefaultPrinting is a default dialog content component used by the dialog host for common runtime prompts and feedback.
4
- * This doc block is consumed by vue-docgen for generated API documentation.
5
- */
6
- import { ref, watch } from 'vue'
7
-
8
- interface DialogProps {
9
- modelValue: boolean // Bound value for v-model synchronization with the parent component.
10
- color?: string // Vuetify color name applied to the visual element.
11
- }
12
- /**
13
- * Custom events emitted by DialogDefaultPrinting.
14
- * Parents can listen to these events to react to user actions and internal state changes.
15
- */
16
- const emit = defineEmits(['update:modelValue'])
17
- /**
18
- * Public props accepted by DialogDefaultPrinting.
19
- * Document each prop field with intent, defaults, and side effects for clear generated docs.
20
- */
21
- const props = defineProps<DialogProps>()
22
- const dialogVisible = ref(props.modelValue)
23
-
1
+ <script setup>
2
+ import { ref, watch } from "vue";
3
+ const emit = defineEmits(["update:modelValue"]);
4
+ const props = defineProps({
5
+ modelValue: { type: Boolean, required: true },
6
+ color: { type: String, required: false }
7
+ });
8
+ const dialogVisible = ref(props.modelValue);
24
9
  watch(() => props.modelValue, (newValue) => {
25
- dialogVisible.value = newValue
26
- })
27
-
10
+ dialogVisible.value = newValue;
11
+ });
28
12
  watch(() => dialogVisible.value, (newValue) => {
29
- emit('update:modelValue', newValue)
30
- })
13
+ emit("update:modelValue", newValue);
14
+ });
31
15
  </script>
32
16
 
33
17
  <template>
@@ -44,4 +28,4 @@ watch(() => dialogVisible.value, (newValue) => {
44
28
  </div>
45
29
  </v-card>
46
30
  </v-dialog>
47
- </template>
31
+ </template>
@@ -0,0 +1,21 @@
1
+ interface DialogProps {
2
+ modelValue: boolean;
3
+ color?: string;
4
+ }
5
+ declare var __VLS_20: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_20) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<DialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:modelValue": (...args: any[]) => void;
11
+ }, string, import("vue").PublicProps, Readonly<DialogProps> & Readonly<{
12
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,29 @@
1
+ interface DialogProps {
2
+ title?: string;
3
+ modelValue: boolean;
4
+ message?: string;
5
+ confirmButtonText?: string;
6
+ cancelButtonText?: string;
7
+ type?: 'primary' | 'success' | 'warning' | 'info' | 'error';
8
+ fixedUsername?: boolean | string;
9
+ width?: string;
10
+ }
11
+ declare const __VLS_export: import("vue").DefineComponent<DialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
12
+ "update:modelValue": (value: boolean) => any;
13
+ resolve: (value: string) => any;
14
+ reject: (value: any) => any;
15
+ }, string, import("vue").PublicProps, Readonly<DialogProps> & Readonly<{
16
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
17
+ onResolve?: ((value: string) => any) | undefined;
18
+ onReject?: ((value: any) => any) | undefined;
19
+ }>, {
20
+ message: string;
21
+ width: string;
22
+ title: string;
23
+ type: "primary" | "success" | "warning" | "info" | "error";
24
+ confirmButtonText: string;
25
+ cancelButtonText: string;
26
+ fixedUsername: boolean | string;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
@@ -1,99 +1,61 @@
1
- <script lang="ts" setup>
2
- /**
3
- * DialogDefaultVerifyUser is a default dialog content component used by the dialog host for common runtime prompts and feedback.
4
- * This doc block is consumed by vue-docgen for generated API documentation.
5
- */
6
- import {computed, ref, type Ref, watch} from 'vue'
7
- import {useDialog} from "../../../composables/dialog"
8
- import {useGraphQlOperation} from "../../../composables/graphqlOperation";
9
- import {type AuthenticationState, useState} from '#imports'
10
-
11
- interface DialogProps {
12
- title?: string // Title text displayed in the component header or dialog.
13
- modelValue: boolean // Bound value for v-model synchronization with the parent component.
14
- message?: string // main message body shown in UI
15
- confirmButtonText?: string // Label text for the confirm/verify action button.
16
- cancelButtonText?: string // Label text for the cancel action button.
17
- type?: 'primary' | 'success' | 'warning' | 'info' | 'error' // visual variant controlling color and intent semantics
18
- fixedUsername?: boolean | string // Locks username input to provided/default value when enabled.
19
- width?: string // dialog/component width in CSS-compatible units
20
- }
21
-
22
- /**
23
- * Public props accepted by DialogDefaultVerifyUser.
24
- * Document each prop field with intent, defaults, and side effects for clear generated docs.
25
- */
26
- const props = withDefaults(defineProps<DialogProps>(), {
27
- title: 'Verify User',
28
- message: 'Please enter your credentials to continue.',
29
- confirmButtonText: 'Verify',
30
- cancelButtonText: 'Cancel',
31
- type: 'primary',
32
- fixedUsername: true,
33
- width: '400',
34
- })
35
-
36
- /**
37
- * Custom events emitted by DialogDefaultVerifyUser.
38
- * Parents can listen to these events to react to user actions and internal state changes.
39
- */
40
- const emit = defineEmits<{
41
- (e: 'update:modelValue', value: boolean): void
42
- (e: 'resolve', value: string): void
43
- (e: 'reject', value: any): void
44
- }>()
45
-
46
- const authenState = useState<AuthenticationState>("authentication")
47
-
48
- const dialogVisible: Ref<boolean> = ref(props.modelValue)
49
-
1
+ <script setup>
2
+ import { computed, ref, watch } from "vue";
3
+ import { useDialog } from "../../../composables/dialog";
4
+ import { useGraphQlOperation } from "../../../composables/graphqlOperation";
5
+ import { useState } from "#imports";
6
+ const props = defineProps({
7
+ title: { type: String, required: false, default: "Verify User" },
8
+ modelValue: { type: Boolean, required: true },
9
+ message: { type: String, required: false, default: "Please enter your credentials to continue." },
10
+ confirmButtonText: { type: String, required: false, default: "Verify" },
11
+ cancelButtonText: { type: String, required: false, default: "Cancel" },
12
+ type: { type: String, required: false, default: "primary" },
13
+ fixedUsername: { type: [Boolean, String], required: false, default: true },
14
+ width: { type: String, required: false, default: "400" }
15
+ });
16
+ const emit = defineEmits(["update:modelValue", "resolve", "reject"]);
17
+ const authenState = useState("authentication");
18
+ const dialogVisible = ref(props.modelValue);
50
19
  watch(() => props.modelValue, (val) => {
51
- dialogVisible.value = val
52
- })
53
-
20
+ dialogVisible.value = val;
21
+ });
54
22
  watch(dialogVisible, (val) => {
55
- if (!val) emit('update:modelValue', false)
56
- })
57
-
58
- const username = ref<string>('')
59
- const password = ref<string>('')
60
-
61
- watch(()=>props.fixedUsername, (fixedUsername) => {
23
+ if (!val) emit("update:modelValue", false);
24
+ });
25
+ const username = ref("");
26
+ const password = ref("");
27
+ watch(() => props.fixedUsername, (fixedUsername) => {
62
28
  if (fixedUsername === true) {
63
- let userProfile = authenState.value?.userProfile as {username: string}
64
- username.value = userProfile?.username ?? ""
29
+ let userProfile = authenState.value?.userProfile;
30
+ username.value = userProfile?.username ?? "";
65
31
  } else {
66
- username.value = (fixedUsername) ? fixedUsername as string : ""
32
+ username.value = fixedUsername ? fixedUsername : "";
67
33
  }
68
- },{immediate: true})
69
-
34
+ }, { immediate: true });
70
35
  const isDisabled = computed(() => {
71
- return !username.value || !password.value
72
- })
73
-
74
- const verifyUser = async (username: string, password: string): Promise<boolean> => {
36
+ return !username.value || !password.value;
37
+ });
38
+ const verifyUser = async (username2, password2) => {
75
39
  try {
76
- let result: any = await useGraphQlOperation('Mutation',"verifyUser",["success"], {username: username, password: password})
77
- return result.success
40
+ let result = await useGraphQlOperation("Mutation", "verifyUser", ["success"], { username: username2, password: password2 });
41
+ return result.success;
78
42
  } catch (_error) {
79
- return false
43
+ return false;
80
44
  }
81
- }
82
-
45
+ };
83
46
  const handleConfirm = async () => {
84
- const verified = await verifyUser(username.value, password.value)
47
+ const verified = await verifyUser(username.value, password.value);
85
48
  if (verified) {
86
- dialogVisible.value = false
87
- emit('resolve', username.value)
49
+ dialogVisible.value = false;
50
+ emit("resolve", username.value);
88
51
  } else {
89
- useDialog().notify({message: "Invalid username or password",type: 'warning',title:"Error"})
52
+ useDialog().notify({ message: "Invalid username or password", type: "warning", title: "Error" });
90
53
  }
91
- }
92
-
54
+ };
93
55
  const handleCancel = () => {
94
- dialogVisible.value = false
95
- emit('reject', 'User cancelled')
96
- }
56
+ dialogVisible.value = false;
57
+ emit("reject", "User cancelled");
58
+ };
97
59
  </script>
98
60
 
99
61
  <template>
@@ -0,0 +1,29 @@
1
+ interface DialogProps {
2
+ title?: string;
3
+ modelValue: boolean;
4
+ message?: string;
5
+ confirmButtonText?: string;
6
+ cancelButtonText?: string;
7
+ type?: 'primary' | 'success' | 'warning' | 'info' | 'error';
8
+ fixedUsername?: boolean | string;
9
+ width?: string;
10
+ }
11
+ declare const __VLS_export: import("vue").DefineComponent<DialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
12
+ "update:modelValue": (value: boolean) => any;
13
+ resolve: (value: string) => any;
14
+ reject: (value: any) => any;
15
+ }, string, import("vue").PublicProps, Readonly<DialogProps> & Readonly<{
16
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
17
+ onResolve?: ((value: string) => any) | undefined;
18
+ onReject?: ((value: any) => any) | undefined;
19
+ }>, {
20
+ message: string;
21
+ width: string;
22
+ title: string;
23
+ type: "primary" | "success" | "warning" | "info" | "error";
24
+ confirmButtonText: string;
25
+ cancelButtonText: string;
26
+ fixedUsername: boolean | string;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
@@ -0,0 +1,9 @@
1
+ interface Props {
2
+ templateCode: string;
3
+ parentTemplates?: string | string[];
4
+ }
5
+ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
6
+ parentTemplates: string | string[];
7
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -1,51 +1,36 @@
1
- <script lang="ts" setup>
2
- /**
3
- * DocumentForm supports document-template rendering and synchronizes template-defined field behavior with runtime data.
4
- * This doc block is consumed by vue-docgen for generated API documentation.
5
- */
6
- import {ref, withDefaults,watch,computed} from 'vue'
7
- import {graphqlOperation} from '#imports'
8
-
9
- interface Props {
10
- templateCode: string // Template identifier used to load document schema/config.
11
- parentTemplates?: string|string[] // Parent template code(s) used for template inheritance/extension.
12
- }
13
-
14
- /**
15
- * Public props accepted by DocumentForm.
16
- * Document each prop field with intent, defaults, and side effects for clear generated docs.
17
- */
18
- const props = withDefaults(defineProps<Props>(), {
19
- parentTemplates: (): string[] => [],
20
- })
21
-
22
- const template = ref<any>()
23
- const templateScript = ref<string>()
24
-
25
- const parentTemplates = computed(()=>{
26
- if (typeof props.parentTemplates === 'string') {
27
- if (props.parentTemplates && props.parentTemplates!="") return props.parentTemplates.split("|")
28
- else return []
1
+ <script setup>
2
+ import { ref, watch, computed } from "vue";
3
+ import { useGraphqlBridge } from "../../bridges/graphql";
4
+ const props = defineProps({
5
+ templateCode: { type: String, required: true },
6
+ parentTemplates: { type: [String, Array], required: false, default: () => [] }
7
+ });
8
+ const template = ref();
9
+ const templateScript = ref();
10
+ const parentTemplates = computed(() => {
11
+ if (typeof props.parentTemplates === "string") {
12
+ if (props.parentTemplates && props.parentTemplates != "") return props.parentTemplates.split("|");
13
+ else return [];
29
14
  } else {
30
- return props.parentTemplates
15
+ return props.parentTemplates;
31
16
  }
32
- })
33
-
34
- const parentTemplatesNext = computed(()=>{
35
- return [...parentTemplates.value,props.templateCode]
36
- })
37
-
38
- watch(()=>props.templateCode,()=>{
17
+ });
18
+ const parentTemplatesNext = computed(() => {
19
+ return [...parentTemplates.value, props.templateCode];
20
+ });
21
+ watch(() => props.templateCode, () => {
39
22
  if (!parentTemplates.value.includes(props.templateCode) && props.templateCode) {
23
+ const { graphqlOperation } = useGraphqlBridge();
40
24
  if (graphqlOperation["documentTemplateByTemplateCode"]) {
41
- graphqlOperation["documentTemplateByTemplateCode"].call(["*"],{templateCode: props.templateCode}).then((result: any)=>{
42
- template.value = result.editTemplate
43
- templateScript.value = result.templateScript
44
- })
25
+ graphqlOperation["documentTemplateByTemplateCode"].call(["*"], { templateCode: props.templateCode }).then((result) => {
26
+ template.value = result.editTemplate;
27
+ templateScript.value = result.templateScript;
28
+ });
45
29
  }
46
30
  }
47
- },{immediate: true})
31
+ }, { immediate: true });
48
32
  </script>
33
+
49
34
  <template>
50
35
  <form-pad :template="template" :template-script="templateScript" :parent-templates="parentTemplatesNext"></form-pad>
51
- </template>
36
+ </template>
@@ -0,0 +1,9 @@
1
+ interface Props {
2
+ templateCode: string;
3
+ parentTemplates?: string | string[];
4
+ }
5
+ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
6
+ parentTemplates: string | string[];
7
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,24 @@
1
+ import 'vue-json-pretty/lib/styles.css';
2
+ interface Props {
3
+ title?: string;
4
+ disableAdvanceMode?: boolean;
5
+ }
6
+ /**
7
+ * Public props accepted by DocumentTemplateBuilder.
8
+ * Document each prop field with intent, defaults, and side effects for clear generated docs.
9
+ */
10
+ type __VLS_Props = Props;
11
+ type __VLS_ModelProps = {
12
+ modelValue?: string | Record<string, any>[];
13
+ };
14
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
15
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ "update:modelValue": (...args: any[]) => void;
17
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
19
+ }>, {
20
+ title: string;
21
+ disableAdvanceMode: boolean;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;