@finema/core 3.0.0 → 3.0.2
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/InputMonth/index.vue +53 -53
- package/dist/runtime/components/Form/InputSelect/index.vue +1 -1
- package/dist/runtime/components/Form/InputSelect/types.d.ts +1 -1
- package/dist/runtime/components/Form/InputSelectMultiple/index.vue +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<FieldWrapper v-bind="wrapperProps">
|
|
3
|
-
<Datepicker
|
|
4
|
-
:model-value="value"
|
|
5
|
-
:teleport="teleport"
|
|
6
|
-
:disabled="wrapperProps.disabled"
|
|
7
|
-
:cancel-text="appConfig.core?.locale === 'th' ? '\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01' : 'Cancel'"
|
|
8
|
-
:select-text="appConfig.core?.locale === 'th' ? '\u0E15\u0E01\u0E25\u0E07' : 'Select'"
|
|
9
|
-
:locale="appConfig.core?.locale"
|
|
10
|
-
:format="appConfig.core?.month_format"
|
|
11
|
-
month-picker
|
|
12
|
-
:placeholder="wrapperProps.placeholder"
|
|
13
|
-
:min-date="minDate"
|
|
14
|
-
:max-date="maxDate"
|
|
15
|
-
:required="wrapperProps.required"
|
|
16
|
-
:clearable="true"
|
|
17
|
-
:always-clearable="true"
|
|
18
|
-
@update:model-value="onInput"
|
|
19
|
-
>
|
|
20
|
-
<template
|
|
21
|
-
v-if="appConfig.core?.is_thai_year"
|
|
22
|
-
#year="{ year }"
|
|
23
|
-
>
|
|
24
|
-
{{ year + 543 }}
|
|
25
|
-
</template>
|
|
26
|
-
<template
|
|
27
|
-
v-if="appConfig.core?.is_thai_year"
|
|
28
|
-
#year-overlay-value="{ value }"
|
|
29
|
-
>
|
|
30
|
-
{{ value + 543 }}
|
|
31
|
-
</template>
|
|
32
|
-
<template #dp-input>
|
|
33
|
-
<Input
|
|
34
|
-
:trailing-icon="!wrapperProps.required && value ? void 0 : 'i-heroicons-calendar-days'"
|
|
35
|
-
type="text"
|
|
36
|
-
:disabled="wrapperProps.disabled"
|
|
37
|
-
:model-value="formatDisplay(value)"
|
|
38
|
-
:placeholder="wrapperProps.placeholder"
|
|
39
|
-
:readonly="true"
|
|
2
|
+
<FieldWrapper v-bind="wrapperProps">
|
|
3
|
+
<Datepicker
|
|
4
|
+
:model-value="value"
|
|
5
|
+
:teleport="teleport"
|
|
6
|
+
:disabled="wrapperProps.disabled"
|
|
7
|
+
:cancel-text="appConfig.core?.locale === 'th' ? '\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01' : 'Cancel'"
|
|
8
|
+
:select-text="appConfig.core?.locale === 'th' ? '\u0E15\u0E01\u0E25\u0E07' : 'Select'"
|
|
9
|
+
:locale="appConfig.core?.locale"
|
|
10
|
+
:format="appConfig.core?.month_format"
|
|
11
|
+
month-picker
|
|
12
|
+
:placeholder="wrapperProps.placeholder"
|
|
13
|
+
:min-date="minDate"
|
|
14
|
+
:max-date="maxDate"
|
|
15
|
+
:required="wrapperProps.required"
|
|
16
|
+
:clearable="true"
|
|
17
|
+
:always-clearable="true"
|
|
18
|
+
@update:model-value="onInput"
|
|
19
|
+
>
|
|
20
|
+
<template
|
|
21
|
+
v-if="appConfig.core?.locale === 'th' && appConfig.core?.is_thai_year"
|
|
22
|
+
#year="{ year }"
|
|
23
|
+
>
|
|
24
|
+
{{ year + 543 }}
|
|
25
|
+
</template>
|
|
26
|
+
<template
|
|
27
|
+
v-if="appConfig.core?.locale === 'th' && appConfig.core?.is_thai_year"
|
|
28
|
+
#year-overlay-value="{ value }"
|
|
29
|
+
>
|
|
30
|
+
{{ value + 543 }}
|
|
31
|
+
</template>
|
|
32
|
+
<template #dp-input>
|
|
33
|
+
<Input
|
|
34
|
+
:trailing-icon="!wrapperProps.required && value ? void 0 : 'i-heroicons-calendar-days'"
|
|
35
|
+
type="text"
|
|
36
|
+
:disabled="wrapperProps.disabled"
|
|
37
|
+
:model-value="formatDisplay(value)"
|
|
38
|
+
:placeholder="wrapperProps.placeholder"
|
|
39
|
+
:readonly="true"
|
|
40
40
|
:ui="{
|
|
41
41
|
base: 'cursor-pointer select-none',
|
|
42
42
|
trailingIcon: 'cursor-pointer'
|
|
43
|
-
}"
|
|
44
|
-
/>
|
|
45
|
-
</template>
|
|
46
|
-
<template #clear-icon="{ clear }">
|
|
47
|
-
<Icon
|
|
48
|
-
v-if="value && !wrapperProps.disabled && !wrapperProps.required"
|
|
49
|
-
:name="clearIcon"
|
|
43
|
+
}"
|
|
44
|
+
/>
|
|
45
|
+
</template>
|
|
46
|
+
<template #clear-icon="{ clear }">
|
|
47
|
+
<Icon
|
|
48
|
+
v-if="value && !wrapperProps.disabled && !wrapperProps.required"
|
|
49
|
+
:name="clearIcon"
|
|
50
50
|
:class="theme.clearIcon({
|
|
51
51
|
class: [ui?.clearIcon]
|
|
52
|
-
})"
|
|
53
|
-
@click.stop="clear"
|
|
54
|
-
/>
|
|
55
|
-
</template>
|
|
56
|
-
</Datepicker>
|
|
57
|
-
</FieldWrapper>
|
|
52
|
+
})"
|
|
53
|
+
@click.stop="clear"
|
|
54
|
+
/>
|
|
55
|
+
</template>
|
|
56
|
+
</Datepicker>
|
|
57
|
+
</FieldWrapper>
|
|
58
58
|
</template>
|
|
59
59
|
|
|
60
60
|
<script setup>
|
|
@@ -97,10 +97,10 @@ const formatDisplay = (date) => {
|
|
|
97
97
|
if (!date) return "";
|
|
98
98
|
let newDateStr = new Date(date.year, date.month);
|
|
99
99
|
const options = {};
|
|
100
|
-
if (appConfig.core?.is_thai_year) {
|
|
100
|
+
if (appConfig.core?.locale === "th" && appConfig.core?.is_thai_year) {
|
|
101
101
|
newDateStr = addYears(newDateStr, 543);
|
|
102
102
|
}
|
|
103
|
-
if (appConfig.core?.is_thai_month) {
|
|
103
|
+
if (appConfig.core?.locale === "th" && appConfig.core?.is_thai_month) {
|
|
104
104
|
options.locale = locales.th;
|
|
105
105
|
}
|
|
106
106
|
return format(newDateStr, appConfig.core?.month_format, options);
|
|
@@ -60,7 +60,7 @@ const props = defineProps({
|
|
|
60
60
|
trailingIcon: { type: String, required: false },
|
|
61
61
|
clearIcon: { type: String, required: false, default: "ph:x-circle-fill" },
|
|
62
62
|
selectedIcon: { type: String, required: false },
|
|
63
|
-
searchInput: { type: Object, required: false },
|
|
63
|
+
searchInput: { type: [Object, Boolean], required: false },
|
|
64
64
|
clearable: { type: Boolean, required: false },
|
|
65
65
|
loading: { type: Boolean, required: false },
|
|
66
66
|
options: { type: Array, required: true },
|
|
@@ -70,7 +70,7 @@ const props = defineProps({
|
|
|
70
70
|
trailingIcon: { type: String, required: false },
|
|
71
71
|
clearIcon: { type: String, required: false },
|
|
72
72
|
selectedIcon: { type: String, required: false },
|
|
73
|
-
searchInput: { type: Object, required: false },
|
|
73
|
+
searchInput: { type: [Object, Boolean], required: false },
|
|
74
74
|
clearable: { type: Boolean, required: false },
|
|
75
75
|
loading: { type: Boolean, required: false },
|
|
76
76
|
options: { type: Array, required: true },
|