@ramathibodi/nuxt-commons 0.1.73 → 0.1.74
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.
- package/README.md +74 -55
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -0
- package/dist/runtime/components/Alert.vue +4 -0
- package/dist/runtime/components/BarcodeReader.vue +8 -0
- package/dist/runtime/components/ExportCSV.vue +13 -5
- package/dist/runtime/components/FileBtn.vue +17 -5
- package/dist/runtime/components/ImportCSV.vue +14 -2
- package/dist/runtime/components/MrzReader.vue +168 -0
- package/dist/runtime/components/SplitterPanel.vue +9 -1
- package/dist/runtime/components/TabsGroup.vue +9 -1
- package/dist/runtime/components/TextBarcode.vue +13 -1
- package/dist/runtime/components/device/IdCardButton.vue +15 -3
- package/dist/runtime/components/device/IdCardWebSocket.vue +18 -6
- package/dist/runtime/components/device/Scanner.vue +18 -6
- package/dist/runtime/components/dialog/Confirm.vue +20 -8
- package/dist/runtime/components/dialog/Host.vue +4 -0
- package/dist/runtime/components/dialog/Index.vue +17 -5
- package/dist/runtime/components/dialog/Loading.vue +14 -2
- package/dist/runtime/components/dialog/default/Confirm.vue +20 -8
- package/dist/runtime/components/dialog/default/Loading.vue +14 -2
- package/dist/runtime/components/dialog/default/Notify.vue +18 -6
- package/dist/runtime/components/dialog/default/Printing.vue +14 -2
- package/dist/runtime/components/dialog/default/VerifyUser.vue +20 -8
- package/dist/runtime/components/document/Form.vue +10 -2
- package/dist/runtime/components/document/TemplateBuilder.vue +14 -2
- package/dist/runtime/components/form/ActionPad.vue +19 -7
- package/dist/runtime/components/form/Birthdate.vue +15 -3
- package/dist/runtime/components/form/CheckboxGroup.vue +17 -5
- package/dist/runtime/components/form/CodeEditor.vue +11 -3
- package/dist/runtime/components/form/Date.vue +23 -11
- package/dist/runtime/components/form/DateTime.vue +29 -17
- package/dist/runtime/components/form/Dialog.vue +21 -9
- package/dist/runtime/components/form/EditPad.vue +20 -8
- package/dist/runtime/components/form/File.vue +18 -6
- package/dist/runtime/components/form/Hidden.vue +15 -3
- package/dist/runtime/components/form/Iterator.vue +43 -31
- package/dist/runtime/components/form/Login.vue +18 -6
- package/dist/runtime/components/form/Pad.vue +24 -12
- package/dist/runtime/components/form/SignPad.vue +13 -5
- package/dist/runtime/components/form/System.vue +10 -2
- package/dist/runtime/components/form/Table.vue +31 -19
- package/dist/runtime/components/form/TableData.vue +21 -9
- package/dist/runtime/components/form/Time.vue +16 -4
- package/dist/runtime/components/form/images/Capture.vue +17 -9
- package/dist/runtime/components/form/images/Edit.vue +16 -4
- package/dist/runtime/components/form/images/Field.vue +21 -10
- package/dist/runtime/components/form/images/Pad.vue +12 -0
- package/dist/runtime/components/label/Date.vue +12 -4
- package/dist/runtime/components/label/DateAgo.vue +13 -5
- package/dist/runtime/components/label/DateCount.vue +13 -5
- package/dist/runtime/components/label/Field.vue +14 -6
- package/dist/runtime/components/label/FormatMoney.vue +11 -3
- package/dist/runtime/components/label/Mask.vue +11 -3
- package/dist/runtime/components/label/Object.vue +11 -3
- package/dist/runtime/components/master/Autocomplete.vue +19 -11
- package/dist/runtime/components/master/Combobox.vue +19 -11
- package/dist/runtime/components/master/RadioGroup.vue +17 -5
- package/dist/runtime/components/master/Select.vue +18 -10
- package/dist/runtime/components/master/label.vue +14 -6
- package/dist/runtime/components/model/Autocomplete.vue +24 -12
- package/dist/runtime/components/model/Combobox.vue +24 -12
- package/dist/runtime/components/model/Pad.vue +15 -3
- package/dist/runtime/components/model/Select.vue +19 -7
- package/dist/runtime/components/model/Table.vue +30 -18
- package/dist/runtime/components/model/iterator.vue +36 -28
- package/dist/runtime/components/model/label.vue +16 -8
- package/dist/runtime/components/pdf/Print.vue +17 -5
- package/dist/runtime/components/pdf/View.vue +18 -6
- package/dist/runtime/composables/alert.d.ts +4 -0
- package/dist/runtime/composables/api.d.ts +4 -0
- package/dist/runtime/composables/document/templateFormHidden.d.ts +4 -0
- package/dist/runtime/composables/localStorageModel.d.ts +4 -0
- package/dist/runtime/composables/lookupList.d.ts +4 -0
- package/dist/runtime/composables/menu.d.ts +4 -0
- package/dist/runtime/composables/useMrzReader.d.ts +48 -0
- package/dist/runtime/composables/useMrzReader.js +423 -0
- package/dist/runtime/composables/useTesseract.d.ts +16 -0
- package/dist/runtime/composables/useTesseract.js +45 -0
- package/dist/runtime/utils/asset.d.ts +2 -0
- package/dist/runtime/utils/asset.js +49 -0
- package/package.json +12 -3
- package/scripts/enrich-vue-docs-from-ai.mjs +197 -0
- package/scripts/generate-ai-summary.mjs +321 -0
- package/scripts/generate-composables-md.mjs +129 -0
- package/templates/public/tesseract/mrz.traineddata.gz +0 -0
- package/templates/public/tesseract/ocrb.traineddata.gz +0 -0
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
/**
|
|
3
|
+
* ModelCombobox 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
|
+
*/
|
|
2
6
|
import { VCombobox } from 'vuetify/components/VCombobox'
|
|
3
7
|
import { defineModel, withDefaults } from 'vue'
|
|
4
8
|
import { useLookupList, type LookupProps } from '../../composables/lookupList'
|
|
@@ -6,22 +10,30 @@ import { useLocalStorageModel, type PersistSlimProps } from '../../composables/l
|
|
|
6
10
|
|
|
7
11
|
interface Props extends /* @vue-ignore */ InstanceType<typeof VCombobox['$props']> {}
|
|
8
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Public props accepted by ModelCombobox.
|
|
15
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
16
|
+
*/
|
|
9
17
|
const props = withDefaults(defineProps<Props & LookupProps & PersistSlimProps>(), {
|
|
10
|
-
fuzzy: false,
|
|
11
|
-
showCode: false,
|
|
12
|
-
cache: false,
|
|
13
|
-
serverSearch: false,
|
|
14
|
-
searchSearchSort: false,
|
|
15
|
-
serverSearchText: 'Type to search…',
|
|
16
|
-
serverSearchLoadingText: 'Searching…',
|
|
17
|
-
serverSearchDebounce: 500,
|
|
18
|
+
fuzzy: false, // Enables fuzzy matching when filtering local options.
|
|
19
|
+
showCode: false, // Displays code values alongside labels in option lists.
|
|
20
|
+
cache: false, // Enables cached requests; number values represent cache TTL in milliseconds.
|
|
21
|
+
serverSearch: false, // Uses remote search requests instead of local filtering.
|
|
22
|
+
searchSearchSort: false, // Sorts server-search results based on search relevance.
|
|
23
|
+
serverSearchText: 'Type to search…', // Placeholder/help text shown before server search starts.
|
|
24
|
+
serverSearchLoadingText: 'Searching…', // Status text shown while server search request is running.
|
|
25
|
+
serverSearchDebounce: 500, // Debounce delay in milliseconds before sending server search.
|
|
18
26
|
|
|
19
|
-
statusField: 'statusCode',
|
|
20
|
-
activeValue: 'active',
|
|
21
|
-
hideInactiveInList: false,
|
|
22
|
-
preventSelectingInactive: false,
|
|
27
|
+
statusField: 'statusCode', // Field name that indicates active/inactive status in each item.
|
|
28
|
+
activeValue: 'active', // Value in statusField treated as active/selectable.
|
|
29
|
+
hideInactiveInList: false, // Hides inactive options from the displayed selection list.
|
|
30
|
+
preventSelectingInactive: false, // Blocks selecting inactive options even if present in the dataset.
|
|
23
31
|
})
|
|
24
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Custom events emitted by ModelCombobox.
|
|
35
|
+
* Parents can listen to these events to react to user actions and internal state changes.
|
|
36
|
+
*/
|
|
25
37
|
const emit = defineEmits<{
|
|
26
38
|
(e: 'update:selectedObject', object: any | any[]): void
|
|
27
39
|
}>()
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
/**
|
|
3
|
+
* ModelPad 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
|
+
*/
|
|
2
6
|
import { computed, useTemplateRef, defineExpose } from 'vue'
|
|
3
7
|
import { type GraphqlModelItemProps, useGraphqlModelItem } from '../../composables/graphqlModelItem'
|
|
4
8
|
import type {FormDialogCallback} from '../../types/formDialog'
|
|
@@ -10,11 +14,15 @@ defineOptions({
|
|
|
10
14
|
})
|
|
11
15
|
|
|
12
16
|
interface Props extends /* @vue-ignore */ InstanceType<typeof EditPad['$props']> {
|
|
13
|
-
title?: string
|
|
14
|
-
saveCaption?: string
|
|
15
|
-
cancelCaption?: string
|
|
17
|
+
title?: string // Title text displayed in the component header or dialog.
|
|
18
|
+
saveCaption?: string // Label text for the save/confirm action button.
|
|
19
|
+
cancelCaption?: string // Label text for the cancel action button.
|
|
16
20
|
}
|
|
17
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Public props accepted by ModelPad.
|
|
24
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
25
|
+
*/
|
|
18
26
|
const props = withDefaults(defineProps<Props & GraphqlModelItemProps>(), {
|
|
19
27
|
fields: () => ['*'],
|
|
20
28
|
|
|
@@ -22,6 +30,10 @@ const props = withDefaults(defineProps<Props & GraphqlModelItemProps>(), {
|
|
|
22
30
|
cancelCaption: 'ยกเลิก',
|
|
23
31
|
})
|
|
24
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Custom events emitted by ModelPad.
|
|
35
|
+
* Parents can listen to these events to react to user actions and internal state changes.
|
|
36
|
+
*/
|
|
25
37
|
const emit = defineEmits(['create', 'update'])
|
|
26
38
|
|
|
27
39
|
const { item,
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
/**
|
|
3
|
+
* ModelSelect 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
|
+
*/
|
|
2
6
|
import { VCombobox } from 'vuetify/components/VCombobox'
|
|
3
7
|
import { defineModel, withDefaults } from 'vue'
|
|
4
8
|
import { useLookupList, type StaticLookupProps } from '../../composables/lookupList'
|
|
@@ -6,17 +10,25 @@ import { useLocalStorageModel, type PersistSlimProps } from '../../composables/l
|
|
|
6
10
|
|
|
7
11
|
interface Props extends /* @vue-ignore */ InstanceType<typeof VCombobox['$props']> {}
|
|
8
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Public props accepted by ModelSelect.
|
|
15
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
16
|
+
*/
|
|
9
17
|
const props = withDefaults(defineProps<Props & StaticLookupProps & PersistSlimProps>(), {
|
|
10
|
-
fuzzy: false,
|
|
11
|
-
showCode: false,
|
|
12
|
-
cache: false,
|
|
18
|
+
fuzzy: false, // Enables fuzzy matching when filtering local options.
|
|
19
|
+
showCode: false, // Displays code values alongside labels in option lists.
|
|
20
|
+
cache: false, // Enables cached requests; number values represent cache TTL in milliseconds.
|
|
13
21
|
|
|
14
|
-
statusField: 'statusCode',
|
|
15
|
-
activeValue: 'active',
|
|
16
|
-
hideInactiveInList: false,
|
|
17
|
-
preventSelectingInactive: false,
|
|
22
|
+
statusField: 'statusCode', // Field name that indicates active/inactive status in each item.
|
|
23
|
+
activeValue: 'active', // Value in statusField treated as active/selectable.
|
|
24
|
+
hideInactiveInList: false, // Hides inactive options from the displayed selection list.
|
|
25
|
+
preventSelectingInactive: false, // Blocks selecting inactive options even if present in the dataset.
|
|
18
26
|
})
|
|
19
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Custom events emitted by ModelSelect.
|
|
30
|
+
* Parents can listen to these events to react to user actions and internal state changes.
|
|
31
|
+
*/
|
|
20
32
|
const emit = defineEmits<{
|
|
21
33
|
(e: 'update:selectedObject', object: any | any[]): void
|
|
22
34
|
}>()
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
/**
|
|
3
|
+
* ModelTable 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
|
+
*/
|
|
2
6
|
import {computed,watch, nextTick, ref, useAttrs} from 'vue'
|
|
3
7
|
import {VDataTable} from 'vuetify/components/VDataTable'
|
|
4
8
|
import {clone} from 'lodash-es'
|
|
@@ -14,26 +18,30 @@ defineOptions({
|
|
|
14
18
|
})
|
|
15
19
|
|
|
16
20
|
interface Props extends /* @vue-ignore */ InstanceType<typeof VDataTable['$props']> {
|
|
17
|
-
title: string
|
|
18
|
-
noDataText?: string
|
|
19
|
-
dialogWidth?: string | number
|
|
20
|
-
dialogMaxWidth?: string | number
|
|
21
|
-
dialogHeight?: string | number
|
|
22
|
-
dialogMaxHeight?: string | number
|
|
23
|
-
dialogFullscreen?: boolean
|
|
24
|
-
initialData?: Record<string, any>
|
|
25
|
-
toolbarColor?: string
|
|
26
|
-
importable?: boolean
|
|
27
|
-
exportable?: boolean
|
|
28
|
-
insertable?: boolean
|
|
29
|
-
searchable?: boolean
|
|
30
|
-
search?: string
|
|
31
|
-
saveAndStay?: boolean
|
|
32
|
-
stringFields?: Array<string>
|
|
33
|
-
onlyOwnerEdit?: boolean
|
|
34
|
-
onlyOwnerOverridePermission?: string | string[]
|
|
21
|
+
title: string // Toolbar title and default export filename for this model table.
|
|
22
|
+
noDataText?: string // Message shown when query returns no rows.
|
|
23
|
+
dialogWidth?: string | number // Width passed to create/edit model dialog.
|
|
24
|
+
dialogMaxWidth?: string | number // Max-width cap for model dialog on large displays.
|
|
25
|
+
dialogHeight?: string | number // Height passed to create/edit model dialog.
|
|
26
|
+
dialogMaxHeight?: string | number // Max-height cap for model dialog before internal scrolling.
|
|
27
|
+
dialogFullscreen?: boolean // Opens model dialog fullscreen by default.
|
|
28
|
+
initialData?: Record<string, any> // Base values merged into create payload before dialog submission.
|
|
29
|
+
toolbarColor?: string // Color used by toolbar and built-in action buttons.
|
|
30
|
+
importable?: boolean // Enables CSV/XLS import action (requires create permission).
|
|
31
|
+
exportable?: boolean // Enables export action for currently loaded model items.
|
|
32
|
+
insertable?: boolean // Shows Add button and allows create flow.
|
|
33
|
+
searchable?: boolean // Shows search input and forwards keyword into GraphQL model search state.
|
|
34
|
+
search?: string // External search keyword; watcher keeps internal model search in sync.
|
|
35
|
+
saveAndStay?: boolean // Forwards to dialog form to keep modal open after successful save.
|
|
36
|
+
stringFields?: Array<string> // Field paths that must remain plain strings during import/export transforms.
|
|
37
|
+
onlyOwnerEdit?: boolean // When true, edit/delete are allowed only for rows created by current user.
|
|
38
|
+
onlyOwnerOverridePermission?: string | string[] // Permission key(s) that bypass `onlyOwnerEdit` restriction.
|
|
35
39
|
}
|
|
36
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Public props accepted by ModelTable.
|
|
43
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
44
|
+
*/
|
|
37
45
|
const props = withDefaults(defineProps<Props & GraphqlModelProps>(), {
|
|
38
46
|
noDataText: 'ไม่พบข้อมูล',
|
|
39
47
|
dialogFullscreen: false,
|
|
@@ -50,6 +58,10 @@ const props = withDefaults(defineProps<Props & GraphqlModelProps>(), {
|
|
|
50
58
|
onlyOwnerEdit: false,
|
|
51
59
|
})
|
|
52
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Custom events emitted by ModelTable.
|
|
63
|
+
* Parents can listen to these events to react to user actions and internal state changes.
|
|
64
|
+
*/
|
|
53
65
|
const emit = defineEmits(['open:dialog','close:dialog','create','update','delete'])
|
|
54
66
|
const attrs = useAttrs()
|
|
55
67
|
const plainAttrs = computed(() => {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
/**
|
|
3
|
+
* ModelIterator 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
|
+
*/
|
|
2
6
|
import {computed, nextTick, ref, useAttrs, useSlots, watch} from 'vue'
|
|
3
7
|
import {VDataIterator} from 'vuetify/components/VDataIterator'
|
|
4
8
|
import {VDataTable} from "vuetify/components/VDataTable";
|
|
@@ -12,36 +16,40 @@ defineOptions({
|
|
|
12
16
|
})
|
|
13
17
|
|
|
14
18
|
interface Props extends /* @vue-ignore */ InstanceType<typeof VDataIterator['$props']> {
|
|
15
|
-
title: string
|
|
16
|
-
noDataText?: string
|
|
17
|
-
dialogFullscreen?: boolean
|
|
18
|
-
initialData?: Record<string, any>
|
|
19
|
-
toolbarColor?: string
|
|
20
|
-
importable?: boolean
|
|
21
|
-
exportable?: boolean
|
|
22
|
-
insertable?: boolean
|
|
23
|
-
searchable?: boolean
|
|
24
|
-
search?: string
|
|
25
|
-
|
|
26
|
-
viewSwitch?: boolean
|
|
27
|
-
viewSwitchMultiple?: boolean
|
|
28
|
-
|
|
29
|
-
cols?: string | number | boolean
|
|
30
|
-
xxl?: string | number | boolean
|
|
31
|
-
xl?: string | number | boolean
|
|
32
|
-
lg?: string | number | boolean
|
|
33
|
-
md?: string | number | boolean
|
|
34
|
-
sm?: string | number | boolean
|
|
35
|
-
itemsPerPage?: string | number
|
|
36
|
-
|
|
37
|
-
preferTable?: string | number | boolean
|
|
38
|
-
preferTableXxl?: string | number | boolean
|
|
39
|
-
preferTableXl?: string | number | boolean
|
|
40
|
-
preferTableLg?: string | number | boolean
|
|
41
|
-
preferTableMd?: string | number | boolean
|
|
42
|
-
preferTableSm?: string | number | boolean
|
|
19
|
+
title: string // Toolbar title for this model-backed iterator/table block.
|
|
20
|
+
noDataText?: string // Empty-state message shown when model query has no results.
|
|
21
|
+
dialogFullscreen?: boolean // Opens create/edit dialog fullscreen by default.
|
|
22
|
+
initialData?: Record<string, any> // Default values merged with `modelBy` before opening create dialog.
|
|
23
|
+
toolbarColor?: string // Toolbar/action color theme token.
|
|
24
|
+
importable?: boolean // Enables import action for creating many model rows at once.
|
|
25
|
+
exportable?: boolean // Enables export action for current model result set.
|
|
26
|
+
insertable?: boolean // Enables create action for new model rows.
|
|
27
|
+
searchable?: boolean // Shows search input and updates GraphQL model search state.
|
|
28
|
+
search?: string // External search value synced into internal search ref via watcher.
|
|
29
|
+
|
|
30
|
+
viewSwitch?: boolean // Displays control for switching between card iterator and table presentations.
|
|
31
|
+
viewSwitchMultiple?: boolean // Allows multiple selected view chips when switch UI supports it.
|
|
32
|
+
|
|
33
|
+
cols?: string | number | boolean // Base columns used by iterator card grid.
|
|
34
|
+
xxl?: string | number | boolean // Card grid columns at `xxl` breakpoint.
|
|
35
|
+
xl?: string | number | boolean // Card grid columns at `xl` breakpoint.
|
|
36
|
+
lg?: string | number | boolean // Card grid columns at `lg` breakpoint.
|
|
37
|
+
md?: string | number | boolean // Card grid columns at `md` breakpoint.
|
|
38
|
+
sm?: string | number | boolean // Card grid columns at `sm` breakpoint.
|
|
39
|
+
itemsPerPage?: string | number // Items per page for iterator/table pagination (`all` supported).
|
|
40
|
+
|
|
41
|
+
preferTable?: string | number | boolean // Auto view strategy: always table (`true`) or table after N items (number).
|
|
42
|
+
preferTableXxl?: string | number | boolean // `xxl` override for `preferTable`.
|
|
43
|
+
preferTableXl?: string | number | boolean // `xl` override for `preferTable`.
|
|
44
|
+
preferTableLg?: string | number | boolean // `lg` override for `preferTable`.
|
|
45
|
+
preferTableMd?: string | number | boolean // `md` override for `preferTable`.
|
|
46
|
+
preferTableSm?: string | number | boolean // `sm` override for `preferTable`.
|
|
43
47
|
}
|
|
44
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Public props accepted by ModelIterator.
|
|
51
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
52
|
+
*/
|
|
45
53
|
const props = withDefaults(defineProps<Props & GraphqlModelProps>(), {
|
|
46
54
|
noDataText: 'ไม่พบข้อมูล',
|
|
47
55
|
dialogFullscreen: false,
|
|
@@ -1,20 +1,28 @@
|
|
|
1
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
|
+
*/
|
|
2
6
|
import { computedAsync } from '@vueuse/core'
|
|
3
7
|
import { useGraphQlOperation } from '../../composables/graphqlOperation'
|
|
4
8
|
import { concat } from "lodash-es";
|
|
5
9
|
import { ref } from 'vue'
|
|
6
10
|
|
|
7
11
|
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
|
|
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
|
|
16
20
|
}
|
|
17
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Public props accepted by ModelLabel.
|
|
24
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
25
|
+
*/
|
|
18
26
|
const props = withDefaults(defineProps<Props>(), {
|
|
19
27
|
cache: false,
|
|
20
28
|
})
|
|
@@ -1,20 +1,32 @@
|
|
|
1
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
|
+
*/
|
|
2
6
|
import printJS from 'print-js'
|
|
3
7
|
import { ref, watch } from 'vue'
|
|
4
8
|
import { useAlert } from '../../composables/alert'
|
|
5
9
|
|
|
6
10
|
interface Props {
|
|
7
|
-
base64String?: string
|
|
8
|
-
fileName?: string
|
|
9
|
-
print?: boolean
|
|
10
|
-
title?: string
|
|
11
|
-
disabled?: boolean
|
|
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
|
|
12
16
|
}
|
|
13
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Public props accepted by PdfPrint.
|
|
20
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
21
|
+
*/
|
|
14
22
|
const props = withDefaults(defineProps<Props>(), {
|
|
15
23
|
print: false,
|
|
16
24
|
disabled: false,
|
|
17
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
|
+
*/
|
|
18
30
|
const emit = defineEmits(['update:print'])
|
|
19
31
|
|
|
20
32
|
const isMobile = ref(false)
|
|
@@ -1,4 +1,8 @@
|
|
|
1
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
|
+
*/
|
|
2
6
|
import PDF from 'pdf-vue3'
|
|
3
7
|
import { uid } from 'uid'
|
|
4
8
|
import printJS from 'print-js'
|
|
@@ -6,14 +10,18 @@ import { ref, computed } from 'vue'
|
|
|
6
10
|
import { useAlert } from '../../composables/alert'
|
|
7
11
|
|
|
8
12
|
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
|
|
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.
|
|
15
19
|
}
|
|
16
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Public props accepted by PdfView.
|
|
23
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
24
|
+
*/
|
|
17
25
|
const props = withDefaults(defineProps<Props>(), {
|
|
18
26
|
base64String: '',
|
|
19
27
|
title: '',
|
|
@@ -23,6 +31,10 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
23
31
|
showBackToTopBtn: false,
|
|
24
32
|
})
|
|
25
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
|
+
*/
|
|
26
38
|
const emit = defineEmits(['closeDialog'])
|
|
27
39
|
const base64 = ref(props.base64String)
|
|
28
40
|
const alert = useAlert()
|
|
@@ -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,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;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useLocalStorageModel persists model state in local storage with optional encryption and cache invalidation controls.
|
|
3
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
4
|
+
*/
|
|
1
5
|
import { type Ref } from 'vue';
|
|
2
6
|
export interface PersistSlimProps {
|
|
3
7
|
/** enable persistence */
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useLookupList loads and normalizes lookup options for fields that depend on remote or cached reference lists.
|
|
3
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
4
|
+
*/
|
|
1
5
|
import { type Ref } from 'vue';
|
|
2
6
|
export interface StaticLookupProps {
|
|
3
7
|
fuzzy?: boolean;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useMenu manages menu configuration, filtering, and visibility behavior for navigation and action surfaces.
|
|
3
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
4
|
+
*/
|
|
1
5
|
import { type ComputedRef, type InjectionKey, type Ref } from 'vue';
|
|
2
6
|
import { type RouteRecordNormalized, type RouteRecordRaw } from 'vue-router';
|
|
3
7
|
import { type MenuItem } from '../types/menu.js';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check-digit map extracted from a parsed TD3 MRZ payload.
|
|
3
|
+
*/
|
|
4
|
+
export type MrzCheckDigits = {
|
|
5
|
+
passportNumber?: string;
|
|
6
|
+
birthDate?: string;
|
|
7
|
+
expirationDate?: string;
|
|
8
|
+
personalNumber?: string;
|
|
9
|
+
composite?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Normalized MRZ parsing result after checksum/date validation.
|
|
13
|
+
*/
|
|
14
|
+
export interface MrzResult {
|
|
15
|
+
raw: string;
|
|
16
|
+
lines: string[];
|
|
17
|
+
fields: {
|
|
18
|
+
documentType?: string;
|
|
19
|
+
issuingState?: string;
|
|
20
|
+
surname?: string;
|
|
21
|
+
givenNames?: string;
|
|
22
|
+
passportNumber?: string;
|
|
23
|
+
nationality?: string;
|
|
24
|
+
birthDate?: string;
|
|
25
|
+
sex?: string;
|
|
26
|
+
expirationDate?: string;
|
|
27
|
+
personalNumber?: string;
|
|
28
|
+
checkDigits?: MrzCheckDigits;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface UseMrzReaderOptions {
|
|
32
|
+
scaleFactor?: number;
|
|
33
|
+
useOpenCv?: boolean;
|
|
34
|
+
lang?: string;
|
|
35
|
+
langPath?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* MRZ reader pipeline for camera/video/image sources.
|
|
39
|
+
* Performs OCR, candidate-region extraction, TD3 parsing, and checksum validation.
|
|
40
|
+
*/
|
|
41
|
+
export declare function useMrzReader(options?: UseMrzReaderOptions): {
|
|
42
|
+
ensureOpenCvReady: () => Promise<boolean>;
|
|
43
|
+
opencvReady: import("vue").Ref<boolean, boolean>;
|
|
44
|
+
ocrProgress: import("vue").Ref<number, number>;
|
|
45
|
+
ocrStatus: import("vue").Ref<string, string>;
|
|
46
|
+
decodeFromVideoElement: (video: HTMLVideoElement) => Promise<MrzResult | undefined>;
|
|
47
|
+
decodeFromImageFile: (file: File) => Promise<MrzResult | undefined>;
|
|
48
|
+
};
|