@ramathibodi/nuxt-commons 0.1.72 → 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 +25 -7
- package/dist/runtime/components/master/Combobox.vue +26 -8
- package/dist/runtime/components/master/RadioGroup.vue +17 -5
- package/dist/runtime/components/master/Select.vue +24 -7
- package/dist/runtime/components/master/label.vue +14 -6
- package/dist/runtime/components/model/Autocomplete.vue +31 -12
- package/dist/runtime/components/model/Combobox.vue +30 -12
- package/dist/runtime/components/model/Pad.vue +15 -3
- package/dist/runtime/components/model/Select.vue +27 -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 +16 -5
- package/dist/runtime/composables/lookupList.js +71 -21
- package/dist/runtime/composables/lookupListMaster.d.ts +4 -0
- package/dist/runtime/composables/lookupListMaster.js +9 -4
- 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
|
+
* DeviceScanner bridges UI actions with host-agent hardware/device operations and emits runtime scan/read results.
|
|
4
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
5
|
+
*/
|
|
2
6
|
import { computed, ref, watch, reactive } from 'vue'
|
|
3
7
|
import type { Base64File } from '../../composables/assetFile'
|
|
4
8
|
import { useAlert } from '../../composables/alert'
|
|
@@ -13,20 +17,28 @@ import {
|
|
|
13
17
|
const alert = useAlert()
|
|
14
18
|
const host = useHostAgent()
|
|
15
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Custom events emitted by DeviceScanner.
|
|
22
|
+
* Parents can listen to these events to react to user actions and internal state changes.
|
|
23
|
+
*/
|
|
16
24
|
const emit = defineEmits<{
|
|
17
25
|
(e: 'scan', files: Base64File[]): void
|
|
18
26
|
}>()
|
|
19
27
|
|
|
20
28
|
interface Props {
|
|
21
|
-
feeder?: boolean
|
|
22
|
-
duplex?: boolean
|
|
23
|
-
dpi?: number
|
|
24
|
-
quality?: number
|
|
29
|
+
feeder?: boolean // Uses ADF feeder mode instead of flatbed scanning.
|
|
30
|
+
duplex?: boolean // Scans both sides of pages when feeder mode supports duplex.
|
|
31
|
+
dpi?: number // Scan resolution in DPI for image quality and file size tradeoff.
|
|
32
|
+
quality?: number // Compression/quality value used when exporting scanned images.
|
|
25
33
|
/** UI string: 'color' | 'grey' | 'bw' */
|
|
26
|
-
color?: string
|
|
27
|
-
maxSize?: number
|
|
34
|
+
color?: string // Vuetify color name applied to the visual element.
|
|
35
|
+
maxSize?: number // Maximum allowed output size (MB) before upload is blocked.
|
|
28
36
|
}
|
|
29
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Public props accepted by DeviceScanner.
|
|
40
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
41
|
+
*/
|
|
30
42
|
const props = withDefaults(defineProps<Props>(), {
|
|
31
43
|
feeder: false,
|
|
32
44
|
duplex: false,
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
/**
|
|
3
|
+
* DialogConfirm coordinates modal rendering and interactions for runtime dialog flows.
|
|
4
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
5
|
+
*/
|
|
2
6
|
import { type Ref, ref, watch, computed } from 'vue'
|
|
3
7
|
import { isEqual, isUndefined, isEmpty } from 'lodash-es'
|
|
4
8
|
|
|
5
9
|
interface DialogProps {
|
|
6
|
-
title?: string
|
|
7
|
-
modelValue: boolean
|
|
8
|
-
message?: string
|
|
9
|
-
buttonTrueText?: string
|
|
10
|
-
buttonFalseText?: string
|
|
11
|
-
type?: 'primary' | 'success' | 'warning' | 'info' | 'error'
|
|
12
|
-
confirmData?: string
|
|
13
|
-
width?: string
|
|
10
|
+
title?: string // Title text displayed in the component header or dialog.
|
|
11
|
+
modelValue: boolean // Bound value for v-model synchronization with the parent component.
|
|
12
|
+
message?: string // main message body shown in UI
|
|
13
|
+
buttonTrueText?: string // label for the confirm/primary action
|
|
14
|
+
buttonFalseText?: string // label for the cancel/secondary action
|
|
15
|
+
type?: 'primary' | 'success' | 'warning' | 'info' | 'error' // visual variant controlling color and intent semantics
|
|
16
|
+
confirmData?: string // confirmation text that users must type before continue
|
|
17
|
+
width?: string // dialog/component width in CSS-compatible units
|
|
14
18
|
}
|
|
15
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Public props accepted by DialogConfirm.
|
|
22
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
23
|
+
*/
|
|
16
24
|
const props = withDefaults(defineProps<DialogProps>(), {
|
|
17
25
|
title: 'ยืนยัน',
|
|
18
26
|
message: 'ยืนยันทำรายการนี้',
|
|
@@ -21,6 +29,10 @@ const props = withDefaults(defineProps<DialogProps>(), {
|
|
|
21
29
|
width: 'auto',
|
|
22
30
|
})
|
|
23
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Custom events emitted by DialogConfirm.
|
|
34
|
+
* Parents can listen to these events to react to user actions and internal state changes.
|
|
35
|
+
*/
|
|
24
36
|
const emit = defineEmits<{
|
|
25
37
|
(e: 'update:result', value: boolean): void
|
|
26
38
|
(e: 'update:modelValue', value: boolean): void
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* DialogHost coordinates modal rendering and interactions for runtime dialog flows.
|
|
4
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
5
|
+
*/
|
|
2
6
|
import {shallowReactive, onMounted} from 'vue'
|
|
3
7
|
import {useDialog} from "../../composables/dialog"
|
|
4
8
|
import type {DialogOpenResult} from "../../types/dialogManager";
|
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
/**
|
|
3
|
+
* DialogIndex coordinates modal rendering and interactions for runtime dialog flows.
|
|
4
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
5
|
+
*/
|
|
2
6
|
import { computed } from 'vue'
|
|
3
7
|
|
|
4
8
|
interface DialogProps {
|
|
5
|
-
modelValue?: boolean
|
|
6
|
-
title?: string
|
|
7
|
-
message?: string
|
|
8
|
-
type?: 'success' | 'error' | 'warning' | 'info'
|
|
9
|
-
width?: number | string
|
|
9
|
+
modelValue?: boolean // Bound value for v-model synchronization with the parent component.
|
|
10
|
+
title?: string // Title text displayed in the component header or dialog.
|
|
11
|
+
message?: string // main message body shown in UI
|
|
12
|
+
type?: 'success' | 'error' | 'warning' | 'info' // visual variant controlling color and intent semantics
|
|
13
|
+
width?: number | string // dialog/component width in CSS-compatible units
|
|
10
14
|
}
|
|
11
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Public props accepted by DialogIndex.
|
|
18
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
19
|
+
*/
|
|
12
20
|
const props = defineProps<DialogProps>()
|
|
21
|
+
/**
|
|
22
|
+
* Custom events emitted by DialogIndex.
|
|
23
|
+
* Parents can listen to these events to react to user actions and internal state changes.
|
|
24
|
+
*/
|
|
13
25
|
const emit = defineEmits(['update:modelValue'])
|
|
14
26
|
|
|
15
27
|
const dialogIcon = computed(() => {
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* DialogLoading coordinates modal rendering and interactions for runtime dialog flows.
|
|
4
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
5
|
+
*/
|
|
2
6
|
import { ref, watch } from 'vue'
|
|
3
7
|
|
|
4
8
|
interface DialogProps {
|
|
5
|
-
modelValue: boolean
|
|
6
|
-
color?: string
|
|
9
|
+
modelValue: boolean // Bound value for v-model synchronization with the parent component.
|
|
10
|
+
color?: string // Vuetify color name applied to the visual element.
|
|
7
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Custom events emitted by DialogLoading.
|
|
14
|
+
* Parents can listen to these events to react to user actions and internal state changes.
|
|
15
|
+
*/
|
|
8
16
|
const emit = defineEmits(['update:modelValue'])
|
|
9
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Public props accepted by DialogLoading.
|
|
20
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
21
|
+
*/
|
|
10
22
|
const props = defineProps<DialogProps>()
|
|
11
23
|
const dialogVisible = ref<boolean>(props.modelValue)
|
|
12
24
|
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
/**
|
|
3
|
+
* DialogDefaultConfirm 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
|
+
*/
|
|
2
6
|
import { ref, watch, computed, type Ref } from 'vue'
|
|
3
7
|
import { isEqual, isUndefined, isEmpty } from 'lodash-es'
|
|
4
8
|
|
|
5
9
|
interface DialogProps {
|
|
6
|
-
title?: string
|
|
7
|
-
modelValue: boolean
|
|
8
|
-
message?: string
|
|
9
|
-
buttonTrueText?: string
|
|
10
|
-
buttonFalseText?: string
|
|
11
|
-
type?: 'primary' | 'success' | 'warning' | 'info' | 'error'
|
|
12
|
-
confirmData?: string
|
|
13
|
-
width?: string
|
|
10
|
+
title?: string // Title text displayed in the component header or dialog.
|
|
11
|
+
modelValue: boolean // Bound value for v-model synchronization with the parent component.
|
|
12
|
+
message?: string // main message body shown in UI
|
|
13
|
+
buttonTrueText?: string // label for the confirm/primary action
|
|
14
|
+
buttonFalseText?: string // label for the cancel/secondary action
|
|
15
|
+
type?: 'primary' | 'success' | 'warning' | 'info' | 'error' // visual variant controlling color and intent semantics
|
|
16
|
+
confirmData?: string // confirmation text that users must type before continue
|
|
17
|
+
width?: string // dialog/component width in CSS-compatible units
|
|
14
18
|
}
|
|
15
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Public props accepted by DialogDefaultConfirm.
|
|
22
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
23
|
+
*/
|
|
16
24
|
const props = withDefaults(defineProps<DialogProps>(), {
|
|
17
25
|
title: 'Confirm',
|
|
18
26
|
message: 'Do you want to proceed?',
|
|
@@ -22,6 +30,10 @@ const props = withDefaults(defineProps<DialogProps>(), {
|
|
|
22
30
|
width: 'auto',
|
|
23
31
|
})
|
|
24
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Custom events emitted by DialogDefaultConfirm.
|
|
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:modelValue', value: boolean): void
|
|
27
39
|
(e: 'resolve', value: boolean): void
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* DialogDefaultLoading 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
|
+
*/
|
|
2
6
|
import { ref, watch } from 'vue'
|
|
3
7
|
|
|
4
8
|
interface DialogProps {
|
|
5
|
-
modelValue: boolean
|
|
6
|
-
color?: string
|
|
9
|
+
modelValue: boolean // Bound value for v-model synchronization with the parent component.
|
|
10
|
+
color?: string // Vuetify color name applied to the visual element.
|
|
7
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Custom events emitted by DialogDefaultLoading.
|
|
14
|
+
* Parents can listen to these events to react to user actions and internal state changes.
|
|
15
|
+
*/
|
|
8
16
|
const emit = defineEmits(['update:modelValue'])
|
|
9
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Public props accepted by DialogDefaultLoading.
|
|
20
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
21
|
+
*/
|
|
10
22
|
const props = defineProps<DialogProps>()
|
|
11
23
|
const dialogVisible = ref<boolean>(props.modelValue)
|
|
12
24
|
|
|
@@ -1,15 +1,23 @@
|
|
|
1
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
|
+
*/
|
|
2
6
|
import { ref, watch, type Ref } from 'vue'
|
|
3
7
|
|
|
4
8
|
interface DialogProps {
|
|
5
|
-
title?: string
|
|
6
|
-
modelValue: boolean
|
|
7
|
-
message?: string
|
|
8
|
-
buttonText?: string
|
|
9
|
-
type?: 'primary' | 'success' | 'warning' | 'info' | 'error'
|
|
10
|
-
width?: string
|
|
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
|
|
11
15
|
}
|
|
12
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Public props accepted by DialogDefaultNotify.
|
|
19
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
20
|
+
*/
|
|
13
21
|
const props = withDefaults(defineProps<DialogProps>(), {
|
|
14
22
|
title: 'Notice',
|
|
15
23
|
message: 'Something happened.',
|
|
@@ -18,6 +26,10 @@ const props = withDefaults(defineProps<DialogProps>(), {
|
|
|
18
26
|
width: 'auto',
|
|
19
27
|
})
|
|
20
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
|
+
*/
|
|
21
33
|
const emit = defineEmits<{
|
|
22
34
|
(e: 'update:modelValue', value: boolean): void
|
|
23
35
|
(e: 'resolve', value: boolean): void
|
|
@@ -1,11 +1,23 @@
|
|
|
1
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
|
+
*/
|
|
2
6
|
import { ref, watch } from 'vue'
|
|
3
7
|
|
|
4
8
|
interface DialogProps {
|
|
5
|
-
modelValue: boolean
|
|
6
|
-
color?: string
|
|
9
|
+
modelValue: boolean // Bound value for v-model synchronization with the parent component.
|
|
10
|
+
color?: string // Vuetify color name applied to the visual element.
|
|
7
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
|
+
*/
|
|
8
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
|
+
*/
|
|
9
21
|
const props = defineProps<DialogProps>()
|
|
10
22
|
const dialogVisible = ref(props.modelValue)
|
|
11
23
|
|
|
@@ -1,20 +1,28 @@
|
|
|
1
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
|
+
*/
|
|
2
6
|
import {computed, ref, type Ref, watch} from 'vue'
|
|
3
7
|
import {useDialog} from "../../../composables/dialog"
|
|
4
8
|
import {useGraphQlOperation} from "../../../composables/graphqlOperation";
|
|
5
9
|
import {type AuthenticationState, useState} from '#imports'
|
|
6
10
|
|
|
7
11
|
interface DialogProps {
|
|
8
|
-
title?: string
|
|
9
|
-
modelValue: boolean
|
|
10
|
-
message?: string
|
|
11
|
-
confirmButtonText?: string
|
|
12
|
-
cancelButtonText?: string
|
|
13
|
-
type?: 'primary' | 'success' | 'warning' | 'info' | 'error'
|
|
14
|
-
fixedUsername?: boolean | string
|
|
15
|
-
width?: string
|
|
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
|
|
16
20
|
}
|
|
17
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Public props accepted by DialogDefaultVerifyUser.
|
|
24
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
25
|
+
*/
|
|
18
26
|
const props = withDefaults(defineProps<DialogProps>(), {
|
|
19
27
|
title: 'Verify User',
|
|
20
28
|
message: 'Please enter your credentials to continue.',
|
|
@@ -25,6 +33,10 @@ const props = withDefaults(defineProps<DialogProps>(), {
|
|
|
25
33
|
width: '400',
|
|
26
34
|
})
|
|
27
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
|
+
*/
|
|
28
40
|
const emit = defineEmits<{
|
|
29
41
|
(e: 'update:modelValue', value: boolean): void
|
|
30
42
|
(e: 'resolve', value: string): void
|
|
@@ -1,12 +1,20 @@
|
|
|
1
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
|
+
*/
|
|
2
6
|
import {ref, withDefaults,watch,computed} from 'vue'
|
|
3
7
|
import {graphqlOperation} from '#imports'
|
|
4
8
|
|
|
5
9
|
interface Props {
|
|
6
|
-
templateCode: string
|
|
7
|
-
parentTemplates?: string|string[]
|
|
10
|
+
templateCode: string // Template identifier used to load document schema/config.
|
|
11
|
+
parentTemplates?: string|string[] // Parent template code(s) used for template inheritance/extension.
|
|
8
12
|
}
|
|
9
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Public props accepted by DocumentForm.
|
|
16
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
17
|
+
*/
|
|
10
18
|
const props = withDefaults(defineProps<Props>(), {
|
|
11
19
|
parentTemplates: (): string[] => [],
|
|
12
20
|
})
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
/**
|
|
3
|
+
* DocumentTemplateBuilder 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
|
+
*/
|
|
2
6
|
import {computed, ref, watch} from 'vue'
|
|
3
7
|
import * as prettier from 'prettier'
|
|
4
8
|
import prettierPluginHtml from 'prettier/plugins/html'
|
|
@@ -10,15 +14,23 @@ import 'vue-json-pretty/lib/styles.css';
|
|
|
10
14
|
import {safeParseJSONDeep} from "../../utils/object";
|
|
11
15
|
|
|
12
16
|
interface Props {
|
|
13
|
-
title?: string
|
|
14
|
-
disableAdvanceMode?: boolean
|
|
17
|
+
title?: string // Title text displayed in the component header or dialog.
|
|
18
|
+
disableAdvanceMode?: boolean // Disables advanced editor mode toggles and actions.
|
|
15
19
|
}
|
|
16
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Public props accepted by DocumentTemplateBuilder.
|
|
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
|
title: "Document Template",
|
|
19
27
|
disableAdvanceMode: false,
|
|
20
28
|
})
|
|
21
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Custom events emitted by DocumentTemplateBuilder.
|
|
32
|
+
* Parents can listen to these events to react to user actions and internal state changes.
|
|
33
|
+
*/
|
|
22
34
|
const emit = defineEmits(['update:modelValue'])
|
|
23
35
|
const modelValue = defineModel<string|Record<string, any>[]>()
|
|
24
36
|
|
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
/**
|
|
3
|
+
* FormActionPad is a schema-driven form field component that binds model data, renders field UI, and emits normalized updates.
|
|
4
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
5
|
+
*/
|
|
2
6
|
import {computed, defineExpose, ref, watchEffect} from 'vue'
|
|
3
7
|
import {cloneDeep, isEqual} from 'lodash-es'
|
|
4
8
|
import type {FormDialogCallback} from '../../types/formDialog'
|
|
5
9
|
import FormPadComponent from './Pad.vue'
|
|
6
10
|
|
|
7
11
|
interface Props extends /* @vue-ignore */ InstanceType<typeof FormPadComponent['$props']> {
|
|
8
|
-
title?: string
|
|
9
|
-
initialData?: object
|
|
10
|
-
saveCaption?: string
|
|
11
|
-
cancelCaption?: string
|
|
12
|
-
readonly?: boolean
|
|
13
|
-
showTitle?: boolean
|
|
14
|
-
skipValidation?:boolean
|
|
12
|
+
title?: string // Title text displayed in the component header or dialog.
|
|
13
|
+
initialData?: object // Initial form/object values used when creating a new record.
|
|
14
|
+
saveCaption?: string // Label text for the save/confirm action button.
|
|
15
|
+
cancelCaption?: string // Label text for the cancel action button.
|
|
16
|
+
readonly?: boolean // renders as read-only while keeping value visible
|
|
17
|
+
showTitle?: boolean // Shows or hides the component title/header area.
|
|
18
|
+
skipValidation?: boolean // Skips form validation before emitting save actions.
|
|
15
19
|
}
|
|
16
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Public props accepted by FormActionPad.
|
|
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
|
saveCaption: 'บันทึก',
|
|
19
27
|
cancelCaption: 'ยกเลิก',
|
|
@@ -27,6 +35,10 @@ const formPadRef = ref()
|
|
|
27
35
|
const formData = ref<object>({})
|
|
28
36
|
const formDataOriginalValue = ref<object>()
|
|
29
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Custom events emitted by FormActionPad.
|
|
40
|
+
* Parents can listen to these events to react to user actions and internal state changes.
|
|
41
|
+
*/
|
|
30
42
|
const emit = defineEmits(['create', 'update'])
|
|
31
43
|
|
|
32
44
|
function save() {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
/**
|
|
3
|
+
* FormBirthdate is a schema-driven form field component that binds model data, renders field UI, and emits normalized updates.
|
|
4
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
5
|
+
*/
|
|
2
6
|
import '@vuepic/vue-datepicker/dist/main.css'
|
|
3
7
|
import {computed, onMounted, ref} from 'vue'
|
|
4
8
|
import {VTextField} from "vuetify/components/VTextField";
|
|
@@ -12,15 +16,23 @@ interface IDobPrecision {
|
|
|
12
16
|
}
|
|
13
17
|
|
|
14
18
|
interface Props {
|
|
15
|
-
flow?: ('month' | 'year' | 'calendar' | 'time' | 'minutes' | 'hours' | 'seconds')[]
|
|
16
|
-
dobPrecisionText?: IDobPrecision
|
|
17
|
-
rules?: typeof VTextField['rules']
|
|
19
|
+
flow?: ('month' | 'year' | 'calendar' | 'time' | 'minutes' | 'hours' | 'seconds')[] // picker navigation flow order shown to users
|
|
20
|
+
dobPrecisionText?: IDobPrecision // Label map for birthdate precision values (day/month/year).
|
|
21
|
+
rules?: typeof VTextField['rules'] // validation rules applied before accepting input
|
|
18
22
|
}
|
|
19
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Public props accepted by FormBirthdate.
|
|
26
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
27
|
+
*/
|
|
20
28
|
const props = withDefaults(defineProps<Props>(), {
|
|
21
29
|
flow: () => ['year', 'month', 'calendar'],
|
|
22
30
|
})
|
|
23
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Custom events emitted by FormBirthdate.
|
|
34
|
+
* Parents can listen to these events to react to user actions and internal state changes.
|
|
35
|
+
*/
|
|
24
36
|
const emit = defineEmits(['update:modelValue'])
|
|
25
37
|
|
|
26
38
|
const modelValue = defineModel<string>()
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* FormCheckboxGroup is a schema-driven form field component that binds model data, renders field UI, and emits normalized updates.
|
|
4
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
5
|
+
*/
|
|
2
6
|
import { ref, watch, computed} from 'vue'
|
|
3
7
|
import { VCheckbox } from 'vuetify/components/VCheckbox'
|
|
4
8
|
import { join,without,filter,head,reject } from 'lodash-es'
|
|
@@ -7,15 +11,23 @@ interface Items {
|
|
|
7
11
|
value : any
|
|
8
12
|
}
|
|
9
13
|
interface Props extends /* @vue-ignore */ InstanceType<typeof VCheckbox['$props']>{
|
|
10
|
-
items
|
|
11
|
-
label
|
|
12
|
-
modelValue
|
|
13
|
-
inline
|
|
14
|
-
rules?: typeof import('vuetify/components')['VCheckbox']['rules']
|
|
14
|
+
items: Items[] // option collection used for selection rendering
|
|
15
|
+
label?: string // UI label displayed to end users
|
|
16
|
+
modelValue: [] // Bound value for v-model synchronization with the parent component.
|
|
17
|
+
inline?: boolean // Displays checkbox options inline instead of stacked.
|
|
18
|
+
rules?: typeof import('vuetify/components')['VCheckbox']['rules'] // validation rules applied before accepting input
|
|
15
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Public props accepted by FormCheckboxGroup.
|
|
22
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
23
|
+
*/
|
|
16
24
|
const props = withDefaults(defineProps<Props>(),{
|
|
17
25
|
inline:false
|
|
18
26
|
})
|
|
27
|
+
/**
|
|
28
|
+
* Custom events emitted by FormCheckboxGroup.
|
|
29
|
+
* Parents can listen to these events to react to user actions and internal state changes.
|
|
30
|
+
*/
|
|
19
31
|
const emit = defineEmits(['update:modelValue'])
|
|
20
32
|
const values = ref([])
|
|
21
33
|
const valuesOther = ref()
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* FormCodeEditor is a schema-driven form field component that binds model data, renders field UI, and emits normalized updates.
|
|
4
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
5
|
+
*/
|
|
2
6
|
import {Codemirror} from 'vue-codemirror'
|
|
3
7
|
import {oneDark} from '@codemirror/theme-one-dark'
|
|
4
8
|
import {javascript} from '@codemirror/lang-javascript'
|
|
@@ -6,11 +10,15 @@ import {html} from '@codemirror/lang-html'
|
|
|
6
10
|
import {vue as vueLang} from '@codemirror/lang-vue'
|
|
7
11
|
|
|
8
12
|
interface Props {
|
|
9
|
-
height?: string | number
|
|
10
|
-
minHeight?: string | number
|
|
11
|
-
lang?: 'html' | 'javascript' | 'vue'
|
|
13
|
+
height?: string | number // Fixed or minimum height applied to the component container.
|
|
14
|
+
minHeight?: string | number // Minimum editor/container height before scrolling is used.
|
|
15
|
+
lang?: 'html' | 'javascript' | 'vue' // Language code used when selecting localized option labels.
|
|
12
16
|
}
|
|
13
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Public props accepted by FormCodeEditor.
|
|
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
|
height: '100%',
|
|
16
24
|
minHeight: '20em',
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
+
/**
|
|
3
|
+
* FormDate is a schema-driven form field component that binds model data, renders field UI, and emits normalized updates.
|
|
4
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
5
|
+
*/
|
|
2
6
|
import { ref, watch, watchEffect, nextTick, defineExpose, computed} from 'vue'
|
|
3
7
|
import { VTextField } from 'vuetify/components/VTextField'
|
|
4
8
|
import Datepicker from '@vuepic/vue-datepicker'
|
|
@@ -9,19 +13,23 @@ import { useRules } from "../../composables/utils/validation";
|
|
|
9
13
|
import { th } from 'date-fns/locale';
|
|
10
14
|
|
|
11
15
|
interface Props extends /* @vue-ignore */ InstanceType<typeof VTextField['$props']> {
|
|
12
|
-
locale?: 'TH' | 'EN'
|
|
13
|
-
format?: dateFormat | string
|
|
14
|
-
modelValue?: string | null
|
|
15
|
-
holiday?: object[] | undefined
|
|
16
|
-
minDate?: Date | string
|
|
17
|
-
maxDate?: Date | string
|
|
18
|
-
pickerOnly?: boolean
|
|
19
|
-
flow?: ('month' | 'year' | 'calendar' | 'time' | 'minutes' | 'hours' | 'seconds')[]
|
|
20
|
-
rules?: typeof VTextField['rules']
|
|
21
|
-
|
|
22
|
-
defaultDate?: boolean | string
|
|
16
|
+
locale?: 'TH' | 'EN' // Locale used for date/time formatting and localized labels.
|
|
17
|
+
format?: dateFormat | string // Output format used when converting the value for display or emit.
|
|
18
|
+
modelValue?: string | null // Bound value for v-model synchronization with the parent component.
|
|
19
|
+
holiday?: object[] | undefined // Holiday date list used to decorate or block specific dates.
|
|
20
|
+
minDate?: Date | string // earliest selectable date allowed by business rules
|
|
21
|
+
maxDate?: Date | string // latest selectable date allowed by business rules
|
|
22
|
+
pickerOnly?: boolean // forces value selection through picker interaction only
|
|
23
|
+
flow?: ('month' | 'year' | 'calendar' | 'time' | 'minutes' | 'hours' | 'seconds')[] // picker navigation flow order shown to users
|
|
24
|
+
rules?: typeof VTextField['rules'] // validation rules applied before accepting input
|
|
25
|
+
|
|
26
|
+
defaultDate?: boolean | string // default date behavior/value when model is initially empty
|
|
23
27
|
}
|
|
24
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Public props accepted by FormDate.
|
|
31
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
32
|
+
*/
|
|
25
33
|
const props = withDefaults(defineProps<Props>(), {
|
|
26
34
|
locale: 'TH',
|
|
27
35
|
format: 'shortDate',
|
|
@@ -31,6 +39,10 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
31
39
|
defaultDate: false,
|
|
32
40
|
})
|
|
33
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Custom events emitted by FormDate.
|
|
44
|
+
* Parents can listen to these events to react to user actions and internal state changes.
|
|
45
|
+
*/
|
|
34
46
|
const emit = defineEmits(['update:modelValue'])
|
|
35
47
|
|
|
36
48
|
const computedRules = computed(() => {
|