@ramathibodi/nuxt-commons 4.0.27 → 4.0.28
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/dist/module.json +2 -2
- package/dist/runtime/components/Calendar.d.vue.ts +12 -10
- package/dist/runtime/components/Calendar.vue.d.ts +12 -10
- package/dist/runtime/components/ExportCSV.d.vue.ts +3 -3
- package/dist/runtime/components/ExportCSV.vue.d.ts +3 -3
- package/dist/runtime/components/FileBtn.d.vue.ts +3 -3
- package/dist/runtime/components/FileBtn.vue.d.ts +3 -3
- package/dist/runtime/components/ImportCSV.d.vue.ts +3 -3
- package/dist/runtime/components/ImportCSV.vue.d.ts +3 -3
- package/dist/runtime/components/SplitterPanel.d.vue.ts +7 -5
- package/dist/runtime/components/SplitterPanel.vue.d.ts +7 -5
- package/dist/runtime/components/TabsGroup.d.vue.ts +7 -5
- package/dist/runtime/components/TabsGroup.vue.d.ts +7 -5
- package/dist/runtime/components/device/IdCardButton.d.vue.ts +3 -3
- package/dist/runtime/components/device/IdCardButton.vue.d.ts +3 -3
- package/dist/runtime/components/device/Scanner.d.vue.ts +31 -29
- package/dist/runtime/components/device/Scanner.vue.d.ts +31 -29
- package/dist/runtime/components/dialog/Confirm.d.vue.ts +7 -5
- package/dist/runtime/components/dialog/Confirm.vue.d.ts +7 -5
- package/dist/runtime/components/dialog/ImportProgress.d.vue.ts +5 -3
- package/dist/runtime/components/dialog/ImportProgress.vue.d.ts +5 -3
- package/dist/runtime/components/dialog/Index.d.vue.ts +5 -3
- package/dist/runtime/components/dialog/Index.vue.d.ts +5 -3
- package/dist/runtime/components/dialog/Loading.d.vue.ts +5 -3
- package/dist/runtime/components/dialog/Loading.vue.d.ts +5 -3
- package/dist/runtime/components/dialog/default/Confirm.d.vue.ts +7 -5
- package/dist/runtime/components/dialog/default/Confirm.vue.d.ts +7 -5
- package/dist/runtime/components/dialog/default/Loading.d.vue.ts +7 -5
- package/dist/runtime/components/dialog/default/Loading.vue.d.ts +7 -5
- package/dist/runtime/components/dialog/default/Printing.d.vue.ts +5 -3
- package/dist/runtime/components/dialog/default/Printing.vue.d.ts +5 -3
- package/dist/runtime/components/document/TemplateBuilderLiveView.d.vue.ts +71 -69
- package/dist/runtime/components/document/TemplateBuilderLiveView.vue.d.ts +71 -69
- package/dist/runtime/components/document/TemplateInputAttributesHelper.d.vue.ts +14 -0
- package/dist/runtime/components/document/TemplateInputAttributesHelper.vue +154 -0
- package/dist/runtime/components/document/TemplateInputAttributesHelper.vue.d.ts +14 -0
- package/dist/runtime/components/document/TemplateItemForm.vue +46 -1
- package/dist/runtime/components/document/TemplatePalette.d.vue.ts +8 -6
- package/dist/runtime/components/document/TemplatePalette.vue +16 -0
- package/dist/runtime/components/document/TemplatePalette.vue.d.ts +8 -6
- package/dist/runtime/components/form/ActionPad.d.vue.ts +34 -32
- package/dist/runtime/components/form/ActionPad.vue.d.ts +34 -32
- package/dist/runtime/components/form/Date.d.vue.ts +20 -18
- package/dist/runtime/components/form/Date.vue.d.ts +20 -18
- package/dist/runtime/components/form/Dialog.d.vue.ts +24 -22
- package/dist/runtime/components/form/Dialog.vue.d.ts +24 -22
- package/dist/runtime/components/form/EditPad.d.vue.ts +34 -32
- package/dist/runtime/components/form/EditPad.vue.d.ts +34 -32
- package/dist/runtime/components/form/File.d.vue.ts +12 -10
- package/dist/runtime/components/form/File.vue.d.ts +12 -10
- package/dist/runtime/components/form/Iterator.d.vue.ts +121 -134
- package/dist/runtime/components/form/Iterator.vue.d.ts +121 -134
- package/dist/runtime/components/form/Login.d.vue.ts +5 -3
- package/dist/runtime/components/form/Login.vue.d.ts +5 -3
- package/dist/runtime/components/form/Pad.d.vue.ts +652 -650
- package/dist/runtime/components/form/Pad.vue.d.ts +652 -650
- package/dist/runtime/components/form/Table.d.vue.ts +69 -82
- package/dist/runtime/components/form/Table.vue.d.ts +69 -82
- package/dist/runtime/components/form/TableData.d.vue.ts +18 -24
- package/dist/runtime/components/form/TableData.vue.d.ts +18 -24
- package/dist/runtime/components/form/images/Capture.d.vue.ts +15 -13
- package/dist/runtime/components/form/images/Capture.vue.d.ts +15 -13
- package/dist/runtime/components/label/Field.d.vue.ts +16 -14
- package/dist/runtime/components/label/Field.vue.d.ts +16 -14
- package/dist/runtime/components/label/FormatMoney.d.vue.ts +1 -1
- package/dist/runtime/components/label/FormatMoney.vue.d.ts +1 -1
- package/dist/runtime/components/master/Autocomplete.d.vue.ts +3 -5
- package/dist/runtime/components/master/Autocomplete.vue.d.ts +3 -5
- package/dist/runtime/components/master/Combobox.d.vue.ts +3 -5
- package/dist/runtime/components/master/Combobox.vue.d.ts +3 -5
- package/dist/runtime/components/master/RadioGroup.d.vue.ts +3 -3
- package/dist/runtime/components/master/RadioGroup.vue.d.ts +3 -3
- package/dist/runtime/components/master/Select.d.vue.ts +3 -5
- package/dist/runtime/components/master/Select.vue.d.ts +3 -5
- package/dist/runtime/components/master/label.d.vue.ts +7 -3
- package/dist/runtime/components/master/label.vue +33 -15
- package/dist/runtime/components/master/label.vue.d.ts +7 -3
- package/dist/runtime/components/model/Autocomplete.d.vue.ts +3 -3
- package/dist/runtime/components/model/Autocomplete.vue.d.ts +3 -3
- package/dist/runtime/components/model/Combobox.d.vue.ts +3 -3
- package/dist/runtime/components/model/Combobox.vue.d.ts +3 -3
- package/dist/runtime/components/model/Pad.d.vue.ts +17 -15
- package/dist/runtime/components/model/Pad.vue.d.ts +17 -15
- package/dist/runtime/components/model/Select.d.vue.ts +3 -3
- package/dist/runtime/components/model/Select.vue.d.ts +3 -3
- package/dist/runtime/components/model/Table.d.vue.ts +102 -166
- package/dist/runtime/components/model/Table.vue.d.ts +102 -166
- package/dist/runtime/components/model/iterator.d.vue.ts +188 -240
- package/dist/runtime/components/model/iterator.vue.d.ts +188 -240
- package/dist/runtime/components/model/label.d.vue.ts +11 -5
- package/dist/runtime/components/model/label.vue +54 -4
- package/dist/runtime/components/model/label.vue.d.ts +11 -5
- package/dist/runtime/composables/batchLookup.d.ts +39 -0
- package/dist/runtime/composables/batchLookup.js +144 -0
- package/dist/runtime/composables/document/inputAttributeCatalog.generated.json +95 -0
- package/dist/runtime/composables/document/inputAttributes.d.ts +46 -0
- package/dist/runtime/composables/document/inputAttributes.js +196 -0
- package/dist/runtime/composables/document/template.js +4 -0
- package/dist/runtime/composables/document/templateInputTypes.d.ts +36 -0
- package/dist/runtime/composables/document/templateInputTypes.js +86 -17
- package/dist/runtime/composables/document/templateMasterLabel.d.ts +32 -0
- package/dist/runtime/composables/document/templateMasterLabel.js +30 -0
- package/dist/runtime/composables/document/validateTemplate.js +11 -1
- package/dist/runtime/composables/masterItemBatch.d.ts +7 -0
- package/dist/runtime/composables/masterItemBatch.js +12 -0
- package/dist/runtime/composables/modelBatch.d.ts +61 -0
- package/dist/runtime/composables/modelBatch.js +192 -0
- package/dist/runtime/labs/form/EditMobile.d.vue.ts +1 -1
- package/dist/runtime/labs/form/EditMobile.vue.d.ts +1 -1
- package/dist/runtime/labs/form/TextFieldMask.d.vue.ts +3 -3
- package/dist/runtime/labs/form/TextFieldMask.vue.d.ts +3 -3
- package/dist/runtime/plugins/clientConfig.d.ts +1 -1
- package/dist/runtime/plugins/default.d.ts +1 -1
- package/dist/runtime/plugins/dialogManager.d.ts +1 -1
- package/dist/runtime/plugins/permission.d.ts +1 -1
- package/package.json +2 -2
- package/scripts/build-input-attribute-catalog.mjs +133 -0
|
@@ -2,12 +2,14 @@ interface DialogProps {
|
|
|
2
2
|
modelValue: boolean;
|
|
3
3
|
color?: string;
|
|
4
4
|
}
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} & {
|
|
9
|
-
|
|
5
|
+
declare const __VLS_template: () => {
|
|
6
|
+
__VLS_Slots: {
|
|
7
|
+
title?: (props: {}) => any;
|
|
8
|
+
} & {
|
|
9
|
+
default?: (props: {}) => any;
|
|
10
|
+
};
|
|
10
11
|
};
|
|
12
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
11
13
|
declare const __VLS_base: import("vue").DefineComponent<DialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
14
|
"update:modelValue": (...args: any[]) => void;
|
|
13
15
|
}, string, import("vue").PublicProps, Readonly<DialogProps> & Readonly<{
|
|
@@ -2,10 +2,12 @@ interface DialogProps {
|
|
|
2
2
|
modelValue: boolean;
|
|
3
3
|
color?: string;
|
|
4
4
|
}
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
declare const __VLS_template: () => {
|
|
6
|
+
__VLS_Slots: {
|
|
7
|
+
default?: (props: {}) => any;
|
|
8
|
+
};
|
|
8
9
|
};
|
|
10
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
9
11
|
declare const __VLS_base: import("vue").DefineComponent<DialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
12
|
"update:modelValue": (...args: any[]) => void;
|
|
11
13
|
}, string, import("vue").PublicProps, Readonly<DialogProps> & Readonly<{
|
|
@@ -2,10 +2,12 @@ interface DialogProps {
|
|
|
2
2
|
modelValue: boolean;
|
|
3
3
|
color?: string;
|
|
4
4
|
}
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
declare const __VLS_template: () => {
|
|
6
|
+
__VLS_Slots: {
|
|
7
|
+
default?: (props: {}) => any;
|
|
8
|
+
};
|
|
8
9
|
};
|
|
10
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
9
11
|
declare const __VLS_base: import("vue").DefineComponent<DialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
12
|
"update:modelValue": (...args: any[]) => void;
|
|
11
13
|
}, string, import("vue").PublicProps, Readonly<DialogProps> & Readonly<{
|
|
@@ -100,72 +100,74 @@ type __VLS_ModelProps = {
|
|
|
100
100
|
modelValue?: string | Record<string, any>[];
|
|
101
101
|
};
|
|
102
102
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
103
|
-
declare
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
103
|
+
declare const __VLS_template: () => {
|
|
104
|
+
__VLS_Slots: {
|
|
105
|
+
title?: (props: {}) => any;
|
|
106
|
+
} & {
|
|
107
|
+
toolbarItems?: (props: {
|
|
108
|
+
items: Record<string, any>[];
|
|
109
|
+
operation: {
|
|
110
|
+
openCreate: typeof openCreate;
|
|
111
|
+
openEdit: typeof openEdit;
|
|
112
|
+
closeEditor: typeof closeEditor;
|
|
113
|
+
selectItem: typeof selectItem;
|
|
114
|
+
deleteItem: typeof deleteItem;
|
|
115
|
+
deleteSelected: typeof deleteSelected;
|
|
116
|
+
moveSelected: typeof moveSelected;
|
|
117
|
+
moveItemTo: typeof moveItemTo;
|
|
118
|
+
duplicateItem: typeof duplicateItem;
|
|
119
|
+
duplicateSelected: typeof duplicateSelected;
|
|
120
|
+
insertInputType: typeof insertInputType;
|
|
121
|
+
importItems: typeof importItems;
|
|
122
|
+
convertToAdvanceMode: () => Promise<void>;
|
|
123
|
+
};
|
|
124
|
+
}) => any;
|
|
125
|
+
} & {
|
|
126
|
+
empty?: (props: {
|
|
127
|
+
operation: {
|
|
128
|
+
openCreate: typeof openCreate;
|
|
129
|
+
openEdit: typeof openEdit;
|
|
130
|
+
closeEditor: typeof closeEditor;
|
|
131
|
+
selectItem: typeof selectItem;
|
|
132
|
+
deleteItem: typeof deleteItem;
|
|
133
|
+
deleteSelected: typeof deleteSelected;
|
|
134
|
+
moveSelected: typeof moveSelected;
|
|
135
|
+
moveItemTo: typeof moveItemTo;
|
|
136
|
+
duplicateItem: typeof duplicateItem;
|
|
137
|
+
duplicateSelected: typeof duplicateSelected;
|
|
138
|
+
insertInputType: typeof insertInputType;
|
|
139
|
+
importItems: typeof importItems;
|
|
140
|
+
convertToAdvanceMode: () => Promise<void>;
|
|
141
|
+
};
|
|
142
|
+
}) => any;
|
|
143
|
+
} & {
|
|
144
|
+
itemOverlay?: (props: {
|
|
145
|
+
index: number;
|
|
146
|
+
item: Record<string, any>;
|
|
147
|
+
operation: {
|
|
148
|
+
openCreate: typeof openCreate;
|
|
149
|
+
openEdit: typeof openEdit;
|
|
150
|
+
closeEditor: typeof closeEditor;
|
|
151
|
+
selectItem: typeof selectItem;
|
|
152
|
+
deleteItem: typeof deleteItem;
|
|
153
|
+
deleteSelected: typeof deleteSelected;
|
|
154
|
+
moveSelected: typeof moveSelected;
|
|
155
|
+
moveItemTo: typeof moveItemTo;
|
|
156
|
+
duplicateItem: typeof duplicateItem;
|
|
157
|
+
duplicateSelected: typeof duplicateSelected;
|
|
158
|
+
insertInputType: typeof insertInputType;
|
|
159
|
+
importItems: typeof importItems;
|
|
160
|
+
convertToAdvanceMode: () => Promise<void>;
|
|
161
|
+
};
|
|
162
|
+
}) => any;
|
|
163
|
+
} & {
|
|
164
|
+
palette?: (props: {
|
|
165
|
+
insert: typeof insertInputType;
|
|
166
|
+
disabled: boolean;
|
|
167
|
+
}) => any;
|
|
153
168
|
};
|
|
154
|
-
}, __VLS_312: {
|
|
155
|
-
insert: typeof insertInputType;
|
|
156
|
-
disabled: boolean;
|
|
157
|
-
};
|
|
158
|
-
type __VLS_Slots = {} & {
|
|
159
|
-
title?: (props: typeof __VLS_19) => any;
|
|
160
|
-
} & {
|
|
161
|
-
toolbarItems?: (props: typeof __VLS_27) => any;
|
|
162
|
-
} & {
|
|
163
|
-
empty?: (props: typeof __VLS_217) => any;
|
|
164
|
-
} & {
|
|
165
|
-
itemOverlay?: (props: typeof __VLS_238) => any;
|
|
166
|
-
} & {
|
|
167
|
-
palette?: (props: typeof __VLS_312) => any;
|
|
168
169
|
};
|
|
170
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
169
171
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
170
172
|
templateItems: import("vue").Ref<Record<string, any>[], Record<string, any>[]>;
|
|
171
173
|
previewData: import("vue").Ref<Record<string, any>, Record<string, any>>;
|
|
@@ -232,18 +234,18 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
232
234
|
title: string;
|
|
233
235
|
stringFields: string[];
|
|
234
236
|
initialData: Record<string, any>;
|
|
237
|
+
exportable: boolean;
|
|
238
|
+
importable: boolean;
|
|
239
|
+
outline: boolean;
|
|
240
|
+
palette: boolean;
|
|
241
|
+
sortable: boolean;
|
|
235
242
|
roleCustomCode: string | string[];
|
|
236
243
|
disableAdvanceMode: boolean;
|
|
237
244
|
toolbarColor: string;
|
|
238
245
|
editorWidth: string | number;
|
|
239
246
|
dialogMaxWidth: string | number;
|
|
240
247
|
dialogFullscreen: boolean;
|
|
241
|
-
outline: boolean;
|
|
242
|
-
importable: boolean;
|
|
243
|
-
exportable: boolean;
|
|
244
248
|
importMode: DocumentTemplateImportMode;
|
|
245
|
-
sortable: boolean;
|
|
246
|
-
palette: boolean;
|
|
247
249
|
paletteTypes: string[];
|
|
248
250
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
249
251
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -100,72 +100,74 @@ type __VLS_ModelProps = {
|
|
|
100
100
|
modelValue?: string | Record<string, any>[];
|
|
101
101
|
};
|
|
102
102
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
103
|
-
declare
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
103
|
+
declare const __VLS_template: () => {
|
|
104
|
+
__VLS_Slots: {
|
|
105
|
+
title?: (props: {}) => any;
|
|
106
|
+
} & {
|
|
107
|
+
toolbarItems?: (props: {
|
|
108
|
+
items: Record<string, any>[];
|
|
109
|
+
operation: {
|
|
110
|
+
openCreate: typeof openCreate;
|
|
111
|
+
openEdit: typeof openEdit;
|
|
112
|
+
closeEditor: typeof closeEditor;
|
|
113
|
+
selectItem: typeof selectItem;
|
|
114
|
+
deleteItem: typeof deleteItem;
|
|
115
|
+
deleteSelected: typeof deleteSelected;
|
|
116
|
+
moveSelected: typeof moveSelected;
|
|
117
|
+
moveItemTo: typeof moveItemTo;
|
|
118
|
+
duplicateItem: typeof duplicateItem;
|
|
119
|
+
duplicateSelected: typeof duplicateSelected;
|
|
120
|
+
insertInputType: typeof insertInputType;
|
|
121
|
+
importItems: typeof importItems;
|
|
122
|
+
convertToAdvanceMode: () => Promise<void>;
|
|
123
|
+
};
|
|
124
|
+
}) => any;
|
|
125
|
+
} & {
|
|
126
|
+
empty?: (props: {
|
|
127
|
+
operation: {
|
|
128
|
+
openCreate: typeof openCreate;
|
|
129
|
+
openEdit: typeof openEdit;
|
|
130
|
+
closeEditor: typeof closeEditor;
|
|
131
|
+
selectItem: typeof selectItem;
|
|
132
|
+
deleteItem: typeof deleteItem;
|
|
133
|
+
deleteSelected: typeof deleteSelected;
|
|
134
|
+
moveSelected: typeof moveSelected;
|
|
135
|
+
moveItemTo: typeof moveItemTo;
|
|
136
|
+
duplicateItem: typeof duplicateItem;
|
|
137
|
+
duplicateSelected: typeof duplicateSelected;
|
|
138
|
+
insertInputType: typeof insertInputType;
|
|
139
|
+
importItems: typeof importItems;
|
|
140
|
+
convertToAdvanceMode: () => Promise<void>;
|
|
141
|
+
};
|
|
142
|
+
}) => any;
|
|
143
|
+
} & {
|
|
144
|
+
itemOverlay?: (props: {
|
|
145
|
+
index: number;
|
|
146
|
+
item: Record<string, any>;
|
|
147
|
+
operation: {
|
|
148
|
+
openCreate: typeof openCreate;
|
|
149
|
+
openEdit: typeof openEdit;
|
|
150
|
+
closeEditor: typeof closeEditor;
|
|
151
|
+
selectItem: typeof selectItem;
|
|
152
|
+
deleteItem: typeof deleteItem;
|
|
153
|
+
deleteSelected: typeof deleteSelected;
|
|
154
|
+
moveSelected: typeof moveSelected;
|
|
155
|
+
moveItemTo: typeof moveItemTo;
|
|
156
|
+
duplicateItem: typeof duplicateItem;
|
|
157
|
+
duplicateSelected: typeof duplicateSelected;
|
|
158
|
+
insertInputType: typeof insertInputType;
|
|
159
|
+
importItems: typeof importItems;
|
|
160
|
+
convertToAdvanceMode: () => Promise<void>;
|
|
161
|
+
};
|
|
162
|
+
}) => any;
|
|
163
|
+
} & {
|
|
164
|
+
palette?: (props: {
|
|
165
|
+
insert: typeof insertInputType;
|
|
166
|
+
disabled: boolean;
|
|
167
|
+
}) => any;
|
|
153
168
|
};
|
|
154
|
-
}, __VLS_312: {
|
|
155
|
-
insert: typeof insertInputType;
|
|
156
|
-
disabled: boolean;
|
|
157
|
-
};
|
|
158
|
-
type __VLS_Slots = {} & {
|
|
159
|
-
title?: (props: typeof __VLS_19) => any;
|
|
160
|
-
} & {
|
|
161
|
-
toolbarItems?: (props: typeof __VLS_27) => any;
|
|
162
|
-
} & {
|
|
163
|
-
empty?: (props: typeof __VLS_217) => any;
|
|
164
|
-
} & {
|
|
165
|
-
itemOverlay?: (props: typeof __VLS_238) => any;
|
|
166
|
-
} & {
|
|
167
|
-
palette?: (props: typeof __VLS_312) => any;
|
|
168
169
|
};
|
|
170
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
169
171
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
170
172
|
templateItems: import("vue").Ref<Record<string, any>[], Record<string, any>[]>;
|
|
171
173
|
previewData: import("vue").Ref<Record<string, any>, Record<string, any>>;
|
|
@@ -232,18 +234,18 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
232
234
|
title: string;
|
|
233
235
|
stringFields: string[];
|
|
234
236
|
initialData: Record<string, any>;
|
|
237
|
+
exportable: boolean;
|
|
238
|
+
importable: boolean;
|
|
239
|
+
outline: boolean;
|
|
240
|
+
palette: boolean;
|
|
241
|
+
sortable: boolean;
|
|
235
242
|
roleCustomCode: string | string[];
|
|
236
243
|
disableAdvanceMode: boolean;
|
|
237
244
|
toolbarColor: string;
|
|
238
245
|
editorWidth: string | number;
|
|
239
246
|
dialogMaxWidth: string | number;
|
|
240
247
|
dialogFullscreen: boolean;
|
|
241
|
-
outline: boolean;
|
|
242
|
-
importable: boolean;
|
|
243
|
-
exportable: boolean;
|
|
244
248
|
importMode: DocumentTemplateImportMode;
|
|
245
|
-
sortable: boolean;
|
|
246
|
-
palette: boolean;
|
|
247
249
|
paletteTypes: string[];
|
|
248
250
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
249
251
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
inputType?: string;
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
"update:modelValue": (value: string) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
8
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
modelValue: string;
|
|
11
|
+
inputType: string;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
|
+
import {
|
|
4
|
+
inputAttributeSnippet,
|
|
5
|
+
insertInputAttribute,
|
|
6
|
+
parseInputAttributeNames,
|
|
7
|
+
useInputAttributeCatalog
|
|
8
|
+
} from "../../composables/document/inputAttributes";
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
inputType: { type: String, required: false, default: void 0 },
|
|
11
|
+
modelValue: { type: String, required: false, default: "" }
|
|
12
|
+
});
|
|
13
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
14
|
+
const menu = ref(false);
|
|
15
|
+
const search = ref("");
|
|
16
|
+
const { attributes, isLoading } = useInputAttributeCatalog(() => props.inputType);
|
|
17
|
+
const usedNames = computed(() => new Set(parseInputAttributeNames(props.modelValue)));
|
|
18
|
+
const insertableCount = computed(() => attributes.value.filter((attribute) => !attribute.managed).length);
|
|
19
|
+
const filteredAttributes = computed(() => {
|
|
20
|
+
const term = (search.value ?? "").trim().toLowerCase();
|
|
21
|
+
if (!term) return attributes.value;
|
|
22
|
+
return attributes.value.filter((attribute) => attribute.name.includes(term) || (attribute.description ?? "").toLowerCase().includes(term));
|
|
23
|
+
});
|
|
24
|
+
function insert(attribute, value) {
|
|
25
|
+
if (attribute.managed) return;
|
|
26
|
+
emit("update:modelValue", insertInputAttribute(props.modelValue, attribute.name, inputAttributeSnippet(attribute, value)));
|
|
27
|
+
}
|
|
28
|
+
function shortType(type) {
|
|
29
|
+
if (!type) return "any";
|
|
30
|
+
return type.length > 40 ? `${type.slice(0, 39)}\u2026` : type;
|
|
31
|
+
}
|
|
32
|
+
function onRowClick(attribute) {
|
|
33
|
+
if (!attribute.values?.length) insert(attribute);
|
|
34
|
+
}
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<v-menu
|
|
39
|
+
v-if="isLoading || insertableCount > 0"
|
|
40
|
+
v-model="menu"
|
|
41
|
+
:close-on-content-click="false"
|
|
42
|
+
location="bottom start"
|
|
43
|
+
min-width="420"
|
|
44
|
+
max-width="560"
|
|
45
|
+
>
|
|
46
|
+
<template #activator="{ props: activatorProps }">
|
|
47
|
+
<v-btn
|
|
48
|
+
v-bind="activatorProps"
|
|
49
|
+
:loading="isLoading"
|
|
50
|
+
class="text-none px-1"
|
|
51
|
+
density="comfortable"
|
|
52
|
+
prepend-icon="mdi mdi-format-list-bulleted"
|
|
53
|
+
size="small"
|
|
54
|
+
variant="text"
|
|
55
|
+
>
|
|
56
|
+
Available props ({{ insertableCount }})
|
|
57
|
+
</v-btn>
|
|
58
|
+
</template>
|
|
59
|
+
<v-card>
|
|
60
|
+
<v-card-text class="pa-2">
|
|
61
|
+
<v-text-field
|
|
62
|
+
v-model="search"
|
|
63
|
+
autofocus
|
|
64
|
+
clearable
|
|
65
|
+
density="compact"
|
|
66
|
+
hide-details
|
|
67
|
+
placeholder="Search name or description"
|
|
68
|
+
prepend-inner-icon="mdi mdi-magnify"
|
|
69
|
+
variant="outlined"
|
|
70
|
+
/>
|
|
71
|
+
</v-card-text>
|
|
72
|
+
<v-divider />
|
|
73
|
+
<v-list
|
|
74
|
+
class="py-0 doc-input-attributes__list"
|
|
75
|
+
density="compact"
|
|
76
|
+
max-height="360"
|
|
77
|
+
>
|
|
78
|
+
<v-list-item
|
|
79
|
+
v-for="attribute in filteredAttributes"
|
|
80
|
+
:key="attribute.name"
|
|
81
|
+
:class="{ 'doc-input-attributes__managed': attribute.managed }"
|
|
82
|
+
:link="!attribute.managed && !attribute.values?.length"
|
|
83
|
+
:data-attribute="attribute.name"
|
|
84
|
+
@click="onRowClick(attribute)"
|
|
85
|
+
>
|
|
86
|
+
<div class="d-flex align-start ga-2">
|
|
87
|
+
<div class="doc-input-attributes__name">
|
|
88
|
+
<code>{{ attribute.name }}</code>
|
|
89
|
+
<div
|
|
90
|
+
class="text-caption text-medium-emphasis"
|
|
91
|
+
:title="attribute.type"
|
|
92
|
+
>
|
|
93
|
+
{{ shortType(attribute.type) }} · {{ attribute.source }}
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
<div class="flex-grow-1 text-body-2">
|
|
97
|
+
<div :class="attribute.managed ? 'text-disabled' : 'text-medium-emphasis'">
|
|
98
|
+
{{ attribute.managed ? "Set by the builder." : attribute.description || "" }}
|
|
99
|
+
</div>
|
|
100
|
+
<div
|
|
101
|
+
v-if="attribute.values?.length && !attribute.managed"
|
|
102
|
+
class="d-flex flex-wrap ga-1 mt-1"
|
|
103
|
+
>
|
|
104
|
+
<v-chip
|
|
105
|
+
v-for="value in attribute.values"
|
|
106
|
+
:key="value"
|
|
107
|
+
:data-value="value"
|
|
108
|
+
label
|
|
109
|
+
size="x-small"
|
|
110
|
+
variant="outlined"
|
|
111
|
+
@click.stop="insert(attribute, value)"
|
|
112
|
+
>
|
|
113
|
+
{{ value }}
|
|
114
|
+
</v-chip>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
<v-chip
|
|
118
|
+
v-if="attribute.managed"
|
|
119
|
+
label
|
|
120
|
+
size="x-small"
|
|
121
|
+
variant="tonal"
|
|
122
|
+
>
|
|
123
|
+
builder
|
|
124
|
+
</v-chip>
|
|
125
|
+
<v-chip
|
|
126
|
+
v-else-if="usedNames.has(attribute.name)"
|
|
127
|
+
color="success"
|
|
128
|
+
label
|
|
129
|
+
prepend-icon="mdi mdi-check"
|
|
130
|
+
size="x-small"
|
|
131
|
+
variant="tonal"
|
|
132
|
+
>
|
|
133
|
+
used
|
|
134
|
+
</v-chip>
|
|
135
|
+
</div>
|
|
136
|
+
</v-list-item>
|
|
137
|
+
<v-list-item
|
|
138
|
+
v-if="filteredAttributes.length === 0"
|
|
139
|
+
class="text-medium-emphasis text-body-2"
|
|
140
|
+
>
|
|
141
|
+
No props match "{{ search }}".
|
|
142
|
+
</v-list-item>
|
|
143
|
+
</v-list>
|
|
144
|
+
<v-divider />
|
|
145
|
+
<div class="px-3 py-1 text-caption text-medium-emphasis">
|
|
146
|
+
Click a prop to insert it. Enum props: click a value. Grey props are set by the builder.
|
|
147
|
+
</div>
|
|
148
|
+
</v-card>
|
|
149
|
+
</v-menu>
|
|
150
|
+
</template>
|
|
151
|
+
|
|
152
|
+
<style scoped>
|
|
153
|
+
.doc-input-attributes__name{flex:0 0 160px;min-width:0;overflow-wrap:anywhere}.doc-input-attributes__managed{cursor:default}
|
|
154
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
inputType?: string;
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
"update:modelValue": (value: string) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
8
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
modelValue: string;
|
|
11
|
+
inputType: string;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
useDocumentTemplateInputTypes
|
|
14
14
|
} from "../../composables/document/templateInputTypes";
|
|
15
15
|
import { autoActionHeader, templateToHeader } from "../../composables/document/templateFormTable";
|
|
16
|
+
import { formatMasterLabelOptions, isMasterLabelFixed } from "../../composables/document/templateMasterLabel";
|
|
16
17
|
import { useRules } from "../../composables/utils/validation";
|
|
17
18
|
import { useUserPermission } from "../../composables/userPermission";
|
|
18
19
|
const props = defineProps({
|
|
@@ -73,6 +74,17 @@ const inputOptionsLabel = computed(() => {
|
|
|
73
74
|
for (const t of inputTypes.value) if (t.optionsLabel) acc[t.value] = t.optionsLabel;
|
|
74
75
|
return acc;
|
|
75
76
|
});
|
|
77
|
+
const masterLabelOptions = computed(() => {
|
|
78
|
+
const current = props.data.inputOptions;
|
|
79
|
+
if (typeof current !== "string") return { groupKey: "", itemCode: "" };
|
|
80
|
+
const pipe = current.indexOf("|");
|
|
81
|
+
return pipe < 0 ? { groupKey: current, itemCode: "" } : { groupKey: current.slice(0, pipe), itemCode: current.slice(pipe + 1) };
|
|
82
|
+
});
|
|
83
|
+
function setMasterLabelOption(part, value) {
|
|
84
|
+
const { groupKey, itemCode } = masterLabelOptions.value;
|
|
85
|
+
props.data.inputOptions = part === "groupKey" ? formatMasterLabelOptions(value, itemCode) : formatMasterLabelOptions(groupKey, value);
|
|
86
|
+
}
|
|
87
|
+
const variableNameRequired = computed(() => !isMasterLabelFixed(props.data));
|
|
76
88
|
const ruleOptions = (inputType) => (value) => {
|
|
77
89
|
if (choiceOption.value.includes(inputType) && !/^[^'",]+(,[^'",]+)*$/.test(value)) return "Invalid options format";
|
|
78
90
|
return true;
|
|
@@ -115,7 +127,7 @@ const ruleOptions = (inputType) => (value) => {
|
|
|
115
127
|
<v-text-field
|
|
116
128
|
v-model="data.variableName"
|
|
117
129
|
label="Variable Name"
|
|
118
|
-
:rules="[rules.
|
|
130
|
+
:rules="[rules.requireIf(variableNameRequired)]"
|
|
119
131
|
/>
|
|
120
132
|
</v-col>
|
|
121
133
|
<v-col
|
|
@@ -288,6 +300,34 @@ const ruleOptions = (inputType) => (value) => {
|
|
|
288
300
|
:rules="[rules.requireIf(requireOption.includes(data.inputType)), ruleOptions(data.inputType)]"
|
|
289
301
|
v-if="!hasSpecificOption.includes(data.inputType) && !choiceOption.includes(data.inputType)"
|
|
290
302
|
/>
|
|
303
|
+
<v-row
|
|
304
|
+
v-if="data.inputType == 'MasterLabel'"
|
|
305
|
+
density="compact"
|
|
306
|
+
>
|
|
307
|
+
<v-col
|
|
308
|
+
cols="12"
|
|
309
|
+
md="6"
|
|
310
|
+
>
|
|
311
|
+
<v-text-field
|
|
312
|
+
:model-value="masterLabelOptions.groupKey"
|
|
313
|
+
label="Group Key"
|
|
314
|
+
:rules="[rules.require()]"
|
|
315
|
+
@update:model-value="setMasterLabelOption('groupKey', $event)"
|
|
316
|
+
/>
|
|
317
|
+
</v-col>
|
|
318
|
+
<v-col
|
|
319
|
+
cols="12"
|
|
320
|
+
md="6"
|
|
321
|
+
>
|
|
322
|
+
<v-text-field
|
|
323
|
+
:model-value="masterLabelOptions.itemCode"
|
|
324
|
+
label="Fixed Item Code"
|
|
325
|
+
hint="Leave empty to show the name of the code in Variable Name"
|
|
326
|
+
persistent-hint
|
|
327
|
+
@update:model-value="setMasterLabelOption('itemCode', $event)"
|
|
328
|
+
/>
|
|
329
|
+
</v-col>
|
|
330
|
+
</v-row>
|
|
291
331
|
</v-col>
|
|
292
332
|
|
|
293
333
|
<v-col
|
|
@@ -330,6 +370,11 @@ const ruleOptions = (inputType) => (value) => {
|
|
|
330
370
|
<v-text-field
|
|
331
371
|
v-model="data.inputAttributes"
|
|
332
372
|
label="Input Attributes"
|
|
373
|
+
hide-details="auto"
|
|
374
|
+
/>
|
|
375
|
+
<document-template-input-attributes-helper
|
|
376
|
+
v-model="data.inputAttributes"
|
|
377
|
+
:input-type="data.inputType"
|
|
333
378
|
/>
|
|
334
379
|
</v-col>
|
|
335
380
|
<v-col class="doc-item-form__half" v-if="!notRequireColumnAttributes.includes(data.inputType)">
|