@ramathibodi/nuxt-commons 0.1.73 → 0.1.75

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 (111) hide show
  1. package/README.md +115 -96
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +1 -0
  4. package/dist/runtime/components/Alert.vue +58 -54
  5. package/dist/runtime/components/BarcodeReader.vue +130 -122
  6. package/dist/runtime/components/ExportCSV.vue +110 -102
  7. package/dist/runtime/components/FileBtn.vue +79 -67
  8. package/dist/runtime/components/ImportCSV.vue +151 -139
  9. package/dist/runtime/components/MrzReader.vue +168 -0
  10. package/dist/runtime/components/SplitterPanel.vue +67 -59
  11. package/dist/runtime/components/TabsGroup.vue +39 -31
  12. package/dist/runtime/components/TextBarcode.vue +66 -54
  13. package/dist/runtime/components/device/IdCardButton.vue +95 -83
  14. package/dist/runtime/components/device/IdCardWebSocket.vue +207 -195
  15. package/dist/runtime/components/device/Scanner.vue +350 -338
  16. package/dist/runtime/components/dialog/Confirm.vue +112 -100
  17. package/dist/runtime/components/dialog/Host.vue +88 -84
  18. package/dist/runtime/components/dialog/Index.vue +84 -72
  19. package/dist/runtime/components/dialog/Loading.vue +51 -39
  20. package/dist/runtime/components/dialog/default/Confirm.vue +112 -100
  21. package/dist/runtime/components/dialog/default/Loading.vue +60 -48
  22. package/dist/runtime/components/dialog/default/Notify.vue +82 -70
  23. package/dist/runtime/components/dialog/default/Printing.vue +46 -34
  24. package/dist/runtime/components/dialog/default/VerifyUser.vue +144 -132
  25. package/dist/runtime/components/document/Form.vue +50 -42
  26. package/dist/runtime/components/document/TemplateBuilder.vue +536 -524
  27. package/dist/runtime/components/form/ActionPad.vue +156 -144
  28. package/dist/runtime/components/form/Birthdate.vue +116 -104
  29. package/dist/runtime/components/form/CheckboxGroup.vue +99 -87
  30. package/dist/runtime/components/form/CodeEditor.vue +45 -37
  31. package/dist/runtime/components/form/Date.vue +270 -258
  32. package/dist/runtime/components/form/DateTime.vue +220 -208
  33. package/dist/runtime/components/form/Dialog.vue +178 -166
  34. package/dist/runtime/components/form/EditPad.vue +157 -145
  35. package/dist/runtime/components/form/File.vue +295 -283
  36. package/dist/runtime/components/form/Hidden.vue +44 -32
  37. package/dist/runtime/components/form/Iterator.vue +538 -526
  38. package/dist/runtime/components/form/Login.vue +143 -131
  39. package/dist/runtime/components/form/Pad.vue +399 -387
  40. package/dist/runtime/components/form/SignPad.vue +226 -218
  41. package/dist/runtime/components/form/System.vue +34 -26
  42. package/dist/runtime/components/form/Table.vue +391 -379
  43. package/dist/runtime/components/form/TableData.vue +236 -224
  44. package/dist/runtime/components/form/Time.vue +177 -165
  45. package/dist/runtime/components/form/images/Capture.vue +245 -237
  46. package/dist/runtime/components/form/images/Edit.vue +133 -121
  47. package/dist/runtime/components/form/images/Field.vue +331 -320
  48. package/dist/runtime/components/form/images/Pad.vue +54 -42
  49. package/dist/runtime/components/label/Date.vue +37 -29
  50. package/dist/runtime/components/label/DateAgo.vue +102 -94
  51. package/dist/runtime/components/label/DateCount.vue +152 -144
  52. package/dist/runtime/components/label/Field.vue +111 -103
  53. package/dist/runtime/components/label/FormatMoney.vue +37 -29
  54. package/dist/runtime/components/label/Mask.vue +46 -38
  55. package/dist/runtime/components/label/Object.vue +21 -13
  56. package/dist/runtime/components/master/Autocomplete.vue +89 -81
  57. package/dist/runtime/components/master/Combobox.vue +88 -80
  58. package/dist/runtime/components/master/RadioGroup.vue +90 -78
  59. package/dist/runtime/components/master/Select.vue +70 -62
  60. package/dist/runtime/components/master/label.vue +55 -47
  61. package/dist/runtime/components/model/Autocomplete.vue +91 -79
  62. package/dist/runtime/components/model/Combobox.vue +90 -78
  63. package/dist/runtime/components/model/Pad.vue +114 -102
  64. package/dist/runtime/components/model/Select.vue +78 -72
  65. package/dist/runtime/components/model/Table.vue +370 -358
  66. package/dist/runtime/components/model/iterator.vue +497 -489
  67. package/dist/runtime/components/model/label.vue +58 -50
  68. package/dist/runtime/components/pdf/Print.vue +75 -63
  69. package/dist/runtime/components/pdf/View.vue +146 -134
  70. package/dist/runtime/composables/alert.d.ts +4 -0
  71. package/dist/runtime/composables/api.d.ts +4 -0
  72. package/dist/runtime/composables/dialog.d.ts +1 -1
  73. package/dist/runtime/composables/document/templateFormHidden.d.ts +4 -0
  74. package/dist/runtime/composables/graphql.d.ts +1 -1
  75. package/dist/runtime/composables/graphqlModel.d.ts +9 -9
  76. package/dist/runtime/composables/graphqlModelItem.d.ts +7 -7
  77. package/dist/runtime/composables/graphqlModelOperation.d.ts +6 -6
  78. package/dist/runtime/composables/localStorageModel.d.ts +4 -0
  79. package/dist/runtime/composables/lookupList.d.ts +4 -0
  80. package/dist/runtime/composables/menu.d.ts +4 -0
  81. package/dist/runtime/composables/useMrzReader.d.ts +48 -0
  82. package/dist/runtime/composables/useMrzReader.js +423 -0
  83. package/dist/runtime/composables/useTesseract.d.ts +16 -0
  84. package/dist/runtime/composables/useTesseract.js +45 -0
  85. package/dist/runtime/composables/userPermission.d.ts +1 -1
  86. package/dist/runtime/labs/Calendar.vue +99 -99
  87. package/dist/runtime/labs/form/EditMobile.vue +152 -152
  88. package/dist/runtime/labs/form/TextFieldMask.vue +43 -43
  89. package/dist/runtime/plugins/clientConfig.d.ts +1 -1
  90. package/dist/runtime/plugins/default.d.ts +1 -1
  91. package/dist/runtime/plugins/dialogManager.d.ts +1 -1
  92. package/dist/runtime/plugins/permission.d.ts +1 -1
  93. package/dist/runtime/types/alert.d.ts +11 -11
  94. package/dist/runtime/types/clientConfig.d.ts +13 -13
  95. package/dist/runtime/types/dialogManager.d.ts +35 -35
  96. package/dist/runtime/types/formDialog.d.ts +5 -5
  97. package/dist/runtime/types/graphqlOperation.d.ts +23 -23
  98. package/dist/runtime/types/menu.d.ts +31 -31
  99. package/dist/runtime/types/modules.d.ts +7 -7
  100. package/dist/runtime/types/permission.d.ts +13 -13
  101. package/dist/runtime/utils/asset.d.ts +2 -0
  102. package/dist/runtime/utils/asset.js +49 -0
  103. package/package.json +131 -122
  104. package/scripts/enrich-vue-docs-from-ai.mjs +197 -0
  105. package/scripts/generate-ai-summary.mjs +321 -0
  106. package/scripts/generate-composables-md.mjs +129 -0
  107. package/scripts/postInstall.cjs +70 -70
  108. package/templates/.codegen/codegen.ts +32 -32
  109. package/templates/.codegen/plugin-schema-object.js +161 -161
  110. package/templates/public/tesseract/mrz.traineddata.gz +0 -0
  111. package/templates/public/tesseract/ocrb.traineddata.gz +0 -0
