@finema/core 3.23.2 → 3.24.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.
Files changed (85) hide show
  1. package/README.md +22 -2
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +3 -14
  4. package/dist/runtime/components/DevToolsWindow/index.vue +24 -26
  5. package/dist/runtime/components/Dialog/index.vue +11 -10
  6. package/dist/runtime/components/Empty.d.vue.ts +1 -1
  7. package/dist/runtime/components/Empty.vue +16 -12
  8. package/dist/runtime/components/Empty.vue.d.ts +1 -1
  9. package/dist/runtime/components/FlexDeck/index.vue +85 -92
  10. package/dist/runtime/components/Form/FieldWrapper.vue +13 -13
  11. package/dist/runtime/components/Form/Fields.d.vue.ts +1 -1
  12. package/dist/runtime/components/Form/Fields.vue +17 -11
  13. package/dist/runtime/components/Form/Fields.vue.d.ts +1 -1
  14. package/dist/runtime/components/Form/InputCheckbox/index.vue +19 -23
  15. package/dist/runtime/components/Form/InputCheckboxGroup/index.vue +1 -5
  16. package/dist/runtime/components/Form/InputCurrency/index.vue +56 -57
  17. package/dist/runtime/components/Form/InputDateTime/date_time_field.types.d.ts +2 -0
  18. package/dist/runtime/components/Form/InputDateTime/index.vue +70 -80
  19. package/dist/runtime/components/Form/InputDateTimeRange/index.vue +78 -75
  20. package/dist/runtime/components/Form/InputMonth/index.vue +7 -10
  21. package/dist/runtime/components/Form/InputNumber/index.vue +21 -25
  22. package/dist/runtime/components/Form/InputRadio/index.d.vue.ts +1 -1
  23. package/dist/runtime/components/Form/InputRadio/index.vue +1 -5
  24. package/dist/runtime/components/Form/InputRadio/index.vue.d.ts +1 -1
  25. package/dist/runtime/components/Form/InputRating/index.vue +1 -5
  26. package/dist/runtime/components/Form/InputSearch/index.vue +2 -8
  27. package/dist/runtime/components/Form/InputSelect/index.vue +112 -122
  28. package/dist/runtime/components/Form/InputSelectMultiple/index.vue +121 -133
  29. package/dist/runtime/components/Form/InputTags/index.vue +55 -59
  30. package/dist/runtime/components/Form/InputText/index.vue +122 -133
  31. package/dist/runtime/components/Form/InputTextarea/index.vue +19 -23
  32. package/dist/runtime/components/Form/InputTime/index.vue +63 -63
  33. package/dist/runtime/components/Form/InputToggle/index.vue +18 -21
  34. package/dist/runtime/components/Form/InputUploadDropzone/index.vue +46 -49
  35. package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +57 -63
  36. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/index.vue +57 -64
  37. package/dist/runtime/components/Form/InputUploadImageAuto/index.vue +57 -63
  38. package/dist/runtime/components/Form/InputWYSIWYG/EditorImagePasteExtension.js +7 -6
  39. package/dist/runtime/components/Form/InputWYSIWYG/EditorImageUploadExtension.js +13 -12
  40. package/dist/runtime/components/Form/InputWYSIWYG/EditorImageUploadNode.vue +21 -19
  41. package/dist/runtime/components/Form/InputWYSIWYG/EditorLinkPopover.vue +85 -87
  42. package/dist/runtime/components/Form/InputWYSIWYG/README.md +96 -96
  43. package/dist/runtime/components/Form/InputWYSIWYG/index.vue +178 -157
  44. package/dist/runtime/components/Form/fileState/EmptyState.vue +21 -21
  45. package/dist/runtime/components/Form/fileState/FailedState.vue +34 -36
  46. package/dist/runtime/components/Form/fileState/LoadingState.vue +24 -24
  47. package/dist/runtime/components/Form/fileState/MultipleFilesState.vue +74 -78
  48. package/dist/runtime/components/Form/fileState/PreviewModal.vue +23 -23
  49. package/dist/runtime/components/Form/fileState/SuccessState.vue +3 -12
  50. package/dist/runtime/components/Form/fileState/useFileState.js +2 -10
  51. package/dist/runtime/components/Form/fileState/useUploadImageState.js +1 -3
  52. package/dist/runtime/components/Form/fileState/useUploadState.js +8 -19
  53. package/dist/runtime/components/Form/fileState/useUploadStateMultiple.js +25 -30
  54. package/dist/runtime/components/Form/index.vue +5 -5
  55. package/dist/runtime/components/Image.vue +22 -28
  56. package/dist/runtime/components/Loader.d.vue.ts +1 -1
  57. package/dist/runtime/components/Loader.vue +10 -7
  58. package/dist/runtime/components/Loader.vue.d.ts +1 -1
  59. package/dist/runtime/components/Log/LogItem.vue +1 -3
  60. package/dist/runtime/components/Log/index.vue +1 -3
  61. package/dist/runtime/components/Table/Base.vue +117 -137
  62. package/dist/runtime/components/Table/ColumnDate.vue +1 -1
  63. package/dist/runtime/components/Table/ColumnDateTime.vue +1 -1
  64. package/dist/runtime/components/Table/ColumnImage.vue +4 -4
  65. package/dist/runtime/components/Table/ColumnText.vue +10 -10
  66. package/dist/runtime/components/Table/Pagination.vue +71 -77
  67. package/dist/runtime/components/Table/Simple.vue +19 -19
  68. package/dist/runtime/components/Table/index.vue +36 -42
  69. package/dist/runtime/composables/loaderList.js +1 -3
  70. package/dist/runtime/composables/loaderPage.js +156 -133
  71. package/dist/runtime/composables/useConfig.js +1 -1
  72. package/dist/runtime/composables/useDialog.js +1 -3
  73. package/dist/runtime/composables/useForm.d.ts +1 -1
  74. package/dist/runtime/composables/useForm.js +1 -3
  75. package/dist/runtime/composables/useTable.js +2 -14
  76. package/dist/runtime/helpers/apiBaseHelper.js +6 -24
  77. package/dist/runtime/helpers/apiListHelper.js +2 -5
  78. package/dist/runtime/helpers/apiObjectHelper.js +2 -5
  79. package/dist/runtime/helpers/apiPageHelper.js +19 -38
  80. package/dist/runtime/helpers/componentHelper.js +2 -6
  81. package/dist/runtime/helpers/uploadCore.js +1 -4
  82. package/dist/runtime/locale/index.js +1 -4
  83. package/dist/runtime/server/tsconfig.json +3 -3
  84. package/dist/runtime/styles/main.css +1 -1
  85. package/package.json +39 -26
