@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,37 +0,0 @@
|
|
|
1
|
-
export const pagination = {
|
|
2
|
-
wrapper: "flex items-center space-x-1",
|
|
3
|
-
default: {
|
|
4
|
-
size: "sm",
|
|
5
|
-
activeButton: {
|
|
6
|
-
color: "primary",
|
|
7
|
-
class: "rounded-md px-3"
|
|
8
|
-
},
|
|
9
|
-
inactiveButton: {
|
|
10
|
-
color: "primary",
|
|
11
|
-
variant: "ghost",
|
|
12
|
-
class: "rounded-md px-3 text-gray-500 hover:bg-primary-500 hover:text-white"
|
|
13
|
-
},
|
|
14
|
-
firstButton: {
|
|
15
|
-
color: "primary",
|
|
16
|
-
variant: "ghost",
|
|
17
|
-
class: "rtl:[&_span:first-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
|
|
18
|
-
},
|
|
19
|
-
lastButton: {
|
|
20
|
-
color: "primary",
|
|
21
|
-
variant: "ghost",
|
|
22
|
-
class: "rtl:[&_span:last-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
|
|
23
|
-
},
|
|
24
|
-
prevButton: {
|
|
25
|
-
color: "primary",
|
|
26
|
-
variant: "ghost",
|
|
27
|
-
icon: "i-heroicons-chevron-left-20-solid",
|
|
28
|
-
class: "rtl:[&_span:first-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
|
|
29
|
-
},
|
|
30
|
-
nextButton: {
|
|
31
|
-
color: "primary",
|
|
32
|
-
variant: "ghost",
|
|
33
|
-
icon: "i-heroicons-chevron-right-20-solid",
|
|
34
|
-
class: "rtl:[&_span:last-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const slideover: any;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { slideover as inheritSlideover } from "#ui/ui.config";
|
|
2
|
-
export const slideover = {
|
|
3
|
-
...inheritSlideover,
|
|
4
|
-
bodyWrapper: "p-4",
|
|
5
|
-
size: {
|
|
6
|
-
sm: "w-screen max-w-xs",
|
|
7
|
-
md: "w-screen max-w-md",
|
|
8
|
-
lg: "w-screen max-w-xl",
|
|
9
|
-
xl: "w-screen max-w-2xl",
|
|
10
|
-
half: "w-screen max-w-[calc(100vw/2)]",
|
|
11
|
-
full: "w-screen max-w-full"
|
|
12
|
-
},
|
|
13
|
-
default: {
|
|
14
|
-
size: "md"
|
|
15
|
-
}
|
|
16
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export const table = {
|
|
2
|
-
wrapper: "relative overflow-x-auto bg-white rounded-lg",
|
|
3
|
-
base: "min-w-full table-fixed",
|
|
4
|
-
divide: "divide-y divide-y-2 divide-gray-300 dark:divide-gray-700",
|
|
5
|
-
thead: "",
|
|
6
|
-
tbody: "divide-y divide-gray-200 dark:divide-gray-800",
|
|
7
|
-
tr: {
|
|
8
|
-
base: "even:bg-gray-50",
|
|
9
|
-
selected: "bg-gray-50 dark:bg-gray-800/50",
|
|
10
|
-
active: "hover:bg-gray-50 dark:hover:bg-gray-800/50 cursor-pointer"
|
|
11
|
-
},
|
|
12
|
-
th: {
|
|
13
|
-
base: "text-left rtl:text-right",
|
|
14
|
-
padding: "px-3 py-3.5",
|
|
15
|
-
color: "text-gray-700 dark:text-white",
|
|
16
|
-
font: "font-normal",
|
|
17
|
-
size: "text-base"
|
|
18
|
-
},
|
|
19
|
-
td: {
|
|
20
|
-
base: "whitespace-nowrap",
|
|
21
|
-
padding: "px-3 py-4",
|
|
22
|
-
color: "text-gray-500 dark:text-gray-400",
|
|
23
|
-
font: "",
|
|
24
|
-
size: "text-sm"
|
|
25
|
-
},
|
|
26
|
-
progress: {
|
|
27
|
-
wrapper: "absolute inset-x-0 p-0"
|
|
28
|
-
},
|
|
29
|
-
default: {
|
|
30
|
-
sortAscIcon: "ph:arrow-up",
|
|
31
|
-
sortDescIcon: "ph:arrow-down",
|
|
32
|
-
sortButton: {
|
|
33
|
-
icon: "ph:arrows-down-up",
|
|
34
|
-
trailing: true,
|
|
35
|
-
square: true,
|
|
36
|
-
color: "gray",
|
|
37
|
-
variant: "ghost",
|
|
38
|
-
class: "-m-1.5 text-gray-700 font-normal"
|
|
39
|
-
},
|
|
40
|
-
loadingState: {
|
|
41
|
-
label: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14..."
|
|
42
|
-
},
|
|
43
|
-
emptyState: {
|
|
44
|
-
label: "\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare const tags: {
|
|
2
|
-
base: string;
|
|
3
|
-
border: string;
|
|
4
|
-
shadow: string;
|
|
5
|
-
padding: string;
|
|
6
|
-
stages: {
|
|
7
|
-
default: string;
|
|
8
|
-
error: string;
|
|
9
|
-
};
|
|
10
|
-
placeholder: string;
|
|
11
|
-
innerWrapper: string;
|
|
12
|
-
input: string;
|
|
13
|
-
tag: {
|
|
14
|
-
size: string;
|
|
15
|
-
color: string;
|
|
16
|
-
variant: string;
|
|
17
|
-
};
|
|
18
|
-
default: {
|
|
19
|
-
tag: {
|
|
20
|
-
size: string;
|
|
21
|
-
color: string;
|
|
22
|
-
variant: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export const tags = {
|
|
2
|
-
base: "relative flex w-full flex-wrap items-center bg-white ring-1 ring-inset",
|
|
3
|
-
border: "rounded-md border-0",
|
|
4
|
-
shadow: "shadow-sm",
|
|
5
|
-
padding: "px-3.5 py-2.5",
|
|
6
|
-
stages: {
|
|
7
|
-
default: "has-[:focus]:ring-primary-500 ring-gray-300 has-[:focus]:ring-2",
|
|
8
|
-
error: "has-[:focus]:ring-danger-500 ring-danger-500 ring-danger-300 has-[:focus]:ring-2"
|
|
9
|
-
},
|
|
10
|
-
placeholder: "absolute left-3.5 top-2.5 text-sm text-gray-400",
|
|
11
|
-
innerWrapper: "mr-2 flex w-full flex-wrap items-center gap-2",
|
|
12
|
-
input: "m-0 grow p-0 text-sm text-gray-900 outline-none",
|
|
13
|
-
tag: {
|
|
14
|
-
size: "",
|
|
15
|
-
color: "",
|
|
16
|
-
variant: ""
|
|
17
|
-
},
|
|
18
|
-
default: {
|
|
19
|
-
tag: {
|
|
20
|
-
size: "xs",
|
|
21
|
-
color: "primary",
|
|
22
|
-
variant: "solid"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
export declare const uploadFileDropzoneImage: {
|
|
2
|
-
imageItemWrapper: string;
|
|
3
|
-
imageItem: {
|
|
4
|
-
wrapper: string;
|
|
5
|
-
onLoading: {
|
|
6
|
-
wrapper: string;
|
|
7
|
-
percentClass: string;
|
|
8
|
-
};
|
|
9
|
-
onPreview: {
|
|
10
|
-
wrapper: string;
|
|
11
|
-
previewImgClass: string;
|
|
12
|
-
previewActionWrapper: string;
|
|
13
|
-
actionBtnClass: string;
|
|
14
|
-
previewTextWrapper: string;
|
|
15
|
-
previewText: string;
|
|
16
|
-
};
|
|
17
|
-
onFailed: {
|
|
18
|
-
wrapper: string;
|
|
19
|
-
failedImgClass: string;
|
|
20
|
-
failedActionWrapper: string;
|
|
21
|
-
actionBtnClass: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
base: string;
|
|
25
|
-
wrapper: string;
|
|
26
|
-
disabled: string;
|
|
27
|
-
failed: string;
|
|
28
|
-
placeholderWrapper: string;
|
|
29
|
-
placeholder: string;
|
|
30
|
-
labelWrapper: string;
|
|
31
|
-
onLoading: {
|
|
32
|
-
wrapper: string;
|
|
33
|
-
placeholderWrapper: string;
|
|
34
|
-
placeholderImgIcon: string;
|
|
35
|
-
placeholderFileIcon: string;
|
|
36
|
-
placeholderIconClass: string;
|
|
37
|
-
textWrapper: string;
|
|
38
|
-
loadingIcon: string;
|
|
39
|
-
loadingIconClass: string;
|
|
40
|
-
};
|
|
41
|
-
onPreview: {
|
|
42
|
-
wrapper: string;
|
|
43
|
-
previewImgWrapper: string;
|
|
44
|
-
previewImgClass: string;
|
|
45
|
-
previewFileIcon: string;
|
|
46
|
-
previewFileClass: string;
|
|
47
|
-
textWrapper: string;
|
|
48
|
-
};
|
|
49
|
-
onFailed: {
|
|
50
|
-
wrapper: string;
|
|
51
|
-
failedImgWrapper: string;
|
|
52
|
-
failedImgIcon: string;
|
|
53
|
-
failedFileIcon: string;
|
|
54
|
-
failedIconClass: string;
|
|
55
|
-
textWrapper: string;
|
|
56
|
-
};
|
|
57
|
-
action: {
|
|
58
|
-
wrapper: string;
|
|
59
|
-
addingWrapper: string;
|
|
60
|
-
iconClass: string;
|
|
61
|
-
deleteIconClass: string;
|
|
62
|
-
retryBtnClass: string;
|
|
63
|
-
addingBtnClass: string;
|
|
64
|
-
addingTextClass: string;
|
|
65
|
-
previewIcon: string;
|
|
66
|
-
downloadIcon: string;
|
|
67
|
-
deleteIcon: string;
|
|
68
|
-
retryIcon: string;
|
|
69
|
-
addingIcon: string;
|
|
70
|
-
};
|
|
71
|
-
background: {
|
|
72
|
-
default: string;
|
|
73
|
-
dragover: string;
|
|
74
|
-
};
|
|
75
|
-
labelIcon: string;
|
|
76
|
-
default: {
|
|
77
|
-
filePreviewIcon: string;
|
|
78
|
-
uploadIcon: string;
|
|
79
|
-
placeholderImgIcon: string;
|
|
80
|
-
failedImgIcon: string;
|
|
81
|
-
loadingIcon: string;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { uploadFileDropzone } from "./uploadFileDropzone.mjs";
|
|
2
|
-
export const uploadFileDropzoneImage = {
|
|
3
|
-
...uploadFileDropzone,
|
|
4
|
-
imageItemWrapper: "flex w-full flex-wrap gap-4",
|
|
5
|
-
imageItem: {
|
|
6
|
-
wrapper: "max-w-[96px]",
|
|
7
|
-
onLoading: {
|
|
8
|
-
wrapper: "flex size-24 flex-col items-center justify-center overflow-hidden rounded-lg border-[1px] border-dashed p-2",
|
|
9
|
-
percentClass: "text-primary"
|
|
10
|
-
},
|
|
11
|
-
onPreview: {
|
|
12
|
-
wrapper: "relative size-24 overflow-hidden rounded-lg border-[1px] border-gray-100",
|
|
13
|
-
previewImgClass: "size-full object-cover",
|
|
14
|
-
previewActionWrapper: "absolute inset-0 z-10 flex items-center justify-center space-x-2 opacity-0 transition hover:bg-black/50 hover:opacity-100",
|
|
15
|
-
actionBtnClass: "size-7 cursor-pointer text-white",
|
|
16
|
-
previewTextWrapper: "mt-2 truncate",
|
|
17
|
-
previewText: "truncate text-center text-sm"
|
|
18
|
-
},
|
|
19
|
-
onFailed: {
|
|
20
|
-
wrapper: "border-danger border-dashed relative size-24 overflow-hidden rounded-lg border-[1px]",
|
|
21
|
-
failedImgClass: "size-full object-cover",
|
|
22
|
-
failedActionWrapper: "absolute inset-0 z-10 flex items-center justify-center space-x-2 bg-white/50",
|
|
23
|
-
actionBtnClass: "text-danger size-7 cursor-pointer"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export declare const uploadFileDropzone: {
|
|
2
|
-
base: string;
|
|
3
|
-
wrapper: string;
|
|
4
|
-
disabled: string;
|
|
5
|
-
failed: string;
|
|
6
|
-
placeholderWrapper: string;
|
|
7
|
-
placeholder: string;
|
|
8
|
-
labelWrapper: string;
|
|
9
|
-
onLoading: {
|
|
10
|
-
wrapper: string;
|
|
11
|
-
placeholderWrapper: string;
|
|
12
|
-
placeholderImgIcon: string;
|
|
13
|
-
placeholderFileIcon: string;
|
|
14
|
-
placeholderIconClass: string;
|
|
15
|
-
textWrapper: string;
|
|
16
|
-
loadingIcon: string;
|
|
17
|
-
loadingIconClass: string;
|
|
18
|
-
};
|
|
19
|
-
onPreview: {
|
|
20
|
-
wrapper: string;
|
|
21
|
-
previewImgWrapper: string;
|
|
22
|
-
previewImgClass: string;
|
|
23
|
-
previewFileIcon: string;
|
|
24
|
-
previewFileClass: string;
|
|
25
|
-
textWrapper: string;
|
|
26
|
-
};
|
|
27
|
-
onFailed: {
|
|
28
|
-
wrapper: string;
|
|
29
|
-
failedImgWrapper: string;
|
|
30
|
-
failedImgIcon: string;
|
|
31
|
-
failedFileIcon: string;
|
|
32
|
-
failedIconClass: string;
|
|
33
|
-
textWrapper: string;
|
|
34
|
-
};
|
|
35
|
-
action: {
|
|
36
|
-
wrapper: string;
|
|
37
|
-
addingWrapper: string;
|
|
38
|
-
iconClass: string;
|
|
39
|
-
deleteIconClass: string;
|
|
40
|
-
retryBtnClass: string;
|
|
41
|
-
addingBtnClass: string;
|
|
42
|
-
addingTextClass: string;
|
|
43
|
-
previewIcon: string;
|
|
44
|
-
downloadIcon: string;
|
|
45
|
-
deleteIcon: string;
|
|
46
|
-
retryIcon: string;
|
|
47
|
-
addingIcon: string;
|
|
48
|
-
};
|
|
49
|
-
background: {
|
|
50
|
-
default: string;
|
|
51
|
-
dragover: string;
|
|
52
|
-
};
|
|
53
|
-
labelIcon: string;
|
|
54
|
-
default: {
|
|
55
|
-
filePreviewIcon: string;
|
|
56
|
-
uploadIcon: string;
|
|
57
|
-
placeholderImgIcon: string;
|
|
58
|
-
failedImgIcon: string;
|
|
59
|
-
loadingIcon: string;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export const uploadFileDropzone = {
|
|
2
|
-
base: "relative w-full p-4 transition rounded-lg flex items-center justify-center border-[1px] ring-0",
|
|
3
|
-
wrapper: "flex flex-col items-center w-full",
|
|
4
|
-
disabled: "bg-gray-100 border-none grayscale cursor-not-allowed",
|
|
5
|
-
failed: "border-danger",
|
|
6
|
-
placeholderWrapper: "py-4 flex flex-col items-center justify-center",
|
|
7
|
-
placeholder: "text-gray-400 text-center font-light text-sm truncate",
|
|
8
|
-
labelWrapper: "flex items-center space-x-2 text-gray-400 text-center",
|
|
9
|
-
onLoading: {
|
|
10
|
-
wrapper: "w-full flex space-x-4",
|
|
11
|
-
placeholderWrapper: "flex size-12 items-center justify-center rounded-lg bg-gray-100",
|
|
12
|
-
placeholderImgIcon: "",
|
|
13
|
-
placeholderFileIcon: "",
|
|
14
|
-
placeholderIconClass: "size-7 text-gray-400",
|
|
15
|
-
textWrapper: "flex w-full items-center justify-between",
|
|
16
|
-
loadingIcon: "",
|
|
17
|
-
loadingIconClass: "text-primary size-10"
|
|
18
|
-
},
|
|
19
|
-
onPreview: {
|
|
20
|
-
wrapper: "w-full flex space-x-4",
|
|
21
|
-
previewImgWrapper: "flex size-12 items-center justify-center rounded-lg overflow-hidden bg-gray-100",
|
|
22
|
-
previewImgClass: "w-full h-full object-cover",
|
|
23
|
-
previewFileIcon: "",
|
|
24
|
-
previewFileClass: "size-7 text-gray-400",
|
|
25
|
-
textWrapper: "flex w-full items-center justify-between"
|
|
26
|
-
},
|
|
27
|
-
onFailed: {
|
|
28
|
-
wrapper: "w-full flex space-x-4",
|
|
29
|
-
failedImgWrapper: "flex size-12 items-center justify-center rounded-lg bg-gray-100",
|
|
30
|
-
failedImgIcon: "",
|
|
31
|
-
failedFileIcon: "",
|
|
32
|
-
failedIconClass: "size-7 text-gray-400",
|
|
33
|
-
textWrapper: "flex w-full items-start justify-between"
|
|
34
|
-
},
|
|
35
|
-
action: {
|
|
36
|
-
wrapper: "flex items-center space-x-4",
|
|
37
|
-
addingWrapper: "flex size-24 flex-col items-center justify-center overflow-hidden rounded-lg border-[1px] border-dashed p-2 cursor-pointer transition hover:bg-gray-100",
|
|
38
|
-
iconClass: "size-6 text-gray-400 cursor-pointer",
|
|
39
|
-
deleteIconClass: "size-6 text-danger cursor-pointer",
|
|
40
|
-
retryBtnClass: "px-0",
|
|
41
|
-
addingBtnClass: "size-7 text-gray-500",
|
|
42
|
-
addingTextClass: "text-center text-sm text-gray-500",
|
|
43
|
-
previewIcon: "i-ic:outline-remove-red-eye",
|
|
44
|
-
downloadIcon: "i-ic:outline-file-download",
|
|
45
|
-
deleteIcon: "ph:trash",
|
|
46
|
-
retryIcon: "ph:arrow-counter-clockwise",
|
|
47
|
-
addingIcon: "i-material-symbols:add"
|
|
48
|
-
},
|
|
49
|
-
background: {
|
|
50
|
-
default: "bg-white border-gray-border",
|
|
51
|
-
dragover: "bg-gray-100 border-primary"
|
|
52
|
-
},
|
|
53
|
-
labelIcon: "w-6 h-6 text-gray-400 text-center mb-4",
|
|
54
|
-
default: {
|
|
55
|
-
filePreviewIcon: "i-heroicons:document-text-solid",
|
|
56
|
-
uploadIcon: "i-ph:cloud-arrow-up",
|
|
57
|
-
placeholderImgIcon: "i-material-symbols:imagesmode-outline",
|
|
58
|
-
failedImgIcon: "i-material-symbols:imagesmode-outline",
|
|
59
|
-
loadingIcon: "i-svg-spinners:180-ring-with-bg"
|
|
60
|
-
}
|
|
61
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export const uploadFileInputClassicAuto = {
|
|
2
|
-
base: "rounded-md ring-1 ring-inset ring-gray-300 shadow-sm bg-white px-3 py-2",
|
|
3
|
-
wrapper: "flex items-center justify-between gap-4",
|
|
4
|
-
selectFileBox: "flex items-center gap-2 truncate",
|
|
5
|
-
placeholder: "truncate text-gray-400 text-sm",
|
|
6
|
-
previewURL: "mt-4 max-w-[300px] rounded",
|
|
7
|
-
default: {}
|
|
8
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export declare const uploadImage: {
|
|
2
|
-
base: string;
|
|
3
|
-
imageItemWrapper: string;
|
|
4
|
-
imageItem: {
|
|
5
|
-
wrapper: string;
|
|
6
|
-
onLoading: {
|
|
7
|
-
wrapper: string;
|
|
8
|
-
percentClass: string;
|
|
9
|
-
};
|
|
10
|
-
onPreview: {
|
|
11
|
-
wrapper: string;
|
|
12
|
-
previewImgClass: string;
|
|
13
|
-
previewActionWrapper: string;
|
|
14
|
-
actionBtnClass: string;
|
|
15
|
-
previewTextWrapper: string;
|
|
16
|
-
previewText: string;
|
|
17
|
-
};
|
|
18
|
-
onFailed: {
|
|
19
|
-
wrapper: string;
|
|
20
|
-
failedImgClass: string;
|
|
21
|
-
failedActionWrapper: string;
|
|
22
|
-
actionBtnClass: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
action: {
|
|
26
|
-
addingWrapper: string;
|
|
27
|
-
deleteIconClass: string;
|
|
28
|
-
addingBtnClass: string;
|
|
29
|
-
addingTextClass: string;
|
|
30
|
-
previewIcon: string;
|
|
31
|
-
deleteIcon: string;
|
|
32
|
-
addingIcon: string;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export const uploadImage = {
|
|
2
|
-
base: "w-full overflow-hidden",
|
|
3
|
-
imageItemWrapper: "flex w-full flex-wrap gap-4",
|
|
4
|
-
imageItem: {
|
|
5
|
-
wrapper: "max-w-[96px]",
|
|
6
|
-
onLoading: {
|
|
7
|
-
wrapper: "flex size-24 flex-col items-center justify-center overflow-hidden rounded-lg border-[1px] border-dashed p-2",
|
|
8
|
-
percentClass: "text-primary"
|
|
9
|
-
},
|
|
10
|
-
onPreview: {
|
|
11
|
-
wrapper: "relative size-24 overflow-hidden rounded-lg border-[1px] border-gray-100",
|
|
12
|
-
previewImgClass: "size-full object-cover",
|
|
13
|
-
previewActionWrapper: "absolute inset-0 z-10 flex items-center justify-center space-x-2 opacity-0 transition hover:bg-black/50 hover:opacity-100",
|
|
14
|
-
actionBtnClass: "size-7 cursor-pointer text-white",
|
|
15
|
-
previewTextWrapper: "mt-2 truncate",
|
|
16
|
-
previewText: "truncate text-center text-sm"
|
|
17
|
-
},
|
|
18
|
-
onFailed: {
|
|
19
|
-
wrapper: "relative size-24 overflow-hidden rounded-lg border-[1px] border-dashed border-danger",
|
|
20
|
-
failedImgClass: "size-full object-cover",
|
|
21
|
-
failedActionWrapper: "absolute inset-0 z-10 flex items-center justify-center space-x-2 bg-white/50",
|
|
22
|
-
actionBtnClass: "text-danger size-7 cursor-pointer"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
action: {
|
|
26
|
-
// wrapper: 'flex items-center space-x-4',
|
|
27
|
-
addingWrapper: "flex size-24 flex-col items-center justify-center overflow-hidden rounded-lg border-[1px] border-dashed p-2 cursor-pointer transition hover:bg-gray-100",
|
|
28
|
-
// iconClass: 'size-6 text-gray-400 cursor-pointer',
|
|
29
|
-
deleteIconClass: "size-6 text-danger cursor-pointer",
|
|
30
|
-
addingBtnClass: "size-7 text-gray-500",
|
|
31
|
-
addingTextClass: "text-center text-sm text-gray-500",
|
|
32
|
-
previewIcon: "i-ic:outline-remove-red-eye",
|
|
33
|
-
deleteIcon: "ph:trash",
|
|
34
|
-
addingIcon: "i-material-symbols:add"
|
|
35
|
-
}
|
|
36
|
-
};
|
package/dist/runtime/ui.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
:root{--dp-font-family:inherit!important}.dp__theme_light{--dp-primary-color:rgb(var(--color-primary-DEFAULT))!important;--dp-primary-disabled-color:rgb(var(--color-primary-200))!important}::-webkit-scrollbar{-webkit-appearance:none;height:10px;width:10px}::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3);border-radius:4px;box-shadow:0 0 1px hsla(0,0%,100%,.5)}#__layout,#__nuxt,.root-container,body,html{display:flex;flex-direction:column;height:100%}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { describe, test, expect } from "vitest";
|
|
2
|
-
import { ArrayHelper } from "./ArrayHelper.mjs";
|
|
3
|
-
describe("ArrayHelper", () => {
|
|
4
|
-
test("toOptions default attr", () => {
|
|
5
|
-
const data = [
|
|
6
|
-
{
|
|
7
|
-
id: "1",
|
|
8
|
-
name: "long"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
id: "2",
|
|
12
|
-
name: "long2"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
id: "3",
|
|
16
|
-
name: "long3"
|
|
17
|
-
}
|
|
18
|
-
];
|
|
19
|
-
expect(ArrayHelper.toOptions(data)).toEqual([
|
|
20
|
-
{
|
|
21
|
-
value: "1",
|
|
22
|
-
label: "long"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
value: "2",
|
|
26
|
-
label: "long2"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
value: "3",
|
|
30
|
-
label: "long3"
|
|
31
|
-
}
|
|
32
|
-
]);
|
|
33
|
-
});
|
|
34
|
-
test("toOptions custom attr", () => {
|
|
35
|
-
const data = [
|
|
36
|
-
{
|
|
37
|
-
ide: "1",
|
|
38
|
-
wtf: "long"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
ide: "2",
|
|
42
|
-
wtf: "long2"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
ide: "3",
|
|
46
|
-
wtf: "long3"
|
|
47
|
-
}
|
|
48
|
-
];
|
|
49
|
-
expect(ArrayHelper.toOptions(data, "ide", "wtf")).toEqual([
|
|
50
|
-
{
|
|
51
|
-
value: "1",
|
|
52
|
-
label: "long"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
value: "2",
|
|
56
|
-
label: "long2"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
value: "3",
|
|
60
|
-
label: "long3"
|
|
61
|
-
}
|
|
62
|
-
]);
|
|
63
|
-
});
|
|
64
|
-
test("toOptions custom attr nested", () => {
|
|
65
|
-
const data = [
|
|
66
|
-
{
|
|
67
|
-
ide: "1",
|
|
68
|
-
wtf: {
|
|
69
|
-
ed: "long"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
ide: "2",
|
|
74
|
-
wtf: {
|
|
75
|
-
ed: "long2"
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
ide: "3",
|
|
80
|
-
wtf: "eiei"
|
|
81
|
-
},
|
|
82
|
-
{}
|
|
83
|
-
];
|
|
84
|
-
expect(ArrayHelper.toOptions(data, "ide", "wtf.ed")).toEqual([
|
|
85
|
-
{
|
|
86
|
-
value: "1",
|
|
87
|
-
label: "long"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
value: "2",
|
|
91
|
-
label: "long2"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
value: "3",
|
|
95
|
-
label: "3"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
value: null,
|
|
99
|
-
label: null
|
|
100
|
-
}
|
|
101
|
-
]);
|
|
102
|
-
});
|
|
103
|
-
test("toArray", () => {
|
|
104
|
-
expect(ArrayHelper.toArray(null)).toEqual([]);
|
|
105
|
-
expect(ArrayHelper.toArray([])).toEqual([]);
|
|
106
|
-
expect(ArrayHelper.toArray("")).toEqual([]);
|
|
107
|
-
expect(ArrayHelper.toArray(false)).toEqual([]);
|
|
108
|
-
expect(ArrayHelper.toArray(true)).toEqual([]);
|
|
109
|
-
expect(ArrayHelper.toArray({})).toEqual([]);
|
|
110
|
-
expect(ArrayHelper.toArray([1, 2, 3])).toEqual([1, 2, 3]);
|
|
111
|
-
});
|
|
112
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|