@@ -1,50 +1,58 @@
1
- <script lang="ts" setup>
2
- import { computedAsync } from '@vueuse/core'
3
- import { useGraphQlOperation } from '../../composables/graphqlOperation'
4
- import { concat } from "lodash-es";
5
- import { ref } from 'vue'
6
-
7
- interface Props {
8
- modelName: string
9
- modelBy?: object
10
- itemTitle: string | ((result:Record<string,any>)=>void)
11
- fields?: Array<string | object>
12
- cache?: boolean | number
13
-
14
- notFoundText?: string
15
- placeholder?: string
16
- }
17
-
18
- const props = withDefaults(defineProps<Props>(), {
19
- cache: false,
20
- })
21
-
22
- const modelItem = ref<Record<string, any>>({})
23
-
24
- const modelItemValue = computedAsync<string>(async () => {
25
- if (props.modelName && props.itemTitle) {
26
- let fields: any[] = (typeof props.itemTitle === "string") ? [props.itemTitle] : []
27
- if (props.fields) fields = concat(fields, props.fields)
28
-
29
- const variables: Record<string, any> = Object.assign({},props.modelBy)
30
- const result : Record<string, any> = await useGraphQlOperation('Query',props.modelName,fields,variables,props.cache)
31
-
32
- try {
33
- if (result) {
34
- modelItem.value = result
35
- if (typeof props.itemTitle === "string") return result[props.itemTitle]
36
- else return props.itemTitle(result)
37
- }
38
- } catch (e) {
39
- console.error(e)
40
- }
41
- }
42
- return props.notFoundText
43
- }, props.placeholder ?? '' )
44
- </script>
45
-
46
- <template>
47
- <slot name="default" :data="modelItem">
48
- <span>{{ modelItemValue }}</span>
49
- </slot>
50
- </template>
1
+ <script lang="ts" setup>
2
+ /**
3
+ * ModelLabel connects model metadata to reusable selection, labeling, iterator, or table UI patterns.
4
+ * This doc block is consumed by vue-docgen for generated API documentation.
5
+ */
6
+ import { computedAsync } from '@vueuse/core'
7
+ import { useGraphQlOperation } from '../../composables/graphqlOperation'
8
+ import { concat } from "lodash-es";
9
+ import { ref } from 'vue'
10
+
11
+ interface Props {
12
+ modelName: string // GraphQL model name used to resolve lookup/query metadata.
13
+ modelBy?: object // Key/value filter used to fetch a specific model item.
14
+ itemTitle: string | ((result:Record<string,any>)=>void) // Field name or mapper function used to build display labels.
15
+ fields?: Array<string | object> // Field list/query selection used when fetching model or lookup data.
16
+ cache?: boolean | number // Enables cached requests; number values represent cache TTL in milliseconds.
17
+
18
+ notFoundText?: string // Text shown when the resolved value or label is unavailable.
19
+ placeholder?: string // placeholder text shown when value is empty
20
+ }
21
+
22
+ /**
23
+ * Public props accepted by ModelLabel.
24
+ * Document each prop field with intent, defaults, and side effects for clear generated docs.
25
+ */
26
+ const props = withDefaults(defineProps<Props>(), {
27
+ cache: false,
28
+ })
29
+
30
+ const modelItem = ref<Record<string, any>>({})
31
+
32
+ const modelItemValue = computedAsync<string>(async () => {
33
+ if (props.modelName && props.itemTitle) {
34
+ let fields: any[] = (typeof props.itemTitle === "string") ? [props.itemTitle] : []
35
+ if (props.fields) fields = concat(fields, props.fields)
36
+
37
+ const variables: Record<string, any> = Object.assign({},props.modelBy)
38
+ const result : Record<string, any> = await useGraphQlOperation('Query',props.modelName,fields,variables,props.cache)
39
+
40
+ try {
41
+ if (result) {
42
+ modelItem.value = result
43
+ if (typeof props.itemTitle === "string") return result[props.itemTitle]
44
+ else return props.itemTitle(result)
45
+ }
46
+ } catch (e) {
47
+ console.error(e)
48
+ }
49
+ }
50
+ return props.notFoundText
51
+ }, props.placeholder ?? '' )
52
+ </script>
53
+
54
+ <template>
55
+ <slot name="default" :data="modelItem">
56
+ <span>{{ modelItemValue }}</span>
57
+ </slot>
58
+ </template>
@@ -1,63 +1,75 @@
1
- <script setup lang="ts">
2
- import printJS from 'print-js'
3
- import { ref, watch } from 'vue'
4
- import { useAlert } from '../../composables/alert'
5
-
6
- interface Props {
7
- base64String?: string
8
- fileName?: string
9
- print?: boolean
10
- title?: string
11
- disabled?: boolean
12
- }
13
-
14
- const props = withDefaults(defineProps<Props>(), {
15
- print: false,
16
- disabled: false,
17
- })
18
- const emit = defineEmits(['update:print'])
19
-
20
- const isMobile = ref(false)
21
- const alert = useAlert()
22
-
23
- const openPdf = () => {
24
- if (/Android|Mobi|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Macintosh/i.test(navigator.userAgent)) {
25
- isMobile.value = true
26
- }
27
- else {
28
- printJS({
29
- printable: props.base64String,
30
- type: 'pdf',
31
- base64: true,
32
- onPrintDialogClose: endLoadPdf,
33
- onError: (error: any) => {
34
- alert?.addAlert({ message: error, alertType: 'error' })
35
- },
36
- })
37
- }
38
- }
39
-
40
- const endLoadPdf = () => {
41
- emit('update:print', false)
42
- isMobile.value = false
43
- }
44
-
45
- watch(() => props.print, () => {
46
- if (props.print) openPdf()
47
- })
48
- </script>
49
-
50
- <template>
51
- <v-dialog
52
- v-model="isMobile"
53
- fullscreen
54
- >
55
- <PdfView
56
- :base64-string="props.base64String"
57
- :disabled="props.disabled"
58
- :title="props.title"
59
- :file-name="props.fileName"
60
- @close-dialog="endLoadPdf"
61
- />
62
- </v-dialog>
63
- </template>
1
+ <script setup lang="ts">
2
+ /**
3
+ * PdfPrint renders a print-oriented PDF view and handles browser print lifecycle events.
4
+ * This doc block is consumed by vue-docgen for generated API documentation.
5
+ */
6
+ import printJS from 'print-js'
7
+ import { ref, watch } from 'vue'
8
+ import { useAlert } from '../../composables/alert'
9
+
10
+ interface Props {
11
+ base64String?: string // Base64 document payload used as the PDF source.
12
+ fileName?: string // File name used when downloading or printing generated files.
13
+ print?: boolean // When true, starts printing automatically after the PDF is ready.
14
+ title?: string // Title text displayed in the component header or dialog.
15
+ disabled?: boolean // disables user interaction for this field
16
+ }
17
+
18
+ /**
19
+ * Public props accepted by PdfPrint.
20
+ * Document each prop field with intent, defaults, and side effects for clear generated docs.
21
+ */
22
+ const props = withDefaults(defineProps<Props>(), {
23
+ print: false,
24
+ disabled: false,
25
+ })
26
+ /**
27
+ * Custom events emitted by PdfPrint.
28
+ * Parents can listen to these events to react to user actions and internal state changes.
29
+ */
30
+ const emit = defineEmits(['update:print'])
31
+
32
+ const isMobile = ref(false)
33
+ const alert = useAlert()
34
+
35
+ const openPdf = () => {
36
+ if (/Android|Mobi|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Macintosh/i.test(navigator.userAgent)) {
37
+ isMobile.value = true
38
+ }
39
+ else {
40
+ printJS({
41
+ printable: props.base64String,
42
+ type: 'pdf',
43
+ base64: true,
44
+ onPrintDialogClose: endLoadPdf,
45
+ onError: (error: any) => {
46
+ alert?.addAlert({ message: error, alertType: 'error' })
47
+ },
48
+ })
49
+ }
50
+ }
51
+
52
+ const endLoadPdf = () => {
53
+ emit('update:print', false)
54
+ isMobile.value = false
55
+ }
56
+
57
+ watch(() => props.print, () => {
58
+ if (props.print) openPdf()
59
+ })
60
+ </script>
61
+
62
+ <template>
63
+ <v-dialog
64
+ v-model="isMobile"
65
+ fullscreen
66
+ >
67
+ <PdfView
68
+ :base64-string="props.base64String"
69
+ :disabled="props.disabled"
70
+ :title="props.title"
71
+ :file-name="props.fileName"
72
+ @close-dialog="endLoadPdf"
73
+ />
74
+ </v-dialog>
75
+ </template>
@@ -1,134 +1,146 @@
1
- <script setup lang="ts">
2
- import PDF from 'pdf-vue3'
3
- import { uid } from 'uid'
4
- import printJS from 'print-js'
5
- import { ref, computed } from 'vue'
6
- import { useAlert } from '../../composables/alert'
7
-
8
- interface Props extends /* @vue-ignore */ InstanceType<typeof PDF['$props']> {
9
- base64String?: string
10
- title?: string
11
- fileName?: string
12
- disabled?: boolean
13
- isPrint?: boolean
14
- showBackToTopBtn?: boolean
15
- }
16
-
17
- const props = withDefaults(defineProps<Props>(), {
18
- base64String: '',
19
- title: '',
20
- fileName: '',
21
- disabled: false,
22
- isPrint: false,
23
- showBackToTopBtn: false,
24
- })
25
-
26
- const emit = defineEmits(['closeDialog'])
27
- const base64 = ref(props.base64String)
28
- const alert = useAlert()
29
-
30
- const generateUniqueId = (): string => {
31
- const uniqueId: string = uid()
32
- return props.fileName ? `${props.fileName}` : uniqueId
33
- }
34
-
35
- const downloadPdf = (): void => {
36
- try {
37
- if (!props.base64String) alert?.addAlert({ message: 'No Base64 provided', alertType: 'error' })
38
-
39
- const byteString = atob(props.base64String || '')
40
- const byteArray = new Uint8Array(byteString.length)
41
-
42
- for (let i = 0; i < byteString.length; i++) {
43
- byteArray[i] = byteString.charCodeAt(i)
44
- }
45
-
46
- const blob = new Blob([byteArray], { type: 'application/pdf' })
47
- const link = URL.createObjectURL(blob)
48
- const anchorElement = document.createElement('a')
49
- anchorElement.style.display = 'none'
50
- anchorElement.href = link
51
- anchorElement.download = `${generateUniqueId()}.pdf`
52
-
53
- document.body.appendChild(anchorElement)
54
- anchorElement.click()
55
- URL.revokeObjectURL(link)
56
- document.body.removeChild(anchorElement)
57
- base64.value = ''
58
-
59
- alert?.addAlert({ message: 'Download success', alertType: 'success' })
60
- }
61
- catch (error) {
62
- alert?.addAlert({ message: `Download unsuccess : ${error}`, alertType: 'error' })
63
- }
64
- }
65
-
66
- const printPdf = () => {
67
- printJS({
68
- printable: props.base64String,
69
- type: 'pdf',
70
- base64: true,
71
- onPrintDialogClose: endLoadPdf,
72
- onError: (error) => {
73
- alert?.addAlert({ message: error, alertType: 'error' })
74
- },
75
- })
76
- base64.value = ''
77
- }
78
-
79
- const endLoadPdf = () => {
80
- emit('closeDialog', false)
81
- base64.value = ''
82
- }
83
-
84
- const isMobile = () => {
85
- return /Android|Mobi|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Macintosh/i.test(navigator.userAgent)
86
- }
87
-
88
- const checkMobileAndPrint = computed(() => {
89
- return !isMobile() && props.isPrint
90
- })
91
-
92
- const setWidthPdf = computed(() => {
93
- if (isMobile()) {
94
- return '100%'
95
- }
96
- else {
97
- return '100dvh'
98
- }
99
- })
100
- </script>
101
-
102
- <template>
103
- <v-card>
104
- <v-toolbar density="compact">
105
- <v-toolbar-title>{{ props.title }}</v-toolbar-title>
106
- <v-spacer />
107
- <v-btn
108
- v-if="checkMobileAndPrint"
109
- icon="mdi mdi-printer"
110
- variant="plain"
111
- @click="printPdf"
112
- />
113
- <v-btn
114
- v-if="!props.disabled"
115
- icon="mdi mdi-download"
116
- variant="plain"
117
- @click="downloadPdf"
118
- />
119
- <v-btn
120
- icon="mdi mdi-close"
121
- variant="plain"
122
- @click="endLoadPdf"
123
- />
124
- </v-toolbar>
125
- <v-card-text class="justify-center h-screen">
126
- <PDF
127
- v-bind="$attrs"
128
- :pdf-width="setWidthPdf"
129
- :src="base64"
130
- :show-back-to-top-btn="props.showBackToTopBtn"
131
- />
132
- </v-card-text>
133
- </v-card>
134
- </template>
1
+ <script setup lang="ts">
2
+ /**
3
+ * PdfView displays PDF documents in-app with loading and viewport state management for preview workflows.
4
+ * This doc block is consumed by vue-docgen for generated API documentation.
5
+ */
6
+ import PDF from 'pdf-vue3'
7
+ import { uid } from 'uid'
8
+ import printJS from 'print-js'
9
+ import { ref, computed } from 'vue'
10
+ import { useAlert } from '../../composables/alert'
11
+
12
+ interface Props extends /* @vue-ignore */ InstanceType<typeof PDF['$props']> {
13
+ base64String?: string // Base64 document payload used as the PDF source.
14
+ title?: string // Title text displayed in the component header or dialog.
15
+ fileName?: string // File name used when downloading or printing generated files.
16
+ disabled?: boolean // disables user interaction for this field
17
+ isPrint?: boolean // boolean flag controlling runtime behavior
18
+ showBackToTopBtn?: boolean // Shows a back-to-top button while scrolling long PDF content.
19
+ }
20
+
21
+ /**
22
+ * Public props accepted by PdfView.
23
+ * Document each prop field with intent, defaults, and side effects for clear generated docs.
24
+ */
25
+ const props = withDefaults(defineProps<Props>(), {
26
+ base64String: '',
27
+ title: '',
28
+ fileName: '',
29
+ disabled: false,
30
+ isPrint: false,
31
+ showBackToTopBtn: false,
32
+ })
33
+
34
+ /**
35
+ * Custom events emitted by PdfView.
36
+ * Parents can listen to these events to react to user actions and internal state changes.
37
+ */
38
+ const emit = defineEmits(['closeDialog'])
39
+ const base64 = ref(props.base64String)
40
+ const alert = useAlert()
41
+
42
+ const generateUniqueId = (): string => {
43
+ const uniqueId: string = uid()
44
+ return props.fileName ? `${props.fileName}` : uniqueId
45
+ }
46
+
47
+ const downloadPdf = (): void => {
48
+ try {
49
+ if (!props.base64String) alert?.addAlert({ message: 'No Base64 provided', alertType: 'error' })
50
+
51
+ const byteString = atob(props.base64String || '')
52
+ const byteArray = new Uint8Array(byteString.length)
53
+
54
+ for (let i = 0; i < byteString.length; i++) {
55
+ byteArray[i] = byteString.charCodeAt(i)
56
+ }
57
+
58
+ const blob = new Blob([byteArray], { type: 'application/pdf' })
59
+ const link = URL.createObjectURL(blob)
60
+ const anchorElement = document.createElement('a')
61
+ anchorElement.style.display = 'none'
62
+ anchorElement.href = link
63
+ anchorElement.download = `${generateUniqueId()}.pdf`
64
+
65
+ document.body.appendChild(anchorElement)
66
+ anchorElement.click()
67
+ URL.revokeObjectURL(link)
68
+ document.body.removeChild(anchorElement)
69
+ base64.value = ''
70
+
71
+ alert?.addAlert({ message: 'Download success', alertType: 'success' })
72
+ }
73
+ catch (error) {
74
+ alert?.addAlert({ message: `Download unsuccess : ${error}`, alertType: 'error' })
75
+ }
76
+ }
77
+
78
+ const printPdf = () => {
79
+ printJS({
80
+ printable: props.base64String,
81
+ type: 'pdf',
82
+ base64: true,
83
+ onPrintDialogClose: endLoadPdf,
84
+ onError: (error) => {
85
+ alert?.addAlert({ message: error, alertType: 'error' })
86
+ },
87
+ })
88
+ base64.value = ''
89
+ }
90
+
91
+ const endLoadPdf = () => {
92
+ emit('closeDialog', false)
93
+ base64.value = ''
94
+ }
95
+
96
+ const isMobile = () => {
97
+ return /Android|Mobi|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Macintosh/i.test(navigator.userAgent)
98
+ }
99
+
100
+ const checkMobileAndPrint = computed(() => {
101
+ return !isMobile() && props.isPrint
102
+ })
103
+
104
+ const setWidthPdf = computed(() => {
105
+ if (isMobile()) {
106
+ return '100%'
107
+ }
108
+ else {
109
+ return '100dvh'
110
+ }
111
+ })
112
+ </script>
113
+
114
+ <template>
115
+ <v-card>
116
+ <v-toolbar density="compact">
117
+ <v-toolbar-title>{{ props.title }}</v-toolbar-title>
118
+ <v-spacer />
119
+ <v-btn
120
+ v-if="checkMobileAndPrint"
121
+ icon="mdi mdi-printer"
122
+ variant="plain"
123
+ @click="printPdf"
124
+ />
125
+ <v-btn
126
+ v-if="!props.disabled"
127
+ icon="mdi mdi-download"
128
+ variant="plain"
129
+ @click="downloadPdf"
130
+ />
131
+ <v-btn
132
+ icon="mdi mdi-close"
133
+ variant="plain"
134
+ @click="endLoadPdf"
135
+ />
136
+ </v-toolbar>
137
+ <v-card-text class="justify-center h-screen">
138
+ <PDF
139
+ v-bind="$attrs"
140
+ :pdf-width="setWidthPdf"
141
+ :src="base64"
142
+ :show-back-to-top-btn="props.showBackToTopBtn"
143
+ />
144
+ </v-card-text>
145
+ </v-card>
146
+ </template>
@@ -1,3 +1,7 @@
1
+ /**
2
+ * useAlert manages reactive alert state, creation helpers, and queue lifecycle used by notification components.
3
+ * This doc block is consumed by vue-docgen for generated API documentation.
4
+ */
1
5
  import { type InjectionKey, type Ref } from 'vue';