@@ -1,56 +1,59 @@
1
1
  <template>
2
- <FieldWrapper
3
- v-bind="wrapperProps"
4
- :error-message="undefined"
5
- >
6
- <div
7
- :class="['inline-flex w-full items-center -space-x-px rounded-lg ring-1', {
8
- 'ring-error': wrapperProps.errorMessage,
9
- 'ring-gray-300': !wrapperProps.errorMessage
10
- }]"
11
- >
12
- <p class="pl-3 text-lg">
13
- {{ currencySymbol }}
14
- </p>
15
- <InputNumber
16
- :model-value="value.value"
17
- :disabled="wrapperProps.disabled"
18
- :name="name"
19
- :placeholder="wrapperProps.placeholder"
20
- :autofocus="!!autoFocus"
21
- :readonly="readonly"
22
- :min="min"
23
- :max="max"
24
- :step="step"
25
- :format-options="formatOptions"
26
- :increment="false"
27
- :decrement="false"
28
- variant="none"
29
- @update:model-value="onAmountChange"
30
- />
31
- <Select
32
- :model-value="value.currency"
33
- :items="options"
34
- :disabled="wrapperProps.disabled"
35
- value-key="value"
36
- label-key="label"
37
- variant="none"
38
- size="xl"
39
- class="cursor-pointer"
40
- @update:model-value="onCurrencyChange"
41
- >
42
- <template #default="{ modelValue }">
43
- {{ options.find((item) => item.value === modelValue)?.label || modelValue }}
44
- </template>
45
- </Select>
46
- </div>
47
- <p
48
- v-if="wrapperProps.errorMessage"
49
- class="text-error mt-2"
50
- >
51
- {{ wrapperProps.errorMessage }}
52
- </p>
53
- </FieldWrapper>
2
+ <FieldWrapper
3
+ v-bind="wrapperProps"
4
+ :error-message="undefined"
5
+ >
6
+ <div
7
+ :class="[
8
+ 'inline-flex w-full items-center -space-x-px rounded-lg ring-1',
9
+ {
10
+ 'ring-error': wrapperProps.errorMessage,
11
+ 'ring-gray-300': !wrapperProps.errorMessage
12
+ }
13
+ ]"
14
+ >
15
+ <p class="pl-3 text-lg">
16
+ {{ currencySymbol }}
17
+ </p>
18
+ <InputNumber
19
+ :model-value="value.value"
20
+ :disabled="wrapperProps.disabled"
21
+ :name="name"
22
+ :placeholder="wrapperProps.placeholder"
23
+ :autofocus="!!autoFocus"
24
+ :readonly="readonly"
25
+ :min="min"
26
+ :max="max"
27
+ :step="step"
28
+ :format-options="formatOptions"
29
+ :increment="false"
30
+ :decrement="false"
31
+ variant="none"
32
+ @update:model-value="onAmountChange"
33
+ />
34
+ <Select
35
+ :model-value="value.currency"
36
+ :items="options"
37
+ :disabled="wrapperProps.disabled"
38
+ value-key="value"
39
+ label-key="label"
40
+ variant="none"
41
+ size="xl"
42
+ class="cursor-pointer"
43
+ @update:model-value="onCurrencyChange"
44
+ >
45
+ <template #default="{ modelValue }">
46
+ {{ options.find((item) => item.value === modelValue)?.label || modelValue }}
47
+ </template>
48
+ </Select>
49
+ </div>
50
+ <p
51
+ v-if="wrapperProps.errorMessage"
52
+ class="mt-2 text-error"
53
+ >
54
+ {{ wrapperProps.errorMessage }}
55
+ </p>
56
+ </FieldWrapper>
54
57
  </template>
