@finema/core 2.8.4 → 2.9.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/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;
|
|
@@ -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";
|