eco-vue-js 0.4.10 → 0.4.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
33
  createVNode(_sfc_main$1, {
34
34
  "is-open": isOpen.value,
35
35
  "max-height": 210,
36
- "max-width": 160,
36
+ "max-width": 320,
37
37
  "horizontal-align": unref(HorizontalAlign).LEFT_INNER,
38
38
  "update-align": false,
39
39
  teleport: ""
package/dist/main.js CHANGED
@@ -70,4 +70,4 @@ export { SemanticType } from './utils/SemanticType.js';
70
70
  export { HorizontalAlign } from './utils/HorizontalAlign.js';
71
71
  export { Month, WeekDay, addDay, addMonth, addYear, dateFormat, dateFormatter, dateRegexp, dateToQueryString, datetimeFormat, durationHumanize, getDurationRound, getStartOfDay, getStartOfMonth, getStartOfWeek, isSameDate, isSameMonth, isSameYear, monthShortFormatter, parseDate, timeFormat, weekdayShortFormatter } from './utils/dateTime.js';
72
72
  export { getIsMobile, getIsTouchDevice } from './utils/mobile.js';
73
- export { debounce, genId, getAllScrollParents, getScrollParent, hasParent, isClientSide, isEqualObj, numberCompactFormatter, numberFormatter, percentCompactFormatter, throttle } from './utils/utils.js';
73
+ export { debounce, genId, getAllScrollParents, getScrollParent, hasParent, isClientSide, isEqualArr, isEqualObj, numberCompactFormatter, numberFormatter, percentCompactFormatter, throttle } from './utils/utils.js';
@@ -4,6 +4,7 @@ export declare const hasParent: (parent: Element, current: Element) => boolean;
4
4
  type DebounceCb = (...args: any[]) => void;
5
5
  export declare function debounce<T extends DebounceCb>(cb: T, delay?: number): T;
6
6
  export declare function throttle<T extends DebounceCb>(cb: T, delay?: number): T;
7
+ export declare const isEqualArr: (arr1: unknown[], arr2: unknown[]) => boolean;
7
8
  export declare const isEqualObj: (obj1: Record<string, unknown>, obj2: Record<string, unknown>, exclude?: string[]) => boolean;
8
9
  export declare const percentCompactFormatter: Intl.NumberFormat;
9
10
  export declare const numberCompactFormatter: Intl.NumberFormat;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,eAAe,SAAU,OAAO,KAAG,OAAO,GAAG,IAKhD,CAAA;AAEV,eAAO,MAAM,mBAAmB,UAAW,OAAO,mBAAa,MAAM,OAAO,CAa3E,CAAA;AAED,eAAO,MAAM,SAAS,WAAY,OAAO,WAAW,OAAO,KAAG,OAI7D,CAAA;AAGD,KAAK,UAAU,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;AAE1C,wBAAgB,QAAQ,CAAC,CAAC,SAAS,UAAU,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,SAAM,GAAG,CAAC,CAWpE;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,UAAU,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,SAAM,GAAG,CAAC,CAYpE;AAED,eAAO,MAAM,UAAU,SAAU,OAAO,MAAM,EAAE,OAAO,CAAC,QAAQ,OAAO,MAAM,EAAE,OAAO,CAAC,YAAY,MAAM,EAAE,KAAG,OAE7G,CAAA;AAED,eAAO,MAAM,uBAAuB,mBAAmE,CAAA;AACvG,eAAO,MAAM,sBAAsB,mBAAiD,CAAA;AACpF,eAAO,MAAM,eAAe,mBAA0B,CAAA;AAEtD,eAAO,MAAM,YAAY,EAAE,OAAuC,CAAA;AAIlE,eAAO,MAAM,KAAK,cAEjB,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,eAAe,SAAU,OAAO,KAAG,OAAO,GAAG,IAKhD,CAAA;AAEV,eAAO,MAAM,mBAAmB,UAAW,OAAO,mBAAa,MAAM,OAAO,CAa3E,CAAA;AAED,eAAO,MAAM,SAAS,WAAY,OAAO,WAAW,OAAO,KAAG,OAI7D,CAAA;AAGD,KAAK,UAAU,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;AAE1C,wBAAgB,QAAQ,CAAC,CAAC,SAAS,UAAU,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,SAAM,GAAG,CAAC,CAWpE;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,UAAU,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,SAAM,GAAG,CAAC,CAYpE;AAED,eAAO,MAAM,UAAU,SAAU,OAAO,EAAE,QAAQ,OAAO,EAAE,KAAG,OAE7D,CAAA;AAED,eAAO,MAAM,UAAU,SAAU,OAAO,MAAM,EAAE,OAAO,CAAC,QAAQ,OAAO,MAAM,EAAE,OAAO,CAAC,YAAY,MAAM,EAAE,KAAG,OAS7G,CAAA;AAED,eAAO,MAAM,uBAAuB,mBAAmE,CAAA;AACvG,eAAO,MAAM,sBAAsB,mBAAiD,CAAA;AACpF,eAAO,MAAM,eAAe,mBAA0B,CAAA;AAEtD,eAAO,MAAM,YAAY,EAAE,OAAuC,CAAA;AAIlE,eAAO,MAAM,KAAK,cAEjB,CAAA"}
@@ -46,8 +46,17 @@ function throttle(cb, delay = 200) {
46
46
  }, delay);
47
47
  };
48
48
  }
49
+ const isEqualArr = (arr1, arr2) => {
50
+ return arr1.length === arr2.length && arr1.every((item) => arr2.includes(item));
51
+ };
49
52
  const isEqualObj = (obj1, obj2, exclude) => {
50
- return [...Object.keys(obj1), ...Object.keys(obj2)].every((key) => exclude?.includes(key) || obj1[key] === obj2[key]);
53
+ return Object.keys({ ...obj1, ...obj2 }).every((key) => {
54
+ if (exclude?.includes(key) || obj1[key] === obj2[key])
55
+ return true;
56
+ if (Array.isArray(obj1[key]) && Array.isArray(obj2[key]))
57
+ return isEqualArr(obj1[key], obj2[key]);
58
+ return false;
59
+ });
51
60
  };
52
61
  const percentCompactFormatter = Intl.NumberFormat("en", { notation: "compact", style: "percent" });
53
62
  const numberCompactFormatter = Intl.NumberFormat("en", { notation: "compact" });
@@ -58,4 +67,4 @@ const genId = () => {
58
67
  return iterator++;
59
68
  };
60
69
 
61
- export { debounce, genId, getAllScrollParents, getScrollParent, hasParent, isClientSide, isEqualObj, numberCompactFormatter, numberFormatter, percentCompactFormatter, throttle };
70
+ export { debounce, genId, getAllScrollParents, getScrollParent, hasParent, isClientSide, isEqualArr, isEqualObj, numberCompactFormatter, numberFormatter, percentCompactFormatter, throttle };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rsmple/eco-vue-js.git"
6
6
  },
7
- "version": "0.4.10",
7
+ "version": "0.4.12",
8
8
  "scripts": {
9
9
  "dev": "vite",
10
10
  "build": "run-p type-check build-only",