55
58
 
56
59
  <script setup>
@@ -93,11 +96,7 @@ const props = defineProps({
93
96
  ui: { type: null, required: false },
94
97
  containerUi: { type: null, required: false }
95
98
  });
96
- const {
97
- value,
98
- wrapperProps,
99
- handleChange
100
- } = useFieldHOC(props);
99
+ const { value, wrapperProps, handleChange } = useFieldHOC(props);
101
100
  const currencySymbol = computed(() => props.options.find((item) => item.value === value.value.currency)?.symbol);
102
101
  const updateValue = (payload) => {
103
102
  const newValue = {
@@ -9,6 +9,8 @@ export interface IDateTimeFieldProps extends IFieldProps {
9
9
  disabledTime?: boolean;
10
10
  minDate?: Date | string;
11
11
  maxDate?: Date | string;
12
+ startDate?: Date | string;
13
+ focusStartDate?: boolean;
12
14
  startTime?: ITimeOption;
13
15
  minTime?: ITimeOption;
14
16
  maxTime?: ITimeOption;
@@ -1,90 +1,83 @@
1
1
  <template>
2
- <FieldWrapper v-bind="wrapperProps">
3
- <Datepicker
4
- :model-value="innerValue"
5
- :disabled="wrapperProps.disabled"
6
- :cancel-text="messages.common.cancel"
7
- :select-text="messages.common.select"
8
- :locale="appConfig.core?.locale"
9
- :enable-time-picker="!disabledTime"
10
- :auto-apply="autoApply && disabledTime"
11
- :placeholder="wrapperProps.placeholder"
12
- :format="format"
13
- :min-date="minDate"
14
- :max-date="maxDate"
15
- :min-time="minTime"
16
- :max-time="maxTime"
17
- :six-weeks="true"
18
- :start-time="startTime"
19
- :teleport="teleport"
20
- :required="required"
21
- :flow="flowCalendar"
22
- @update:model-value="onInput"
23
- >
24
- <template
25
- v-if="appConfig.core?.locale === 'th' && appConfig.core?.is_thai_year"
26
- #year="{ value }"
27
- >
28
- {{ value + 543 }}
29
- </template>
30
- <template
31
- v-if="appConfig.core?.locale === 'th' && appConfig.core?.is_thai_year"
32
- #year-overlay-value="{ value }"
33
- >
34
- {{ value + 543 }}
35
- </template>
36
- <template #dp-input="{ value: innerValue }">
37
- <Input
38
- v-if="!readMode"
39
- :trailing-icon="innerValue ? void 0 : 'i-heroicons-calendar-days'"
40
- type="text"
41
- :disabled="wrapperProps.disabled"
42
- :model-value="innerValue"
43
- :placeholder="wrapperProps.placeholder"
44
- :readonly="true"
2
+ <FieldWrapper v-bind="wrapperProps">
3
+ <Datepicker
4
+ :model-value="innerValue"
5
+ :disabled="wrapperProps.disabled"
6
+ :cancel-text="messages.common.cancel"
7
+ :select-text="messages.common.select"
8
+ :locale="appConfig.core?.locale"
9
+ :enable-time-picker="!disabledTime"
10
+ :auto-apply="autoApply && disabledTime"
11
+ :placeholder="wrapperProps.placeholder"
12
+ :format="format"
13
+ :min-date="minDate"
14
+ :max-date="maxDate"
15
+ :min-time="minTime"
16
+ :max-time="maxTime"
17
+ :six-weeks="true"
18
+ :start-time="startTime"
19
+ :start-date="startDate"
20
+ :focus-start-date="focusStartDate"
21
+ :teleport="teleport"
22
+ :required="required"
23
+ :flow="flowCalendar"
24
+ @update:model-value="onInput"
25
+ >
26
+ <template
27
+ v-if="appConfig.core?.locale === 'th' && appConfig.core?.is_thai_year"
28
+ #year="{ value }"
29
+ >
30
+ {{ value + 543 }}
31
+ </template>
32
+ <template
33
+ v-if="appConfig.core?.locale === 'th' && appConfig.core?.is_thai_year"
34
+ #year-overlay-value="{ value }"
35
+ >
36
+ {{ value + 543 }}
37
+ </template>
38
+ <template #dp-input="{ value: innerValue }">
39
+ <Input
40
+ v-if="!readMode"
41
+ :trailing-icon="innerValue ? void 0 : 'i-heroicons-calendar-days'"
42
+ type="text"
43
+ :disabled="wrapperProps.disabled"
44
+ :model-value="innerValue"
45
+ :placeholder="wrapperProps.placeholder"
46
+ :readonly="true"
45
47
  :ui="{
46
48
  base: 'cursor-pointer select-none',
47
49
  trailingIcon: 'cursor-pointer'
48
- }"
49
- />
50
- <div
51
- v-else
52
- class="cursor-pointer rounded-md px-2 py-1 hover:bg-gray-100"
53
- :class="classReadMode"
54
- >
55
- {{ innerValue || "None" }}
56
- </div>
57
- </template>
58
- <template #clear-icon="{ clear }">
59
- <Icon
60
- v-if="clearable"
61
- :name="clearIcon"
50
+ }"
51
+ />
52
+ <div
53
+ v-else
54
+ class="cursor-pointer rounded-md px-2 py-1 hover:bg-gray-100"
55
+ :class="classReadMode"
56
+ >
57
+ {{ innerValue || "None" }}
58
+ </div>
59
+ </template>
60
+ <template #clear-icon="{ clear }">
61
+ <Icon
62
+ v-if="clearable"
63
+ :name="clearIcon"
62
64
  :class="
63
65
  theme.clearIcon({
64
66
  class: [ui?.clearIcon]
65
67
  })
66
- "
67
- @click.stop="clear"
68
- />
69
- </template>
70
- </Datepicker>
71
- </FieldWrapper>
68
+ "
69
+ @click.stop="clear"
70
+ />
71
+ </template>
72
+ </Datepicker>
73
+ </FieldWrapper>
72
74
  </template>
73
75
 
74
76
  <script setup>
75
77
  import { useCoreMessages } from "#core/composables/useMessages";
76
78
  import Datepicker from "@vuepic/vue-datepicker";
77
79
  import FieldWrapper from "#core/components/Form/FieldWrapper.vue";
78
- import {
79
- computed,
80
- TimeHelper,
81
- useAppConfig,
82
- useFieldHOC,
83
- useUiConfig,
84
- ref,
85
- watch,
86
- onMounted
87
- } from "#imports";
80
+ import { computed, TimeHelper, useAppConfig, useFieldHOC, useUiConfig, ref, watch, onMounted } from "#imports";
88
81
  import "@vuepic/vue-datepicker/dist/main.css";
89
82
  import { dateTimeTheme } from "#core/theme/dateTime";
90
83
  import { breakpointsTailwind, useBreakpoints } from "@vueuse/core";
@@ -94,6 +87,8 @@ const props = defineProps({
94
87
  disabledTime: { type: Boolean, required: false },
95
88
  minDate: { type: [Date, String], required: false },
96
89
  maxDate: { type: [Date, String], required: false },
90
+ startDate: { type: [Date, String], required: false },
91
+ focusStartDate: { type: Boolean, required: false },
97
92
  startTime: { type: Object, required: false },
98
93
  minTime: { type: Object, required: false },
99
94
  maxTime: { type: Object, required: false },
@@ -122,10 +117,7 @@ const props = defineProps({
122
117
  const appConfig = useAppConfig();
123
118
  const theme = computed(() => useUiConfig(dateTimeTheme, "dateTime")());
124
119
  const isShowModal = ref(false);
125
- const {
126
- value,
127
- wrapperProps
128
- } = useFieldHOC(props);
120
+ const { value, wrapperProps } = useFieldHOC(props);
129
121
  const innerValue = ref();
130
122
  const breakpoints = useBreakpoints(breakpointsTailwind);
131
123
  const isMobile = breakpoints.smallerOrEqual("md");
@@ -170,9 +162,7 @@ const onInput = (_value) => {
170
162
  }
171
163
  emits("change", value.value);
172
164
  };
173
- const {
174
- messages
175
- } = useCoreMessages();
165
+ const { messages } = useCoreMessages();
176
166
  </script>
177
167
 
178
168
  <style scoped>
@@ -1,65 +1,67 @@
1
1
  <template>
2
- <FieldWrapper v-bind="wrapperProps">
3
- <Datepicker
4
- ref="datepicker"
5
- v-model="innerValueRef"
6
- :teleport="teleport"
7
- :disabled="wrapperProps.disabled"
8
- :cancel-text="messages.common.cancel"
9
- :select-text="messages.common.select"
10
- :locale="appConfig.core?.locale"
11
- :format="format"
12
- :enable-time-picker="!disabledTime"
13
- :placeholder="wrapperProps.placeholder"
14
- :min-date="minDate"
15
- :max-date="maxDate"
16
- :min-time="minTime"
17
- :max-time="maxTime"
18
- :six-weeks="true"
19
- :start-time="startTime"
20
- :multi-calendars="!isDisabledMultiCalendar"
21
- :required="required"
22
- time-picker-inline
23
- range
24
- :flow="['calendar', 'time']"
25
- @update:model-value="onInput"
26
- >
27
- <template
28
- v-if="appConfig.core?.locale === 'th' && appConfig.core?.is_thai_year"
29
- #year="{ value }"
30
- >
31
- {{ value + 543 }}
32
- </template>
33
- <template
34
- v-if="appConfig.core?.locale === 'th' && appConfig.core?.is_thai_year"
35
- #year-overlay-value="{ value }"
36
- >
37
- {{ value + 543 }}
38
- </template>
39
- <template #dp-input="{ value: innerValue }">
40
- <Input
41
- :trailing-icon="innerValue ? void 0 : 'i-heroicons-calendar-days'"
42
- type="text"
43
- :model-value="innerValue"
44
- :placeholder="wrapperProps.placeholder"
45
- :readonly="true"
2
+ <FieldWrapper v-bind="wrapperProps">
3
+ <Datepicker
4
+ ref="datepicker"
5
+ v-model="innerValueRef"
6
+ :teleport="teleport"
7
+ :disabled="wrapperProps.disabled"
8
+ :cancel-text="messages.common.cancel"
9
+ :select-text="messages.common.select"
10
+ :locale="appConfig.core?.locale"
11
+ :format="format"
12
+ :enable-time-picker="!disabledTime"
13
+ :placeholder="wrapperProps.placeholder"
14
+ :min-date="minDate"
15
+ :max-date="maxDate"
16
+ :min-time="minTime"
17
+ :max-time="maxTime"
18
+ :six-weeks="true"
19
+ :start-time="startTime"
20
+ :multi-calendars="!isDisabledMultiCalendar"
21
+ :required="required"
22
+ time-picker-inline
23
+ range
24
+ :flow="['calendar', 'time']"
25
+ @update:model-value="onInput"
26
+ >
27
+ <template
28
+ v-if="appConfig.core?.locale === 'th' && appConfig.core?.is_thai_year"
29
+ #year="{ value }"
30
+ >
31
+ {{ value + 543 }}
32
+ </template>
33
+ <template
34
+ v-if="appConfig.core?.locale === 'th' && appConfig.core?.is_thai_year"
35
+ #year-overlay-value="{ value }"
36
+ >
37
+ {{ value + 543 }}
38
+ </template>
39
+ <template #dp-input="{ value: innerValue }">
40
+ <Input
41
+ :trailing-icon="innerValue ? void 0 : 'i-heroicons-calendar-days'"
42
+ type="text"
43
+ :model-value="innerValue"
44
+ :placeholder="wrapperProps.placeholder"
45
+ :readonly="true"
46
46
  :ui="{
47
47
  base: 'cursor-pointer select-none',
48
48
  trailingIcon: 'cursor-pointer'
49
- }"
50
- />
51
- </template>
52
- <template #clear-icon="{ clear }">
53
- <Icon
54
- :name="clearIcon"
55
- :class="theme.clearIcon({
56
- class: [ui?.clearIcon]
57
- })"
58
- @click.stop="clear"
59
- />
60
- </template>
61
- </Datepicker>
62
- </FieldWrapper>
49
+ }"
50
+ />
51
+ </template>
52
+ <template #clear-icon="{ clear }">
53
+ <Icon
54
+ :name="clearIcon"
55
+ :class="
56
+ theme.clearIcon({
57
+ class: [ui?.clearIcon]
58
+ })
59
+ "
60
+ @click.stop="clear"
61
+ />
62
+ </template>
63
+ </Datepicker>
64
+ </FieldWrapper>
63
65
  </template>
