@ramathibodi/nuxt-commons 0.1.74 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/dist/module.json +4 -4
- package/dist/module.mjs +4 -4
- package/dist/runtime/bridges/authentication.d.ts +21 -0
- package/dist/runtime/bridges/authentication.js +20 -0
- package/dist/runtime/bridges/graphql.d.ts +17 -0
- package/dist/runtime/bridges/graphql.js +45 -0
- package/dist/runtime/components/Alert.d.vue.ts +3 -0
- package/dist/runtime/components/Alert.vue +17 -26
- package/dist/runtime/components/Alert.vue.d.ts +3 -0
- package/dist/runtime/components/BarcodeReader.d.vue.ts +9 -0
- package/dist/runtime/components/BarcodeReader.vue +56 -81
- package/dist/runtime/components/BarcodeReader.vue.d.ts +9 -0
- package/dist/runtime/components/ExportCSV.d.vue.ts +55 -0
- package/dist/runtime/components/ExportCSV.vue +39 -76
- package/dist/runtime/components/ExportCSV.vue.d.ts +55 -0
- package/dist/runtime/components/FileBtn.d.vue.ts +53 -0
- package/dist/runtime/components/FileBtn.vue +23 -50
- package/dist/runtime/components/FileBtn.vue.d.ts +53 -0
- package/dist/runtime/components/ImportCSV.d.vue.ts +52 -0
- package/dist/runtime/components/ImportCSV.vue +60 -111
- package/dist/runtime/components/ImportCSV.vue.d.ts +52 -0
- package/dist/runtime/components/MrzReader.d.vue.ts +19 -0
- package/dist/runtime/components/MrzReader.vue +69 -109
- package/dist/runtime/components/MrzReader.vue.d.ts +19 -0
- package/dist/runtime/components/SplitterPanel.d.vue.ts +15 -0
- package/dist/runtime/components/SplitterPanel.vue +18 -35
- package/dist/runtime/components/SplitterPanel.vue.d.ts +15 -0
- package/dist/runtime/components/TabsGroup.d.vue.ts +19 -0
- package/dist/runtime/components/TabsGroup.vue +8 -20
- package/dist/runtime/components/TabsGroup.vue.d.ts +19 -0
- package/dist/runtime/components/TextBarcode.d.vue.ts +12 -0
- package/dist/runtime/components/TextBarcode.vue +22 -45
- package/dist/runtime/components/TextBarcode.vue.d.ts +12 -0
- package/dist/runtime/components/device/IdCardButton.d.vue.ts +57 -0
- package/dist/runtime/components/device/IdCardButton.vue +30 -67
- package/dist/runtime/components/device/IdCardButton.vue.d.ts +57 -0
- package/dist/runtime/components/device/IdCardWebSocket.d.vue.ts +55 -0
- package/dist/runtime/components/device/IdCardWebSocket.vue +104 -165
- package/dist/runtime/components/device/IdCardWebSocket.vue.d.ts +55 -0
- package/dist/runtime/components/device/Scanner.d.vue.ts +66 -0
- package/dist/runtime/components/device/Scanner.vue +97 -178
- package/dist/runtime/components/device/Scanner.vue.d.ts +66 -0
- package/dist/runtime/components/dialog/Confirm.d.vue.ts +37 -0
- package/dist/runtime/components/dialog/Confirm.vue +30 -59
- package/dist/runtime/components/dialog/Confirm.vue.d.ts +37 -0
- package/dist/runtime/components/dialog/Host.d.vue.ts +9 -0
- package/dist/runtime/components/dialog/Host.vue +34 -57
- package/dist/runtime/components/dialog/Host.vue.d.ts +9 -0
- package/dist/runtime/components/dialog/Index.d.vue.ts +24 -0
- package/dist/runtime/components/dialog/Index.vue +20 -40
- package/dist/runtime/components/dialog/Index.vue.d.ts +24 -0
- package/dist/runtime/components/dialog/Loading.d.vue.ts +21 -0
- package/dist/runtime/components/dialog/Loading.vue +12 -29
- package/dist/runtime/components/dialog/Loading.vue.d.ts +21 -0
- package/dist/runtime/components/dialog/default/Confirm.d.vue.ts +40 -0
- package/dist/runtime/components/dialog/default/Confirm.vue +29 -62
- package/dist/runtime/components/dialog/default/Confirm.vue.d.ts +40 -0
- package/dist/runtime/components/dialog/default/Loading.d.vue.ts +23 -0
- package/dist/runtime/components/dialog/default/Loading.vue +12 -29
- package/dist/runtime/components/dialog/default/Loading.vue.d.ts +23 -0
- package/dist/runtime/components/dialog/default/Notify.d.vue.ts +23 -0
- package/dist/runtime/components/dialog/default/Notify.vue +19 -48
- package/dist/runtime/components/dialog/default/Notify.vue.d.ts +23 -0
- package/dist/runtime/components/dialog/default/Printing.d.vue.ts +21 -0
- package/dist/runtime/components/dialog/default/Printing.vue +13 -29
- package/dist/runtime/components/dialog/default/Printing.vue.d.ts +21 -0
- package/dist/runtime/components/dialog/default/VerifyUser.d.vue.ts +29 -0
- package/dist/runtime/components/dialog/default/VerifyUser.vue +44 -82
- package/dist/runtime/components/dialog/default/VerifyUser.vue.d.ts +29 -0
- package/dist/runtime/components/document/Form.d.vue.ts +9 -0
- package/dist/runtime/components/document/Form.vue +27 -42
- package/dist/runtime/components/document/Form.vue.d.ts +9 -0
- package/dist/runtime/components/document/TemplateBuilder.d.vue.ts +24 -0
- package/dist/runtime/components/document/TemplateBuilder.vue +154 -194
- package/dist/runtime/components/document/TemplateBuilder.vue.d.ts +24 -0
- package/dist/runtime/components/form/ActionPad.d.vue.ts +114 -0
- package/dist/runtime/components/form/ActionPad.vue +48 -85
- package/dist/runtime/components/form/ActionPad.vue.d.ts +114 -0
- package/dist/runtime/components/form/Birthdate.d.vue.ts +38 -0
- package/dist/runtime/components/form/Birthdate.vue +44 -76
- package/dist/runtime/components/form/Birthdate.vue.d.ts +38 -0
- package/dist/runtime/components/form/CheckboxGroup.d.vue.ts +41 -0
- package/dist/runtime/components/form/CheckboxGroup.vue +34 -64
- package/dist/runtime/components/form/CheckboxGroup.vue.d.ts +41 -0
- package/dist/runtime/components/form/CodeEditor.d.vue.ts +25 -0
- package/dist/runtime/components/form/CodeEditor.vue +18 -36
- package/dist/runtime/components/form/CodeEditor.vue.d.ts +25 -0
- package/dist/runtime/components/form/Date.d.vue.ts +86 -0
- package/dist/runtime/components/form/Date.vue +109 -162
- package/dist/runtime/components/form/Date.vue.d.ts +86 -0
- package/dist/runtime/components/form/DateTime.d.vue.ts +36 -0
- package/dist/runtime/components/form/DateTime.vue +94 -143
- package/dist/runtime/components/form/DateTime.vue.d.ts +36 -0
- package/dist/runtime/components/form/Dialog.d.vue.ts +69 -0
- package/dist/runtime/components/form/Dialog.vue +60 -96
- package/dist/runtime/components/form/Dialog.vue.d.ts +69 -0
- package/dist/runtime/components/form/EditPad.d.vue.ts +113 -0
- package/dist/runtime/components/form/EditPad.vue +49 -85
- package/dist/runtime/components/form/EditPad.vue.d.ts +113 -0
- package/dist/runtime/components/form/File.d.vue.ts +65 -0
- package/dist/runtime/components/form/File.vue +112 -186
- package/dist/runtime/components/form/File.vue.d.ts +65 -0
- package/dist/runtime/components/form/Hidden.d.vue.ts +12 -0
- package/dist/runtime/components/form/Hidden.vue +17 -34
- package/dist/runtime/components/form/Hidden.vue.d.ts +12 -0
- package/dist/runtime/components/form/Iterator.d.vue.ts +279 -0
- package/dist/runtime/components/form/Iterator.vue +162 -252
- package/dist/runtime/components/form/Iterator.vue.d.ts +279 -0
- package/dist/runtime/components/form/Login.d.vue.ts +32 -0
- package/dist/runtime/components/form/Login.vue +23 -55
- package/dist/runtime/components/form/Login.vue.d.ts +32 -0
- package/dist/runtime/components/form/Pad.d.vue.ts +674 -0
- package/dist/runtime/components/form/Pad.vue +166 -265
- package/dist/runtime/components/form/Pad.vue.d.ts +674 -0
- package/dist/runtime/components/form/SignPad.d.vue.ts +62 -0
- package/dist/runtime/components/form/SignPad.vue +80 -126
- package/dist/runtime/components/form/SignPad.vue.d.ts +62 -0
- package/dist/runtime/components/form/System.d.vue.ts +34 -0
- package/dist/runtime/components/form/System.vue +18 -32
- package/dist/runtime/components/form/System.vue.d.ts +34 -0
- package/dist/runtime/components/form/Table.d.vue.ts +221 -0
- package/dist/runtime/components/form/Table.vue +123 -182
- package/dist/runtime/components/form/Table.vue.d.ts +221 -0
- package/dist/runtime/components/form/TableData.d.vue.ts +102 -0
- package/dist/runtime/components/form/TableData.vue +109 -139
- package/dist/runtime/components/form/TableData.vue.d.ts +102 -0
- package/dist/runtime/components/form/Time.d.vue.ts +49 -0
- package/dist/runtime/components/form/Time.vue +64 -99
- package/dist/runtime/components/form/Time.vue.d.ts +49 -0
- package/dist/runtime/components/form/images/Capture.d.vue.ts +96 -0
- package/dist/runtime/components/form/images/Capture.vue +104 -147
- package/dist/runtime/components/form/images/Capture.vue.d.ts +96 -0
- package/dist/runtime/components/form/images/Edit.d.vue.ts +29 -0
- package/dist/runtime/components/form/images/Edit.vue +57 -81
- package/dist/runtime/components/form/images/Edit.vue.d.ts +29 -0
- package/dist/runtime/components/form/images/Field.d.vue.ts +27 -0
- package/dist/runtime/components/form/images/Field.vue +136 -205
- package/dist/runtime/components/form/images/Field.vue.d.ts +27 -0
- package/dist/runtime/components/form/images/Pad.d.vue.ts +13 -0
- package/dist/runtime/components/form/images/Pad.vue +23 -40
- package/dist/runtime/components/form/images/Pad.vue.d.ts +13 -0
- package/dist/runtime/components/label/Date.d.vue.ts +13 -0
- package/dist/runtime/components/label/Date.vue +13 -29
- package/dist/runtime/components/label/Date.vue.d.ts +13 -0
- package/dist/runtime/components/label/DateAgo.d.vue.ts +20 -0
- package/dist/runtime/components/label/DateAgo.vue +43 -75
- package/dist/runtime/components/label/DateAgo.vue.d.ts +20 -0
- package/dist/runtime/components/label/DateCount.d.vue.ts +22 -0
- package/dist/runtime/components/label/DateCount.vue +58 -105
- package/dist/runtime/components/label/DateCount.vue.d.ts +22 -0
- package/dist/runtime/components/label/Field.d.vue.ts +38 -0
- package/dist/runtime/components/label/Field.vue +18 -40
- package/dist/runtime/components/label/Field.vue.d.ts +38 -0
- package/dist/runtime/components/label/FormatMoney.d.vue.ts +12 -0
- package/dist/runtime/components/label/FormatMoney.vue +12 -28
- package/dist/runtime/components/label/FormatMoney.vue.d.ts +12 -0
- package/dist/runtime/components/label/Mask.d.vue.ts +10 -0
- package/dist/runtime/components/label/Mask.vue +21 -38
- package/dist/runtime/components/label/Mask.vue.d.ts +10 -0
- package/dist/runtime/components/label/Object.d.vue.ts +8 -0
- package/dist/runtime/components/label/Object.vue +10 -20
- package/dist/runtime/components/label/Object.vue.d.ts +8 -0
- package/dist/runtime/components/master/Autocomplete.d.vue.ts +70 -0
- package/dist/runtime/components/master/Autocomplete.vue +25 -34
- package/dist/runtime/components/master/Autocomplete.vue.d.ts +70 -0
- package/dist/runtime/components/master/Combobox.d.vue.ts +70 -0
- package/dist/runtime/components/master/Combobox.vue +26 -35
- package/dist/runtime/components/master/Combobox.vue.d.ts +70 -0
- package/dist/runtime/components/master/RadioGroup.d.vue.ts +51 -0
- package/dist/runtime/components/master/RadioGroup.vue +44 -59
- package/dist/runtime/components/master/RadioGroup.vue.d.ts +51 -0
- package/dist/runtime/components/master/Select.d.vue.ts +68 -0
- package/dist/runtime/components/master/Select.vue +25 -34
- package/dist/runtime/components/master/Select.vue.d.ts +68 -0
- package/dist/runtime/components/master/label.d.vue.ts +24 -0
- package/dist/runtime/components/master/label.vue +22 -42
- package/dist/runtime/components/master/label.vue.d.ts +24 -0
- package/dist/runtime/components/model/Autocomplete.d.vue.ts +82 -0
- package/dist/runtime/components/model/Autocomplete.vue +50 -49
- package/dist/runtime/components/model/Autocomplete.vue.d.ts +82 -0
- package/dist/runtime/components/model/Combobox.d.vue.ts +82 -0
- package/dist/runtime/components/model/Combobox.vue +51 -49
- package/dist/runtime/components/model/Combobox.vue.d.ts +82 -0
- package/dist/runtime/components/model/Pad.d.vue.ts +72 -0
- package/dist/runtime/components/model/Pad.vue +50 -65
- package/dist/runtime/components/model/Pad.vue.d.ts +72 -0
- package/dist/runtime/components/model/Select.d.vue.ts +72 -0
- package/dist/runtime/components/model/Select.vue +42 -44
- package/dist/runtime/components/model/Select.vue.d.ts +72 -0
- package/dist/runtime/components/model/Table.d.vue.ts +272 -0
- package/dist/runtime/components/model/Table.vue +121 -145
- package/dist/runtime/components/model/Table.vue.d.ts +272 -0
- package/dist/runtime/components/model/iterator.d.vue.ts +321 -0
- package/dist/runtime/components/model/iterator.vue +148 -183
- package/dist/runtime/components/model/iterator.vue.d.ts +321 -0
- package/dist/runtime/components/model/label.d.vue.ts +26 -0
- package/dist/runtime/components/model/label.vue +25 -43
- package/dist/runtime/components/model/label.vue.d.ts +26 -0
- package/dist/runtime/components/pdf/Print.d.vue.ts +17 -0
- package/dist/runtime/components/pdf/Print.vue +27 -50
- package/dist/runtime/components/pdf/Print.vue.d.ts +17 -0
- package/dist/runtime/components/pdf/View.d.vue.ts +52 -0
- package/dist/runtime/components/pdf/View.vue +58 -95
- package/dist/runtime/components/pdf/View.vue.d.ts +52 -0
- package/dist/runtime/composables/api.js +4 -2
- package/dist/runtime/composables/assetFile.js +4 -2
- package/dist/runtime/composables/dialog.d.ts +1 -1
- package/dist/runtime/composables/document/template.js +3 -3
- package/dist/runtime/composables/document/templateFormTable.js +1 -0
- package/dist/runtime/composables/graphql.d.ts +2 -2
- package/dist/runtime/composables/graphql.js +5 -5
- package/dist/runtime/composables/graphqlModel.d.ts +6 -6
- package/dist/runtime/composables/graphqlModelItem.d.ts +4 -4
- package/dist/runtime/composables/graphqlModelOperation.d.ts +6 -6
- package/dist/runtime/composables/graphqlModelOperation.js +2 -1
- package/dist/runtime/composables/graphqlOperation.js +5 -1
- package/dist/runtime/composables/hostAgentWs.d.ts +1 -1
- package/dist/runtime/composables/lookupListMaster.js +3 -3
- package/dist/runtime/composables/menu.js +2 -2
- package/dist/runtime/composables/userPermission.d.ts +1 -1
- package/dist/runtime/composables/utils/fuzzy.d.ts +2 -1
- package/dist/runtime/labs/Calendar.d.vue.ts +35 -0
- package/dist/runtime/labs/Calendar.vue +47 -75
- package/dist/runtime/labs/Calendar.vue.d.ts +35 -0
- package/dist/runtime/labs/form/EditMobile.d.vue.ts +12 -0
- package/dist/runtime/labs/form/EditMobile.vue +19 -36
- package/dist/runtime/labs/form/EditMobile.vue.d.ts +12 -0
- package/dist/runtime/labs/form/TextFieldMask.d.vue.ts +21 -0
- package/dist/runtime/labs/form/TextFieldMask.vue +19 -25
- package/dist/runtime/labs/form/TextFieldMask.vue.d.ts +21 -0
- package/dist/runtime/plugins/dialogManager.js +2 -2
- package/dist/runtime/plugins/permission.js +3 -3
- package/dist/runtime/types/bridge.d.ts +14 -0
- package/dist/runtime/utils/datetime.js +1 -1
- package/dist/types.d.mts +2 -6
- package/package.json +71 -58
- package/scripts/ci-release.mjs +125 -0
- package/scripts/release-version.mjs +68 -0
- package/scripts/release.mjs +49 -0
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -8
- package/dist/types.d.ts +0 -7
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import FormPadComponent from './Pad.vue.js';
|
|
2
|
+
interface Props extends /* @vue-ignore */ InstanceType<typeof FormPadComponent['$props']> {
|
|
3
|
+
title?: string;
|
|
4
|
+
initialData?: object;
|
|
5
|
+
saveCaption?: string;
|
|
6
|
+
cancelCaption?: string;
|
|
7
|
+
readonly?: boolean;
|
|
8
|
+
showTitle?: boolean;
|
|
9
|
+
skipValidation?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare function save(): void;
|
|
12
|
+
declare function cancel(): void;
|
|
13
|
+
declare function setOriginalData(originalData?: object): void;
|
|
14
|
+
declare var __VLS_14: {
|
|
15
|
+
operation: {
|
|
16
|
+
isDataChange: boolean;
|
|
17
|
+
isCreating: boolean;
|
|
18
|
+
isSaving: boolean;
|
|
19
|
+
save: typeof save;
|
|
20
|
+
cancel: typeof cancel;
|
|
21
|
+
};
|
|
22
|
+
}, __VLS_22: {
|
|
23
|
+
operation: {
|
|
24
|
+
isDataChange: boolean;
|
|
25
|
+
isCreating: boolean;
|
|
26
|
+
isSaving: boolean;
|
|
27
|
+
save: typeof save;
|
|
28
|
+
cancel: typeof cancel;
|
|
29
|
+
};
|
|
30
|
+
}, __VLS_39: any, __VLS_47: {
|
|
31
|
+
operation: {
|
|
32
|
+
isDataChange: boolean;
|
|
33
|
+
isCreating: boolean;
|
|
34
|
+
isSaving: boolean;
|
|
35
|
+
save: typeof save;
|
|
36
|
+
cancel: typeof cancel;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
type __VLS_Slots = {} & {
|
|
40
|
+
titleToolbar?: (props: typeof __VLS_14) => any;
|
|
41
|
+
} & {
|
|
42
|
+
title?: (props: typeof __VLS_22) => any;
|
|
43
|
+
} & {
|
|
44
|
+
default?: (props: typeof __VLS_39) => any;
|
|
45
|
+
} & {
|
|
46
|
+
action?: (props: typeof __VLS_47) => any;
|
|
47
|
+
};
|
|
48
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
49
|
+
saveCaption: string;
|
|
50
|
+
cancelCaption: string;
|
|
51
|
+
readonly: boolean;
|
|
52
|
+
showTitle: boolean;
|
|
53
|
+
skipValidation: boolean;
|
|
54
|
+
}>>, {
|
|
55
|
+
setOriginalData: typeof setOriginalData;
|
|
56
|
+
operation: import("vue").Ref<{
|
|
57
|
+
isDataChange: boolean;
|
|
58
|
+
isCreating: boolean;
|
|
59
|
+
isSaving: boolean;
|
|
60
|
+
save: typeof save;
|
|
61
|
+
cancel: typeof cancel;
|
|
62
|
+
}, {
|
|
63
|
+
isDataChange: import("vue").ComputedRef<boolean>;
|
|
64
|
+
isCreating: import("vue").ComputedRef<boolean>;
|
|
65
|
+
isSaving: import("vue").Ref<boolean, boolean>;
|
|
66
|
+
save: typeof save;
|
|
67
|
+
cancel: typeof cancel;
|
|
68
|
+
} | {
|
|
69
|
+
isDataChange: boolean;
|
|
70
|
+
isCreating: boolean;
|
|
71
|
+
isSaving: boolean;
|
|
72
|
+
save: typeof save;
|
|
73
|
+
cancel: typeof cancel;
|
|
74
|
+
}>;
|
|
75
|
+
formPad: import("vue").Ref<any, any>;
|
|
76
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
77
|
+
update: (...args: any[]) => void;
|
|
78
|
+
create: (...args: any[]) => void;
|
|
79
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
80
|
+
saveCaption: string;
|
|
81
|
+
cancelCaption: string;
|
|
82
|
+
readonly: boolean;
|
|
83
|
+
showTitle: boolean;
|
|
84
|
+
skipValidation: boolean;
|
|
85
|
+
}>>> & Readonly<{
|
|
86
|
+
onUpdate?: ((...args: any[]) => any) | undefined;
|
|
87
|
+
onCreate?: ((...args: any[]) => any) | undefined;
|
|
88
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
89
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
90
|
+
declare const _default: typeof __VLS_export;
|
|
91
|
+
export default _default;
|
|
92
|
+
type __VLS_TypePropsToOption<T> = {
|
|
93
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
94
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
95
|
+
} : {
|
|
96
|
+
type: import('vue').PropType<T[K]>;
|
|
97
|
+
required: true;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
type __VLS_WithDefaults<P, D> = {
|
|
101
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
102
|
+
default: D[K];
|
|
103
|
+
}> : P[K];
|
|
104
|
+
};
|
|
105
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
106
|
+
new (): {
|
|
107
|
+
$slots: S;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
111
|
+
[K in keyof T]: T[K];
|
|
112
|
+
} : {
|
|
113
|
+
[K in keyof T as K]: T[K];
|
|
114
|
+
}) & {};
|
|
@@ -1,103 +1,66 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Public props accepted by FormActionPad.
|
|
23
|
-
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
24
|
-
*/
|
|
25
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
26
|
-
saveCaption: 'บันทึก',
|
|
27
|
-
cancelCaption: 'ยกเลิก',
|
|
28
|
-
readonly: false,
|
|
29
|
-
showTitle: false,
|
|
30
|
-
skipValidation:false
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
const isSaving = ref<boolean>(false)
|
|
34
|
-
const formPadRef = ref()
|
|
35
|
-
const formData = ref<object>({})
|
|
36
|
-
const formDataOriginalValue = ref<object>()
|
|
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
|
-
*/
|
|
42
|
-
const emit = defineEmits(['create', 'update'])
|
|
43
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref, watchEffect } from "vue";
|
|
3
|
+
import { cloneDeep, isEqual } from "lodash-es";
|
|
4
|
+
import FormPadComponent from "./Pad.vue";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
title: { type: String, required: false },
|
|
7
|
+
initialData: { type: Object, required: false },
|
|
8
|
+
saveCaption: { type: String, required: false, default: "\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01" },
|
|
9
|
+
cancelCaption: { type: String, required: false, default: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01" },
|
|
10
|
+
readonly: { type: Boolean, required: false, default: false },
|
|
11
|
+
showTitle: { type: Boolean, required: false, default: false },
|
|
12
|
+
skipValidation: { type: Boolean, required: false, default: false }
|
|
13
|
+
});
|
|
14
|
+
const isSaving = ref(false);
|
|
15
|
+
const formPadRef = ref();
|
|
16
|
+
const formData = ref({});
|
|
17
|
+
const formDataOriginalValue = ref();
|
|
18
|
+
const emit = defineEmits(["create", "update"]);
|
|
44
19
|
function save() {
|
|
45
20
|
if (props.skipValidation || formPadRef.value?.isValid) {
|
|
46
|
-
isSaving.value = true
|
|
47
|
-
emit(
|
|
21
|
+
isSaving.value = true;
|
|
22
|
+
emit(isCreating.value ? "create" : "update", cloneDeep(formData.value), callback);
|
|
48
23
|
}
|
|
49
24
|
}
|
|
50
|
-
|
|
51
25
|
function cancel() {
|
|
52
|
-
reset()
|
|
26
|
+
reset();
|
|
53
27
|
}
|
|
54
|
-
|
|
55
28
|
function reset() {
|
|
56
|
-
formDataOriginalValue.value =
|
|
57
|
-
formPadRef.value?.reset()
|
|
58
|
-
loadFormData()
|
|
29
|
+
formDataOriginalValue.value = void 0;
|
|
30
|
+
formPadRef.value?.reset();
|
|
31
|
+
loadFormData();
|
|
59
32
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
reset()
|
|
33
|
+
const callback = {
|
|
34
|
+
done: function() {
|
|
35
|
+
isSaving.value = false;
|
|
36
|
+
reset();
|
|
65
37
|
},
|
|
66
|
-
error: function
|
|
67
|
-
isSaving.value = false
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
38
|
+
error: function() {
|
|
39
|
+
isSaving.value = false;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
71
42
|
const isDataChange = computed(() => {
|
|
72
|
-
return !(
|
|
73
|
-
})
|
|
74
|
-
|
|
43
|
+
return !(isCreating.value ? isEqual(formData.value, createOriginalValue.value) : isEqual(formData.value, formDataOriginalValue.value));
|
|
44
|
+
});
|
|
75
45
|
const isCreating = computed(() => {
|
|
76
|
-
return !formDataOriginalValue.value
|
|
77
|
-
})
|
|
78
|
-
|
|
46
|
+
return !formDataOriginalValue.value;
|
|
47
|
+
});
|
|
79
48
|
const createOriginalValue = computed(() => {
|
|
80
|
-
return Object.assign({}, props.initialData)
|
|
81
|
-
})
|
|
82
|
-
|
|
49
|
+
return Object.assign({}, props.initialData);
|
|
50
|
+
});
|
|
83
51
|
const loadFormData = () => {
|
|
84
52
|
if (formDataOriginalValue.value) {
|
|
85
|
-
formData.value = cloneDeep(formDataOriginalValue.value)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
formData.value = Object.assign({}, cloneDeep(props.initialData))
|
|
53
|
+
formData.value = cloneDeep(formDataOriginalValue.value);
|
|
54
|
+
} else {
|
|
55
|
+
formData.value = Object.assign({}, cloneDeep(props.initialData));
|
|
89
56
|
}
|
|
57
|
+
};
|
|
58
|
+
const operation = ref({ isDataChange, isCreating, isSaving, save, cancel });
|
|
59
|
+
watchEffect(loadFormData);
|
|
60
|
+
function setOriginalData(originalData) {
|
|
61
|
+
formDataOriginalValue.value = originalData;
|
|
90
62
|
}
|
|
91
|
-
|
|
92
|
-
const operation = ref({ isDataChange, isCreating, isSaving, save, cancel })
|
|
93
|
-
|
|
94
|
-
watchEffect(loadFormData)
|
|
95
|
-
|
|
96
|
-
function setOriginalData(originalData?: object) {
|
|
97
|
-
formDataOriginalValue.value = originalData
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
defineExpose({setOriginalData,operation,formPad: formPadRef})
|
|
63
|
+
defineExpose({ setOriginalData, operation, formPad: formPadRef });
|
|
101
64
|
</script>
|
|
102
65
|
|
|
103
66
|
<template>
|
|
@@ -106,7 +69,7 @@ defineExpose({setOriginalData,operation,formPad: formPadRef})
|
|
|
106
69
|
<slot name="titleToolbar" :operation="operation">
|
|
107
70
|
<VToolbarTitle>
|
|
108
71
|
<slot name="title" :operation="operation">
|
|
109
|
-
{{
|
|
72
|
+
{{ isCreating ? "New" : "Edit" }} {{ title }}
|
|
110
73
|
</slot>
|
|
111
74
|
</VToolbarTitle>
|
|
112
75
|
</slot>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import FormPadComponent from './Pad.vue.js';
|
|
2
|
+
interface Props extends /* @vue-ignore */ InstanceType<typeof FormPadComponent['$props']> {
|
|
3
|
+
title?: string;
|
|
4
|
+
initialData?: object;
|
|
5
|
+
saveCaption?: string;
|
|
6
|
+
cancelCaption?: string;
|
|
7
|
+
readonly?: boolean;
|
|
8
|
+
showTitle?: boolean;
|
|
9
|
+
skipValidation?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare function save(): void;
|
|
12
|
+
declare function cancel(): void;
|
|
13
|
+
declare function setOriginalData(originalData?: object): void;
|
|
14
|
+
declare var __VLS_14: {
|
|
15
|
+
operation: {
|
|
16
|
+
isDataChange: boolean;
|
|
17
|
+
isCreating: boolean;
|
|
18
|
+
isSaving: boolean;
|
|
19
|
+
save: typeof save;
|
|
20
|
+
cancel: typeof cancel;
|
|
21
|
+
};
|
|
22
|
+
}, __VLS_22: {
|
|
23
|
+
operation: {
|
|
24
|
+
isDataChange: boolean;
|
|
25
|
+
isCreating: boolean;
|
|
26
|
+
isSaving: boolean;
|
|
27
|
+
save: typeof save;
|
|
28
|
+
cancel: typeof cancel;
|
|
29
|
+
};
|
|
30
|
+
}, __VLS_39: any, __VLS_47: {
|
|
31
|
+
operation: {
|
|
32
|
+
isDataChange: boolean;
|
|
33
|
+
isCreating: boolean;
|
|
34
|
+
isSaving: boolean;
|
|
35
|
+
save: typeof save;
|
|
36
|
+
cancel: typeof cancel;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
type __VLS_Slots = {} & {
|
|
40
|
+
titleToolbar?: (props: typeof __VLS_14) => any;
|
|
41
|
+
} & {
|
|
42
|
+
title?: (props: typeof __VLS_22) => any;
|
|
43
|
+
} & {
|
|
44
|
+
default?: (props: typeof __VLS_39) => any;
|
|
45
|
+
} & {
|
|
46
|
+
action?: (props: typeof __VLS_47) => any;
|
|
47
|
+
};
|
|
48
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
49
|
+
saveCaption: string;
|
|
50
|
+
cancelCaption: string;
|
|
51
|
+
readonly: boolean;
|
|
52
|
+
showTitle: boolean;
|
|
53
|
+
skipValidation: boolean;
|
|
54
|
+
}>>, {
|
|
55
|
+
setOriginalData: typeof setOriginalData;
|
|
56
|
+
operation: import("vue").Ref<{
|
|
57
|
+
isDataChange: boolean;
|
|
58
|
+
isCreating: boolean;
|
|
59
|
+
isSaving: boolean;
|
|
60
|
+
save: typeof save;
|
|
61
|
+
cancel: typeof cancel;
|
|
62
|
+
}, {
|
|
63
|
+
isDataChange: import("vue").ComputedRef<boolean>;
|
|
64
|
+
isCreating: import("vue").ComputedRef<boolean>;
|
|
65
|
+
isSaving: import("vue").Ref<boolean, boolean>;
|
|
66
|
+
save: typeof save;
|
|
67
|
+
cancel: typeof cancel;
|
|
68
|
+
} | {
|
|
69
|
+
isDataChange: boolean;
|
|
70
|
+
isCreating: boolean;
|
|
71
|
+
isSaving: boolean;
|
|
72
|
+
save: typeof save;
|
|
73
|
+
cancel: typeof cancel;
|
|
74
|
+
}>;
|
|
75
|
+
formPad: import("vue").Ref<any, any>;
|
|
76
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
77
|
+
update: (...args: any[]) => void;
|
|
78
|
+
create: (...args: any[]) => void;
|
|
79
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
80
|
+
saveCaption: string;
|
|
81
|
+
cancelCaption: string;
|
|
82
|
+
readonly: boolean;
|
|
83
|
+
showTitle: boolean;
|
|
84
|
+
skipValidation: boolean;
|
|
85
|
+
}>>> & Readonly<{
|
|
86
|
+
onUpdate?: ((...args: any[]) => any) | undefined;
|
|
87
|
+
onCreate?: ((...args: any[]) => any) | undefined;
|
|
88
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
89
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
90
|
+
declare const _default: typeof __VLS_export;
|
|
91
|
+
export default _default;
|
|
92
|
+
type __VLS_TypePropsToOption<T> = {
|
|
93
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
94
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
95
|
+
} : {
|
|
96
|
+
type: import('vue').PropType<T[K]>;
|
|
97
|
+
required: true;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
type __VLS_WithDefaults<P, D> = {
|
|
101
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
102
|
+
default: D[K];
|
|
103
|
+
}> : P[K];
|
|
104
|
+
};
|
|
105
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
106
|
+
new (): {
|
|
107
|
+
$slots: S;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
111
|
+
[K in keyof T]: T[K];
|
|
112
|
+
} : {
|
|
113
|
+
[K in keyof T as K]: T[K];
|
|
114
|
+
}) & {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FormBirthdate is a schema-driven form field component that binds model data, renders field UI, and emits normalized updates.
|
|
3
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
4
|
+
*/
|
|
5
|
+
import '@vuepic/vue-datepicker/dist/main.css';
|
|
6
|
+
import { VTextField } from "vuetify/components/VTextField";
|
|
7
|
+
interface IDobPrecision {
|
|
8
|
+
yearMonthDay: string;
|
|
9
|
+
yearMonth: string;
|
|
10
|
+
year: string;
|
|
11
|
+
estimated: string;
|
|
12
|
+
}
|
|
13
|
+
interface Props {
|
|
14
|
+
flow?: ('month' | 'year' | 'calendar' | 'time' | 'minutes' | 'hours' | 'seconds')[];
|
|
15
|
+
dobPrecisionText?: IDobPrecision;
|
|
16
|
+
rules?: typeof VTextField['rules'];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Public props accepted by FormBirthdate.
|
|
20
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
21
|
+
*/
|
|
22
|
+
type __VLS_Props = Props;
|
|
23
|
+
type __VLS_ModelProps = {
|
|
24
|
+
modelValue?: string;
|
|
25
|
+
'dobPrecision'?: 'yearMonthDay' | 'yearMonth' | 'year' | 'estimated';
|
|
26
|
+
};
|
|
27
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
28
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
|
+
"update:modelValue": (...args: any[]) => void;
|
|
30
|
+
"update:dobPrecision": (value: "year" | "yearMonthDay" | "yearMonth" | "estimated" | undefined) => void;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
32
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
"onUpdate:dobPrecision"?: ((value: "year" | "yearMonthDay" | "yearMonth" | "estimated" | undefined) => any) | undefined;
|
|
34
|
+
}>, {
|
|
35
|
+
flow: ("month" | "year" | "calendar" | "time" | "minutes" | "hours" | "seconds")[];
|
|
36
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
@@ -1,93 +1,61 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
yearMonth: string
|
|
14
|
-
year: string
|
|
15
|
-
estimated: string
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface Props {
|
|
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
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Public props accepted by FormBirthdate.
|
|
26
|
-
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
27
|
-
*/
|
|
28
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
29
|
-
flow: () => ['year', 'month', 'calendar'],
|
|
30
|
-
})
|
|
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
|
-
*/
|
|
36
|
-
const emit = defineEmits(['update:modelValue'])
|
|
37
|
-
|
|
38
|
-
const modelValue = defineModel<string>()
|
|
39
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import "@vuepic/vue-datepicker/dist/main.css";
|
|
3
|
+
import { computed, onMounted, ref } from "vue";
|
|
4
|
+
import { VTextField } from "vuetify/components/VTextField";
|
|
5
|
+
import { isArray } from "lodash-es";
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
flow: { type: Array, required: false, default: () => ["year", "month", "calendar"] },
|
|
8
|
+
dobPrecisionText: { type: Object, required: false },
|
|
9
|
+
rules: { type: null, required: false }
|
|
10
|
+
});
|
|
11
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
12
|
+
const modelValue = defineModel({ type: String });
|
|
40
13
|
const dobPrecisionText = computed(() => {
|
|
41
|
-
if (props.dobPrecisionText) return props.dobPrecisionText
|
|
14
|
+
if (props.dobPrecisionText) return props.dobPrecisionText;
|
|
42
15
|
else return {
|
|
43
|
-
yearMonthDay:
|
|
44
|
-
yearMonth:
|
|
45
|
-
year:
|
|
46
|
-
estimated:
|
|
47
|
-
}
|
|
48
|
-
})
|
|
49
|
-
const dobPrecisionChoice = ref
|
|
50
|
-
const dobPrecisionSelected = defineModel
|
|
51
|
-
onMounted(()=>{
|
|
16
|
+
yearMonthDay: "YMD",
|
|
17
|
+
yearMonth: "YM",
|
|
18
|
+
year: "Y",
|
|
19
|
+
estimated: "EST"
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
const dobPrecisionChoice = ref(["yearMonthDay", "yearMonth", "year", "estimated"]);
|
|
23
|
+
const dobPrecisionSelected = defineModel("dobPrecision", { type: String });
|
|
24
|
+
onMounted(() => {
|
|
52
25
|
if (!dobPrecisionSelected.value) {
|
|
53
|
-
dobPrecisionSelected.value =
|
|
26
|
+
dobPrecisionSelected.value = "yearMonthDay";
|
|
54
27
|
}
|
|
55
|
-
})
|
|
56
|
-
|
|
28
|
+
});
|
|
57
29
|
const dobPrecisionDisplay = computed(() => {
|
|
58
|
-
return
|
|
59
|
-
})
|
|
60
|
-
|
|
30
|
+
return dobPrecisionSelected.value ? dobPrecisionText.value[dobPrecisionSelected.value] : dobPrecisionText.value["yearMonthDay"];
|
|
31
|
+
});
|
|
61
32
|
const changeDobPrecision = () => {
|
|
62
33
|
if (dobPrecisionSelected.value && dobPrecisionChoice.value.includes(dobPrecisionSelected.value)) {
|
|
63
|
-
dobPrecisionSelected.value = dobPrecisionChoice.value[(dobPrecisionChoice.value.indexOf(dobPrecisionSelected.value) + 1) % dobPrecisionChoice.value.length]
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
dobPrecisionSelected.value = dobPrecisionChoice.value[0]
|
|
34
|
+
dobPrecisionSelected.value = dobPrecisionChoice.value[(dobPrecisionChoice.value.indexOf(dobPrecisionSelected.value) + 1) % dobPrecisionChoice.value.length];
|
|
35
|
+
} else {
|
|
36
|
+
dobPrecisionSelected.value = dobPrecisionChoice.value[0];
|
|
67
37
|
}
|
|
68
|
-
}
|
|
69
|
-
|
|
38
|
+
};
|
|
70
39
|
const computedRules = computed(() => {
|
|
71
40
|
if (props.rules && isArray(props.rules)) {
|
|
72
|
-
return props.rules.includes("DateHappen") ? props.rules : props.rules.concat("DateHappen")
|
|
41
|
+
return props.rules.includes("DateHappen") ? props.rules : props.rules.concat("DateHappen");
|
|
73
42
|
} else {
|
|
74
|
-
return [
|
|
43
|
+
return ["DateHappen"];
|
|
75
44
|
}
|
|
76
|
-
})
|
|
77
|
-
|
|
45
|
+
});
|
|
78
46
|
const dobFormat = computed(() => {
|
|
79
|
-
let displayFormat
|
|
80
|
-
if (dobPrecisionSelected.value=="yearMonth") {
|
|
81
|
-
displayFormat = "MMM yyyy"
|
|
47
|
+
let displayFormat = void 0;
|
|
48
|
+
if (dobPrecisionSelected.value == "yearMonth") {
|
|
49
|
+
displayFormat = "MMM yyyy";
|
|
82
50
|
}
|
|
83
|
-
if (dobPrecisionSelected.value=="year") {
|
|
84
|
-
displayFormat = "yyyy"
|
|
51
|
+
if (dobPrecisionSelected.value == "year") {
|
|
52
|
+
displayFormat = "yyyy";
|
|
85
53
|
}
|
|
86
|
-
if (dobPrecisionSelected.value=="estimated") {
|
|
87
|
-
displayFormat = "~ MMM yyyy"
|
|
54
|
+
if (dobPrecisionSelected.value == "estimated") {
|
|
55
|
+
displayFormat = "~ MMM yyyy";
|
|
88
56
|
}
|
|
89
|
-
return displayFormat
|
|
90
|
-
})
|
|
57
|
+
return displayFormat;
|
|
58
|
+
});
|
|
91
59
|
</script>
|
|
92
60
|
|
|
93
61
|
<template>
|
|
@@ -97,11 +65,11 @@ const dobFormat = computed(() => {
|
|
|
97
65
|
:format="dobFormat"
|
|
98
66
|
:rules="computedRules"
|
|
99
67
|
>
|
|
100
|
-
<template #append="{ isReadonly, isDisabled, activatorProps, toggleMenuOpen}">
|
|
68
|
+
<template #append="{ isReadonly, isDisabled, activatorProps, toggleMenuOpen }">
|
|
101
69
|
<span
|
|
102
70
|
style="cursor: pointer;"
|
|
103
71
|
class="font-weight-medium"
|
|
104
|
-
@click="
|
|
72
|
+
@click="isReadonly.value || isDisabled.value ? void 0 : changeDobPrecision()"
|
|
105
73
|
>{{ dobPrecisionDisplay }}</span>
|
|
106
74
|
|
|
107
75
|
<v-icon
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FormBirthdate is a schema-driven form field component that binds model data, renders field UI, and emits normalized updates.
|
|
3
|
+
* This doc block is consumed by vue-docgen for generated API documentation.
|
|
4
|
+
*/
|
|
5
|
+
import '@vuepic/vue-datepicker/dist/main.css';
|
|
6
|
+
import { VTextField } from "vuetify/components/VTextField";
|
|
7
|
+
interface IDobPrecision {
|
|
8
|
+
yearMonthDay: string;
|
|
9
|
+
yearMonth: string;
|
|
10
|
+
year: string;
|
|
11
|
+
estimated: string;
|
|
12
|
+
}
|
|
13
|
+
interface Props {
|
|
14
|
+
flow?: ('month' | 'year' | 'calendar' | 'time' | 'minutes' | 'hours' | 'seconds')[];
|
|
15
|
+
dobPrecisionText?: IDobPrecision;
|
|
16
|
+
rules?: typeof VTextField['rules'];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Public props accepted by FormBirthdate.
|
|
20
|
+
* Document each prop field with intent, defaults, and side effects for clear generated docs.
|
|
21
|
+
*/
|
|
22
|
+
type __VLS_Props = Props;
|
|
23
|
+
type __VLS_ModelProps = {
|
|
24
|
+
modelValue?: string;
|
|
25
|
+
'dobPrecision'?: 'yearMonthDay' | 'yearMonth' | 'year' | 'estimated';
|
|
26
|
+
};
|
|
27
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
28
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
|
+
"update:modelValue": (...args: any[]) => void;
|
|
30
|
+
"update:dobPrecision": (value: "year" | "yearMonthDay" | "yearMonth" | "estimated" | undefined) => void;
|
|
31
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
32
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
"onUpdate:dobPrecision"?: ((value: "year" | "yearMonthDay" | "yearMonth" | "estimated" | undefined) => any) | undefined;
|
|
34
|
+
}>, {
|
|
35
|
+
flow: ("month" | "year" | "calendar" | "time" | "minutes" | "hours" | "seconds")[];
|
|
36
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { VCheckbox } from 'vuetify/components/VCheckbox';
|
|
2
|
+
interface Items {
|
|
3
|
+
label: string;
|
|
4
|
+
value: any;
|
|
5
|
+
}
|
|
6
|
+
interface Props extends /* @vue-ignore */ InstanceType<typeof VCheckbox['$props']> {
|
|
7
|
+
items: Items[];
|
|
8
|
+
label?: string;
|
|
9
|
+
modelValue: [];
|
|
10
|
+
inline?: boolean;
|
|
11
|
+
rules?: typeof import('vuetify/components')['VCheckbox']['rules'];
|
|
12
|
+
}
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
14
|
+
inline: boolean;
|
|
15
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
"update:modelValue": (...args: any[]) => void;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
18
|
+
inline: boolean;
|
|
19
|
+
}>>> & Readonly<{
|
|
20
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_TypePropsToOption<T> = {
|
|
25
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
26
|
+
type: import('vue').PropType<Required<T>[K]>;
|
|
27
|
+
} : {
|
|
28
|
+
type: import('vue').PropType<T[K]>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
type __VLS_WithDefaults<P, D> = {
|
|
33
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
34
|
+
default: D[K];
|
|
35
|
+
}> : P[K];
|
|
36
|
+
};
|
|
37
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
38
|
+
[K in keyof T]: T[K];
|
|
39
|
+
} : {
|
|
40
|
+
[K in keyof T as K]: T[K];
|
|
41
|
+
}) & {};
|