@finema/core 2.8.4 → 2.10.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/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/Form/InputDateTime/date_time_field.types.d.ts +1 -0
- package/dist/runtime/components/Form/InputDateTime/index.vue +57 -45
- package/dist/runtime/components/Form/InputDateTime/index.vue.d.ts +3 -1
- package/dist/runtime/components/Form/InputDateTimeRange/index.vue +13 -1
- package/dist/runtime/components/Form/InputDateTimeRange/index.vue.d.ts +3 -1
- package/dist/runtime/styles/main.css +1 -1
- package/dist/runtime/theme/dateTime.d.ts +5 -0
- package/dist/runtime/theme/dateTime.js +5 -0
- package/dist/runtime/theme/index.d.ts +1 -0
- package/dist/runtime/theme/index.js +1 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,59 +1,70 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<FieldWrapper v-bind="wrapperProps">
|
|
3
|
-
<Datepicker
|
|
4
|
-
:model-value="value"
|
|
5
|
-
:disabled="wrapperProps.disabled"
|
|
6
|
-
cancel-text="ยกเลิก"
|
|
7
|
-
select-text="เลือก"
|
|
8
|
-
locale="th"
|
|
9
|
-
:enable-time-picker="!disabledTime"
|
|
10
|
-
:placeholder="wrapperProps.placeholder"
|
|
11
|
-
:format="format"
|
|
12
|
-
:min-date="minDate"
|
|
13
|
-
:max-date="maxDate"
|
|
14
|
-
:min-time="minTime"
|
|
15
|
-
:max-time="maxTime"
|
|
16
|
-
:start-time="startTime"
|
|
17
|
-
:required="required"
|
|
18
|
-
:flow="['calendar', 'time']"
|
|
19
|
-
@update:model-value="onInput"
|
|
20
|
-
>
|
|
21
|
-
<template
|
|
22
|
-
v-if="appConfig.core?.is_thai_year"
|
|
23
|
-
#year="{ value }"
|
|
24
|
-
>
|
|
25
|
-
{{ value + 543 }}
|
|
26
|
-
</template>
|
|
27
|
-
<template
|
|
28
|
-
v-if="appConfig.core?.is_thai_year"
|
|
29
|
-
#year-overlay-value="{ value }"
|
|
30
|
-
>
|
|
31
|
-
{{ value + 543 }}
|
|
32
|
-
</template>
|
|
33
|
-
<template #dp-input="{ value: innerValue }">
|
|
34
|
-
<Input
|
|
35
|
-
:trailing-icon="innerValue ? void 0 : 'i-heroicons-calendar-days'"
|
|
36
|
-
type="text"
|
|
37
|
-
:disabled="wrapperProps.disabled"
|
|
38
|
-
:model-value="innerValue"
|
|
39
|
-
:placeholder="wrapperProps.placeholder"
|
|
40
|
-
:readonly="true"
|
|
2
|
+
<FieldWrapper v-bind="wrapperProps">
|
|
3
|
+
<Datepicker
|
|
4
|
+
:model-value="value"
|
|
5
|
+
:disabled="wrapperProps.disabled"
|
|
6
|
+
cancel-text="ยกเลิก"
|
|
7
|
+
select-text="เลือก"
|
|
8
|
+
locale="th"
|
|
9
|
+
:enable-time-picker="!disabledTime"
|
|
10
|
+
:placeholder="wrapperProps.placeholder"
|
|
11
|
+
:format="format"
|
|
12
|
+
:min-date="minDate"
|
|
13
|
+
:max-date="maxDate"
|
|
14
|
+
:min-time="minTime"
|
|
15
|
+
:max-time="maxTime"
|
|
16
|
+
:start-time="startTime"
|
|
17
|
+
:required="required"
|
|
18
|
+
:flow="['calendar', 'time']"
|
|
19
|
+
@update:model-value="onInput"
|
|
20
|
+
>
|
|
21
|
+
<template
|
|
22
|
+
v-if="appConfig.core?.is_thai_year"
|
|
23
|
+
#year="{ value }"
|
|
24
|
+
>
|
|
25
|
+
{{ value + 543 }}
|
|
26
|
+
</template>
|
|
27
|
+
<template
|
|
28
|
+
v-if="appConfig.core?.is_thai_year"
|
|
29
|
+
#year-overlay-value="{ value }"
|
|
30
|
+
>
|
|
31
|
+
{{ value + 543 }}
|
|
32
|
+
</template>
|
|
33
|
+
<template #dp-input="{ value: innerValue }">
|
|
34
|
+
<Input
|
|
35
|
+
:trailing-icon="innerValue ? void 0 : 'i-heroicons-calendar-days'"
|
|
36
|
+
type="text"
|
|
37
|
+
:disabled="wrapperProps.disabled"
|
|
38
|
+
:model-value="innerValue"
|
|
39
|
+
:placeholder="wrapperProps.placeholder"
|
|
40
|
+
:readonly="true"
|
|
41
41
|
:ui="{
|
|
42
42
|
base: 'cursor-pointer select-none',
|
|
43
43
|
trailingIcon: 'cursor-pointer'
|
|
44
|
-
}"
|
|
45
|
-
/>
|
|
46
|
-
</template>
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
}"
|
|
45
|
+
/>
|
|
46
|
+
</template>
|
|
47
|
+
<template #clear-icon="{ clear }">
|
|
48
|
+
<Icon
|
|
49
|
+
:name="clearIcon"
|
|
50
|
+
:class="theme.clearIcon({
|
|
51
|
+
class: [ui?.clearIcon]
|
|
52
|
+
})"
|
|
53
|
+
@click.stop="clear"
|
|
54
|
+
/>
|
|
55
|
+
</template>
|
|
56
|
+
</Datepicker>
|
|
57
|
+
</FieldWrapper>
|
|
49
58
|
</template>
|
|
50
59
|
|
|
51
60
|
<script setup>
|
|
52
61
|
import Datepicker from "@vuepic/vue-datepicker";
|
|
53
62
|
import FieldWrapper from "#core/components/Form/FieldWrapper.vue";
|
|
54
|
-
import { TimeHelper, useAppConfig, useFieldHOC } from "#imports";
|
|
63
|
+
import { computed, TimeHelper, useAppConfig, useFieldHOC, useUiConfig } from "#imports";
|
|
55
64
|
import "@vuepic/vue-datepicker/dist/main.css";
|
|
65
|
+
import { dateTimeTheme } from "#core/theme/dateTime";
|
|
56
66
|
const props = defineProps({
|
|
67
|
+
clearIcon: { type: String, required: false, default: "ph:x-circle-fill" },
|
|
57
68
|
disabledTime: { type: Boolean, required: false },
|
|
58
69
|
minDate: { type: [Date, String], required: false },
|
|
59
70
|
maxDate: { type: [Date, String], required: false },
|
|
@@ -77,6 +88,7 @@ const props = defineProps({
|
|
|
77
88
|
ui: { type: null, required: false }
|
|
78
89
|
});
|
|
79
90
|
const appConfig = useAppConfig();
|
|
91
|
+
const theme = computed(() => useUiConfig(dateTimeTheme, "dateTime")());
|
|
80
92
|
const {
|
|
81
93
|
value,
|
|
82
94
|
wrapperProps
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import '@vuepic/vue-datepicker/dist/main.css';
|
|
2
2
|
import type { IDateTimeFieldProps } from '#core/components/Form/InputDateTime/date_time_field.types';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<IDateTimeFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IDateTimeFieldProps> & Readonly<{}>, {
|
|
3
|
+
declare const _default: import("vue").DefineComponent<IDateTimeFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IDateTimeFieldProps> & Readonly<{}>, {
|
|
4
|
+
clearIcon: string;
|
|
5
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
6
|
export default _default;
|
|
@@ -47,6 +47,15 @@
|
|
|
47
47
|
}"
|
|
48
48
|
/>
|
|
49
49
|
</template>
|
|
50
|
+
<template #clear-icon="{ clear }">
|
|
51
|
+
<Icon
|
|
52
|
+
:name="clearIcon"
|
|
53
|
+
:class="theme.clearIcon({
|
|
54
|
+
class: [ui?.clearIcon]
|
|
55
|
+
})"
|
|
56
|
+
@click.stop="clear"
|
|
57
|
+
/>
|
|
58
|
+
</template>
|
|
50
59
|
</Datepicker>
|
|
51
60
|
</FieldWrapper>
|
|
52
61
|
</template>
|
|
@@ -54,10 +63,12 @@
|
|
|
54
63
|
<script setup>
|
|
55
64
|
import Datepicker from "@vuepic/vue-datepicker";
|
|
56
65
|
import FieldWrapper from "#core/components/Form/FieldWrapper.vue";
|
|
57
|
-
import { TimeHelper, ref, useFieldHOC, useAppConfig } from "#imports";
|
|
66
|
+
import { TimeHelper, ref, useFieldHOC, useAppConfig, computed, useUiConfig } from "#imports";
|
|
58
67
|
import "@vuepic/vue-datepicker/dist/main.css";
|
|
68
|
+
import { dateTimeTheme } from "#core/theme/dateTime";
|
|
59
69
|
const props = defineProps({
|
|
60
70
|
isDisabledMultiCalendar: { type: Boolean, required: false },
|
|
71
|
+
clearIcon: { type: String, required: false, default: "ph:x-circle-fill" },
|
|
61
72
|
disabledTime: { type: Boolean, required: false },
|
|
62
73
|
minDate: { type: [Date, String], required: false },
|
|
63
74
|
maxDate: { type: [Date, String], required: false },
|
|
@@ -81,6 +92,7 @@ const props = defineProps({
|
|
|
81
92
|
ui: { type: null, required: false }
|
|
82
93
|
});
|
|
83
94
|
const appConfig = useAppConfig();
|
|
95
|
+
const theme = computed(() => useUiConfig(dateTimeTheme, "dateTime")());
|
|
84
96
|
const {
|
|
85
97
|
value,
|
|
86
98
|
wrapperProps
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import '@vuepic/vue-datepicker/dist/main.css';
|
|
2
2
|
import type { IDateTimeRangeFieldProps } from './date_range_time_field.types.js';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<IDateTimeRangeFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IDateTimeRangeFieldProps> & Readonly<{}>, {
|
|
3
|
+
declare const _default: import("vue").DefineComponent<IDateTimeRangeFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IDateTimeRangeFieldProps> & Readonly<{}>, {
|
|
4
|
+
clearIcon: string;
|
|
5
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
6
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "tailwindcss";@import "@nuxt/ui"
|
|
1
|
+
@import "tailwindcss";@import "@nuxt/ui";@theme static{--font-sans:"Noto Sans Thai","Noto Sans Thai Looped","Public Sans",sans-serif;--color-main:#232c5a;--color-main-50:#f4f4f7;--color-main-100:#e9eaef;--color-main-200:#c8cad6;--color-main-300:#a7abbd;--color-main-400:#656b8c;--color-main-500:#232c5a;--color-main-600:#202851;--color-main-700:#151a36;--color-main-800:#101429;--color-main-900:#0b0d1b;--color-main-950:#0b0d1b;--color-secondary:#ee8b36;--color-secondary-50:#fdf1e7;--color-secondary-100:#f9d6b8;--color-secondary-200:#f5bb89;--color-secondary-300:#f1a05a;--color-secondary-400:#ed852b;--color-secondary-500:#d46b12;--color-secondary-600:#a5540e;--color-secondary-700:#763c0a;--color-secondary-800:#472406;--color-secondary-900:#180c02;--color-info:#0d8cee;--color-info-50:#f3f9fe;--color-info-100:#e7f4fd;--color-info-200:#ebf6ff;--color-info-300:#9ed1f8;--color-info-400:#56aff3;--color-info-500:#0d8cee;--color-info-600:#0c7ed6;--color-info-700:#08548f;--color-info-800:#063f6b;--color-info-900:#042a47;--color-error:#f25555;--color-error-50:#fef7f7;--color-error-100:#feeeee;--color-error-200:#ffdfdf;--color-error-300:#fabbbb;--color-error-400:#f68888;--color-error-500:#f25555;--color-error-600:#da4d4d;--color-error-700:#913333;--color-error-800:#6d2626;--color-error-900:#491a1a;--color-success:#3fb061;--color-success-50:#f5fbf7;--color-success-100:#ecf7ef;--color-success-200:#daeee0;--color-success-300:#b2dfc0;--color-success-400:#79c890;--color-success-500:#3fb061;--color-success-600:#399e57;--color-success-700:#266a3a;--color-success-800:#1c4f2c;--color-success-900:#13351d;--color-warning:#ff9a35;--color-warning-50:#fffaf5;--color-warning-100:#fff5eb;--color-warning-200:#fef1cc;--color-warning-300:#ffd7ae;--color-warning-400:#ffb872;--color-warning-500:#ff9a35;--color-warning-600:#e68b30;--color-warning-700:#995c20;--color-warning-800:#734518;--color-warning-900:#4d2e10}::-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)}:root{--dp-font-family:inherit!important}.dp__theme_light{--dp-primary-color:rgb(var(--color-main))!important;--dp-primary-disabled-color:rgb(var(--color-primary-200))!important}#__nuxt,body,html{@apply w-full h-full}
|
|
@@ -10,3 +10,4 @@ export { formTheme as form } from './form.js';
|
|
|
10
10
|
export { inputNumberTheme as inputNumber } from './inputNumber.js';
|
|
11
11
|
export { iconsTheme as icons } from './icons.js';
|
|
12
12
|
export { uploadFileDropzoneTheme as uploadFileDropzone } from './uploadFileDropzone.js';
|
|
13
|
+
export { dateTimeTheme as dateTime } from './dateTime.js';
|
|
@@ -10,3 +10,4 @@ export { formTheme as form } from "./form.js";
|
|
|
10
10
|
export { inputNumberTheme as inputNumber } from "./inputNumber.js";
|
|
11
11
|
export { iconsTheme as icons } from "./icons.js";
|
|
12
12
|
export { uploadFileDropzoneTheme as uploadFileDropzone } from "./uploadFileDropzone.js";
|
|
13
|
+
export { dateTimeTheme as dateTime } from "./dateTime.js";
|