64
66
 
65
67
  <script setup>
@@ -77,6 +79,8 @@ const props = defineProps({
77
79
  disabledTime: { type: Boolean, required: false },
78
80
  minDate: { type: [Date, String], required: false },
79
81
  maxDate: { type: [Date, String], required: false },
82
+ startDate: { type: [Date, String], required: false },
83
+ focusStartDate: { type: Boolean, required: false },
80
84
  startTime: { type: Object, required: false },
81
85
  minTime: { type: Object, required: false },
82
86
  maxTime: { type: Object, required: false },
@@ -103,10 +107,7 @@ const props = defineProps({
103
107
  });
104
108
  const appConfig = useAppConfig();
105
109
  const theme = computed(() => useUiConfig(dateTimeTheme, "dateTime")());
106
- const {
107
- value,
108
- wrapperProps
109
- } = useFieldHOC(props);
110
+ const { value, wrapperProps } = useFieldHOC(props);
110
111
  const innerValueRef = ref([]);
111
112
  const initializeValue = () => {
112
113
  const currentValue = value.value;
@@ -118,17 +119,21 @@ const initializeValue = () => {
118
119
  innerValueRef.value = [];
119
120
  }
120
121
  };
121
- watch(value, (newValue) => {
122
- if (newValue && (newValue.start || newValue.end)) {
123
- const start = typeof newValue.start === "string" ? new Date(newValue.start) : newValue.start;
124
- const end = typeof newValue.end === "string" ? new Date(newValue.end) : newValue.end;
125
- innerValueRef.value = [start, end];
126
- } else if (!newValue) {
127
- innerValueRef.value = [];
122
+ watch(
123
+ value,
124
+ (newValue) => {
125
+ if (newValue && (newValue.start || newValue.end)) {
126
+ const start = typeof newValue.start === "string" ? new Date(newValue.start) : newValue.start;
127
+ const end = typeof newValue.end === "string" ? new Date(newValue.end) : newValue.end;
128
+ innerValueRef.value = [start, end];
129
+ } else if (!newValue) {
130
+ innerValueRef.value = [];
131
+ }
132
+ },
133
+ {
134
+ immediate: false
128
135
  }
129
- }, {
130
- immediate: false
131
- });
136
+ );
132
137
  onMounted(() => {
133
138
  initializeValue();
134
139
  });
@@ -157,7 +162,5 @@ const onInput = (_value) => {
157
162
  }
158
163
  emits("change", value.value);
159
164
  };
160
- const {
161
- messages
162
- } = useCoreMessages();
165
+ const { messages } = useCoreMessages();
163
166
  </script>
@@ -47,9 +47,11 @@
47
47
  <Icon
48
48
  v-if="value && !wrapperProps.disabled && !wrapperProps.required"
49
49
  :name="clearIcon"
50
- :class="theme.clearIcon({
51
- class: [ui?.clearIcon]
52
- })"
50
+ :class="
51
+ theme.clearIcon({
52
+ class: [ui?.clearIcon]
53
+ })
54
+ "
53
55
  @click.stop="clear"