2
6
  import type { AlertItem } from '../types/alert.js';
3
7
  interface AlertProvide {
@@ -1,3 +1,7 @@
1
+ /**
2
+ * useApi wraps authenticated HTTP calls, URL resolution, and optional response caching for runtime services.
3
+ * This doc block is consumed by vue-docgen for generated API documentation.
4
+ */
1
5
  import type { UseFetchOptions } from 'nuxt/app';
2
6
  import type { SearchParameters } from 'ofetch';
3
7
  export declare function useApi(): {
@@ -1 +1 @@
1
- export declare const useDialog: () => import("../types/dialogManager").DialogPlugin;
1
+ export declare const useDialog: () => any;
@@ -1,2 +1,6 @@
1
+ /**
2
+ * Hidden-field template helpers build non-visual document form bindings while preserving data mapping.
3
+ * This doc block is consumed by vue-docgen for generated API documentation.
4
+ */
1
5
  import { type DocumentTemplateItem } from './template.js';
2
6
  export declare function processTemplateFormHidden(item: DocumentTemplateItem, parentTemplates: string | string[], dataVariable?: string): string;
@@ -10,7 +10,7 @@ declare type VariableOptions = {
10
10
  [k: string]: any;
11
11
  };
12
12
  export declare function useGraphQl(): {
13
- query: <T>(operation: string, fields: Array<string | Object> | ClassConstructor<any>, variables?: VariableOptions, cache?: boolean) => import("#app").AsyncData<(T extends any[] ? T : T extends Record<string, any> ? keyof T extends (T extends T ? keyof T extends string ? string & keyof T : never : never) ? T : (T extends T ? keyof T extends string ? string & keyof T : never : never) extends never ? T : Pick<T, T extends T ? keyof T extends string ? string & keyof T : never : never> : T) | null, import("#app").NuxtError<unknown> | null>;
13
+ query: <T>(operation: string, fields: Array<string | Object> | ClassConstructor<any>, variables?: VariableOptions, cache?: boolean) => any;
14
14
  queryPromise: <T>(operation: string, fields: Array<string | Object> | ClassConstructor<any>, variables?: VariableOptions, cache?: boolean | number) => Promise<T>;
15
15
  mutation: <T>(operation: string, fields: Array<string | Object> | ClassConstructor<any>, variables?: VariableOptions) => UseMutationReturn<any, any>;
16
16
  mutationPromise: <T>(operation: string, fields: Array<string | Object> | ClassConstructor<any>, variables?: VariableOptions) => Promise<T>;
@@ -13,22 +13,22 @@ export declare function useGraphqlModel<T extends GraphqlModelProps>(props: T):
13
13
  search: import("vue").Ref<string | undefined, string | undefined>;
14
14
  setSearch: (keyword: string) => void;
15
15
  currentOptions: import("vue").Ref<any, any>;
16
- operationCreate: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any>>;
17
- operationUpdate: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any>>;
18
- operationDelete: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any>>;
19
- operationRead: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any>>;
20
- operationReadPageable: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any>>;
21
- operationSearch: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any>>;
16
+ operationCreate: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any> | undefined>;
17
+ operationUpdate: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any> | undefined>;
18
+ operationDelete: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any> | undefined>;
19
+ operationRead: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any> | undefined>;
20
+ operationReadPageable: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any> | undefined>;
21
+ operationSearch: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any> | undefined>;
22
22
  fields: import("vue").ComputedRef<(string | object)[]>;
23
23
  canServerPageable: import("vue").ComputedRef<boolean>;
24
24
  canServerSearch: import("vue").ComputedRef<boolean>;
25
25
  canCreate: import("vue").ComputedRef<boolean>;
26
26
  canUpdate: import("vue").ComputedRef<boolean>;
27
27
  canDelete: import("vue").ComputedRef<boolean>;
28
- createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void>;
28
+ createItem: (item: Record<string, any>, callback?: FormDialogCallback, importing?: boolean) => Promise<void> | undefined;
29
29
  importItems: (importItems: Record<string, any>[], callback?: FormDialogCallback) => void;
30
- updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<void>;
31
- deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
30
+ updateItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<void> | undefined;
31
+ deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any> | undefined;
32
32
  loadItems: (options: any) => void;
33
33
  reload: () => void;
34
34
  isLoading: import("vue").Ref<boolean, boolean>;
@@ -4,17 +4,17 @@ export type GraphqlModelItemProps = Omit<GraphqlModelConfigProps, 'operationSear
4
4
  export declare function useGraphqlModelItem<T extends GraphqlModelItemProps>(props: T): {
5
5
  modelBy: import("vue").Ref<object | undefined, object | undefined>;
6
6
  item: import("vue").Ref<Record<string, any> | undefined, Record<string, any> | undefined>;
7
- operationCreate: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any>>;
8
- operationUpdate: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any>>;
9
- operationDelete: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any>>;
10
- operationRead: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any>>;
7
+ operationCreate: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any> | undefined>;
8
+ operationUpdate: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any> | undefined>;
9
+ operationDelete: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any> | undefined>;
10
+ operationRead: import("vue").ComputedRef<import("~/.nuxt/types/graphqlOperation").graphqlOperationObject<any, any> | undefined>;
11
11
  fields: import("vue").ComputedRef<(string | object)[]>;
12
12
  canCreate: import("vue").ComputedRef<boolean>;
13
13
  canUpdate: import("vue").ComputedRef<boolean>;
14
14
  canDelete: import("vue").ComputedRef<boolean>;
15
- createItem: (createItem: Record<string, any>, callback?: FormDialogCallback) => Promise<void>;
16
- updateItem: (updateItem: Record<string, any>, callback?: FormDialogCallback) => Promise<void>;
17
- deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any>;
15
+ createItem: (createItem: Record<string, any>, callback?: FormDialogCallback) => Promise<void> | undefined;
16
+ updateItem: (updateItem: Record<string, any>, callback?: FormDialogCallback) => Promise<void> | undefined;
17
+ deleteItem: (item: Record<string, any>, callback?: FormDialogCallback) => Promise<any> | undefined;
18
18
  reload: () => void;
19
19
  isLoading: import("vue").Ref<boolean, boolean>;
20
20
  };