@sheinx/hooks 3.3.4 → 3.3.6-beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,7 +36,7 @@ declare function setTime(date: Date, old: Date, options?: DateOptions): Date;
36
36
  declare function cloneTime(date: Date, old: DateTimeType, fmt?: string, options?: DateOptions): Date;
37
37
  declare function formatDateWithDefaultTime(date: Date, value: Date | undefined, defaultTime: Date | undefined, fmt: string, options: DateOptions): string | Date;
38
38
  declare function clearHMS(date: Date, options: DateOptions): Date;
39
- declare function compareDateArray(arr1: Date[], arr2: Date[], type: string | undefined, options: DateOptions): boolean;
39
+ declare function compareDateArray(arr1: Date[], arr2: Date[], type: string | undefined, options: DateOptions, fmt?: string): boolean;
40
40
  declare function resetTimeByFormat(value: Date | undefined, fo: string, options: DateOptions): Date | null;
41
41
  declare function formatted(date: Date, fmt: string | ((date: Date, offsetDate: Date) => string), options: DateOptions): string;
42
42
  declare function getStartYear(date: Date, options: DateOptions): number;
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["util.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAC9D,MAAM,MAAM,IAAI,GACZ,MAAM,GACN,OAAO,GACP,SAAS,GACT,MAAM,GACN,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,MAAM,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;AAKjD,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAqBD,eAAO,MAAM,aAAa,SAAU,MAAM,uBAmBzC,CAAC;AAOF,iBAAS,iBAAiB,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,GAAE,WAAgB,EAAE,IAAI,UAAQ,QAa3E;AAED,iBAAS,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,MAA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CAAC,EACxD,OAAO,EAAE,WAAW,UAKrB;AAED,iBAAS,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,UAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBD,wBAsCE"}
@@ -327,11 +327,12 @@ function clearHMS(date, options) {
327
327
  function compareDateArray(arr1, arr2) {
328
328
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'date';
329
329
  var options = arguments.length > 3 ? arguments[3] : undefined;
330
+ var fmt = arguments.length > 4 ? arguments[4] : undefined;
330
331
  if (!arr1 || !arr2 || arr1.length !== arr2.length) return false;
331
332
  return arr1.every(function (v, i) {
332
333
  if (!v || !arr2[i]) return false;
333
334
  if (type === 'week') return format(v, 'gggg ww', options) === format(arr2[i], 'gggg ww', options);
334
- return v.getTime() === arr2[i].getTime();
335
+ return toDateWithFormat(v, fmt).getTime() === toDateWithFormat(arr2[i], fmt).getTime();
335
336
  });
336
337
  }
337
338
  function getFormat(fo) {
package/cjs/utils/is.d.ts CHANGED
@@ -21,6 +21,7 @@ export declare const isPromise: (p: unknown) => unknown;
21
21
  export declare const isNan: (a: unknown) => boolean;
22
22
  export declare const isEmpty: (val: unknown) => boolean;
23
23
  export declare const isLink: (el: unknown) => el is React.ReactElement<any, string | React.JSXElementConstructor<any>>;
24
+ export declare function isNamedComponent(type: any): type is React.ForwardRefExoticComponent<unknown>;
24
25
  export declare const isMacOS: () => boolean;
25
26
  export declare const isFirefox: () => boolean;
26
27
  export declare const isChromeLowerThan: (version: number) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"is.d.ts","sourceRoot":"","sources":["is.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,SAAS,YAExB;AASD,eAAO,MAA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AI,KAAK,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAE5F;AAED,eAAO,MAAM,OAAO,QAAO,OACqC,CAAC;AAEjE,eAAO,MAAM,SAAS,QAAO,OAG5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,YAAa,MAAM,KAAG,OASnD,CAAC;AAEF,wBAAgB,YAAY,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,WAAW,CAQjE"}
package/cjs/utils/is.js CHANGED
@@ -7,7 +7,9 @@ exports.isBoolean = exports.isArray = void 0;
7
7
  exports.isBrowser = isBrowser;
8
8
  exports.isDate = exports.isChromeLowerThan = exports.isBuffer = void 0;
9
9
  exports.isDomElement = isDomElement;
10
- exports.isUndefined = exports.isUnMatchedData = exports.isString = exports.isSet = exports.isRegexp = exports.isPromise = exports.isObject = exports.isNumber = exports.isNan = exports.isMergeable = exports.isMap = exports.isMacOS = exports.isLink = exports.isFunc = exports.isFirefox = exports.isError = exports.isEmpty = void 0;
10
+ exports.isMergeable = exports.isMap = exports.isMacOS = exports.isLink = exports.isFunc = exports.isFirefox = exports.isError = exports.isEmpty = void 0;
11
+ exports.isNamedComponent = isNamedComponent;
12
+ exports.isUndefined = exports.isUnMatchedData = exports.isString = exports.isSet = exports.isRegexp = exports.isPromise = exports.isObject = exports.isNumber = exports.isNan = void 0;
11
13
  var _react = _interopRequireDefault(require("react"));
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
@@ -96,6 +98,9 @@ var isLink = exports.isLink = function isLink(el) {
96
98
  }
97
99
  return false;
98
100
  };
101
+ function isNamedComponent(type) {
102
+ return (isObject(type) || isFunc(type)) && type.hasOwnProperty('displayName');
103
+ }
99
104
  var isMacOS = exports.isMacOS = function isMacOS() {
100
105
  return isBrowser() && /macintosh|mac os x/i.test(navigator.userAgent);
101
106
  };
@@ -36,7 +36,7 @@ declare function setTime(date: Date, old: Date, options?: DateOptions): Date;
36
36
  declare function cloneTime(date: Date, old: DateTimeType, fmt?: string, options?: DateOptions): Date;
37
37
  declare function formatDateWithDefaultTime(date: Date, value: Date | undefined, defaultTime: Date | undefined, fmt: string, options: DateOptions): string | Date;
38
38
  declare function clearHMS(date: Date, options: DateOptions): Date;
39
- declare function compareDateArray(arr1: Date[], arr2: Date[], type: string | undefined, options: DateOptions): boolean;
39
+ declare function compareDateArray(arr1: Date[], arr2: Date[], type: string | undefined, options: DateOptions, fmt?: string): boolean;
40
40
  declare function resetTimeByFormat(value: Date | undefined, fo: string, options: DateOptions): Date | null;
41
41
  declare function formatted(date: Date, fmt: string | ((date: Date, offsetDate: Date) => string), options: DateOptions): string;
42
42
  declare function getStartYear(date: Date, options: DateOptions): number;
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["util.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAC9D,MAAM,MAAM,IAAI,GACZ,MAAM,GACN,OAAO,GACP,SAAS,GACT,MAAM,GACN,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,MAAM,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;AAKjD,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAqBD,eAAO,MAAM,aAAa,SAAU,MAAM,uBAmBzC,CAAC;AAOF,iBAAS,iBAAiB,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,GAAE,WAAgB,EAAE,IAAI,UAAQ,QAa3E;AAED,iBAAS,OAAO,CAAC,IAAI,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AE,IAAI,KAAK,MAAM,CAAC,EACxD,OAAO,EAAE,WAAW,UAKrB;AAED,iBAAS,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,UAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBD,wBAsCE"}
@@ -321,11 +321,12 @@ function clearHMS(date, options) {
321
321
  function compareDateArray(arr1, arr2) {
322
322
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'date';
323
323
  var options = arguments.length > 3 ? arguments[3] : undefined;
324
+ var fmt = arguments.length > 4 ? arguments[4] : undefined;
324
325
  if (!arr1 || !arr2 || arr1.length !== arr2.length) return false;
325
326
  return arr1.every(function (v, i) {
326
327
  if (!v || !arr2[i]) return false;
327
328
  if (type === 'week') return format(v, 'gggg ww', options) === format(arr2[i], 'gggg ww', options);
328
- return v.getTime() === arr2[i].getTime();
329
+ return toDateWithFormat(v, fmt).getTime() === toDateWithFormat(arr2[i], fmt).getTime();
329
330
  });
330
331
  }
331
332
  function getFormat(fo) {
package/esm/utils/is.d.ts CHANGED
@@ -21,6 +21,7 @@ export declare const isPromise: (p: unknown) => unknown;
21
21
  export declare const isNan: (a: unknown) => boolean;
22
22
  export declare const isEmpty: (val: unknown) => boolean;
23
23
  export declare const isLink: (el: unknown) => el is React.ReactElement<any, string | React.JSXElementConstructor<any>>;
24
+ export declare function isNamedComponent(type: any): type is React.ForwardRefExoticComponent<unknown>;
24
25
  export declare const isMacOS: () => boolean;
25
26
  export declare const isFirefox: () => boolean;
26
27
  export declare const isChromeLowerThan: (version: number) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"is.d.ts","sourceRoot":"","sources":["is.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,SAAS,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GAAG,GAAG,IAAI,IAAI,KAAK,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAE5F;AAED,eAAO,MAAM,OAAO,QAAO,OACqC,CAAC;AAEjE,eAAO,MAAM,SAAS,QAAO,OAG5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,YAAa,MAAM,KAAG,OASnD,CAAC;AAEF,wBAAgB,YAAY,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,WAAW,CAQjE"}
package/esm/utils/is.js CHANGED
@@ -85,6 +85,9 @@ export var isLink = function isLink(el) {
85
85
  }
86
86
  return false;
87
87
  };
88
+ export function isNamedComponent(type) {
89
+ return (isObject(type) || isFunc(type)) && type.hasOwnProperty('displayName');
90
+ }
88
91
  export var isMacOS = function isMacOS() {
89
92
  return isBrowser() && /macintosh|mac os x/i.test(navigator.userAgent);
90
93
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/hooks",
3
- "version": "3.3.4",
3
+ "version": "3.3.6-beta.1",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",