54
56
  />
55
57
  </template>
@@ -91,10 +93,7 @@ const props = defineProps({
91
93
  });
92
94
  const appConfig = useAppConfig();
93
95
  const theme = computed(() => useUiConfig(dateTimeTheme, "dateTime")());
94
- const {
95
- value,
96
- wrapperProps
97
- } = useFieldHOC(props);
96
+ const { value, wrapperProps } = useFieldHOC(props);
98
97
  const formatDisplay = (date) => {
99
98
  if (!date) return "";
100
99
  let newDateStr = new Date(date.year, date.month);
@@ -111,7 +110,5 @@ const onInput = (date) => {
111
110
  value.value = date;
112
111
  emits("change", value.value);
113
112
  };
114
- const {
115
- messages
116
- } = useCoreMessages();
113
+ const { messages } = useCoreMessages();
117
114
  </script>
@@ -1,24 +1,24 @@
1
1
  <template>
2
- <FieldWrapper v-bind="wrapperProps">
3
- <InputNumber
4
- :model-value="value"
5
- :disabled="wrapperProps.disabled"
6
- :name="name"
7
- :placeholder="wrapperProps.placeholder"
8
- :autofocus="!!autoFocus"
9
- :readonly="readonly"
10
- :orientation="orientation"
11
- :increment="increment"
12
- :decrement="decrement"
13
- :min="min"
14
- :max="max"
15
- :step="step"
16
- :disable-wheel-change="disableWheelChange"
17
- :format-options="formatOptions"
18
- :ui="ui"
19
- @update:model-value="onChange"
20
- />
21
- </FieldWrapper>
2
+ <FieldWrapper v-bind="wrapperProps">
3
+ <InputNumber
4
+ :model-value="value"
5
+ :disabled="wrapperProps.disabled"
6
+ :name="name"
7
+ :placeholder="wrapperProps.placeholder"
8
+ :autofocus="!!autoFocus"
9
+ :readonly="readonly"
10
+ :orientation="orientation"
11
+ :increment="increment"
12
+ :decrement="decrement"
13
+ :min="min"
14
+ :max="max"
15
+ :step="step"
16
+ :disable-wheel-change="disableWheelChange"
17
+ :format-options="formatOptions"
18
+ :ui="ui"
19
+ @update:model-value="onChange"
20
+ />
21
+ </FieldWrapper>
22
22
  </template>
23
23
 
24
24
  <script setup>
@@ -50,11 +50,7 @@ const props = defineProps({
50
50
  ui: { type: null, required: false },
51
51
  containerUi: { type: null, required: false }
52
52
  });
53
- const {
54
- value,
55
- wrapperProps,
56
- handleChange
57
- } = useFieldHOC(props);
53
+ const { value, wrapperProps, handleChange } = useFieldHOC(props);
58
54
  const onChange = (value2) => {
59
55
  handleChange(value2);
60
56
  emits("change", value2);
@@ -5,8 +5,8 @@ declare const __VLS_export: import("vue").DefineComponent<IRadioFieldProps, {},
5
5
  onChange?: ((value: any) => any) | undefined;
6
6
  }>, {
7
7
  variant: "list" | "card" | "table";
8
- indicator: "start" | "end" | "hidden";
9
8
  orientation: "horizontal" | "vertical";
9
+ indicator: "start" | "end" | "hidden";
10
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  export default _default;
@@ -45,11 +45,7 @@ const props = defineProps({
45
45
  ui: { type: null, required: false },
46
46
  containerUi: { type: null, required: false }
47
47
  });
48
- const {
49
- value,
50
- wrapperProps,
51
- handleChange
52
- } = useFieldHOC(props);
48
+ const { value, wrapperProps, handleChange } = useFieldHOC(props);
53
49
  const onChange = (newValue) => {
54
50
  handleChange(newValue);
55
51
  emits("change", newValue);
@@ -5,8 +5,8 @@ declare const __VLS_export: import("vue").DefineComponent<IRadioFieldProps, {},
5
5
  onChange?: ((value: any) => any) | undefined;
6
6
  }>, {
7
7
  variant: "list" | "card" | "table";
8
- indicator: "start" | "end" | "hidden";
9
8
  orientation: "horizontal" | "vertical";
9
+ indicator: "start" | "end" | "hidden";
10
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  export default _default;
@@ -53,11 +53,7 @@ const props = defineProps({
53
53
  ui: { type: null, required: false },
54
54
  containerUi: { type: null, required: false }
55
55
  });
56
- const {
57
- value,
58
- wrapperProps,
59
- handleChange
60
- } = useFieldHOC(props);
56
+ const { value, wrapperProps, handleChange } = useFieldHOC(props);
61
57
  const onChange = (value2) => {
62
58
  handleChange(value2);
63
59
  emits("change", value2);