@owp/core 2.5.20 → 2.5.22
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/dayjs.d.ts +4 -0
- package/dayjs.js +2 -0
- package/dist/_virtual/isBetween.js +8 -0
- package/dist/_virtual/isBetween.js.map +1 -0
- package/dist/_virtual/isBetween2.js +5 -0
- package/dist/_virtual/isBetween2.js.map +1 -0
- package/dist/components/OwpCommonCode/OwpCommonCodeQuerySelector.js +26 -26
- package/dist/components/OwpCommonCode/OwpCommonCodeQuerySelector.js.map +1 -1
- package/dist/components/OwpCommonCode/OwpCommonCodeSelector.js +29 -29
- package/dist/components/OwpCommonCode/OwpCommonCodeSelector.js.map +1 -1
- package/dist/components/OwpMrtTable/OwpMrtTable.js +144 -141
- package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
- package/dist/components/OwpOptionSelector/OwpOptionSelector.js +20 -20
- package/dist/components/OwpOptionSelector/OwpOptionSelector.js.map +1 -1
- package/dist/components/OwpPageContent/OwpPageContent.js +20 -19
- package/dist/components/OwpPageContent/OwpPageContent.js.map +1 -1
- package/dist/components/OwpPicker/OwpDatePicker.js +216 -235
- package/dist/components/OwpPicker/OwpDatePicker.js.map +1 -1
- package/dist/components/OwpPicker/OwpDateRangePicker.js +21 -21
- package/dist/components/OwpPicker/OwpDateRangePicker.js.map +1 -1
- package/dist/components/OwpPicker/OwpTimePicker.js +310 -340
- package/dist/components/OwpPicker/OwpTimePicker.js.map +1 -1
- package/dist/components/OwpPicker/OwpWeekDatePicker.js +28 -29
- package/dist/components/OwpPicker/OwpWeekDatePicker.js.map +1 -1
- package/dist/components/OwpPicker/OwpYearRangePicker.js +1 -1
- package/dist/components/OwpPicker/OwpYearRangePicker.js.map +1 -1
- package/dist/components/OwpPicker/constants/index.js +21 -6
- package/dist/components/OwpPicker/constants/index.js.map +1 -1
- package/dist/components/OwpPicker/internal/DatePickerInput.js +5 -5
- package/dist/components/OwpPicker/internal/DatePickerInput.js.map +1 -1
- package/dist/components/OwpPicker/utils/index.js +22 -0
- package/dist/components/OwpPicker/utils/index.js.map +1 -0
- package/dist/components/OwpQuerySelector/OwpQuerySelector.js +218 -205
- package/dist/components/OwpQuerySelector/OwpQuerySelector.js.map +1 -1
- package/dist/components/OwpSection/OwpSection.js +118 -111
- package/dist/components/OwpSection/OwpSection.js.map +1 -1
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +59 -59
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
- package/dist/components/OwpSelectorBase/OwpSelectorSelect.js +88 -85
- package/dist/components/OwpSelectorBase/OwpSelectorSelect.js.map +1 -1
- package/dist/components/OwpSelectorBase/hooks/useOwpSelectorBase.js +93 -93
- package/dist/components/OwpSelectorBase/hooks/useOwpSelectorBase.js.map +1 -1
- package/dist/components/OwpTable/OwpDataTable.js +329 -317
- package/dist/components/OwpTable/OwpDataTable.js.map +1 -1
- package/dist/components/OwpTable/OwpFieldTable.js +77 -74
- package/dist/components/OwpTable/OwpFieldTable.js.map +1 -1
- package/dist/components/OwpTable/OwpTable.js +66 -219
- package/dist/components/OwpTable/OwpTable.js.map +1 -1
- package/dist/components/OwpTable/internal/OwpTableBase.js +195 -0
- package/dist/components/OwpTable/internal/OwpTableBase.js.map +1 -0
- package/dist/components/OwpTable/internal/OwpTableTotalCount.js +23 -0
- package/dist/components/OwpTable/internal/OwpTableTotalCount.js.map +1 -0
- package/dist/components/OwpTable/internal/defaultTableStyle.js +10 -10
- package/dist/components/OwpTable/internal/defaultTableStyle.js.map +1 -1
- package/dist/components/OwpTable/utils/tableSx.js +9 -0
- package/dist/components/OwpTable/utils/tableSx.js.map +1 -0
- package/dist/components/OwpTextField/OwpTextMaskField.js +95 -86
- package/dist/components/OwpTextField/OwpTextMaskField.js.map +1 -1
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +1 -1
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js +164 -179
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridDatePickerEditor.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +10 -10
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
- package/dist/components/OwpYesNoSelector/OwpYesNoSelector.js.map +1 -1
- package/dist/dayjs.js +18 -0
- package/dist/dayjs.js.map +1 -0
- package/dist/features/themePreview/components/ThemePreviewCanvas.js +22 -22
- package/dist/features/themePreview/components/ThemePreviewCanvas.js.map +1 -1
- package/dist/features/themePreview/configs/table.js +4 -4
- package/dist/features/themePreview/configs/table.js.map +1 -1
- package/dist/features/themePreview/hooks/useThemePreview.js +16 -16
- package/dist/features/themePreview/hooks/useThemePreview.js.map +1 -1
- package/dist/hooks/{useInitCommonCodes.js → internal/useInitCommonCodes.js} +6 -6
- package/dist/hooks/internal/useInitCommonCodes.js.map +1 -0
- package/dist/hooks/internal/useMinimumVisibleState.js +31 -0
- package/dist/hooks/internal/useMinimumVisibleState.js.map +1 -0
- package/dist/hooks/useInitApp.js +17 -14
- package/dist/hooks/useInitApp.js.map +1 -1
- package/dist/hooks.js +49 -51
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +91 -94
- package/dist/node_modules/.pnpm/dayjs@1.11.18/node_modules/dayjs/plugin/isBetween.js +23 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.18/node_modules/dayjs/plugin/isBetween.js.map +1 -0
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
- package/dist/types/components/OwpCommonCode/OwpCommonCodeQuerySelector.d.ts +3 -3
- package/dist/types/components/OwpCommonCode/OwpCommonCodeSelector.d.ts +3 -3
- package/dist/types/components/OwpMrtTable/OwpMrtTable.d.ts +1 -0
- package/dist/types/components/OwpOptionSelector/OwpOptionSelector.d.ts +2 -2
- package/dist/types/components/OwpPicker/OwpDatePicker.d.ts +1 -1
- package/dist/types/components/OwpPicker/OwpTimePicker.d.ts +2 -2
- package/dist/types/components/OwpPicker/constants/index.d.ts +15 -0
- package/dist/types/components/OwpPicker/utils/index.d.ts +6 -0
- package/dist/types/components/OwpQuerySelector/OwpQuerySelector.d.ts +1 -1
- package/dist/types/components/OwpQuerySelector/types/types.d.ts +1 -0
- package/dist/types/components/OwpSection/OwpSection.d.ts +9 -3
- package/dist/types/components/OwpSelectorBase/hooks/useOwpSelectorBase.d.ts +1 -1
- package/dist/types/components/OwpSelectorBase/types/types.d.ts +1 -1
- package/dist/types/components/OwpTable/OwpDataTable.d.ts +5 -1
- package/dist/types/components/OwpTable/OwpFieldTable.d.ts +7 -1
- package/dist/types/components/OwpTable/OwpTable.d.ts +6 -38
- package/dist/types/components/OwpTable/internal/OwpTableBase.d.ts +34 -0
- package/dist/types/components/OwpTable/internal/OwpTableTotalCount.d.ts +9 -0
- package/dist/types/components/OwpTable/internal/defaultTableStyle.d.ts +4 -2
- package/dist/types/components/OwpTable/utils/tableSx.d.ts +11 -0
- package/dist/types/components/OwpTextField/OwpTextMaskField.d.ts +3 -3
- package/dist/types/components/OwpYesNoSelector/OwpYesNoSelector.d.ts +1 -1
- package/dist/types/dayjs.d.ts +18 -0
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/hooks/internal/useMinimumVisibleState.d.ts +7 -0
- package/dist/types/utils/dayjsBrowser.d.ts +1 -7
- package/dist/types/utils/formatDateToYmd.d.ts +1 -1
- package/dist/utils/formatDateToYmd.js +3 -3
- package/dist/utils/formatDateToYmd.js.map +1 -1
- package/dist/utils/treeGridExportExcelUtil.js +1 -1
- package/dist/utils/treeGridExportExcelUtil.js.map +1 -1
- package/dist/utils/zipUtil.js +3 -3
- package/dist/utils/zipUtil.js.map +1 -1
- package/package.json +3 -1
- package/dist/hooks/useInitCommonCodes.js.map +0 -1
- package/dist/utils/dayjsBrowser.js +0 -16
- package/dist/utils/dayjsBrowser.js.map +0 -1
- /package/dist/types/hooks/{useInitCommonCodes.d.ts → internal/useInitCommonCodes.d.ts} +0 -0
|
@@ -1,273 +1,286 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { OwpSelectorBase as
|
|
5
|
-
import { splitSelectorValue as
|
|
6
|
-
import { STORAGE_ACCESS_TOKEN_KEY as
|
|
7
|
-
import { useOwpAppContext as
|
|
8
|
-
import { useGetCurrentUser as
|
|
9
|
-
import { createJsonString as
|
|
10
|
-
import { getApiLanguageCode as
|
|
11
|
-
import { useQuery as
|
|
12
|
-
import { clsx as
|
|
13
|
-
import { useState as
|
|
14
|
-
import { isArray as
|
|
15
|
-
import { isPlainObject as
|
|
16
|
-
import { isFunction as
|
|
17
|
-
const
|
|
18
|
-
jsondata:
|
|
19
|
-
}), "defaultBuildRequestQuery"),
|
|
1
|
+
var Ct = Object.defineProperty;
|
|
2
|
+
var c = (t, o) => Ct(t, "name", { value: o, configurable: !0 });
|
|
3
|
+
import { jsx as Ot } from "../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
|
+
import { OwpSelectorBase as Bt } from "../OwpSelectorBase/OwpSelectorBase.js";
|
|
5
|
+
import { splitSelectorValue as y, mergeSelectorOptions as It } from "../OwpSelectorBase/utils/querySelectorUtils.js";
|
|
6
|
+
import { STORAGE_ACCESS_TOKEN_KEY as Nt } from "../../constants/localStorageKeys.js";
|
|
7
|
+
import { useOwpAppContext as jt } from "../../contexts/OwpAppProvider.js";
|
|
8
|
+
import { useGetCurrentUser as $t } from "../../hooks/useCurrentUser.js";
|
|
9
|
+
import { createJsonString as Tt } from "../../utils/createJsonString.js";
|
|
10
|
+
import { getApiLanguageCode as Mt } from "../../utils/language.js";
|
|
11
|
+
import { useQuery as Y } from "@tanstack/react-query";
|
|
12
|
+
import { clsx as ct } from "../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
13
|
+
import { useState as V, useMemo as N, useEffect as j } from "react";
|
|
14
|
+
import { isArray as at } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isArray.js";
|
|
15
|
+
import { isPlainObject as Vt } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js";
|
|
16
|
+
import { isFunction as it } from "../../node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isFunction.js";
|
|
17
|
+
const _t = "resultData", v = /* @__PURE__ */ c((t) => typeof t == "string" || typeof t == "number" ? `${t}` : "", "getQuerySelectorOptionLabelText"), Rt = /* @__PURE__ */ c((t) => ({
|
|
18
|
+
jsondata: Tt(t)
|
|
19
|
+
}), "defaultBuildRequestQuery"), ut = /* @__PURE__ */ c((t, o) => o != null && o.length ? [...t, o] : t, "appendQuerySelectorQueryKeyDeps"), H = /* @__PURE__ */ c((t) => {
|
|
20
20
|
if (t instanceof Date)
|
|
21
21
|
return t.toJSON();
|
|
22
22
|
if (typeof t == "bigint")
|
|
23
23
|
return t.toString();
|
|
24
|
-
if (
|
|
25
|
-
return t.map((
|
|
26
|
-
if (
|
|
27
|
-
return Object.keys(t).sort().reduce((
|
|
28
|
-
const
|
|
29
|
-
return
|
|
24
|
+
if (at(t))
|
|
25
|
+
return t.map((o) => H(o));
|
|
26
|
+
if (Vt(t))
|
|
27
|
+
return Object.keys(t).sort().reduce((o, a) => {
|
|
28
|
+
const m = H(t[a]);
|
|
29
|
+
return m === void 0 || (o[a] = m), o;
|
|
30
30
|
}, {});
|
|
31
|
-
if (!(
|
|
31
|
+
if (!(it(t) || typeof t == "symbol"))
|
|
32
32
|
return t;
|
|
33
|
-
}, "normalizeQuerySelectorKeyValue"),
|
|
34
|
-
const
|
|
35
|
-
return Object.entries(
|
|
36
|
-
|
|
37
|
-
}),
|
|
38
|
-
}, "createQuerySelectorRequestUrl"),
|
|
33
|
+
}, "normalizeQuerySelectorKeyValue"), Jt = /* @__PURE__ */ c((t) => JSON.stringify(H(t)), "createQuerySelectorScopeKey"), zt = /* @__PURE__ */ c((t, o, a, m) => {
|
|
34
|
+
const Q = new URL(t.endsWith("/") ? t : `${t}/`), n = new URL(o.startsWith("/") ? o.slice(1) : o, Q);
|
|
35
|
+
return Object.entries(a).forEach(([d, l]) => {
|
|
36
|
+
l != null && n.searchParams.set(d, typeof l == "string" ? l : JSON.stringify(l));
|
|
37
|
+
}), m && n.searchParams.set("TOKEN", m), n.searchParams.set("i18nextLng", Mt()), n.toString();
|
|
38
|
+
}, "createQuerySelectorRequestUrl"), kt = /* @__PURE__ */ c((t, o) => {
|
|
39
39
|
if (!t || typeof t != "object")
|
|
40
40
|
return [];
|
|
41
|
-
const
|
|
42
|
-
return
|
|
43
|
-
}, "getQuerySelectorResponseList"),
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
label:
|
|
47
|
-
raw:
|
|
48
|
-
value:
|
|
41
|
+
const a = t[o];
|
|
42
|
+
return at(a) ? a : [];
|
|
43
|
+
}, "getQuerySelectorResponseList"), Gt = /* @__PURE__ */ c((t, o, a) => `${(a ? a(t) : `${(t == null ? void 0 : t[o ?? ""]) ?? ""}`) ?? ""}`.trim(), "resolveQuerySelectorValue"), Wt = /* @__PURE__ */ c((t, o, a) => `${(a ? a(t) : `${(t == null ? void 0 : t[o ?? ""]) ?? ""}`) ?? ""}`.trim(), "resolveQuerySelectorLabel"), Yt = /* @__PURE__ */ c((t, o, a, m, Q) => t.map((n) => {
|
|
44
|
+
const d = Gt(n, o, m);
|
|
45
|
+
return d ? {
|
|
46
|
+
label: Wt(n, a, Q),
|
|
47
|
+
raw: n,
|
|
48
|
+
value: d
|
|
49
49
|
} : null;
|
|
50
|
-
}).filter((
|
|
50
|
+
}).filter((n) => n != null), "mapQuerySelectorOptions"), tn = /* @__PURE__ */ c(({
|
|
51
51
|
apiUrl: t,
|
|
52
|
-
asyncSearch:
|
|
53
|
-
buildRequestQuery:
|
|
54
|
-
className:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
multiple:
|
|
58
|
-
query:
|
|
59
|
-
queryKeyDeps:
|
|
60
|
-
responseListKey:
|
|
61
|
-
selectorType:
|
|
62
|
-
value:
|
|
63
|
-
valueKey:
|
|
64
|
-
valueResolver:
|
|
65
|
-
labelKey:
|
|
66
|
-
labelResolver:
|
|
67
|
-
onChange:
|
|
68
|
-
defaultValue:
|
|
69
|
-
|
|
70
|
-
|
|
52
|
+
asyncSearch: o,
|
|
53
|
+
buildRequestQuery: a = Rt,
|
|
54
|
+
className: m,
|
|
55
|
+
filterOptions: Q,
|
|
56
|
+
forceEmptyOptions: n = !1,
|
|
57
|
+
multiple: d,
|
|
58
|
+
query: l,
|
|
59
|
+
queryKeyDeps: _,
|
|
60
|
+
responseListKey: L = _t,
|
|
61
|
+
selectorType: R = "select",
|
|
62
|
+
value: w,
|
|
63
|
+
valueKey: C,
|
|
64
|
+
valueResolver: lt,
|
|
65
|
+
labelKey: O,
|
|
66
|
+
labelResolver: dt,
|
|
67
|
+
onChange: U,
|
|
68
|
+
defaultValue: J,
|
|
69
|
+
showAllOption: ft = !0,
|
|
70
|
+
textFieldProps: f,
|
|
71
|
+
...gt
|
|
71
72
|
}) => {
|
|
72
|
-
const { env:
|
|
73
|
-
|
|
74
|
-
[t,
|
|
75
|
-
|
|
73
|
+
const { env: X } = jt(), Z = $t(), $ = `${(X == null ? void 0 : X.apiBaseUrl) ?? ""}`.trim(), mt = `${(Z == null ? void 0 : Z.token) ?? localStorage.getItem(Nt) ?? ""}`.trim(), r = R === "autocomplete" ? o : void 0, u = r != null, tt = n || u ? !1 : ft, St = (r == null ? void 0 : r.minLength) ?? 1, nt = (r == null ? void 0 : r.debounceMs) ?? 300, [A, K] = V(w ?? J ?? ""), [bt, S] = V(""), [et, T] = V(""), [D, M] = V(""), ot = _ != null && _.length ? H(_) : void 0, h = Jt(
|
|
74
|
+
ut(
|
|
75
|
+
[t, l, L, C, O],
|
|
76
|
+
ot
|
|
76
77
|
)
|
|
77
|
-
), [
|
|
78
|
+
), [z, wt] = V(() => ({
|
|
78
79
|
options: {},
|
|
79
|
-
scopeKey:
|
|
80
|
+
scopeKey: h
|
|
80
81
|
})), rt = N(
|
|
81
|
-
() =>
|
|
82
|
-
[
|
|
83
|
-
),
|
|
82
|
+
() => z.scopeKey === h ? z.options : {},
|
|
83
|
+
[z.options, z.scopeKey, h]
|
|
84
|
+
), st = N(() => y(A), [A]), B = N(
|
|
85
|
+
() => n ? [] : st,
|
|
86
|
+
[n, st]
|
|
87
|
+
), E = !n && u && D.trim().length >= St, k = /* @__PURE__ */ c((...e) => ut(["owp", "query-selector", ...e], ot), "createSelectorQueryKey");
|
|
84
88
|
j(() => {
|
|
85
|
-
|
|
86
|
-
}, [
|
|
87
|
-
|
|
88
|
-
}, [
|
|
89
|
-
if (!
|
|
89
|
+
w !== void 0 && K(w);
|
|
90
|
+
}, [w]), j(() => {
|
|
91
|
+
w === void 0 && K(J ?? "");
|
|
92
|
+
}, [J, w]), j(() => {
|
|
93
|
+
if (!u)
|
|
90
94
|
return;
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
},
|
|
95
|
+
const e = window.setTimeout(() => {
|
|
96
|
+
M(et.trim());
|
|
97
|
+
}, nt);
|
|
94
98
|
return () => {
|
|
95
|
-
window.clearTimeout(
|
|
99
|
+
window.clearTimeout(e);
|
|
96
100
|
};
|
|
97
|
-
}, [
|
|
98
|
-
const
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
),
|
|
102
|
-
if (!
|
|
103
|
-
throw new Error(`${(
|
|
104
|
-
const
|
|
105
|
-
return
|
|
101
|
+
}, [nt, u, et]);
|
|
102
|
+
const G = /* @__PURE__ */ c(async (e) => {
|
|
103
|
+
const s = await fetch(
|
|
104
|
+
zt($, t, a(e), mt)
|
|
105
|
+
), i = await s.json();
|
|
106
|
+
if (!s.ok || (i == null ? void 0 : i.resultCode) === "STATUS_0")
|
|
107
|
+
throw new Error(`${(i == null ? void 0 : i.resultMessage) ?? "Failed to fetch selector options"}`);
|
|
108
|
+
const g = kt(i, L), b = it(Q) ? Q(g) : g;
|
|
109
|
+
return Yt(
|
|
110
|
+
b,
|
|
111
|
+
C,
|
|
106
112
|
O,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
ut,
|
|
110
|
-
ft
|
|
113
|
+
lt,
|
|
114
|
+
dt
|
|
111
115
|
);
|
|
112
|
-
}, "fetchOptions"),
|
|
113
|
-
queryKey:
|
|
114
|
-
enabled:
|
|
115
|
-
queryFn: /* @__PURE__ */
|
|
116
|
-
}),
|
|
117
|
-
queryKey:
|
|
116
|
+
}, "fetchOptions"), p = Y({
|
|
117
|
+
queryKey: k(t, l, L, C, O),
|
|
118
|
+
enabled: !!$ && !n && !u,
|
|
119
|
+
queryFn: /* @__PURE__ */ c(() => G(l), "queryFn")
|
|
120
|
+
}), q = Y({
|
|
121
|
+
queryKey: k(
|
|
118
122
|
"search",
|
|
119
123
|
t,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
l,
|
|
125
|
+
D,
|
|
126
|
+
L,
|
|
127
|
+
C,
|
|
128
|
+
O
|
|
125
129
|
),
|
|
126
|
-
enabled:
|
|
127
|
-
queryFn: /* @__PURE__ */
|
|
128
|
-
...
|
|
129
|
-
...(
|
|
130
|
+
enabled: !!$ && !n && u && E,
|
|
131
|
+
queryFn: /* @__PURE__ */ c(() => G({
|
|
132
|
+
...l,
|
|
133
|
+
...(r == null ? void 0 : r.buildKeywordQuery(D)) ?? {}
|
|
130
134
|
}), "queryFn")
|
|
131
|
-
}),
|
|
132
|
-
queryKey:
|
|
135
|
+
}), x = Y({
|
|
136
|
+
queryKey: k(
|
|
133
137
|
"all",
|
|
134
138
|
t,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
+
l,
|
|
140
|
+
L,
|
|
141
|
+
C,
|
|
142
|
+
O
|
|
139
143
|
),
|
|
140
|
-
enabled:
|
|
141
|
-
queryFn: /* @__PURE__ */
|
|
142
|
-
var
|
|
143
|
-
return
|
|
144
|
-
...
|
|
145
|
-
...((
|
|
144
|
+
enabled: !!$ && !n && u && (!!B.length || !!d && tt),
|
|
145
|
+
queryFn: /* @__PURE__ */ c(() => {
|
|
146
|
+
var e;
|
|
147
|
+
return G({
|
|
148
|
+
...l,
|
|
149
|
+
...((e = r == null ? void 0 : r.buildAllQuery) == null ? void 0 : e.call(r)) ?? {}
|
|
146
150
|
});
|
|
147
151
|
}, "queryFn")
|
|
148
|
-
}),
|
|
149
|
-
queryKey:
|
|
152
|
+
}), F = Y({
|
|
153
|
+
queryKey: k(
|
|
150
154
|
"selected",
|
|
151
155
|
t,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
l,
|
|
157
|
+
B,
|
|
158
|
+
L,
|
|
159
|
+
C,
|
|
160
|
+
O
|
|
157
161
|
),
|
|
158
|
-
enabled:
|
|
159
|
-
queryFn: /* @__PURE__ */
|
|
160
|
-
var
|
|
161
|
-
return
|
|
162
|
-
...
|
|
163
|
-
...((
|
|
162
|
+
enabled: !!$ && !n && u && !!B.length && !!(r != null && r.buildSelectedQuery),
|
|
163
|
+
queryFn: /* @__PURE__ */ c(() => {
|
|
164
|
+
var e;
|
|
165
|
+
return G({
|
|
166
|
+
...l,
|
|
167
|
+
...((e = r == null ? void 0 : r.buildSelectedQuery) == null ? void 0 : e.call(r, B)) ?? {}
|
|
164
168
|
});
|
|
165
169
|
}, "queryFn")
|
|
166
|
-
}),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
170
|
+
}), P = N(() => n ? [] : u ? E ? q.data ?? [] : [] : p.data ?? [], [
|
|
171
|
+
p.data,
|
|
172
|
+
n,
|
|
173
|
+
u,
|
|
174
|
+
q.data,
|
|
175
|
+
E
|
|
176
|
+
]), I = N(
|
|
177
|
+
() => n ? [] : It(
|
|
178
|
+
P,
|
|
175
179
|
x.data,
|
|
180
|
+
F.data,
|
|
176
181
|
Object.values(rt)
|
|
177
182
|
),
|
|
178
|
-
[
|
|
179
|
-
|
|
183
|
+
[
|
|
184
|
+
x.data,
|
|
185
|
+
rt,
|
|
186
|
+
P,
|
|
187
|
+
n,
|
|
188
|
+
F.data
|
|
189
|
+
]
|
|
190
|
+
), W = N(
|
|
180
191
|
() => {
|
|
181
|
-
const
|
|
182
|
-
return
|
|
183
|
-
|
|
184
|
-
}),
|
|
192
|
+
const e = {};
|
|
193
|
+
return I.forEach((s) => {
|
|
194
|
+
e[s.value] = s;
|
|
195
|
+
}), e;
|
|
185
196
|
},
|
|
186
|
-
[
|
|
187
|
-
),
|
|
188
|
-
|
|
189
|
-
|
|
197
|
+
[I]
|
|
198
|
+
), ht = !n && (p.isLoading || q.isLoading || x.isLoading || F.isLoading), Qt = ct(R === "autocomplete" && "!min-w-160", m), Lt = ct(
|
|
199
|
+
R === "autocomplete" && !(f != null && f.className) && "w-full",
|
|
200
|
+
f == null ? void 0 : f.className
|
|
190
201
|
);
|
|
191
202
|
return j(() => {
|
|
192
|
-
|
|
193
|
-
const
|
|
194
|
-
let
|
|
195
|
-
return
|
|
196
|
-
|
|
197
|
-
}), !
|
|
198
|
-
options:
|
|
199
|
-
scopeKey:
|
|
203
|
+
I.length && wt((e) => {
|
|
204
|
+
const s = e.scopeKey === h ? e.options : {}, i = { ...s };
|
|
205
|
+
let g = !1;
|
|
206
|
+
return I.forEach((b) => {
|
|
207
|
+
i[b.value] !== b && (i[b.value] = b, g = !0);
|
|
208
|
+
}), !g && e.scopeKey === h ? e : {
|
|
209
|
+
options: g ? i : s,
|
|
210
|
+
scopeKey: h
|
|
200
211
|
};
|
|
201
212
|
});
|
|
202
|
-
}, [
|
|
203
|
-
var
|
|
204
|
-
if (!
|
|
213
|
+
}, [h, I]), j(() => {
|
|
214
|
+
var s;
|
|
215
|
+
if (!u)
|
|
205
216
|
return;
|
|
206
|
-
if (
|
|
207
|
-
|
|
217
|
+
if (d) {
|
|
218
|
+
S("");
|
|
208
219
|
return;
|
|
209
220
|
}
|
|
210
|
-
const
|
|
211
|
-
if (!
|
|
212
|
-
|
|
221
|
+
const e = B[0];
|
|
222
|
+
if (!e) {
|
|
223
|
+
S("");
|
|
213
224
|
return;
|
|
214
225
|
}
|
|
215
|
-
|
|
216
|
-
}, [
|
|
217
|
-
|
|
226
|
+
S(v(((s = W[e]) == null ? void 0 : s.label) ?? ""));
|
|
227
|
+
}, [u, d, W, B]), j(() => {
|
|
228
|
+
!n || !u || (S(""), T(""), M(""));
|
|
229
|
+
}, [n, u]), /* @__PURE__ */ Ot(
|
|
230
|
+
Bt,
|
|
218
231
|
{
|
|
219
|
-
...
|
|
220
|
-
allOptions:
|
|
232
|
+
...gt,
|
|
233
|
+
allOptions: I,
|
|
221
234
|
allValueMode: "joined",
|
|
222
|
-
autocompleteInputValue:
|
|
223
|
-
className:
|
|
224
|
-
defaultValue:
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
r !== "reset" && (l && r !== "input" || (p(o), M(o)));
|
|
235
|
+
autocompleteInputValue: u ? n ? "" : bt : void 0,
|
|
236
|
+
className: Qt,
|
|
237
|
+
defaultValue: n ? "" : J,
|
|
238
|
+
disableClientFilter: u,
|
|
239
|
+
loading: ht,
|
|
240
|
+
multiple: d,
|
|
241
|
+
onAutocompleteInputChange: u ? (e, s) => {
|
|
242
|
+
s !== "reset" && (d && s !== "input" || n || (S(e), T(e)));
|
|
231
243
|
} : void 0,
|
|
232
|
-
onChange: /* @__PURE__ */
|
|
233
|
-
var
|
|
234
|
-
if (
|
|
235
|
-
const
|
|
236
|
-
if (
|
|
237
|
-
|
|
244
|
+
onChange: /* @__PURE__ */ c((e) => {
|
|
245
|
+
var s;
|
|
246
|
+
if (K(e.target.value), u) {
|
|
247
|
+
const i = n ? [] : y(e.target.value);
|
|
248
|
+
if (d)
|
|
249
|
+
S(""), T(""), M("");
|
|
238
250
|
else {
|
|
239
|
-
const
|
|
240
|
-
|
|
251
|
+
const g = i[0], b = g ? v(((s = W[g]) == null ? void 0 : s.label) ?? "") : "";
|
|
252
|
+
S(b), T(""), M("");
|
|
241
253
|
}
|
|
242
254
|
}
|
|
243
|
-
|
|
255
|
+
U == null || U(e);
|
|
244
256
|
}, "onChange"),
|
|
245
|
-
options:
|
|
246
|
-
selectorType:
|
|
257
|
+
options: P,
|
|
258
|
+
selectorType: R,
|
|
259
|
+
showAllOption: tt,
|
|
247
260
|
textFieldProps: {
|
|
248
|
-
...
|
|
249
|
-
className:
|
|
250
|
-
onBlur: /* @__PURE__ */
|
|
251
|
-
var
|
|
252
|
-
if (
|
|
253
|
-
if (
|
|
254
|
-
|
|
261
|
+
...f,
|
|
262
|
+
className: Lt,
|
|
263
|
+
onBlur: /* @__PURE__ */ c((e) => {
|
|
264
|
+
var s, i;
|
|
265
|
+
if (u) {
|
|
266
|
+
if (d)
|
|
267
|
+
S("");
|
|
255
268
|
else {
|
|
256
|
-
const
|
|
257
|
-
|
|
258
|
-
|
|
269
|
+
const g = n ? void 0 : y(A)[0];
|
|
270
|
+
S(
|
|
271
|
+
g ? v(((s = W[g]) == null ? void 0 : s.label) ?? "") : ""
|
|
259
272
|
);
|
|
260
273
|
}
|
|
261
|
-
|
|
274
|
+
T(""), M("");
|
|
262
275
|
}
|
|
263
|
-
(
|
|
276
|
+
(i = f == null ? void 0 : f.onBlur) == null || i.call(f, e);
|
|
264
277
|
}, "onBlur")
|
|
265
278
|
},
|
|
266
|
-
value:
|
|
279
|
+
value: n ? "" : w
|
|
267
280
|
}
|
|
268
281
|
);
|
|
269
282
|
}, "OwpQuerySelector");
|
|
270
283
|
export {
|
|
271
|
-
|
|
284
|
+
tn as OwpQuerySelector
|
|
272
285
|
};
|
|
273
286
|
//# sourceMappingURL=OwpQuerySelector.js.map
|