@finema/core 3.6.4 → 3.7.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "3.6.4",
3
+ "version": "3.7.0",
4
4
  "configKey": "core",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
package/dist/module.mjs CHANGED
@@ -4,7 +4,7 @@ import * as lodash from 'lodash-es';
4
4
  import * as theme from '../dist/runtime/theme/index.js';
5
5
 
6
6
  const name = "@finema/core";
7
- const version = "3.6.4";
7
+ const version = "3.7.0";
8
8
 
9
9
  const nuxtAppOptions = {
10
10
  head: {
@@ -65,7 +65,8 @@
65
65
  class="mt-4 flex justify-between px-3"
66
66
  >
67
67
  <p class="text-xs text-gray-500">
68
- {{ pageBetween }} รายการ จากทั้งหมด {{ totalCountWithComma }} รายการ
68
+ {{ pageBetween }} {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23 \u0E08\u0E32\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14" : "items of total" }}
69
+ {{ totalCountWithComma }} {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23" : "items" }}
69
70
  </p>
70
71
  <Pagination
71
72
  v-if="options.pageOptions.totalPage > 1"
@@ -83,7 +84,7 @@
83
84
  import { computed, ref, watch } from "vue";
84
85
  import { useElementVisibility } from "@vueuse/core";
85
86
  import { NumberHelper } from "#core/utils/NumberHelper";
86
- import { _debounce, useRouter, useWatchChange, useWatchTrue } from "#imports";
87
+ import { _debounce, useRouter, useWatchChange, useWatchTrue, useAppConfig } from "#imports";
87
88
  import { useCoreConfig } from "#core/composables/useConfig";
88
89
  import Empty from "#core/components/Empty.vue";
89
90
  const emits = defineEmits(["pageChange", "search"]);
@@ -99,6 +100,7 @@ const props = defineProps({
99
100
  });
100
101
  defineSlots();
101
102
  const coreConfig = useCoreConfig();
103
+ const appConfig = useAppConfig();
102
104
  const router = useRouter();
103
105
  const q = ref(props.options?.pageOptions.search ?? "");
104
106
  const bottomEdgeElement = ref(null);
@@ -14,6 +14,8 @@ export interface IDateTimeFieldProps extends IFieldProps {
14
14
  maxTime?: ITimeOption;
15
15
  isReturnISO?: boolean;
16
16
  teleport?: boolean | string | HTMLElement;
17
+ readMode?: boolean;
18
+ classReadMode?: string;
17
19
  }
18
20
  export type IDateTimeField = IFormFieldBase<INPUT_TYPES.DATE_TIME | INPUT_TYPES.DATE, IDateTimeFieldProps, {
19
21
  change: (value: string) => void;
@@ -34,6 +34,7 @@
34
34
  </template>
35
35
  <template #dp-input="{ value: innerValue }">
36
36
  <Input
37
+ v-if="!readMode"
37
38
  :trailing-icon="innerValue ? void 0 : 'i-heroicons-calendar-days'"
38
39
  type="text"
39
40
  :disabled="wrapperProps.disabled"
@@ -45,6 +46,13 @@
45
46
  trailingIcon: 'cursor-pointer'
46
47
  }"
47
48
  />
49
+ <div
50
+ v-else
51
+ class="cursor-pointer p-1 hover:bg-gray-100"
52
+ :class="classReadMode"
53
+ >
54
+ {{ innerValue || "none" }}
55
+ </div>
48
56
  </template>
49
57
  <template #clear-icon="{ clear }">
50
58
  <Icon
@@ -76,6 +84,8 @@ const props = defineProps({
76
84
  maxTime: { type: Object, required: false },
77
85
  isReturnISO: { type: Boolean, required: false },
78
86
  teleport: { type: [Boolean, String], required: false, skipCheck: true, default: true },
87
+ readMode: { type: Boolean, required: false },
88
+ classReadMode: { type: String, required: false },
79
89
  form: { type: Object, required: false },
80
90
  name: { type: String, required: true },
81
91
  errorMessage: { type: String, required: false },
@@ -80,6 +80,8 @@ const props = defineProps({
80
80
  minTime: { type: Object, required: false },
81
81
  maxTime: { type: Object, required: false },
82
82
  isReturnISO: { type: Boolean, required: false },
83
+ readMode: { type: Boolean, required: false },
84
+ classReadMode: { type: String, required: false },
83
85
  form: { type: Object, required: false },
84
86
  name: { type: String, required: true },
85
87
  errorMessage: { type: String, required: false },
@@ -34,7 +34,7 @@
34
34
  })
35
35
  "
36
36
  >
37
- {{ modelValue }} รายการ
37
+ {{ modelValue }} {{ appConfig.core?.locale === "th" ? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23" : "items" }}
38
38
  </p>
39
39
  </template>
40
40
  </USelect>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "3.6.4",
3
+ "version": "3.7.0",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",