@finema/core 2.28.0 → 2.30.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 (34) hide show
  1. package/README.md +79 -79
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +1 -1
  4. package/dist/runtime/components/Form/FieldWrapper.vue +13 -13
  5. package/dist/runtime/components/Form/Fields.vue +18 -13
  6. package/dist/runtime/components/Form/InputCheckbox/index.vue +18 -18
  7. package/dist/runtime/components/Form/InputDateTime/index.vue +51 -51
  8. package/dist/runtime/components/Form/InputNumber/index.vue +20 -20
  9. package/dist/runtime/components/Form/InputSelectMultiple/index.vue +43 -43
  10. package/dist/runtime/components/Form/InputText/index.vue +3 -0
  11. package/dist/runtime/components/Form/InputTextarea/index.vue +18 -18
  12. package/dist/runtime/components/Form/InputTime/index.vue +106 -0
  13. package/dist/runtime/components/Form/InputTime/index.vue.d.ts +11 -0
  14. package/dist/runtime/components/Form/InputTime/types.d.ts +17 -0
  15. package/dist/runtime/components/Form/InputTime/types.js +0 -0
  16. package/dist/runtime/components/Form/InputToggle/index.vue +17 -17
  17. package/dist/runtime/components/Form/InputUploadDropzone/index.vue +30 -30
  18. package/dist/runtime/components/Form/fileState/EmptyState.vue +21 -21
  19. package/dist/runtime/components/Form/fileState/FailedState.vue +33 -33
  20. package/dist/runtime/components/Form/fileState/LoadingState.vue +24 -24
  21. package/dist/runtime/components/Form/fileState/PreviewModal.vue +23 -23
  22. package/dist/runtime/components/Form/index.vue +5 -5
  23. package/dist/runtime/components/Form/types.d.ts +3 -1
  24. package/dist/runtime/components/Form/types.js +1 -0
  25. package/dist/runtime/components/Image.vue +28 -28
  26. package/dist/runtime/components/Log/index.vue +17 -17
  27. package/dist/runtime/components/Table/ColumnDate.vue +1 -1
  28. package/dist/runtime/components/Table/ColumnDateTime.vue +1 -1
  29. package/dist/runtime/components/Table/ColumnImage.vue +4 -4
  30. package/dist/runtime/components/Table/ColumnText.vue +1 -1
  31. package/dist/runtime/server/tsconfig.json +3 -3
  32. package/dist/runtime/utils/TimeHelper.d.ts +3 -3
  33. package/dist/runtime/utils/TimeHelper.js +6 -6
  34. package/package.json +2 -2
@@ -8,9 +8,9 @@ export declare class TimeHelper {
8
8
  };
9
9
  static toUTC: (time: string | Date) => string;
10
10
  static toLocal: (time: string | Date) => string;
11
- static getCurrentDate: () => string;
12
- static getDateFormTime: (time: string | Date) => string;
13
- static getDateFormTimeWithLocal: (time: string | Date) => string;
11
+ static getCurrentDate: (customFormat?: string) => string;
12
+ static getDateFormTime: (time: string | Date, customFormat?: string) => string;
13
+ static getDateFormTimeWithLocal: (time: string | Date, customFormat?: string) => string;
14
14
  static getISODateTimeFormTime: (time: string | Date) => string;
15
15
  static getDateTimeFormTime: (time: string | Date) => string;
16
16
  static getTimeFormTime: (time: string | Date) => string;
@@ -81,24 +81,24 @@ export class TimeHelper {
81
81
  return time.toString();
82
82
  }
83
83
  };
84
- static getCurrentDate = () => {
85
- return format(/* @__PURE__ */ new Date(), dateFormat);
84
+ static getCurrentDate = (customFormat = dateFormat) => {
85
+ return format(/* @__PURE__ */ new Date(), customFormat);
86
86
  };
87
- static getDateFormTime = (time) => {
87
+ static getDateFormTime = (time, customFormat = dateFormat) => {
88
88
  if (!time) {
89
89
  return time;
90
90
  }
91
91
  const parsedTime = isDate(time) ? time : parse(time, dateTimeFormat, /* @__PURE__ */ new Date());
92
- const newTime = format(parsedTime, dateFormat);
92
+ const newTime = format(parsedTime, customFormat);
93
93
  return isValid(parsedTime) ? newTime : time;
94
94
  };
95
- static getDateFormTimeWithLocal = (time) => {
95
+ static getDateFormTimeWithLocal = (time, customFormat = dateFormat) => {
96
96
  if (!time) {
97
97
  return time;
98
98
  }
99
99
  const localTime = TimeHelper.toLocal(time);
100
100
  const parsedTime = isDate(localTime) ? localTime : parse(localTime, dateTimeFormat, /* @__PURE__ */ new Date());
101
- const newTime = format(parsedTime, dateFormat);
101
+ const newTime = format(parsedTime, customFormat);
102
102
  return isValid(parsedTime) ? newTime : time;
103
103
  };
104
104
  static getISODateTimeFormTime = (time) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "2.28.0",
3
+ "version": "2.30.0",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",
@@ -44,7 +44,7 @@
44
44
  "@iconify-json/ph": "^1.2.2",
45
45
  "@iconify-json/svg-spinners": "^1.2.2",
46
46
  "@nuxt/kit": "^4.0.2",
47
- "@nuxt/ui": "^3.3.0",
47
+ "@nuxt/ui": "^3.3.2",
48
48
  "@pinia/nuxt": "^0.11.0",
49
49
  "@tailwindcss/typography": "^0.5.0-alpha.3",
50
50
  "@tiptap/extension-image": "^3.0.7",