@finema/core 1.4.219 → 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 +58 -39
- 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 +67 -100
- package/dist/runtime/components/Dialog/index.vue.d.ts +10 -0
- package/dist/runtime/components/Empty.vue +29 -14
- package/dist/runtime/components/Empty.vue.d.ts +12 -0
- package/dist/runtime/components/FlexDeck/Base.vue +82 -87
- package/dist/runtime/components/FlexDeck/Base.vue.d.ts +63 -0
- package/dist/runtime/components/FlexDeck/index.vue +38 -39
- package/dist/runtime/components/FlexDeck/index.vue.d.ts +43 -0
- package/dist/runtime/components/Form/FieldWrapper.vue +21 -9
- package/dist/runtime/components/Form/FieldWrapper.vue.d.ts +16 -0
- package/dist/runtime/components/Form/Fields.vue +84 -222
- package/dist/runtime/components/Form/Fields.vue.d.ts +14 -0
- package/dist/runtime/components/Form/InputCheckbox/index.vue +43 -18
- 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 +59 -30
- package/dist/runtime/components/Form/InputDateTime/index.vue.d.ts +4 -0
- package/dist/runtime/components/Form/InputNumber/index.vue +51 -17
- 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 +77 -37
- 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 +91 -37
- 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 +103 -36
- 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 +43 -11
- 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 +41 -17
- 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 +0 -1
- 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 +47 -32
- package/dist/runtime/components/Image.vue.d.ts +13 -0
- package/dist/runtime/components/Loader.vue +21 -19
- package/dist/runtime/components/Loader.vue.d.ts +22 -0
- package/dist/runtime/components/{LogItem.vue → Log/LogItem.vue} +19 -16
- 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 +103 -98
- package/dist/runtime/components/Table/Base.vue.d.ts +47 -0
- package/dist/runtime/components/Table/ColumnDate.vue +10 -12
- package/dist/runtime/components/Table/ColumnDate.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnDateTime.vue +11 -13
- package/dist/runtime/components/Table/ColumnDateTime.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnImage.vue +12 -11
- package/dist/runtime/components/Table/ColumnImage.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnNumber.vue +12 -12
- package/dist/runtime/components/Table/ColumnNumber.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnText.vue +19 -24
- package/dist/runtime/components/Table/ColumnText.vue.d.ts +8 -0
- package/dist/runtime/components/Table/Simple.vue +41 -42
- package/dist/runtime/components/Table/Simple.vue.d.ts +24 -0
- package/dist/runtime/components/Table/index.vue +159 -46
- 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 +31 -29
- 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 +54 -63
- 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,27 +1,51 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<FieldWrapper
|
|
3
|
-
|
|
2
|
+
<FieldWrapper
|
|
3
|
+
v-bind="wrapperProps"
|
|
4
|
+
label=""
|
|
5
|
+
description=""
|
|
6
|
+
>
|
|
7
|
+
<Switch
|
|
4
8
|
:model-value="value"
|
|
5
|
-
:disabled="wrapperProps.
|
|
9
|
+
:disabled="wrapperProps.disabled"
|
|
6
10
|
:name="name"
|
|
7
11
|
:ui="ui"
|
|
12
|
+
:label="label"
|
|
13
|
+
:description="description"
|
|
14
|
+
:loading="loading"
|
|
15
|
+
:loading-icon="loadingIcon"
|
|
8
16
|
@update:modelValue="onChange"
|
|
9
17
|
/>
|
|
10
18
|
</FieldWrapper>
|
|
11
19
|
</template>
|
|
12
20
|
|
|
13
|
-
<script
|
|
14
|
-
import { useFieldHOC } from
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
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
|
+
};
|
|
27
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;
|
|
@@ -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
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
type: String,
|
|
15
|
-
default: '',
|
|
16
|
-
},
|
|
17
|
-
errorSrc: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: '',
|
|
20
|
-
},
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
const { isLoading, error } = useImage({ src: props.src })
|
|
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>
|
|
24
14
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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>
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
}
|
|
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
|
+
});
|
|
36
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
|
+
};
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
v-if="
|
|
4
|
-
:class="
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
{
|
|
8
|
-
'min-h-[200px]': !$attrs.class,
|
|
9
|
-
},
|
|
10
|
-
]"
|
|
3
|
+
v-if="loading"
|
|
4
|
+
:class="theme.base({
|
|
5
|
+
class: [ui?.base, props.class]
|
|
6
|
+
})"
|
|
11
7
|
>
|
|
12
|
-
<
|
|
8
|
+
<Icon
|
|
9
|
+
:name="icon"
|
|
10
|
+
:class="[theme.icon({
|
|
11
|
+
class: [ui?.icon]
|
|
12
|
+
})]"
|
|
13
|
+
/>
|
|
13
14
|
</div>
|
|
14
15
|
<slot v-else />
|
|
15
16
|
</template>
|
|
16
|
-
<script lang="ts" setup>
|
|
17
|
-
defineOptions({
|
|
18
|
-
inheritAttrs: false,
|
|
19
|
-
})
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
18
|
+
<script setup>
|
|
19
|
+
import { computed } from "vue";
|
|
20
|
+
import { loaderTheme } from "#core/theme/loader";
|
|
21
|
+
import { useUiConfig } from "#core/composables/useConfig";
|
|
22
|
+
const props = defineProps({
|
|
23
|
+
loading: { type: Boolean, required: false, default: true },
|
|
24
|
+
icon: { type: String, required: false, default: "i-svg-spinners:180-ring-with-bg" },
|
|
25
|
+
ui: { type: null, required: false },
|
|
26
|
+
class: { type: null, required: false }
|
|
27
|
+
});
|
|
28
|
+
const theme = computed(() => useUiConfig(loaderTheme, "loader")());
|
|
27
29
|
</script>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { loaderTheme } from '#core/theme/loader';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
loading?: boolean;
|
|
4
|
+
icon?: string;
|
|
5
|
+
ui?: typeof loaderTheme['slots'];
|
|
6
|
+
class?: any;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_5: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_5) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
|
+
loading: boolean;
|
|
14
|
+
icon: string;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
2
|
+
<div class="text-xs">
|
|
3
3
|
<div class="mb-2 flex items-center justify-between">
|
|
4
|
-
<p
|
|
4
|
+
<p
|
|
5
|
+
class="font-semibold"
|
|
6
|
+
>
|
|
7
|
+
{{ title || "Log" }}
|
|
8
|
+
</p>
|
|
5
9
|
<Icon
|
|
6
10
|
class="cursor-pointer"
|
|
7
11
|
:name="isShow ? 'heroicons:minus' : 'heroicons:plus'"
|
|
@@ -12,32 +16,31 @@
|
|
|
12
16
|
v-show="isShow"
|
|
13
17
|
:code="getCode"
|
|
14
18
|
max-height="500"
|
|
15
|
-
:browser-window="
|
|
19
|
+
:browser-window="false"
|
|
16
20
|
:indent="2"
|
|
17
21
|
lang="json"
|
|
18
22
|
highlightjs
|
|
19
23
|
/>
|
|
20
24
|
</div>
|
|
21
25
|
</template>
|
|
22
|
-
<script lang="ts" setup>
|
|
23
|
-
import { computed, ref } from 'vue'
|
|
24
|
-
import { VCodeBlock } from '@wdns/vue-code-block'
|
|
25
|
-
|
|
26
|
-
const props = defineProps<{
|
|
27
|
-
data?: any
|
|
28
|
-
title?: string
|
|
29
|
-
}>()
|
|
30
|
-
|
|
31
|
-
const isShow = ref(true)
|
|
32
26
|
|
|
27
|
+
<script setup>
|
|
28
|
+
import { computed, ref } from "vue";
|
|
29
|
+
import { VCodeBlock } from "@wdns/vue-code-block";
|
|
30
|
+
const props = defineProps({
|
|
31
|
+
data: { type: null, required: false },
|
|
32
|
+
title: { type: String, required: false }
|
|
33
|
+
});
|
|
34
|
+
const isShow = ref(true);
|
|
33
35
|
const getCode = computed(() => {
|
|
34
36
|
try {
|
|
35
|
-
return JSON.stringify(props.data)
|
|
37
|
+
return JSON.stringify(props.data);
|
|
36
38
|
} catch (e) {
|
|
37
|
-
return JSON.stringify(
|
|
39
|
+
return JSON.stringify("{}");
|
|
38
40
|
}
|
|
39
|
-
})
|
|
41
|
+
});
|
|
40
42
|
</script>
|
|
43
|
+
|
|
41
44
|
<style>
|
|
42
45
|
.hljs-string{white-space:break-spaces}
|
|
43
46
|
</style>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
data?: any;
|
|
3
|
+
title?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<DevOnly>
|
|
3
|
+
<TeleportSafe
|
|
4
|
+
to="#dev-logs"
|
|
5
|
+
>
|
|
6
|
+
<LogItem
|
|
7
|
+
v-if="typeof data !== 'undefined'"
|
|
8
|
+
:data="data"
|
|
9
|
+
:title="title"
|
|
10
|
+
/>
|
|
11
|
+
<LogItem
|
|
12
|
+
v-for="(item, index) in dataItems"
|
|
13
|
+
:key="index"
|
|
14
|
+
:data="item"
|
|
15
|
+
:title="`${title} #${index + 1}`"
|
|
16
|
+
/>
|
|
17
|
+
</TeleportSafe>
|
|
18
|
+
</DevOnly>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup>
|
|
22
|
+
import LogItem from "./LogItem.vue";
|
|
23
|
+
defineProps({
|
|
24
|
+
data: { type: null, required: false },
|
|
25
|
+
dataItems: { type: Array, required: false },
|
|
26
|
+
title: { type: String, required: false }
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
data?: any;
|
|
3
|
+
dataItems?: any[];
|
|
4
|
+
title?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|