@finema/core 1.4.220 → 2.1.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 +79 -60
- package/dist/module.d.mts +4 -24
- package/dist/module.json +4 -3
- package/dist/module.mjs +75 -213
- package/dist/runtime/components/App.vue +27 -0
- package/dist/runtime/components/App.vue.d.ts +12 -0
- package/dist/runtime/components/DevToolsWindow/index.vue +312 -0
- package/dist/runtime/components/DevToolsWindow/index.vue.d.ts +2 -0
- package/dist/runtime/components/Dialog/index.vue +77 -110
- package/dist/runtime/components/Dialog/index.vue.d.ts +10 -0
- package/dist/runtime/components/Empty.vue +33 -18
- package/dist/runtime/components/Empty.vue.d.ts +12 -0
- package/dist/runtime/components/FlexDeck/Base.vue +154 -159
- package/dist/runtime/components/FlexDeck/Base.vue.d.ts +63 -0
- package/dist/runtime/components/FlexDeck/index.vue +67 -68
- package/dist/runtime/components/FlexDeck/index.vue.d.ts +43 -0
- package/dist/runtime/components/Form/FieldWrapper.vue +35 -23
- package/dist/runtime/components/Form/FieldWrapper.vue.d.ts +16 -0
- package/dist/runtime/components/Form/Fields.vue +92 -230
- package/dist/runtime/components/Form/Fields.vue.d.ts +14 -0
- package/dist/runtime/components/Form/InputCheckbox/index.vue +53 -28
- package/dist/runtime/components/Form/InputCheckbox/index.vue.d.ts +3 -0
- package/dist/runtime/components/Form/InputCheckbox/types.d.ts +5 -1
- package/dist/runtime/components/Form/InputDateTime/date_time_field.types.d.ts +1 -1
- package/dist/runtime/components/Form/InputDateTime/index.vue +97 -68
- package/dist/runtime/components/Form/InputDateTime/index.vue.d.ts +4 -0
- package/dist/runtime/components/Form/InputNumber/index.vue +61 -27
- package/dist/runtime/components/Form/InputNumber/index.vue.d.ts +5 -0
- package/dist/runtime/components/Form/InputNumber/types.d.ts +10 -5
- package/dist/runtime/components/Form/InputSelect/index.vue +95 -55
- package/dist/runtime/components/Form/InputSelect/index.vue.d.ts +5 -0
- package/dist/runtime/components/Form/InputSelect/types.d.ts +14 -8
- package/dist/runtime/components/Form/InputSelectMultiple/index.vue +108 -54
- package/dist/runtime/components/Form/InputSelectMultiple/index.vue.d.ts +3 -0
- package/dist/runtime/components/Form/InputSelectMultiple/types.d.ts +9 -8
- package/dist/runtime/components/Form/InputText/index.vue +135 -68
- package/dist/runtime/components/Form/InputText/index.vue.d.ts +5 -0
- package/dist/runtime/components/Form/InputText/types.d.ts +4 -3
- package/dist/runtime/components/Form/InputTextarea/index.vue +57 -25
- package/dist/runtime/components/Form/InputTextarea/index.vue.d.ts +3 -0
- package/dist/runtime/components/Form/InputTextarea/types.d.ts +7 -2
- package/dist/runtime/components/Form/InputToggle/index.vue +51 -27
- package/dist/runtime/components/Form/InputToggle/index.vue.d.ts +3 -0
- package/dist/runtime/components/Form/InputToggle/types.d.ts +5 -1
- package/dist/runtime/components/Form/index.vue +5 -6
- package/dist/runtime/components/Form/index.vue.d.ts +12 -0
- package/dist/runtime/components/Form/types.d.ts +13 -27
- package/dist/runtime/components/Image.vue +51 -36
- package/dist/runtime/components/Image.vue.d.ts +13 -0
- package/dist/runtime/components/Loader.vue +29 -27
- package/dist/runtime/components/Loader.vue.d.ts +22 -0
- package/dist/runtime/components/{LogItem.vue → Log/LogItem.vue} +44 -41
- package/dist/runtime/components/Log/LogItem.vue.d.ts +6 -0
- package/dist/runtime/components/Log/index.vue +28 -0
- package/dist/runtime/components/Log/index.vue.d.ts +7 -0
- package/dist/runtime/components/Table/Base.vue +166 -161
- package/dist/runtime/components/Table/Base.vue.d.ts +47 -0
- package/dist/runtime/components/Table/ColumnDate.vue +14 -16
- package/dist/runtime/components/Table/ColumnDate.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnDateTime.vue +16 -18
- package/dist/runtime/components/Table/ColumnDateTime.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnImage.vue +16 -15
- package/dist/runtime/components/Table/ColumnImage.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnNumber.vue +14 -14
- package/dist/runtime/components/Table/ColumnNumber.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnText.vue +24 -29
- package/dist/runtime/components/Table/ColumnText.vue.d.ts +8 -0
- package/dist/runtime/components/Table/Simple.vue +69 -70
- package/dist/runtime/components/Table/Simple.vue.d.ts +24 -0
- package/dist/runtime/components/Table/index.vue +178 -65
- package/dist/runtime/components/Table/index.vue.d.ts +25 -0
- package/dist/runtime/components/Table/types.d.ts +14 -18
- package/dist/runtime/components/Table/{types.mjs → types.js} +1 -0
- package/dist/runtime/components/TeleportSafe.vue +42 -40
- package/dist/runtime/components/TeleportSafe.vue.d.ts +16 -0
- package/dist/runtime/composables/loaderList.d.ts +2 -2
- package/dist/runtime/composables/loaderList.js +51 -0
- package/dist/runtime/composables/loaderObject.d.ts +1 -1
- package/dist/runtime/composables/loaderObject.js +50 -0
- package/dist/runtime/composables/loaderPage.d.ts +10 -11
- package/dist/runtime/composables/loaderPage.js +243 -0
- package/dist/runtime/composables/useApp.d.ts +4 -9
- package/dist/runtime/composables/{useApp.mjs → useApp.js} +0 -12
- package/dist/runtime/composables/useConfig.d.ts +3 -3
- package/dist/runtime/composables/useConfig.js +12 -0
- package/dist/runtime/composables/useDialog.d.ts +1 -7
- package/dist/runtime/composables/useDialog.js +53 -0
- package/dist/runtime/composables/useFlexDeck.d.ts +1 -1
- package/dist/runtime/composables/{useFlexDeck.mjs → useFlexDeck.js} +5 -5
- package/dist/runtime/composables/useForm.d.ts +5 -2
- package/dist/runtime/composables/useForm.js +37 -0
- package/dist/runtime/composables/useNotification.d.ts +6 -22
- package/dist/runtime/composables/{useNotification.mjs → useNotification.js} +5 -21
- package/dist/runtime/composables/useTable.d.ts +12 -11
- package/dist/runtime/composables/{useTable.mjs → useTable.js} +3 -8
- package/dist/runtime/composables/useUpload.d.ts +2 -2
- package/dist/runtime/composables/{useUpload.mjs → useUpload.js} +1 -1
- package/dist/runtime/helpers/apiBaseHelper.d.ts +29 -0
- package/dist/runtime/helpers/apiBaseHelper.js +63 -0
- package/dist/runtime/helpers/apiListHelper.d.ts +4 -6
- package/dist/runtime/helpers/apiListHelper.js +50 -0
- package/dist/runtime/helpers/apiObjectHelper.d.ts +19 -20
- package/dist/runtime/helpers/apiObjectHelper.js +51 -0
- package/dist/runtime/helpers/apiPageHelper.d.ts +44 -44
- package/dist/runtime/helpers/apiPageHelper.js +287 -0
- package/dist/runtime/helpers/componentHelper.d.ts +11 -12
- package/dist/runtime/helpers/{componentHelper.mjs → componentHelper.js} +2 -7
- package/dist/runtime/i18n/valibot.d.ts +69 -0
- package/dist/runtime/i18n/valibot.js +72 -0
- package/dist/runtime/plugin.d.ts +1 -1
- package/dist/runtime/plugin.js +12 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/theme/button.d.ts +5 -0
- package/dist/runtime/theme/button.js +1 -0
- package/dist/runtime/theme/dialog.d.ts +31 -0
- package/dist/runtime/theme/dialog.js +21 -0
- package/dist/runtime/theme/empty.d.ts +7 -0
- package/dist/runtime/theme/empty.js +7 -0
- package/dist/runtime/theme/form.d.ts +18 -0
- package/dist/runtime/theme/form.js +16 -0
- package/dist/runtime/theme/index.d.ts +10 -0
- package/dist/runtime/theme/index.js +10 -0
- package/dist/runtime/theme/input.d.ts +8 -0
- package/dist/runtime/theme/input.js +4 -0
- package/dist/runtime/theme/inputNumber.d.ts +8 -0
- package/dist/runtime/theme/inputNumber.js +4 -0
- package/dist/runtime/theme/loader.d.ts +28 -0
- package/dist/runtime/theme/loader.js +18 -0
- package/dist/runtime/theme/selectMenu.d.ts +17 -0
- package/dist/runtime/theme/selectMenu.js +18 -0
- package/dist/runtime/theme/table.d.ts +10 -0
- package/dist/runtime/theme/table.js +10 -0
- package/dist/runtime/theme/textarea.d.ts +5 -0
- package/dist/runtime/theme/textarea.js +1 -0
- package/dist/runtime/types/lib.d.ts +1 -1
- package/dist/runtime/utils/ArrayHelper.d.ts +1 -1
- package/dist/runtime/utils/{ArrayHelper.mjs → ArrayHelper.js} +1 -1
- package/dist/runtime/utils/ObjectHelper.d.ts +3 -3
- package/dist/runtime/utils/{ObjectHelper.mjs → ObjectHelper.js} +3 -3
- package/dist/runtime/utils/ParamHelper.d.ts +1 -1
- package/dist/runtime/utils/{ParamHelper.mjs → ParamHelper.js} +1 -1
- package/dist/types.d.mts +2 -15
- package/package.json +91 -100
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -50
- package/dist/runtime/components/Alert.vue +0 -48
- package/dist/runtime/components/Avatar.vue +0 -27
- package/dist/runtime/components/Badge.vue +0 -11
- package/dist/runtime/components/Breadcrumb.vue +0 -44
- package/dist/runtime/components/Button/Group.vue +0 -37
- package/dist/runtime/components/Button/index.vue +0 -75
- package/dist/runtime/components/Card.vue +0 -38
- package/dist/runtime/components/Core.vue +0 -45
- package/dist/runtime/components/Dropdown/index.vue +0 -70
- package/dist/runtime/components/Dropdown/types.d.ts +0 -2
- package/dist/runtime/components/Dropdown/types.mjs +0 -17
- package/dist/runtime/components/Form/InputDateTimeRange/date_range_time_field.types.d.ts +0 -17
- package/dist/runtime/components/Form/InputDateTimeRange/index.vue +0 -91
- package/dist/runtime/components/Form/InputRadio/index.vue +0 -27
- package/dist/runtime/components/Form/InputRadio/types.d.ts +0 -8
- package/dist/runtime/components/Form/InputStatic/index.vue +0 -16
- package/dist/runtime/components/Form/InputStatic/types.d.ts +0 -4
- package/dist/runtime/components/Form/InputTags/index.vue +0 -141
- package/dist/runtime/components/Form/InputTags/types.d.ts +0 -11
- package/dist/runtime/components/Form/InputTextarea/types.mjs +0 -0
- package/dist/runtime/components/Form/InputToggle/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadDropzone/index.vue +0 -206
- package/dist/runtime/components/Form/InputUploadDropzone/types.d.ts +0 -11
- package/dist/runtime/components/Form/InputUploadDropzone/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +0 -362
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/types.d.ts +0 -23
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemUpload.vue +0 -241
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemView.vue +0 -110
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/index.vue +0 -171
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/types.d.ts +0 -23
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/ItemUpload.vue +0 -161
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/ItemView.vue +0 -64
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/index.vue +0 -178
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/types.d.ts +0 -21
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadFileClassic/index.vue +0 -95
- package/dist/runtime/components/Form/InputUploadFileClassic/types.d.ts +0 -13
- package/dist/runtime/components/Form/InputUploadFileClassic/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadFileClassicAuto/index.vue +0 -151
- package/dist/runtime/components/Form/InputUploadFileClassicAuto/types.d.ts +0 -18
- package/dist/runtime/components/Form/InputUploadFileClassicAuto/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadImageAuto/index.vue +0 -219
- package/dist/runtime/components/Form/InputUploadImageAuto/types.d.ts +0 -20
- package/dist/runtime/components/Form/InputUploadImageAuto/types.mjs +0 -0
- package/dist/runtime/components/Form/InputWYSIWYG/UploadImageForm.vue +0 -55
- package/dist/runtime/components/Form/InputWYSIWYG/index.vue +0 -230
- package/dist/runtime/components/Form/InputWYSIWYG/types.d.ts +0 -19
- package/dist/runtime/components/Form/InputWYSIWYG/types.mjs +0 -0
- package/dist/runtime/components/Icon.vue +0 -23
- package/dist/runtime/components/Log.vue +0 -22
- package/dist/runtime/components/Modal/index.vue +0 -146
- package/dist/runtime/components/OTPInput.vue +0 -127
- package/dist/runtime/components/QRCode.vue +0 -22
- package/dist/runtime/components/SimplePagination.vue +0 -96
- package/dist/runtime/components/Slideover/index.vue +0 -110
- package/dist/runtime/components/Tabs/index.vue +0 -64
- package/dist/runtime/composables/loaderList.mjs +0 -52
- package/dist/runtime/composables/loaderObject.mjs +0 -52
- package/dist/runtime/composables/loaderPage.mjs +0 -229
- package/dist/runtime/composables/useConfig.mjs +0 -9
- package/dist/runtime/composables/useDialog.mjs +0 -81
- package/dist/runtime/composables/useForm.mjs +0 -18
- package/dist/runtime/core.config.d.ts +0 -14
- package/dist/runtime/core.config.mjs +0 -14
- package/dist/runtime/helpers/apiListHelper.mjs +0 -44
- package/dist/runtime/helpers/apiObjectHelper.mjs +0 -46
- package/dist/runtime/helpers/apiPageHelper.mjs +0 -270
- package/dist/runtime/plugin.mjs +0 -149
- package/dist/runtime/types/common.mjs +0 -0
- package/dist/runtime/types/config.d.ts +0 -1
- package/dist/runtime/types/config.mjs +0 -0
- package/dist/runtime/types/lib.mjs +0 -0
- package/dist/runtime/ui.config/alert.d.ts +0 -3
- package/dist/runtime/ui.config/alert.mjs +0 -6
- package/dist/runtime/ui.config/badge.d.ts +0 -3
- package/dist/runtime/ui.config/badge.mjs +0 -1
- package/dist/runtime/ui.config/breadcrumb.d.ts +0 -1
- package/dist/runtime/ui.config/breadcrumb.mjs +0 -7
- package/dist/runtime/ui.config/button.d.ts +0 -3
- package/dist/runtime/ui.config/button.mjs +0 -8
- package/dist/runtime/ui.config/buttonGroup.d.ts +0 -3
- package/dist/runtime/ui.config/buttonGroup.mjs +0 -1
- package/dist/runtime/ui.config/card.d.ts +0 -1
- package/dist/runtime/ui.config/card.mjs +0 -2
- package/dist/runtime/ui.config/checkbox.d.ts +0 -3
- package/dist/runtime/ui.config/checkbox.mjs +0 -1
- package/dist/runtime/ui.config/formGroup.d.ts +0 -3
- package/dist/runtime/ui.config/formGroup.mjs +0 -5
- package/dist/runtime/ui.config/icon.d.ts +0 -3
- package/dist/runtime/ui.config/icon.mjs +0 -3
- package/dist/runtime/ui.config/index.d.ts +0 -16
- package/dist/runtime/ui.config/index.mjs +0 -16
- package/dist/runtime/ui.config/input.d.ts +0 -3
- package/dist/runtime/ui.config/input.mjs +0 -5
- package/dist/runtime/ui.config/modal.d.ts +0 -1
- package/dist/runtime/ui.config/modal.mjs +0 -34
- package/dist/runtime/ui.config/notification.d.ts +0 -11
- package/dist/runtime/ui.config/notification.mjs +0 -13
- package/dist/runtime/ui.config/notifications.d.ts +0 -3
- package/dist/runtime/ui.config/notifications.mjs +0 -3
- package/dist/runtime/ui.config/pagination.d.ts +0 -3
- package/dist/runtime/ui.config/pagination.mjs +0 -37
- package/dist/runtime/ui.config/select.d.ts +0 -3
- package/dist/runtime/ui.config/select.mjs +0 -5
- package/dist/runtime/ui.config/selectMenu.d.ts +0 -3
- package/dist/runtime/ui.config/selectMenu.mjs +0 -5
- package/dist/runtime/ui.config/slideover.d.ts +0 -1
- package/dist/runtime/ui.config/slideover.mjs +0 -16
- package/dist/runtime/ui.config/table.d.ts +0 -3
- package/dist/runtime/ui.config/table.mjs +0 -47
- package/dist/runtime/ui.config/tabs.d.ts +0 -3
- package/dist/runtime/ui.config/tabs.mjs +0 -4
- package/dist/runtime/ui.config/tags.d.ts +0 -25
- package/dist/runtime/ui.config/tags.mjs +0 -25
- package/dist/runtime/ui.config/textarea.d.ts +0 -3
- package/dist/runtime/ui.config/textarea.mjs +0 -5
- package/dist/runtime/ui.config/toggle.d.ts +0 -3
- package/dist/runtime/ui.config/toggle.mjs +0 -5
- package/dist/runtime/ui.config/uploadDropzoneImage.d.ts +0 -83
- package/dist/runtime/ui.config/uploadDropzoneImage.mjs +0 -26
- package/dist/runtime/ui.config/uploadFileDropzone.d.ts +0 -61
- package/dist/runtime/ui.config/uploadFileDropzone.mjs +0 -61
- package/dist/runtime/ui.config/uploadFileInputClassicAuto.d.ts +0 -8
- package/dist/runtime/ui.config/uploadFileInputClassicAuto.mjs +0 -8
- package/dist/runtime/ui.config/uploadImage.d.ts +0 -34
- package/dist/runtime/ui.config/uploadImage.mjs +0 -36
- package/dist/runtime/ui.css +0 -1
- package/dist/runtime/utils/ArrayHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/ArrayHelper.spec.mjs +0 -112
- package/dist/runtime/utils/FileHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/FileHelper.spec.mjs +0 -14
- package/dist/runtime/utils/ObjectHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/ObjectHelper.spec.mjs +0 -52
- package/dist/runtime/utils/ParamHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/ParamHelper.spec.mjs +0 -78
- package/dist/runtime/utils/StringHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/StringHelper.spec.mjs +0 -76
- package/dist/runtime/utils/TimeHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/TimeHelper.spec.mjs +0 -79
- package/dist/runtime/utils/TimeHelper.thai.spec.d.ts +0 -1
- package/dist/runtime/utils/TimeHelper.thai.spec.mjs +0 -31
- package/dist/types.d.ts +0 -16
- package/dist/runtime/components/FlexDeck/{types.mjs → types.js} +0 -0
- package/dist/runtime/components/Form/InputCheckbox/{types.mjs → types.js} +0 -0
- package/dist/runtime/components/Form/InputDateTime/{date_time_field.types.mjs → date_time_field.types.js} +0 -0
- package/dist/runtime/components/Form/{InputDateTimeRange/date_range_time_field.types.mjs → InputNumber/types.js} +0 -0
- package/dist/runtime/components/Form/{InputNumber/types.mjs → InputSelect/types.js} +0 -0
- package/dist/runtime/components/Form/{InputRadio/types.mjs → InputSelectMultiple/types.js} +0 -0
- package/dist/runtime/components/Form/{InputSelect/types.mjs → InputText/types.js} +0 -0
- package/dist/runtime/components/Form/{InputSelectMultiple/types.mjs → InputTextarea/types.js} +0 -0
- package/dist/runtime/components/Form/{InputStatic/types.mjs → InputToggle/types.js} +0 -0
- package/dist/runtime/components/Form/{types.mjs → types.js} +0 -0
- package/dist/runtime/composables/{useWatch.mjs → useWatch.js} +0 -0
- package/dist/runtime/lib/{Requester.mjs → Requester.js} +0 -0
- package/dist/runtime/{components/Form/InputTags/types.mjs → types/common.js} +0 -0
- package/dist/runtime/{components/Form/InputText/types.mjs → types/lib.js} +0 -0
- package/dist/runtime/utils/{FileHelper.mjs → FileHelper.js} +0 -0
- package/dist/runtime/utils/{StringHelper.mjs → StringHelper.js} +0 -0
- package/dist/runtime/utils/{TimeHelper.mjs → TimeHelper.js} +1 -1
- /package/dist/runtime/utils/{lodash.mjs → lodash.js} +0 -0
|
@@ -1,68 +1,135 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FieldWrapper v-bind="wrapperProps">
|
|
3
|
-
<
|
|
4
|
-
v-if="type === 'password'"
|
|
5
|
-
v-
|
|
6
|
-
|
|
7
|
-
:
|
|
8
|
-
:
|
|
9
|
-
:
|
|
10
|
-
:
|
|
11
|
-
:
|
|
12
|
-
:
|
|
13
|
-
:
|
|
14
|
-
:
|
|
15
|
-
:
|
|
16
|
-
:
|
|
17
|
-
:
|
|
18
|
-
:
|
|
19
|
-
:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
:
|
|
38
|
-
:
|
|
39
|
-
:
|
|
40
|
-
:
|
|
41
|
-
:
|
|
42
|
-
:
|
|
43
|
-
:
|
|
44
|
-
:
|
|
45
|
-
:
|
|
46
|
-
:
|
|
47
|
-
:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
import {
|
|
57
|
-
import
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<FieldWrapper v-bind="wrapperProps">
|
|
3
|
+
<Input
|
|
4
|
+
v-if="type === 'password'"
|
|
5
|
+
v-maska="activeMaskOptions"
|
|
6
|
+
:model-value="value"
|
|
7
|
+
:disabled="wrapperProps.disabled"
|
|
8
|
+
:leading-icon="leadingIcon"
|
|
9
|
+
:trailing-icon="trailingIcon"
|
|
10
|
+
:loading="loading"
|
|
11
|
+
:loading-icon="loadingIcon"
|
|
12
|
+
:name="name"
|
|
13
|
+
:placeholder="wrapperProps.placeholder"
|
|
14
|
+
:type="isShowPassword ? 'text' : 'password'"
|
|
15
|
+
:autofocus="!!autoFocus"
|
|
16
|
+
:icon="icon"
|
|
17
|
+
:readonly="readonly"
|
|
18
|
+
:ui="defu(ui, { icon: { trailing: { pointer: '' } } })"
|
|
19
|
+
@update:model-value="onChange"
|
|
20
|
+
>
|
|
21
|
+
<template #trailing>
|
|
22
|
+
<Button
|
|
23
|
+
color="neutral"
|
|
24
|
+
variant="link"
|
|
25
|
+
:icon="isShowPassword ? 'i-heroicons-eye-slash' : 'i-heroicons-eye'"
|
|
26
|
+
:padded="false"
|
|
27
|
+
@click="isShowPassword = !isShowPassword"
|
|
28
|
+
/>
|
|
29
|
+
</template>
|
|
30
|
+
</Input>
|
|
31
|
+
<Input
|
|
32
|
+
v-else
|
|
33
|
+
v-maska="activeMaskOptions"
|
|
34
|
+
:model-value="value"
|
|
35
|
+
:disabled="wrapperProps.disabled"
|
|
36
|
+
:leading-icon="leadingIcon"
|
|
37
|
+
:trailing-icon="trailingIcon"
|
|
38
|
+
:loading="loading"
|
|
39
|
+
:loading-icon="loadingIcon"
|
|
40
|
+
:name="name"
|
|
41
|
+
:placeholder="wrapperProps.placeholder"
|
|
42
|
+
:type="type"
|
|
43
|
+
:autofocus="!!autoFocus"
|
|
44
|
+
:icon="icon"
|
|
45
|
+
:readonly="readonly"
|
|
46
|
+
:ui="ui"
|
|
47
|
+
@update:model-value="onChange"
|
|
48
|
+
/>
|
|
49
|
+
</FieldWrapper>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script setup>
|
|
53
|
+
import { vMaska } from "maska/vue";
|
|
54
|
+
import { defu } from "defu";
|
|
55
|
+
import { ref, computed } from "#imports";
|
|
56
|
+
import { useFieldHOC } from "#core/composables/useForm";
|
|
57
|
+
import FieldWrapper from "#core/components/Form/FieldWrapper.vue";
|
|
58
|
+
const emits = defineEmits(["change"]);
|
|
59
|
+
const props = defineProps({
|
|
60
|
+
type: { type: String, required: false, default: "text" },
|
|
61
|
+
leadingIcon: { type: null, required: false },
|
|
62
|
+
trailingIcon: { type: null, required: false },
|
|
63
|
+
loading: { type: Boolean, required: false },
|
|
64
|
+
loadingIcon: { type: null, required: false },
|
|
65
|
+
icon: { type: String, required: false },
|
|
66
|
+
mask: { type: [String, Array, Function, null], required: false },
|
|
67
|
+
maskOptions: { type: Object, required: false },
|
|
68
|
+
maskTokens: { type: null, required: false },
|
|
69
|
+
maskEager: { type: Boolean, required: false },
|
|
70
|
+
maskTokensReplace: { type: Boolean, required: false },
|
|
71
|
+
maskReversed: { type: Boolean, required: false },
|
|
72
|
+
form: { type: Object, required: false },
|
|
73
|
+
name: { type: String, required: true },
|
|
74
|
+
errorMessage: { type: String, required: false },
|
|
75
|
+
label: { type: null, required: false },
|
|
76
|
+
description: { type: String, required: false },
|
|
77
|
+
hint: { type: String, required: false },
|
|
78
|
+
rules: { type: null, required: false },
|
|
79
|
+
autoFocus: { type: Boolean, required: false },
|
|
80
|
+
placeholder: { type: String, required: false },
|
|
81
|
+
disabled: { type: Boolean, required: false },
|
|
82
|
+
readonly: { type: Boolean, required: false },
|
|
83
|
+
required: { type: Boolean, required: false },
|
|
84
|
+
help: { type: String, required: false },
|
|
85
|
+
ui: { type: null, required: false }
|
|
86
|
+
});
|
|
87
|
+
const {
|
|
88
|
+
value,
|
|
89
|
+
wrapperProps,
|
|
90
|
+
handleChange
|
|
91
|
+
} = useFieldHOC(props);
|
|
92
|
+
const isShowPassword = ref(false);
|
|
93
|
+
const onChange = (value2) => {
|
|
94
|
+
handleChange(value2);
|
|
95
|
+
emits("change", value2);
|
|
96
|
+
};
|
|
97
|
+
const activeMaskOptions = computed(() => {
|
|
98
|
+
if (props.maskOptions && Object.keys(props.maskOptions).length > 0) {
|
|
99
|
+
if (typeof props.maskOptions.mask === "string" && Object.keys(props.maskOptions).length === 1) {
|
|
100
|
+
return props.maskOptions.mask;
|
|
101
|
+
}
|
|
102
|
+
return props.maskOptions;
|
|
103
|
+
}
|
|
104
|
+
const options = {};
|
|
105
|
+
let hasIndividualProps = false;
|
|
106
|
+
if (props.mask !== void 0) {
|
|
107
|
+
options.mask = props.mask;
|
|
108
|
+
hasIndividualProps = true;
|
|
109
|
+
}
|
|
110
|
+
if (props.maskTokens !== void 0) {
|
|
111
|
+
options.tokens = props.maskTokens;
|
|
112
|
+
hasIndividualProps = true;
|
|
113
|
+
}
|
|
114
|
+
if (props.maskEager !== void 0) {
|
|
115
|
+
options.eager = props.maskEager;
|
|
116
|
+
hasIndividualProps = true;
|
|
117
|
+
}
|
|
118
|
+
if (props.maskReversed !== void 0) {
|
|
119
|
+
options.reversed = props.maskReversed;
|
|
120
|
+
hasIndividualProps = true;
|
|
121
|
+
}
|
|
122
|
+
if (props.maskTokensReplace !== void 0) {
|
|
123
|
+
options.tokensReplace = props.maskTokensReplace;
|
|
124
|
+
hasIndividualProps = true;
|
|
125
|
+
}
|
|
126
|
+
if (hasIndividualProps) {
|
|
127
|
+
const keys = Object.keys(options);
|
|
128
|
+
if (keys.length === 1 && keys[0] === "mask" && typeof options.mask === "string") {
|
|
129
|
+
return options.mask;
|
|
130
|
+
}
|
|
131
|
+
return options;
|
|
132
|
+
}
|
|
133
|
+
return void 0;
|
|
134
|
+
});
|
|
135
|
+
</script>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ITextFieldProps } from '#core/components/Form/InputText/types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<ITextFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
|
|
3
|
+
type: "text" | "password" | "email";
|
|
4
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
export default _default;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { type IFieldProps, type IFormFieldBase, type INPUT_TYPES } from '#core/components/Form/types';
|
|
2
1
|
import type { MaskInputOptions, MaskType } from 'maska';
|
|
2
|
+
import type { IFieldProps, IFormFieldBase, INPUT_TYPES } from '#core/components/Form/types';
|
|
3
3
|
export interface ITextFieldProps extends IFieldProps {
|
|
4
4
|
type?: 'text' | 'password' | 'email';
|
|
5
5
|
leadingIcon?: any;
|
|
6
6
|
trailingIcon?: any;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
loadingIcon?: any;
|
|
7
9
|
icon?: string;
|
|
8
10
|
mask?: MaskType;
|
|
9
11
|
maskOptions?: MaskInputOptions;
|
|
10
|
-
maskTokens?:
|
|
12
|
+
maskTokens?: MaskInputOptions['tokens'];
|
|
11
13
|
maskEager?: boolean;
|
|
12
14
|
maskTokensReplace?: boolean;
|
|
13
15
|
maskReversed?: boolean;
|
|
14
16
|
}
|
|
15
17
|
export type ITextField = IFormFieldBase<INPUT_TYPES.TEXT | INPUT_TYPES.PASSWORD | INPUT_TYPES.EMAIL, ITextFieldProps, {
|
|
16
18
|
change?: (value: string) => void;
|
|
17
|
-
blur?: (value: string) => void;
|
|
18
19
|
}>;
|
|
@@ -1,25 +1,57 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FieldWrapper v-bind="wrapperProps">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
:disabled="wrapperProps.
|
|
6
|
-
:name="name"
|
|
7
|
-
:resize="resize"
|
|
8
|
-
:placeholder="wrapperProps.placeholder"
|
|
9
|
-
:autofocus="!!autoFocus"
|
|
10
|
-
:autoresize="autoresize"
|
|
11
|
-
:rows="rows"
|
|
12
|
-
:
|
|
13
|
-
:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<FieldWrapper v-bind="wrapperProps">
|
|
3
|
+
<Textarea
|
|
4
|
+
:model-value="value"
|
|
5
|
+
:disabled="wrapperProps.disabled"
|
|
6
|
+
:name="name"
|
|
7
|
+
:resize="resize"
|
|
8
|
+
:placeholder="wrapperProps.placeholder"
|
|
9
|
+
:autofocus="!!autoFocus"
|
|
10
|
+
:autoresize="autoresize"
|
|
11
|
+
:rows="rows"
|
|
12
|
+
:maxrows="maxrows"
|
|
13
|
+
:loading="loading"
|
|
14
|
+
:loading-icon="loadingIcon"
|
|
15
|
+
:readonly="readonly"
|
|
16
|
+
:ui="ui"
|
|
17
|
+
@update:model-value="onChange"
|
|
18
|
+
/>
|
|
19
|
+
</FieldWrapper>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup>
|
|
23
|
+
import { useFieldHOC } from "#core/composables/useForm";
|
|
24
|
+
import FieldWrapper from "#core/components/Form/FieldWrapper.vue";
|
|
25
|
+
const emits = defineEmits(["change"]);
|
|
26
|
+
const props = defineProps({
|
|
27
|
+
autoresize: { type: Boolean, required: false },
|
|
28
|
+
resize: { type: Boolean, required: false },
|
|
29
|
+
rows: { type: Number, required: false },
|
|
30
|
+
maxrows: { type: Number, required: false },
|
|
31
|
+
loading: { type: Boolean, required: false },
|
|
32
|
+
loadingIcon: { type: null, required: false },
|
|
33
|
+
form: { type: Object, required: false },
|
|
34
|
+
name: { type: String, required: true },
|
|
35
|
+
errorMessage: { type: String, required: false },
|
|
36
|
+
label: { type: null, required: false },
|
|
37
|
+
description: { type: String, required: false },
|
|
38
|
+
hint: { type: String, required: false },
|
|
39
|
+
rules: { type: null, required: false },
|
|
40
|
+
autoFocus: { type: Boolean, required: false },
|
|
41
|
+
placeholder: { type: String, required: false },
|
|
42
|
+
disabled: { type: Boolean, required: false },
|
|
43
|
+
readonly: { type: Boolean, required: false },
|
|
44
|
+
required: { type: Boolean, required: false },
|
|
45
|
+
help: { type: String, required: false },
|
|
46
|
+
ui: { type: null, required: false }
|
|
47
|
+
});
|
|
48
|
+
const {
|
|
49
|
+
value,
|
|
50
|
+
wrapperProps,
|
|
51
|
+
handleChange
|
|
52
|
+
} = useFieldHOC(props);
|
|
53
|
+
const onChange = (value2) => {
|
|
54
|
+
handleChange(value2);
|
|
55
|
+
emits("change", value2);
|
|
56
|
+
};
|
|
57
|
+
</script>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ITextareaFieldProps } from '#core/components/Form/InputTextarea/types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<ITextareaFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IFieldProps, IFormFieldBase, INPUT_TYPES } from '#core/components/Form/types';
|
|
2
2
|
export interface ITextareaFieldProps extends IFieldProps {
|
|
3
3
|
autoresize?: boolean;
|
|
4
4
|
resize?: boolean;
|
|
5
5
|
rows?: number;
|
|
6
|
+
maxrows?: number;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
loadingIcon?: any;
|
|
6
9
|
}
|
|
7
|
-
export type ITextareaField = IFormFieldBase<INPUT_TYPES.TEXTAREA, ITextareaFieldProps,
|
|
10
|
+
export type ITextareaField = IFormFieldBase<INPUT_TYPES.TEXTAREA, ITextareaFieldProps, {
|
|
11
|
+
change?: (value: string) => void;
|
|
12
|
+
}>;
|
|
@@ -1,27 +1,51 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FieldWrapper
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<FieldWrapper
|
|
3
|
+
v-bind="wrapperProps"
|
|
4
|
+
label=""
|
|
5
|
+
description=""
|
|
6
|
+
>
|
|
7
|
+
<Switch
|
|
8
|
+
:model-value="value"
|
|
9
|
+
:disabled="wrapperProps.disabled"
|
|
10
|
+
:name="name"
|
|
11
|
+
:ui="ui"
|
|
12
|
+
:label="label"
|
|
13
|
+
:description="description"
|
|
14
|
+
:loading="loading"
|
|
15
|
+
:loading-icon="loadingIcon"
|
|
16
|
+
@update:modelValue="onChange"
|
|
17
|
+
/>
|
|
18
|
+
</FieldWrapper>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup>
|
|
22
|
+
import { useFieldHOC } from "#core/composables/useForm";
|
|
23
|
+
import FieldWrapper from "#core/components/Form/FieldWrapper.vue";
|
|
24
|
+
const emit = defineEmits(["change"]);
|
|
25
|
+
const props = defineProps({
|
|
26
|
+
loading: { type: Boolean, required: false },
|
|
27
|
+
loadingIcon: { type: null, required: false },
|
|
28
|
+
label: { type: String, required: false },
|
|
29
|
+
description: { type: String, required: false },
|
|
30
|
+
form: { type: Object, required: false },
|
|
31
|
+
name: { type: String, required: true },
|
|
32
|
+
errorMessage: { type: String, required: false },
|
|
33
|
+
hint: { type: String, required: false },
|
|
34
|
+
rules: { type: null, required: false },
|
|
35
|
+
autoFocus: { type: Boolean, required: false },
|
|
36
|
+
placeholder: { type: String, required: false },
|
|
37
|
+
disabled: { type: Boolean, required: false },
|
|
38
|
+
readonly: { type: Boolean, required: false },
|
|
39
|
+
required: { type: Boolean, required: false },
|
|
40
|
+
help: { type: String, required: false },
|
|
41
|
+
ui: { type: null, required: false }
|
|
42
|
+
});
|
|
43
|
+
const {
|
|
44
|
+
value,
|
|
45
|
+
wrapperProps
|
|
46
|
+
} = useFieldHOC(props);
|
|
47
|
+
const onChange = (bool) => {
|
|
48
|
+
emit("change", bool);
|
|
49
|
+
value.value = bool;
|
|
50
|
+
};
|
|
51
|
+
</script>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IToggleFieldProps } from '#core/components/Form/InputToggle/types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<IToggleFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IFieldProps, IFormFieldBase, INPUT_TYPES } from '#core/components/Form/types';
|
|
2
2
|
export interface IToggleFieldProps extends IFieldProps {
|
|
3
|
+
loading?: boolean;
|
|
4
|
+
loadingIcon?: any;
|
|
5
|
+
label?: string;
|
|
6
|
+
description?: string;
|
|
3
7
|
}
|
|
4
8
|
export type IToggleField = IFormFieldBase<INPUT_TYPES.TOGGLE, IToggleFieldProps, {
|
|
5
9
|
change?: (value: boolean) => void;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<form class="form">
|
|
3
|
-
<slot />
|
|
4
|
-
</form>
|
|
5
|
-
</template>
|
|
6
|
-
<script lang="ts" setup></script>
|
|
1
|
+
<template>
|
|
2
|
+
<form class="form">
|
|
3
|
+
<slot />
|
|
4
|
+
</form>
|
|
5
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
7
|
+
export default _default;
|
|
8
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
9
|
+
new (): {
|
|
10
|
+
$slots: S;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -1,25 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { type IToggleField } from '#core/components/Form/InputToggle/types';
|
|
9
|
-
import { type ITextareaField } from '#core/components/Form/InputTextarea/types';
|
|
10
|
-
import { type IDateTimeField } from '#core/components/Form/InputDateTime/date_time_field.types';
|
|
11
|
-
import { type IDateTimeRangeField } from '#core/components/Form/InputDateTimeRange/date_range_time_field.types';
|
|
12
|
-
import { type IUploadFileClassicField } from '#core/components/Form/InputUploadFileClassic/types';
|
|
13
|
-
import { type IUploadFileField } from '#core/components/Form/InputUploadFileClassicAuto/types';
|
|
14
|
-
import { type IUploadImageAutoField } from '#core/components/Form/InputUploadImageAuto/types';
|
|
15
|
-
import { type IUploadDropzoneField } from '#core/components/Form/InputUploadDropzone/types';
|
|
16
|
-
import { type IUploadDropzoneAutoField } from '#core/components/Form/InputUploadDropzoneAuto/types';
|
|
17
|
-
import type { INumberField } from '#core/components/Form/InputNumber/types';
|
|
18
|
-
import type { IUploadDropzoneAutoMultipleField } from '#core/components/Form/InputUploadDropzoneAutoMultiple/types';
|
|
19
|
-
import type { IUploadDropzoneImageAutoMultipleField } from '#core/components/Form/InputUploadDropzoneImageAutoMultiple/types';
|
|
20
|
-
import type { IWYSIWYGField } from '#core/components/Form/InputWYSIWYG/types';
|
|
21
|
-
import type { ITagsField } from '#core/components/Form/InputTags/types';
|
|
1
|
+
import type { Component } from '@nuxt/schema';
|
|
2
|
+
import type { FormContext } from 'vee-validate';
|
|
3
|
+
import type { ITextField } from '#core/components/Form/InputText/types';
|
|
4
|
+
import type { ITextareaField } from '#core/components/Form/InputTextarea/types';
|
|
5
|
+
import type { IToggleField } from '#core/components/Form/InputToggle/types';
|
|
6
|
+
import type { ISelectField } from '#core/components/Form/InputSelect/types';
|
|
7
|
+
import type { ICheckboxField } from '#core/components/Form/InputCheckbox/types';
|
|
22
8
|
import type { ISelectMultipleField } from '#core/components/Form/InputSelectMultiple/types';
|
|
9
|
+
import type { INumberField } from '#core/components/Form/InputNumber/types';
|
|
10
|
+
import type { IDateTimeField } from '#core/components/Form/InputDateTime/date_time_field.types';
|
|
23
11
|
export declare const enum INPUT_TYPES {
|
|
24
12
|
TEXT = "TEXT",
|
|
25
13
|
NUMBER = "NUMBER",
|
|
@@ -54,16 +42,14 @@ export interface IFieldProps {
|
|
|
54
42
|
label?: string | any;
|
|
55
43
|
description?: string;
|
|
56
44
|
hint?: string;
|
|
57
|
-
size?: string;
|
|
58
45
|
rules?: any;
|
|
59
46
|
autoFocus?: boolean;
|
|
60
47
|
placeholder?: string;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
readonly?: boolean;
|
|
50
|
+
required?: boolean;
|
|
64
51
|
help?: string;
|
|
65
52
|
ui?: object | any;
|
|
66
|
-
containerUi?: object | any;
|
|
67
53
|
}
|
|
68
54
|
export interface IFormFieldBase<I extends INPUT_TYPES, P extends IFieldProps, O> {
|
|
69
55
|
type: I;
|
|
@@ -74,7 +60,7 @@ export interface IFormFieldBase<I extends INPUT_TYPES, P extends IFieldProps, O>
|
|
|
74
60
|
props: P;
|
|
75
61
|
on?: O;
|
|
76
62
|
}
|
|
77
|
-
export type IFormField = ITextField | INumberField |
|
|
63
|
+
export type IFormField = ITextField | INumberField | ITextareaField | IToggleField | ISelectField | ICheckboxField | ISelectMultipleField | IDateTimeField | IFormFieldBase<INPUT_TYPES.COMPONENT, any, any>;
|
|
78
64
|
export interface IFileValue {
|
|
79
65
|
url: string;
|
|
80
66
|
path?: string;
|
|
@@ -1,36 +1,51 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<UseImage v-bind="$props">
|
|
3
|
+
<template #loading>
|
|
4
|
+
<slot name="loading">
|
|
5
|
+
<div
|
|
6
|
+
class="w-full h-full flex justify-center items-center"
|
|
7
|
+
>
|
|
8
|
+
<Loader
|
|
9
|
+
:loading="true"
|
|
10
|
+
/>
|
|
11
|
+
</div>
|
|
12
|
+
</slot>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<template #error>
|
|
16
|
+
<slot name="error">
|
|
17
|
+
<div
|
|
18
|
+
class="w-full h-full flex justify-center items-center"
|
|
19
|
+
>
|
|
20
|
+
<p class="text-error-400">
|
|
21
|
+
<Icon
|
|
22
|
+
name="i-heroicons:exclamation-circle-solid"
|
|
23
|
+
class="text-error-400 size-8"
|
|
24
|
+
/>
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
27
|
+
</slot>
|
|
28
|
+
</template>
|
|
29
|
+
</UseImage>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script setup>
|
|
33
|
+
import { UseImage } from "@vueuse/components";
|
|
34
|
+
defineSlots();
|
|
35
|
+
defineProps({
|
|
36
|
+
src: { type: String, required: true },
|
|
37
|
+
srcset: { type: String, required: false },
|
|
38
|
+
sizes: { type: String, required: false },
|
|
39
|
+
alt: { type: String, required: false },
|
|
40
|
+
class: { type: String, required: false },
|
|
41
|
+
loading: { type: null, required: false },
|
|
42
|
+
crossorigin: { type: String, required: false },
|
|
43
|
+
referrerPolicy: { type: null, required: false },
|
|
44
|
+
width: { type: null, required: false },
|
|
45
|
+
height: { type: null, required: false },
|
|
46
|
+
decoding: { type: null, required: false },
|
|
47
|
+
fetchPriority: { type: null, required: false },
|
|
48
|
+
ismap: { type: null, required: false },
|
|
49
|
+
usemap: { type: null, required: false }
|
|
50
|
+
});
|
|
51
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { UseImageOptions } from '@vueuse/core';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
loading: () => any;
|
|
4
|
+
error: () => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<UseImageOptions, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<UseImageOptions> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|