@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,270 +0,0 @@
|
|
|
1
|
-
import { ObjectHelper } from "../utils/ObjectHelper.mjs";
|
|
2
|
-
import { ParamHelper } from "../utils/ParamHelper.mjs";
|
|
3
|
-
import { NewRequester } from "../lib/Requester.mjs";
|
|
4
|
-
import { useCoreConfig } from "../composables/useConfig.mjs";
|
|
5
|
-
import { _findIndex, _get, _shuffle } from "#imports";
|
|
6
|
-
export const apiAddHelper = async (state, onUpdateStatus, onUpdateOptions, onUpdateData, onUpdateItems, data, opts) => {
|
|
7
|
-
onUpdateStatus(ObjectHelper.toLoadingStatus(state().status));
|
|
8
|
-
onUpdateOptions({});
|
|
9
|
-
const reqOptions = {
|
|
10
|
-
...opts.getBaseRequestOptions?.() || {},
|
|
11
|
-
...opts.add?.getRequestOptions?.(data, opts) ?? {}
|
|
12
|
-
};
|
|
13
|
-
reqOptions.params = ParamHelper.getParams(opts, reqOptions);
|
|
14
|
-
try {
|
|
15
|
-
let item = null;
|
|
16
|
-
if (opts.isMock) {
|
|
17
|
-
const res = {
|
|
18
|
-
data: opts.mockItems?.[0]
|
|
19
|
-
};
|
|
20
|
-
onUpdateData(res.data);
|
|
21
|
-
onUpdateStatus(ObjectHelper.toSuccessStatus(state().status));
|
|
22
|
-
} else {
|
|
23
|
-
const { data: itemm, status } = await NewRequester.post(
|
|
24
|
-
opts.add?.getURL ? opts.add.getURL(data, opts) : opts.baseURL,
|
|
25
|
-
data,
|
|
26
|
-
reqOptions
|
|
27
|
-
);
|
|
28
|
-
onUpdateData(itemm);
|
|
29
|
-
item = itemm;
|
|
30
|
-
onUpdateStatus(ObjectHelper.toSuccessStatus(state().status));
|
|
31
|
-
onUpdateOptions({
|
|
32
|
-
_timestamp: Date.now(),
|
|
33
|
-
_status: status,
|
|
34
|
-
request: reqOptions
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
if (state().items) {
|
|
38
|
-
onUpdateItems([item, ...state().items]);
|
|
39
|
-
}
|
|
40
|
-
} catch (e) {
|
|
41
|
-
onUpdateStatus(ObjectHelper.toErrorStatus(state().status, e));
|
|
42
|
-
onUpdateOptions({
|
|
43
|
-
_status: e.response?.status,
|
|
44
|
-
request: reqOptions
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
onUpdateStatus(ObjectHelper.toCompleteStatus(state().status));
|
|
48
|
-
};
|
|
49
|
-
export const apiDeleteHelper = async (state, onUpdateStatus, onUpdateOptions, _onUpdateData, onUpdateItems, id, opts) => {
|
|
50
|
-
const primaryKey = opts.primary ?? "id";
|
|
51
|
-
const getPrimaryKey = (item) => _get(item, primaryKey, "");
|
|
52
|
-
onUpdateStatus(ObjectHelper.toLoadingStatus(state().status));
|
|
53
|
-
onUpdateOptions({});
|
|
54
|
-
const reqOptions = {
|
|
55
|
-
...opts.getBaseRequestOptions?.() || {},
|
|
56
|
-
...opts.delete?.getRequestOptions?.(id, opts) ?? {}
|
|
57
|
-
};
|
|
58
|
-
reqOptions.params = ParamHelper.getParams(opts, reqOptions);
|
|
59
|
-
try {
|
|
60
|
-
if (opts.isMock) {
|
|
61
|
-
onUpdateStatus(ObjectHelper.toSuccessStatus(state().status));
|
|
62
|
-
} else {
|
|
63
|
-
const { status } = await NewRequester.delete(
|
|
64
|
-
opts.delete?.getURL ? opts.delete.getURL(id, opts) : `${opts.baseURL}/${id}`,
|
|
65
|
-
reqOptions
|
|
66
|
-
);
|
|
67
|
-
onUpdateStatus(ObjectHelper.toSuccessStatus(state().status));
|
|
68
|
-
onUpdateOptions({
|
|
69
|
-
_timestamp: Date.now(),
|
|
70
|
-
_status: status,
|
|
71
|
-
request: reqOptions
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
if (state().items) {
|
|
75
|
-
onUpdateItems(
|
|
76
|
-
state().items.filter((item) => {
|
|
77
|
-
return getPrimaryKey(item) !== id;
|
|
78
|
-
})
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
} catch (e) {
|
|
82
|
-
onUpdateStatus(ObjectHelper.toErrorStatus(state().status, e));
|
|
83
|
-
onUpdateOptions({
|
|
84
|
-
_status: e.response?.status,
|
|
85
|
-
request: reqOptions
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
onUpdateStatus(ObjectHelper.toCompleteStatus(state().status));
|
|
89
|
-
};
|
|
90
|
-
export const apiFetchHelper = async (state, onUpdateStatus, onUpdateOptions, onUpdateItems, page, query, opts) => {
|
|
91
|
-
const config = useCoreConfig();
|
|
92
|
-
const timestamp = state().options._timestamp;
|
|
93
|
-
if (opts.expire && timestamp) {
|
|
94
|
-
if (timestamp + opts.expire > Date.now()) {
|
|
95
|
-
onUpdateStatus(ObjectHelper.toCompleteStatus(state().status));
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
onUpdateStatus(ObjectHelper.toLoadingStatus(state().status));
|
|
100
|
-
onUpdateOptions({
|
|
101
|
-
...state().options,
|
|
102
|
-
...opts,
|
|
103
|
-
currentPage: page,
|
|
104
|
-
search: query,
|
|
105
|
-
primary: opts.primary ?? "id",
|
|
106
|
-
_status: void 0
|
|
107
|
-
});
|
|
108
|
-
const getOptions = (data) => {
|
|
109
|
-
const { total, limit: limit2, ...more } = data;
|
|
110
|
-
return {
|
|
111
|
-
...state().options,
|
|
112
|
-
...more,
|
|
113
|
-
currentPageCount: state().items?.length || 0,
|
|
114
|
-
currentPage: page,
|
|
115
|
-
totalCount: total,
|
|
116
|
-
limit: limit2,
|
|
117
|
-
search: query,
|
|
118
|
-
totalPage: Math.ceil(total / data.limit)
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
const reqOptions = {
|
|
122
|
-
...opts.getBaseRequestOptions?.() || {},
|
|
123
|
-
...opts.fetch?.getRequestOptions?.(page, query, opts) ?? {}
|
|
124
|
-
};
|
|
125
|
-
const limit = reqOptions.params?.limit || config.limit_per_page;
|
|
126
|
-
reqOptions.params = {
|
|
127
|
-
limit,
|
|
128
|
-
q: (query || "").trim(),
|
|
129
|
-
...ParamHelper.getParams(opts, reqOptions),
|
|
130
|
-
page
|
|
131
|
-
};
|
|
132
|
-
try {
|
|
133
|
-
if (opts.isMock) {
|
|
134
|
-
await new Promise((resolve) => {
|
|
135
|
-
setTimeout(resolve, 500);
|
|
136
|
-
});
|
|
137
|
-
const res = {
|
|
138
|
-
data: {
|
|
139
|
-
items: opts.mockItems || [],
|
|
140
|
-
totalCount: (opts.mockItems || []).length
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
onUpdateItems(_shuffle(res.data.items));
|
|
144
|
-
onUpdateOptions(getOptions(res.data));
|
|
145
|
-
onUpdateStatus(ObjectHelper.toSuccessStatus(state().status));
|
|
146
|
-
} else {
|
|
147
|
-
const {
|
|
148
|
-
data: { items: itemss, ...moreOptions },
|
|
149
|
-
status
|
|
150
|
-
} = await NewRequester.get(
|
|
151
|
-
opts.fetch?.getURL ? opts.fetch.getURL(page, query, opts) : opts.baseURL,
|
|
152
|
-
reqOptions
|
|
153
|
-
);
|
|
154
|
-
onUpdateItems(itemss);
|
|
155
|
-
onUpdateOptions({
|
|
156
|
-
...getOptions(moreOptions),
|
|
157
|
-
_timestamp: Date.now(),
|
|
158
|
-
_status: status,
|
|
159
|
-
request: reqOptions
|
|
160
|
-
});
|
|
161
|
-
onUpdateStatus(ObjectHelper.toSuccessStatus(state().status));
|
|
162
|
-
}
|
|
163
|
-
} catch (e) {
|
|
164
|
-
onUpdateStatus(ObjectHelper.toErrorStatus(state().status, e));
|
|
165
|
-
onUpdateOptions({
|
|
166
|
-
...state().options,
|
|
167
|
-
_status: e.response?.status,
|
|
168
|
-
request: reqOptions
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
onUpdateStatus(ObjectHelper.toCompleteStatus(state().status));
|
|
172
|
-
};
|
|
173
|
-
export const apiFindHelper = async (state, onUpdateStatus, onUpdateOptions, onUpdateData, id, opts) => {
|
|
174
|
-
const timestamp = state().options._timestamp;
|
|
175
|
-
if (opts.expire && timestamp) {
|
|
176
|
-
if (timestamp + opts.expire > Date.now()) {
|
|
177
|
-
onUpdateStatus(ObjectHelper.toCompleteStatus(state().status));
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
onUpdateStatus(ObjectHelper.toLoadingStatus(state().status));
|
|
182
|
-
onUpdateOptions({});
|
|
183
|
-
const reqOptions = {
|
|
184
|
-
...opts.getBaseRequestOptions?.() || {},
|
|
185
|
-
...opts.find?.getRequestOptions?.(id, opts) ?? {}
|
|
186
|
-
};
|
|
187
|
-
reqOptions.params = ParamHelper.getParams(opts, reqOptions);
|
|
188
|
-
try {
|
|
189
|
-
if (opts.isMock) {
|
|
190
|
-
const res = {
|
|
191
|
-
data: opts.mockItems?.[0]
|
|
192
|
-
};
|
|
193
|
-
onUpdateData(res.data);
|
|
194
|
-
onUpdateStatus(ObjectHelper.toSuccessStatus(state().status));
|
|
195
|
-
} else {
|
|
196
|
-
const { data, status } = await NewRequester.get(
|
|
197
|
-
opts.find?.getURL ? opts.find.getURL(id, opts) : `${opts.baseURL}/${id}`,
|
|
198
|
-
reqOptions
|
|
199
|
-
);
|
|
200
|
-
onUpdateData(data);
|
|
201
|
-
onUpdateStatus(ObjectHelper.toSuccessStatus(state().status));
|
|
202
|
-
onUpdateOptions({
|
|
203
|
-
_timestamp: Date.now(),
|
|
204
|
-
_status: status,
|
|
205
|
-
request: reqOptions
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
} catch (e) {
|
|
209
|
-
onUpdateStatus(ObjectHelper.toErrorStatus(state().status, e));
|
|
210
|
-
onUpdateOptions({
|
|
211
|
-
_status: e.response?.status,
|
|
212
|
-
request: reqOptions
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
onUpdateStatus(ObjectHelper.toCompleteStatus(state().status));
|
|
216
|
-
};
|
|
217
|
-
export const updateHelper = async (state, onUpdateStatus, onUpdateOptions, onUpdateData, _onUpdateItems, onUpdateOldData, id, data, opts) => {
|
|
218
|
-
onUpdateStatus(ObjectHelper.toLoadingStatus(state().status));
|
|
219
|
-
onUpdateOptions({});
|
|
220
|
-
const reqOptions = {
|
|
221
|
-
...opts.getBaseRequestOptions?.() || {},
|
|
222
|
-
...opts.update?.getRequestOptions?.(id, data, opts) ?? {}
|
|
223
|
-
};
|
|
224
|
-
reqOptions.params = ParamHelper.getParams(opts, reqOptions);
|
|
225
|
-
try {
|
|
226
|
-
let finalItem;
|
|
227
|
-
if (opts.isMock) {
|
|
228
|
-
const res = {
|
|
229
|
-
data: opts.mockItems?.[0]
|
|
230
|
-
};
|
|
231
|
-
onUpdateData(res.data);
|
|
232
|
-
finalItem = res.data;
|
|
233
|
-
onUpdateStatus(ObjectHelper.toSuccessStatus(state().status));
|
|
234
|
-
} else {
|
|
235
|
-
const { data: item, status } = await NewRequester.put(
|
|
236
|
-
opts.update?.getURL ? opts.update.getURL(id, data, opts) : `${opts.baseURL}/${id}`,
|
|
237
|
-
data,
|
|
238
|
-
reqOptions
|
|
239
|
-
);
|
|
240
|
-
onUpdateData(item);
|
|
241
|
-
finalItem = item;
|
|
242
|
-
onUpdateStatus(ObjectHelper.toSuccessStatus(state().status));
|
|
243
|
-
onUpdateOptions({
|
|
244
|
-
_timestamp: Date.now(),
|
|
245
|
-
_status: status,
|
|
246
|
-
request: reqOptions
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
if (state().oldData) {
|
|
250
|
-
onUpdateOldData(finalItem);
|
|
251
|
-
}
|
|
252
|
-
if (state().items) {
|
|
253
|
-
const index = _findIndex(state().items, (item) => item.id === id);
|
|
254
|
-
if (index !== -1) {
|
|
255
|
-
const itemsTemp = state().items;
|
|
256
|
-
if (itemsTemp?.[index]) {
|
|
257
|
-
itemsTemp[index] = finalItem;
|
|
258
|
-
state().items = itemsTemp;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
} catch (e) {
|
|
263
|
-
onUpdateStatus(ObjectHelper.toErrorStatus(state().status, e));
|
|
264
|
-
onUpdateOptions({
|
|
265
|
-
_status: e.response?.status,
|
|
266
|
-
request: reqOptions
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
onUpdateStatus(ObjectHelper.toCompleteStatus(state().status));
|
|
270
|
-
};
|
package/dist/runtime/plugin.mjs
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from "#app";
|
|
2
|
-
import z from "zod";
|
|
3
|
-
import { zodI18nMap } from "zod-i18n-map";
|
|
4
|
-
import i18next from "i18next";
|
|
5
|
-
import en from "zod-i18n-map/locales/en/zod.json";
|
|
6
|
-
import { vMaska } from "maska";
|
|
7
|
-
export default defineNuxtPlugin((nuxtApp) => {
|
|
8
|
-
if (process.env.NODE_ENV !== "production") {
|
|
9
|
-
console.log("Plugin injected by @finema/core module!");
|
|
10
|
-
}
|
|
11
|
-
nuxtApp.vueApp.directive("maska", vMaska);
|
|
12
|
-
i18next.init({
|
|
13
|
-
lng: "th",
|
|
14
|
-
resources: {
|
|
15
|
-
th: {
|
|
16
|
-
zod: {
|
|
17
|
-
errors: {
|
|
18
|
-
invalid_type: "\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 {{expected}}",
|
|
19
|
-
invalid_type_received_undefined: "\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19",
|
|
20
|
-
invalid_type_received_null: "\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19",
|
|
21
|
-
invalid_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07 \u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 {{expected}}",
|
|
22
|
-
unrecognized_keys: "\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01\u0E43\u0E19\u0E2D\u0E47\u0E2D\u0E1A\u0E40\u0E08\u0E47\u0E01\u0E15\u0E4C: {{- keys}}",
|
|
23
|
-
invalid_union: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
24
|
-
invalid_union_discriminator: "\u0E04\u0E48\u0E32\u0E15\u0E31\u0E27\u0E41\u0E22\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07 \u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 {{- options}}",
|
|
25
|
-
invalid_enum_value: "\u0E04\u0E48\u0E32 enum \u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07 \u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 {{- options}}, \u0E23\u0E31\u0E1A '{{received}}'",
|
|
26
|
-
invalid_arguments: "\u0E2D\u0E32\u0E23\u0E4C\u0E01\u0E34\u0E27\u0E40\u0E21\u0E19\u0E15\u0E4C\u0E1F\u0E31\u0E07\u0E01\u0E4C\u0E0A\u0E31\u0E19\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
27
|
-
invalid_return_type: "\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E01\u0E32\u0E23\u0E04\u0E37\u0E19\u0E04\u0E48\u0E32\u0E02\u0E2D\u0E07\u0E1F\u0E31\u0E07\u0E01\u0E4C\u0E0A\u0E31\u0E19\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
28
|
-
invalid_date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
29
|
-
custom: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
30
|
-
invalid_intersection_types: "\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E23\u0E27\u0E21\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E01\u0E31\u0E19\u0E44\u0E14\u0E49",
|
|
31
|
-
not_multiple_of: "\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E04\u0E48\u0E32\u0E02\u0E2D\u0E07 {{multipleOf}}",
|
|
32
|
-
not_finite: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E08\u0E23\u0E34\u0E07",
|
|
33
|
-
invalid_string: {
|
|
34
|
-
email: "\u0E2D\u0E35\u0E40\u0E21\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
35
|
-
url: "URL \u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
36
|
-
uuid: "UUID \u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
37
|
-
cuid: "CUID \u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
38
|
-
regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
39
|
-
datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E25\u0E30\u0E40\u0E27\u0E25\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
40
|
-
startsWith: '\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "{{startsWith}}"',
|
|
41
|
-
endsWith: '\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "{{endsWith}}"'
|
|
42
|
-
},
|
|
43
|
-
too_small: {
|
|
44
|
-
array: {
|
|
45
|
-
exact: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 {{minimum}} \u0E15\u0E31\u0E27",
|
|
46
|
-
inclusive: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 {{minimum}} \u0E15\u0E31\u0E27",
|
|
47
|
-
not_inclusive: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32 {{minimum}} \u0E15\u0E31\u0E27"
|
|
48
|
-
},
|
|
49
|
-
string: {
|
|
50
|
-
exact: "\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 {{minimum}} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",
|
|
51
|
-
inclusive: "\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22 {{minimum}} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",
|
|
52
|
-
not_inclusive: "\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32 {{minimum}} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23"
|
|
53
|
-
},
|
|
54
|
-
number: {
|
|
55
|
-
exact: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 {{minimum}}",
|
|
56
|
-
inclusive: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32\u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E17\u0E48\u0E32\u0E01\u0E31\u0E1A {{minimum}}",
|
|
57
|
-
not_inclusive: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32 {{minimum}}"
|
|
58
|
-
},
|
|
59
|
-
set: {
|
|
60
|
-
exact: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
61
|
-
inclusive: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
62
|
-
not_inclusive: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"
|
|
63
|
-
},
|
|
64
|
-
date: {
|
|
65
|
-
exact: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 {{- minimum, datetime}}",
|
|
66
|
-
inclusive: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32\u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E17\u0E48\u0E32\u0E01\u0E31\u0E1A {{- minimum, datetime}}",
|
|
67
|
-
not_inclusive: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32 {{- minimum, datetime}}"
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
too_big: {
|
|
71
|
-
array: {
|
|
72
|
-
exact: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 {{maximum}} \u0E15\u0E31\u0E27",
|
|
73
|
-
inclusive: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 {{maximum}} \u0E15\u0E31\u0E27",
|
|
74
|
-
not_inclusive: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32 {{maximum}} \u0E15\u0E31\u0E27"
|
|
75
|
-
},
|
|
76
|
-
string: {
|
|
77
|
-
exact: "\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 {{maximum}} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",
|
|
78
|
-
inclusive: "\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 {{maximum}} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",
|
|
79
|
-
not_inclusive: "\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32 {{maximum}} \u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23"
|
|
80
|
-
},
|
|
81
|
-
number: {
|
|
82
|
-
exact: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 {{maximum}}",
|
|
83
|
-
inclusive: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E15\u0E49\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 {{maximum}}",
|
|
84
|
-
not_inclusive: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E15\u0E49\u0E2D\u0E07\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32 {{maximum}}"
|
|
85
|
-
},
|
|
86
|
-
set: {
|
|
87
|
-
exact: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
88
|
-
inclusive: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
89
|
-
not_inclusive: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"
|
|
90
|
-
},
|
|
91
|
-
date: {
|
|
92
|
-
exact: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19 {{- maximum, datetime}}",
|
|
93
|
-
inclusive: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 {{- maximum, datetime}}",
|
|
94
|
-
not_inclusive: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32 {{- maximum, datetime}}"
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
validations: {
|
|
99
|
-
email: "\u0E2D\u0E35\u0E40\u0E21\u0E25",
|
|
100
|
-
url: "URL",
|
|
101
|
-
uuid: "UUID",
|
|
102
|
-
cuid: "CUID",
|
|
103
|
-
regex: "regex",
|
|
104
|
-
datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E25\u0E30\u0E40\u0E27\u0E25\u0E32"
|
|
105
|
-
},
|
|
106
|
-
types: {
|
|
107
|
-
function: "function",
|
|
108
|
-
number: "number",
|
|
109
|
-
string: "string",
|
|
110
|
-
nan: "nan",
|
|
111
|
-
integer: "integer",
|
|
112
|
-
float: "float",
|
|
113
|
-
boolean: "boolean",
|
|
114
|
-
date: "date",
|
|
115
|
-
bigint: "bigint",
|
|
116
|
-
undefined: "undefined",
|
|
117
|
-
symbol: "symbol",
|
|
118
|
-
null: "null",
|
|
119
|
-
array: "array",
|
|
120
|
-
object: "object",
|
|
121
|
-
unknown: "unknown",
|
|
122
|
-
promise: "promise",
|
|
123
|
-
void: "void",
|
|
124
|
-
never: "never",
|
|
125
|
-
map: "map",
|
|
126
|
-
set: "set"
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
custom: {
|
|
130
|
-
invalid_file_type: "\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E44\u0E1F\u0E25\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
|
|
131
|
-
invalid_file_size_kb: "\u0E02\u0E19\u0E32\u0E14\u0E44\u0E1F\u0E25\u0E4C\u0E40\u0E01\u0E34\u0E19\u0E01\u0E27\u0E48\u0E32\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 {{size}} KB",
|
|
132
|
-
invalid_file_size_mb: "\u0E02\u0E19\u0E32\u0E14\u0E44\u0E1F\u0E25\u0E4C\u0E40\u0E01\u0E34\u0E19\u0E01\u0E27\u0E48\u0E32\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 {{size}} MB"
|
|
133
|
-
},
|
|
134
|
-
en
|
|
135
|
-
},
|
|
136
|
-
en: {
|
|
137
|
-
zod: {
|
|
138
|
-
...en
|
|
139
|
-
},
|
|
140
|
-
custom: {
|
|
141
|
-
invalid_file_type: "Invalid file type",
|
|
142
|
-
invalid_file_size_kb: "Invalid exceed of file size {{size}} KB",
|
|
143
|
-
invalid_file_size_mb: "Invalid exceed of file size {{size}} MB"
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
z.setErrorMap(zodI18nMap);
|
|
149
|
-
});
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type UIComponentList = 'modal' | 'slideover' | 'dropdown' | 'icon' | 'button' | 'buttonGroup' | 'tabs' | 'card' | 'breadcrumb' | 'badge' | 'input' | 'pagination' | 'notification' | 'uploadFileInputClassicAuto' | 'uploadFileDropzone' | 'uploadFileDropzoneImage' | 'uploadImage' | 'tags';
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const badge = {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const breadcrumb: any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const buttonGroup = {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const card: any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const checkbox = {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { table } from './table';
|
|
2
|
-
export { pagination } from './pagination';
|
|
3
|
-
export { button } from './button';
|
|
4
|
-
export { badge } from './badge';
|
|
5
|
-
export { buttonGroup } from './buttonGroup';
|
|
6
|
-
export { card } from './card';
|
|
7
|
-
export { tabs } from './tabs';
|
|
8
|
-
export { icon } from './icon';
|
|
9
|
-
export { modal } from './modal';
|
|
10
|
-
export { slideover } from './slideover';
|
|
11
|
-
export { breadcrumb } from './breadcrumb';
|
|
12
|
-
export { uploadFileInputClassicAuto } from './uploadFileInputClassicAuto';
|
|
13
|
-
export { uploadFileDropzone } from './uploadFileDropzone';
|
|
14
|
-
export { uploadFileDropzoneImage } from './uploadDropzoneImage';
|
|
15
|
-
export { uploadImage } from './uploadImage';
|
|
16
|
-
export { tags } from './tags';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { table } from "./table.mjs";
|
|
2
|
-
export { pagination } from "./pagination.mjs";
|
|
3
|
-
export { button } from "./button.mjs";
|
|
4
|
-
export { badge } from "./badge.mjs";
|
|
5
|
-
export { buttonGroup } from "./buttonGroup.mjs";
|
|
6
|
-
export { card } from "./card.mjs";
|
|
7
|
-
export { tabs } from "./tabs.mjs";
|
|
8
|
-
export { icon } from "./icon.mjs";
|
|
9
|
-
export { modal } from "./modal.mjs";
|
|
10
|
-
export { slideover } from "./slideover.mjs";
|
|
11
|
-
export { breadcrumb } from "./breadcrumb.mjs";
|
|
12
|
-
export { uploadFileInputClassicAuto } from "./uploadFileInputClassicAuto.mjs";
|
|
13
|
-
export { uploadFileDropzone } from "./uploadFileDropzone.mjs";
|
|
14
|
-
export { uploadFileDropzoneImage } from "./uploadDropzoneImage.mjs";
|
|
15
|
-
export { uploadImage } from "./uploadImage.mjs";
|
|
16
|
-
export { tags } from "./tags.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const modal: any;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { modal as inheritModal } from "#ui/ui.config";
|
|
2
|
-
export const modal = {
|
|
3
|
-
...inheritModal,
|
|
4
|
-
header: "px-6 py-4 border-b",
|
|
5
|
-
innerWrapper: "px-6 py-4",
|
|
6
|
-
padding: "p-6",
|
|
7
|
-
margin: "my-0",
|
|
8
|
-
size: {
|
|
9
|
-
sm: "w-full lg:max-w-sm",
|
|
10
|
-
md: "w-full lg:max-w-lg",
|
|
11
|
-
lg: "w-full lg:max-w-2xl",
|
|
12
|
-
xl: "w-full lg:max-w-4xl"
|
|
13
|
-
},
|
|
14
|
-
position: {
|
|
15
|
-
top: "flex min-h-full items-start justify-center text-center",
|
|
16
|
-
center: "flex min-h-full items-start lg:items-center justify-center text-center",
|
|
17
|
-
bottom: "flex min-h-full items-start lg:items-end justify-center text-center"
|
|
18
|
-
},
|
|
19
|
-
overlay: {
|
|
20
|
-
background: "bg-gray-500/75 dark:bg-gray-800/75 backdrop-blur-sm"
|
|
21
|
-
},
|
|
22
|
-
fixHeightSize: {
|
|
23
|
-
default: "max-h-[calc(100vh-4rem)]",
|
|
24
|
-
sm: "max-h-[256px]",
|
|
25
|
-
md: "max-h-[512px]",
|
|
26
|
-
lg: "max-h-[768px]",
|
|
27
|
-
xl: "max-h-[1024px]"
|
|
28
|
-
},
|
|
29
|
-
default: {
|
|
30
|
-
size: "md",
|
|
31
|
-
position: "center",
|
|
32
|
-
fixHeightSize: "default"
|
|
33
|
-
}
|
|
34
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { DeepPartial } from '#ui/types';
|
|
2
|
-
import type * as config from '#ui/ui.config';
|
|
3
|
-
export declare const notification: DeepPartial<(typeof config)['notification'] & {
|
|
4
|
-
actionGroup: {
|
|
5
|
-
wrapper: string;
|
|
6
|
-
cancelColor: string;
|
|
7
|
-
cancelVariant: string;
|
|
8
|
-
confirmColor: string;
|
|
9
|
-
confirmVariant: string;
|
|
10
|
-
};
|
|
11
|
-
}>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export const notification = {
|
|
2
|
-
ring: "ring-0",
|
|
3
|
-
progress: {
|
|
4
|
-
base: "hidden"
|
|
5
|
-
},
|
|
6
|
-
actionGroup: {
|
|
7
|
-
wrapper: "mt-5 flex justify-end space-x-4",
|
|
8
|
-
cancelColor: "primary",
|
|
9
|
-
cancelVariant: "outline",
|
|
10
|
-
confirmColor: "primary",
|
|
11
|
-
confirmVariant: "solid"
|
|
12
|
-
}
|
|
13
|
-
};
|