@fctc/widget-logic 2.7.1 → 2.7.2
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/hooks.d.mts +3 -4
- package/dist/hooks.d.ts +3 -4
- package/dist/hooks.js +113 -117
- package/dist/hooks.mjs +108 -112
- package/dist/index.js +150 -154
- package/dist/index.mjs +112 -116
- package/dist/widget.js +52 -52
- package/dist/widget.mjs +16 -16
- package/package.json +1 -1
package/dist/widget.mjs
CHANGED
|
@@ -59,7 +59,7 @@ var require_moment = __commonJS({
|
|
|
59
59
|
function hasOwnProp(a, b) {
|
|
60
60
|
return Object.prototype.hasOwnProperty.call(a, b);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function isObjectEmpty5(obj) {
|
|
63
63
|
if (Object.getOwnPropertyNames) {
|
|
64
64
|
return Object.getOwnPropertyNames(obj).length === 0;
|
|
65
65
|
} else {
|
|
@@ -2198,7 +2198,7 @@ var require_moment = __commonJS({
|
|
|
2198
2198
|
strict = locale2;
|
|
2199
2199
|
locale2 = void 0;
|
|
2200
2200
|
}
|
|
2201
|
-
if (isObject(input) &&
|
|
2201
|
+
if (isObject(input) && isObjectEmpty5(input) || isArray(input) && input.length === 0) {
|
|
2202
2202
|
input = void 0;
|
|
2203
2203
|
}
|
|
2204
2204
|
c._isAMomentObject = true;
|
|
@@ -2617,7 +2617,7 @@ var require_moment = __commonJS({
|
|
|
2617
2617
|
return isMoment(input) || isDate(input) || isString(input) || isNumber(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === void 0;
|
|
2618
2618
|
}
|
|
2619
2619
|
function isMomentInputObject(input) {
|
|
2620
|
-
var objectTest = isObject(input) && !
|
|
2620
|
+
var objectTest = isObject(input) && !isObjectEmpty5(input), propertyTest = false, properties = [
|
|
2621
2621
|
"years",
|
|
2622
2622
|
"year",
|
|
2623
2623
|
"y",
|
|
@@ -2659,7 +2659,7 @@ var require_moment = __commonJS({
|
|
|
2659
2659
|
return arrayTest && dataTypeTest;
|
|
2660
2660
|
}
|
|
2661
2661
|
function isCalendarSpec(input) {
|
|
2662
|
-
var objectTest = isObject(input) && !
|
|
2662
|
+
var objectTest = isObject(input) && !isObjectEmpty5(input), propertyTest = false, properties = [
|
|
2663
2663
|
"sameDay",
|
|
2664
2664
|
"nextDay",
|
|
2665
2665
|
"lastDay",
|
|
@@ -4180,15 +4180,6 @@ var provider_exports = {};
|
|
|
4180
4180
|
__reExport(provider_exports, provider_star);
|
|
4181
4181
|
import * as provider_star from "@fctc/interface-logic/provider";
|
|
4182
4182
|
|
|
4183
|
-
// src/hooks/core/use-detail.ts
|
|
4184
|
-
import { useQuery } from "@tanstack/react-query";
|
|
4185
|
-
import { useEffect as useEffect2 } from "react";
|
|
4186
|
-
|
|
4187
|
-
// src/hooks/core/use-profile.ts
|
|
4188
|
-
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
4189
|
-
import { useEffect as useEffect4, useMemo as useMemo2 } from "react";
|
|
4190
|
-
import { useTranslation } from "react-i18next";
|
|
4191
|
-
|
|
4192
4183
|
// src/utils.ts
|
|
4193
4184
|
var utils_exports = {};
|
|
4194
4185
|
__export(utils_exports, {
|
|
@@ -4210,7 +4201,7 @@ var languages = [
|
|
|
4210
4201
|
];
|
|
4211
4202
|
|
|
4212
4203
|
// src/utils/function.ts
|
|
4213
|
-
import { useCallback as useCallback2, useEffect as
|
|
4204
|
+
import { useCallback as useCallback2, useEffect as useEffect2, useReducer } from "react";
|
|
4214
4205
|
var countSum = (data, field) => {
|
|
4215
4206
|
if (!data || !field) return 0;
|
|
4216
4207
|
return data.reduce(
|
|
@@ -4349,7 +4340,7 @@ async function setStorageItemAsync(key, value) {
|
|
|
4349
4340
|
}
|
|
4350
4341
|
function useStorageState(key) {
|
|
4351
4342
|
const [state, setState] = useAsyncState();
|
|
4352
|
-
|
|
4343
|
+
useEffect2(() => {
|
|
4353
4344
|
try {
|
|
4354
4345
|
const storedValue = localStorage.getItem(key);
|
|
4355
4346
|
setState(storedValue);
|
|
@@ -4371,6 +4362,15 @@ function useStorageState(key) {
|
|
|
4371
4362
|
__reExport(utils_exports, utils_star);
|
|
4372
4363
|
import * as utils_star from "@fctc/interface-logic/utils";
|
|
4373
4364
|
|
|
4365
|
+
// src/hooks/core/use-detail.ts
|
|
4366
|
+
import { useQuery } from "@tanstack/react-query";
|
|
4367
|
+
import { useEffect as useEffect3 } from "react";
|
|
4368
|
+
|
|
4369
|
+
// src/hooks/core/use-profile.ts
|
|
4370
|
+
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
4371
|
+
import { useEffect as useEffect4, useMemo as useMemo2 } from "react";
|
|
4372
|
+
import { useTranslation } from "react-i18next";
|
|
4373
|
+
|
|
4374
4374
|
// src/hooks/core/use-view-v2.ts
|
|
4375
4375
|
import { useMemo as useMemo3 } from "react";
|
|
4376
4376
|
|
|
@@ -4400,7 +4400,7 @@ import { useMemo as useMemo7, useState as useState6 } from "react";
|
|
|
4400
4400
|
import {
|
|
4401
4401
|
evalJSONDomain,
|
|
4402
4402
|
formatSortingString,
|
|
4403
|
-
isObjectEmpty as
|
|
4403
|
+
isObjectEmpty as isObjectEmpty4
|
|
4404
4404
|
} from "@fctc/interface-logic/utils";
|
|
4405
4405
|
|
|
4406
4406
|
// src/hooks/utils/use-click-outside.ts
|