@finema/core 1.4.57 → 1.4.59

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.57",
3
+ "version": "1.4.59",
4
4
  "configKey": "core",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.7.4"
package/dist/module.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineNuxtModule, createResolver, installModule, addPlugin, addComponentsDir, addImportsDir } from '@nuxt/kit';
2
2
 
3
3
  const name = "@finema/core";
4
- const version = "1.4.57";
4
+ const version = "1.4.59";
5
5
 
6
6
  const colors = {
7
7
  black: "#20243E",
@@ -1,6 +1,6 @@
1
1
  import { ParamHelper } from "./ParamHelper.mjs";
2
2
  import { _get } from "#build/imports";
3
- import { _isEmpty } from "~/test/fixtures/basic/.nuxt/pctjej/imports";
3
+ import { _isEmpty } from "./lodash.mjs";
4
4
  export class ObjectHelper {
5
5
  static createOption(value, label = "") {
6
6
  return {
@@ -1,4 +1,5 @@
1
1
  import { addHours, addYears, format, formatISO, isDate, isValid, parse, subHours } from "date-fns";
2
+ import * as locales from "date-fns/locale";
2
3
  import { useCoreConfig } from "#core/composables/useConfig";
3
4
  const dateFormat = useCoreConfig().date_format;
4
5
  const dateTimeFormat = useCoreConfig().date_time_format;
@@ -13,6 +14,7 @@ export class TimeHelper {
13
14
  newDateStr = addYears(dateStr, 543);
14
15
  }
15
16
  if (isThaiMonth) {
17
+ options.locale = locales.th;
16
18
  }
17
19
  return format(newDateStr, formatStr, options);
18
20
  };
@@ -1 +1,2 @@
1
1
  export declare const _deepMerge: (target: any, ...sources: any[]) => any;
2
+ export declare const _isEmpty: (value: any) => boolean;
@@ -16,3 +16,15 @@ export const _deepMerge = (target, ...sources) => {
16
16
  }
17
17
  return _deepMerge(target, ...sources);
18
18
  };
19
+ export const _isEmpty = (value) => {
20
+ if (value === null || value === void 0) {
21
+ return true;
22
+ } else if (Array.isArray(value) || typeof value === "string") {
23
+ return value.length === 0;
24
+ } else if (typeof value === "object") {
25
+ return Object.keys(value).length === 0;
26
+ } else if (typeof value.size === "number") {
27
+ return value.size === 0;
28
+ }
29
+ return false;
30
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.4.57",
3
+ "version": "1.4.59",
4
4
  "repository": "https://gitlab.finema.co/finema/ui-kit",
5
5
  "license": "MIT",
6
6
  "author": "Finema Dev Core Team",