@finema/core 1.4.48 → 1.4.50

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": "1.4.48",
3
+ "version": "1.4.50",
4
4
  "configKey": "core",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.7.4"
package/dist/module.mjs CHANGED
@@ -2,7 +2,7 @@ import { defineNuxtModule, createResolver, installModule, addPlugin, addComponen
2
2
  import 'lodash-es';
3
3
 
4
4
  const name = "@finema/core";
5
- const version = "1.4.48";
5
+ const version = "1.4.50";
6
6
 
7
7
  const colors = {
8
8
  black: "#20243E",
@@ -2,7 +2,7 @@ export declare class StringHelper {
2
2
  static genString: (length?: number) => string;
3
3
  static withComma: (value?: number | string) => string;
4
4
  static split: (str: string | null | undefined, separator: string | RegExp) => string[];
5
- static joinURL: (value: any, value2: any) => string;
5
+ static joinURL: (...parts: string[]) => string;
6
6
  static truncate: (str: any, num?: number) => any;
7
7
  static getError: (errorData: {
8
8
  code: string;
@@ -15,8 +15,8 @@ export class StringHelper {
15
15
  static split = (str, separator) => {
16
16
  return `${str || ""}`.split(separator).filter((item) => item).map((item) => item.trim());
17
17
  };
18
- static joinURL = (value, value2) => {
19
- return urlJoin(value, value2);
18
+ static joinURL = (...parts) => {
19
+ return urlJoin(...parts);
20
20
  };
21
21
  static truncate = (str, num = 300) => {
22
22
  const newStr = str || "";
@@ -1,4 +1,4 @@
1
- import { addHours, format, formatISO, isDate, isValid, parse, subHours, addYears } from "date-fns";
1
+ import { addHours, addYears, format, formatISO, isDate, isValid, parse, subHours } from "date-fns";
2
2
  import { useCoreConfig } from "#core/composables/useConfig";
3
3
  const dateFormat = useCoreConfig().date_format;
4
4
  const dateTimeFormat = useCoreConfig().date_time_format;
@@ -13,58 +13,6 @@ export class TimeHelper {
13
13
  newDateStr = addYears(dateStr, 543);
14
14
  }
15
15
  if (isThaiMonth) {
16
- options.locale = {
17
- localize: {
18
- code: "th",
19
- month: (n) => {
20
- const monthValues = {
21
- narrow: [
22
- "\u0E21.\u0E04.",
23
- "\u0E01.\u0E1E.",
24
- "\u0E21\u0E35.\u0E04.",
25
- "\u0E40\u0E21.\u0E22.",
26
- "\u0E1E.\u0E04.",
27
- "\u0E21\u0E34.\u0E22.",
28
- "\u0E01.\u0E04.",
29
- "\u0E2A.\u0E04.",
30
- "\u0E01.\u0E22.",
31
- "\u0E15.\u0E04.",
32
- "\u0E1E.\u0E22.",
33
- "\u0E18.\u0E04."
34
- ],
35
- abbreviated: [
36
- "\u0E21.\u0E04.",
37
- "\u0E01.\u0E1E.",
38
- "\u0E21\u0E35.\u0E04.",
39
- "\u0E40\u0E21.\u0E22.",
40
- "\u0E1E.\u0E04.",
41
- "\u0E21\u0E34.\u0E22.",
42
- "\u0E01.\u0E04.",
43
- "\u0E2A.\u0E04.",
44
- "\u0E01.\u0E22.",
45
- "\u0E15.\u0E04.",
46
- "\u0E1E.\u0E22.",
47
- "\u0E18.\u0E04."
48
- ],
49
- wide: [
50
- "\u0E21\u0E01\u0E23\u0E32\u0E04\u0E21",
51
- "\u0E01\u0E38\u0E21\u0E20\u0E32\u0E1E\u0E31\u0E19\u0E18\u0E4C",
52
- "\u0E21\u0E35\u0E19\u0E32\u0E04\u0E21",
53
- "\u0E40\u0E21\u0E29\u0E32\u0E22\u0E19",
54
- "\u0E1E\u0E24\u0E29\u0E20\u0E32\u0E04\u0E21",
55
- "\u0E21\u0E34\u0E16\u0E38\u0E19\u0E32\u0E22\u0E19",
56
- "\u0E01\u0E23\u0E01\u0E0E\u0E32\u0E04\u0E21",
57
- "\u0E2A\u0E34\u0E07\u0E2B\u0E32\u0E04\u0E21",
58
- "\u0E01\u0E31\u0E19\u0E22\u0E32\u0E22\u0E19",
59
- "\u0E15\u0E38\u0E25\u0E32\u0E04\u0E21",
60
- "\u0E1E\u0E24\u0E28\u0E08\u0E34\u0E01\u0E32\u0E22\u0E19",
61
- "\u0E18\u0E31\u0E19\u0E27\u0E32\u0E04\u0E21"
62
- ]
63
- };
64
- return monthValues.abbreviated[n - 1];
65
- }
66
- }
67
- };
68
16
  }
69
17
  return format(newDateStr, formatStr, options);
70
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.4.48",
3
+ "version": "1.4.50",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",