@kengic/core.react 0.0.1-beta.75 → 0.0.1-beta.77

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.
@@ -1498,7 +1498,7 @@ Check the top-level render call using <` + gi + ">.");
1498
1498
  }
1499
1499
  process.env.NODE_ENV === "production" ? react.exports = requireReact_production_min() : react.exports = requireReact_development();
1500
1500
  var reactExports = react.exports;
1501
- const React$1 = /* @__PURE__ */ getDefaultExportFromCjs(reactExports), React$2 = /* @__PURE__ */ _mergeNamespaces({
1501
+ const React$1 = /* @__PURE__ */ getDefaultExportFromCjs(reactExports), ReactOriginal = /* @__PURE__ */ _mergeNamespaces({
1502
1502
  __proto__: null,
1503
1503
  default: React$1
1504
1504
  }, [reactExports]), defaultIconDimensions = Object.freeze(
@@ -23872,366 +23872,6 @@ function noop$4() {
23872
23872
  function formatProdErrorMessage(e) {
23873
23873
  return `Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
23874
23874
  }
23875
- var withSelector = { exports: {} }, useSyncExternalStoreWithSelector_production_min = {};
23876
- /**
23877
- * @license React
23878
- * use-sync-external-store-with-selector.production.min.js
23879
- *
23880
- * Copyright (c) Facebook, Inc. and its affiliates.
23881
- *
23882
- * This source code is licensed under the MIT license found in the
23883
- * LICENSE file in the root directory of this source tree.
23884
- */
23885
- var hasRequiredUseSyncExternalStoreWithSelector_production_min;
23886
- function requireUseSyncExternalStoreWithSelector_production_min() {
23887
- if (hasRequiredUseSyncExternalStoreWithSelector_production_min) return useSyncExternalStoreWithSelector_production_min;
23888
- hasRequiredUseSyncExternalStoreWithSelector_production_min = 1;
23889
- var e = reactExports;
23890
- function t(C, w) {
23891
- return C === w && (C !== 0 || 1 / C === 1 / w) || C !== C && w !== w;
23892
- }
23893
- var r = typeof Object.is == "function" ? Object.is : t, n = e.useSyncExternalStore, a = e.useRef, s = e.useEffect, u = e.useMemo, p = e.useDebugValue;
23894
- return useSyncExternalStoreWithSelector_production_min.useSyncExternalStoreWithSelector = function(C, w, D, G, ne) {
23895
- var oe = a(null);
23896
- if (oe.current === null) {
23897
- var se = { hasValue: !1, value: null };
23898
- oe.current = se;
23899
- } else se = oe.current;
23900
- oe = u(function() {
23901
- function ae(ta) {
23902
- if (!ct) {
23903
- if (ct = !0, ea = ta, ta = G(ta), ne !== void 0 && se.hasValue) {
23904
- var oa = se.value;
23905
- if (ne(oa, ta)) return ut = oa;
23906
- }
23907
- return ut = ta;
23908
- }
23909
- if (oa = ut, r(ea, ta)) return oa;
23910
- var ia = G(ta);
23911
- return ne !== void 0 && ne(oa, ia) ? oa : (ea = ta, ut = ia);
23912
- }
23913
- var ct = !1, ea, ut, ra = D === void 0 ? null : D;
23914
- return [function() {
23915
- return ae(w());
23916
- }, ra === null ? void 0 : function() {
23917
- return ae(ra());
23918
- }];
23919
- }, [w, D, G, ne]);
23920
- var ue = n(C, oe[0], oe[1]);
23921
- return s(function() {
23922
- se.hasValue = !0, se.value = ue;
23923
- }, [ue]), p(ue), ue;
23924
- }, useSyncExternalStoreWithSelector_production_min;
23925
- }
23926
- var useSyncExternalStoreWithSelector_development = {};
23927
- /**
23928
- * @license React
23929
- * use-sync-external-store-with-selector.development.js
23930
- *
23931
- * Copyright (c) Facebook, Inc. and its affiliates.
23932
- *
23933
- * This source code is licensed under the MIT license found in the
23934
- * LICENSE file in the root directory of this source tree.
23935
- */
23936
- var hasRequiredUseSyncExternalStoreWithSelector_development;
23937
- function requireUseSyncExternalStoreWithSelector_development() {
23938
- return hasRequiredUseSyncExternalStoreWithSelector_development || (hasRequiredUseSyncExternalStoreWithSelector_development = 1, process.env.NODE_ENV !== "production" && function() {
23939
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
23940
- var e = reactExports;
23941
- function t(w, D) {
23942
- return w === D && (w !== 0 || 1 / w === 1 / D) || w !== w && D !== D;
23943
- }
23944
- var r = typeof Object.is == "function" ? Object.is : t, n = e.useSyncExternalStore, a = e.useRef, s = e.useEffect, u = e.useMemo, p = e.useDebugValue;
23945
- function C(w, D, G, ne, oe) {
23946
- var se = a(null), ue;
23947
- se.current === null ? (ue = {
23948
- hasValue: !1,
23949
- value: null
23950
- }, se.current = ue) : ue = se.current;
23951
- var ae = u(function() {
23952
- var ra = !1, ta, oa, ia = function(ya) {
23953
- if (!ra) {
23954
- ra = !0, ta = ya;
23955
- var Ea = ne(ya);
23956
- if (oe !== void 0 && ue.hasValue) {
23957
- var ha = ue.value;
23958
- if (oe(ha, Ea))
23959
- return oa = ha, ha;
23960
- }
23961
- return oa = Ea, Ea;
23962
- }
23963
- var ua = ta, Ca = oa;
23964
- if (r(ua, ya))
23965
- return Ca;
23966
- var ba = ne(ya);
23967
- return oe !== void 0 && oe(Ca, ba) ? Ca : (ta = ya, oa = ba, ba);
23968
- }, ca = G === void 0 ? null : G, sa = function() {
23969
- return ia(D());
23970
- }, va = ca === null ? void 0 : function() {
23971
- return ia(ca());
23972
- };
23973
- return [sa, va];
23974
- }, [D, G, ne, oe]), ct = ae[0], ea = ae[1], ut = n(w, ct, ea);
23975
- return s(function() {
23976
- ue.hasValue = !0, ue.value = ut;
23977
- }, [ut]), p(ut), ut;
23978
- }
23979
- useSyncExternalStoreWithSelector_development.useSyncExternalStoreWithSelector = C, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
23980
- }()), useSyncExternalStoreWithSelector_development;
23981
- }
23982
- process.env.NODE_ENV === "production" ? withSelector.exports = requireUseSyncExternalStoreWithSelector_production_min() : withSelector.exports = requireUseSyncExternalStoreWithSelector_development();
23983
- var withSelectorExports = withSelector.exports, React = (
23984
- // prettier-ignore
23985
- // @ts-ignore
23986
- "default" in React$2 ? React$1 : React$2
23987
- ), ContextKey = Symbol.for("react-redux-context"), gT = typeof globalThis < "u" ? globalThis : (
23988
- /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */
23989
- {}
23990
- );
23991
- function getContext() {
23992
- if (!React.createContext)
23993
- return {};
23994
- const e = gT[ContextKey] ?? (gT[ContextKey] = /* @__PURE__ */ new Map());
23995
- let t = e.get(React.createContext);
23996
- return t || (t = React.createContext(
23997
- null
23998
- ), process.env.NODE_ENV !== "production" && (t.displayName = "ReactRedux"), e.set(React.createContext, t)), t;
23999
- }
24000
- var ReactReduxContext = /* @__PURE__ */ getContext(), notInitialized = () => {
24001
- throw new Error("uSES not initialized!");
24002
- };
24003
- function createReduxContextHook(e = ReactReduxContext) {
24004
- return function() {
24005
- const r = React.useContext(e);
24006
- if (process.env.NODE_ENV !== "production" && !r)
24007
- throw new Error(
24008
- "could not find react-redux context value; please ensure the component is wrapped in a <Provider>"
24009
- );
24010
- return r;
24011
- };
24012
- }
24013
- var useReduxContext = /* @__PURE__ */ createReduxContextHook(), useSyncExternalStoreWithSelector = notInitialized, initializeUseSelector = (e) => {
24014
- useSyncExternalStoreWithSelector = e;
24015
- }, refEquality = (e, t) => e === t;
24016
- function createSelectorHook(e = ReactReduxContext) {
24017
- const t = e === ReactReduxContext ? useReduxContext : createReduxContextHook(e), r = (n, a = {}) => {
24018
- const { equalityFn: s = refEquality, devModeChecks: u = {} } = typeof a == "function" ? { equalityFn: a } : a;
24019
- if (process.env.NODE_ENV !== "production") {
24020
- if (!n)
24021
- throw new Error("You must pass a selector to useSelector");
24022
- if (typeof n != "function")
24023
- throw new Error("You must pass a function as a selector to useSelector");
24024
- if (typeof s != "function")
24025
- throw new Error(
24026
- "You must pass a function as an equality function to useSelector"
24027
- );
24028
- }
24029
- const {
24030
- store: p,
24031
- subscription: C,
24032
- getServerState: w,
24033
- stabilityCheck: D,
24034
- identityFunctionCheck: G
24035
- } = t(), ne = React.useRef(!0), oe = React.useCallback(
24036
- {
24037
- [n.name](ue) {
24038
- const ae = n(ue);
24039
- if (process.env.NODE_ENV !== "production") {
24040
- const {
24041
- identityFunctionCheck: ct,
24042
- stabilityCheck: ea
24043
- } = {
24044
- stabilityCheck: D,
24045
- identityFunctionCheck: G,
24046
- ...u
24047
- };
24048
- if (ea === "always" || ea === "once" && ne.current) {
24049
- const ut = n(ue);
24050
- if (!s(ae, ut)) {
24051
- let ra;
24052
- try {
24053
- throw new Error();
24054
- } catch (ta) {
24055
- ({ stack: ra } = ta);
24056
- }
24057
- console.warn(
24058
- "Selector " + (n.name || "unknown") + ` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
24059
- Selectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization`,
24060
- {
24061
- state: ue,
24062
- selected: ae,
24063
- selected2: ut,
24064
- stack: ra
24065
- }
24066
- );
24067
- }
24068
- }
24069
- if ((ct === "always" || ct === "once" && ne.current) && ae === ue) {
24070
- let ut;
24071
- try {
24072
- throw new Error();
24073
- } catch (ra) {
24074
- ({ stack: ut } = ra);
24075
- }
24076
- console.warn(
24077
- "Selector " + (n.name || "unknown") + ` returned the root state when called. This can lead to unnecessary rerenders.
24078
- Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,
24079
- { stack: ut }
24080
- );
24081
- }
24082
- ne.current && (ne.current = !1);
24083
- }
24084
- return ae;
24085
- }
24086
- }[n.name],
24087
- [n, D, u.stabilityCheck]
24088
- ), se = useSyncExternalStoreWithSelector(
24089
- C.addNestedSub,
24090
- p.getState,
24091
- w || p.getState,
24092
- oe,
24093
- s
24094
- );
24095
- return React.useDebugValue(se), se;
24096
- };
24097
- return Object.assign(r, {
24098
- withTypes: () => r
24099
- }), r;
24100
- }
24101
- var useSelector = /* @__PURE__ */ createSelectorHook();
24102
- function defaultNoopBatch(e) {
24103
- e();
24104
- }
24105
- function createListenerCollection() {
24106
- let e = null, t = null;
24107
- return {
24108
- clear() {
24109
- e = null, t = null;
24110
- },
24111
- notify() {
24112
- defaultNoopBatch(() => {
24113
- let r = e;
24114
- for (; r; )
24115
- r.callback(), r = r.next;
24116
- });
24117
- },
24118
- get() {
24119
- const r = [];
24120
- let n = e;
24121
- for (; n; )
24122
- r.push(n), n = n.next;
24123
- return r;
24124
- },
24125
- subscribe(r) {
24126
- let n = !0;
24127
- const a = t = {
24128
- callback: r,
24129
- next: null,
24130
- prev: t
24131
- };
24132
- return a.prev ? a.prev.next = a : e = a, function() {
24133
- !n || e === null || (n = !1, a.next ? a.next.prev = a.prev : t = a.prev, a.prev ? a.prev.next = a.next : e = a.next);
24134
- };
24135
- }
24136
- };
24137
- }
24138
- var nullListeners = {
24139
- notify() {
24140
- },
24141
- get: () => []
24142
- };
24143
- function createSubscription(e, t) {
24144
- let r, n = nullListeners, a = 0, s = !1;
24145
- function u(ue) {
24146
- D();
24147
- const ae = n.subscribe(ue);
24148
- let ct = !1;
24149
- return () => {
24150
- ct || (ct = !0, ae(), G());
24151
- };
24152
- }
24153
- function p() {
24154
- n.notify();
24155
- }
24156
- function C() {
24157
- se.onStateChange && se.onStateChange();
24158
- }
24159
- function w() {
24160
- return s;
24161
- }
24162
- function D() {
24163
- a++, r || (r = e.subscribe(C), n = createListenerCollection());
24164
- }
24165
- function G() {
24166
- a--, r && a === 0 && (r(), r = void 0, n.clear(), n = nullListeners);
24167
- }
24168
- function ne() {
24169
- s || (s = !0, D());
24170
- }
24171
- function oe() {
24172
- s && (s = !1, G());
24173
- }
24174
- const se = {
24175
- addNestedSub: u,
24176
- notifyNestedSubs: p,
24177
- handleChangeWrapper: C,
24178
- isSubscribed: w,
24179
- trySubscribe: ne,
24180
- tryUnsubscribe: oe,
24181
- getListeners: () => n
24182
- };
24183
- return se;
24184
- }
24185
- var canUseDOM = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", useIsomorphicLayoutEffect$1 = canUseDOM || isReactNative ? React.useLayoutEffect : React.useEffect;
24186
- function Provider$1({
24187
- store: e,
24188
- context: t,
24189
- children: r,
24190
- serverState: n,
24191
- stabilityCheck: a = "once",
24192
- identityFunctionCheck: s = "once"
24193
- }) {
24194
- const u = React.useMemo(() => {
24195
- const w = createSubscription(e);
24196
- return {
24197
- store: e,
24198
- subscription: w,
24199
- getServerState: n ? () => n : void 0,
24200
- stabilityCheck: a,
24201
- identityFunctionCheck: s
24202
- };
24203
- }, [e, n, a, s]), p = React.useMemo(() => e.getState(), [e]);
24204
- useIsomorphicLayoutEffect$1(() => {
24205
- const { subscription: w } = u;
24206
- return w.onStateChange = w.notifyNestedSubs, w.trySubscribe(), p !== e.getState() && w.notifyNestedSubs(), () => {
24207
- w.tryUnsubscribe(), w.onStateChange = void 0;
24208
- };
24209
- }, [u, p]);
24210
- const C = t || ReactReduxContext;
24211
- return /* @__PURE__ */ React.createElement(C.Provider, { value: u }, r);
24212
- }
24213
- var Provider_default = Provider$1;
24214
- function createStoreHook(e = ReactReduxContext) {
24215
- const t = e === ReactReduxContext ? useReduxContext : (
24216
- // @ts-ignore
24217
- createReduxContextHook(e)
24218
- ), r = () => {
24219
- const { store: n } = t();
24220
- return n;
24221
- };
24222
- return Object.assign(r, {
24223
- withTypes: () => r
24224
- }), r;
24225
- }
24226
- var useStore = /* @__PURE__ */ createStoreHook();
24227
- function createDispatchHook(e = ReactReduxContext) {
24228
- const t = e === ReactReduxContext ? useStore : createStoreHook(e), r = () => t().dispatch;
24229
- return Object.assign(r, {
24230
- withTypes: () => r
24231
- }), r;
24232
- }
24233
- var useDispatch = /* @__PURE__ */ createDispatchHook();
24234
- initializeUseSelector(withSelectorExports.useSyncExternalStoreWithSelector);
24235
23875
  const KgSlice = createSlice({
24236
23876
  initialState: { option: {} },
24237
23877
  name: "Kg",
@@ -24250,18 +23890,6 @@ const KgSlice = createSlice({
24250
23890
  function getOption(e) {
24251
23891
  return console.log("222", e, e.option), e.option;
24252
23892
  }
24253
- const getOption2 = (e) => (console.log("222:B", e, e.option), e.option), kgStore = configureStore({
24254
- middleware: (e) => e({
24255
- serializableCheck: {
24256
- ignoredActionPaths: ["payload.fn"],
24257
- ignoredActions: [],
24258
- ignoredPaths: []
24259
- }
24260
- }),
24261
- reducer: KgSlice.reducer
24262
- });
24263
- useDispatch.withTypes();
24264
- const useKgSelector = useSelector.withTypes();
24265
23893
  var classnames = { exports: {} };
24266
23894
  /*!
24267
23895
  Copyright (c) 2018 Jed Watson.
@@ -25596,7 +25224,7 @@ var token2CSSVar = function(t) {
25596
25224
  if (!n)
25597
25225
  return t();
25598
25226
  }, r);
25599
- }, fullClone$3 = _objectSpread2$7({}, React$2), useInsertionEffect$1 = fullClone$3.useInsertionEffect, useInsertionEffectPolyfill = function(t, r, n) {
25227
+ }, fullClone$3 = _objectSpread2$7({}, ReactOriginal), useInsertionEffect$1 = fullClone$3.useInsertionEffect, useInsertionEffectPolyfill = function(t, r, n) {
25600
25228
  reactExports.useMemo(t, n), useLayoutEffect$1(function() {
25601
25229
  return r(!0);
25602
25230
  }, n);
@@ -25604,7 +25232,7 @@ var token2CSSVar = function(t) {
25604
25232
  return useInsertionEffect$1(function() {
25605
25233
  return e(), t();
25606
25234
  }, r);
25607
- } : useInsertionEffectPolyfill, fullClone$2 = _objectSpread2$7({}, React$2), useInsertionEffect = fullClone$2.useInsertionEffect, useCleanupRegister = function(t) {
25235
+ } : useInsertionEffectPolyfill, fullClone$2 = _objectSpread2$7({}, ReactOriginal), useInsertionEffect = fullClone$2.useInsertionEffect, useCleanupRegister = function(t) {
25608
25236
  var r = [], n = !1;
25609
25237
  function a(s) {
25610
25238
  if (n) {
@@ -28549,7 +28177,7 @@ function genPresetColor(e, t) {
28549
28177
  }));
28550
28178
  }, {});
28551
28179
  }
28552
- const fullClone$1 = Object.assign({}, React$2), {
28180
+ const fullClone$1 = Object.assign({}, ReactOriginal), {
28553
28181
  useId: useId$2
28554
28182
  } = fullClone$1, useEmptyId = () => "", useThemeKey = typeof useId$2 > "u" ? useEmptyId : useId$2;
28555
28183
  function useTheme(e, t, r) {
@@ -28670,7 +28298,7 @@ const useDomMotionEvents = function(e) {
28670
28298
  };
28671
28299
  }, []), [n, r];
28672
28300
  };
28673
- var useIsomorphicLayoutEffect = canUseDom() ? reactExports.useLayoutEffect : reactExports.useEffect;
28301
+ var useIsomorphicLayoutEffect$1 = canUseDom() ? reactExports.useLayoutEffect : reactExports.useEffect;
28674
28302
  const useNextFrame = function() {
28675
28303
  var e = reactExports.useRef(null);
28676
28304
  function t() {
@@ -28704,7 +28332,7 @@ const useStepQueue = function(e, t, r) {
28704
28332
  u(STEP_PREPARE, !0);
28705
28333
  }
28706
28334
  var ne = t ? SIMPLE_STEP_QUEUE : FULL_STEP_QUEUE;
28707
- return useIsomorphicLayoutEffect(function() {
28335
+ return useIsomorphicLayoutEffect$1(function() {
28708
28336
  if (s !== STEP_NONE && s !== STEP_ACTIVATED) {
28709
28337
  var oe = ne.indexOf(s), se = ne[oe + 1], ue = r(s);
28710
28338
  ue === SkipStep ? u(se, !0) : se && w(function(ae) {
@@ -28766,7 +28394,7 @@ function useStatus(e, t, r, n) {
28766
28394
  });
28767
28395
  }, D))), Wa === STEP_PREPARED && Ha(), DoStep;
28768
28396
  }), Na = _slicedToArray(Va, 2), Ba = Na[0], Wa = Na[1], Ti = isActive(Wa);
28769
- Da.current = Ti, useIsomorphicLayoutEffect(function() {
28397
+ Da.current = Ti, useIsomorphicLayoutEffect$1(function() {
28770
28398
  Ea(t);
28771
28399
  var Si = Ta.current;
28772
28400
  Ta.current = !0;
@@ -33355,7 +32983,7 @@ var getPortalContainer = function(t) {
33355
32983
  process.env.NODE_ENV !== "production" && (Portal.displayName = "Portal");
33356
32984
  var RefContext = /* @__PURE__ */ reactExports.createContext({});
33357
32985
  function getUseId() {
33358
- var e = _objectSpread2$7({}, React$2);
32986
+ var e = _objectSpread2$7({}, ReactOriginal);
33359
32987
  return e.useId;
33360
32988
  }
33361
32989
  var uuid$3 = 0, useOriginId = getUseId();
@@ -64266,7 +63894,7 @@ TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
64266
63894
  TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
64267
63895
  var IntlContext = typeof window < "u" && !window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__ ? window.__REACT_INTL_CONTEXT__ || (window.__REACT_INTL_CONTEXT__ = reactExports.createContext(null)) : reactExports.createContext(null);
64268
63896
  IntlContext.Consumer;
64269
- var IntlProvider$1 = IntlContext.Provider, Provider = IntlProvider$1, Context = IntlContext;
63897
+ var IntlProvider$1 = IntlContext.Provider, Provider$1 = IntlProvider$1, Context = IntlContext;
64270
63898
  function useIntl() {
64271
63899
  var e = reactExports.useContext(Context);
64272
63900
  return invariantIntlContext(e), e;
@@ -64373,7 +64001,7 @@ var IntlProvider = (
64373
64001
  prevConfig: u
64374
64002
  };
64375
64003
  }, t.prototype.render = function() {
64376
- return invariantIntlContext(this.state.intl), reactExports.createElement(Provider, { value: this.state.intl }, this.props.children);
64004
+ return invariantIntlContext(this.state.intl), reactExports.createElement(Provider$1, { value: this.state.intl }, this.props.children);
64377
64005
  }, t.displayName = "IntlProvider", t.defaultProps = DEFAULT_INTL_CONFIG, t;
64378
64006
  }(reactExports.PureComponent)
64379
64007
  );
@@ -66914,6 +66542,380 @@ class KgVarConfigElement extends HTMLElement {
66914
66542
  function initKgVarConfigElement() {
66915
66543
  customElements.define("kg-var-config", KgVarConfigElement);
66916
66544
  }
66545
+ var withSelector = { exports: {} }, useSyncExternalStoreWithSelector_production_min = {};
66546
+ /**
66547
+ * @license React
66548
+ * use-sync-external-store-with-selector.production.min.js
66549
+ *
66550
+ * Copyright (c) Facebook, Inc. and its affiliates.
66551
+ *
66552
+ * This source code is licensed under the MIT license found in the
66553
+ * LICENSE file in the root directory of this source tree.
66554
+ */
66555
+ var hasRequiredUseSyncExternalStoreWithSelector_production_min;
66556
+ function requireUseSyncExternalStoreWithSelector_production_min() {
66557
+ if (hasRequiredUseSyncExternalStoreWithSelector_production_min) return useSyncExternalStoreWithSelector_production_min;
66558
+ hasRequiredUseSyncExternalStoreWithSelector_production_min = 1;
66559
+ var e = reactExports;
66560
+ function t(C, w) {
66561
+ return C === w && (C !== 0 || 1 / C === 1 / w) || C !== C && w !== w;
66562
+ }
66563
+ var r = typeof Object.is == "function" ? Object.is : t, n = e.useSyncExternalStore, a = e.useRef, s = e.useEffect, u = e.useMemo, p = e.useDebugValue;
66564
+ return useSyncExternalStoreWithSelector_production_min.useSyncExternalStoreWithSelector = function(C, w, D, G, ne) {
66565
+ var oe = a(null);
66566
+ if (oe.current === null) {
66567
+ var se = { hasValue: !1, value: null };
66568
+ oe.current = se;
66569
+ } else se = oe.current;
66570
+ oe = u(function() {
66571
+ function ae(ta) {
66572
+ if (!ct) {
66573
+ if (ct = !0, ea = ta, ta = G(ta), ne !== void 0 && se.hasValue) {
66574
+ var oa = se.value;
66575
+ if (ne(oa, ta)) return ut = oa;
66576
+ }
66577
+ return ut = ta;
66578
+ }
66579
+ if (oa = ut, r(ea, ta)) return oa;
66580
+ var ia = G(ta);
66581
+ return ne !== void 0 && ne(oa, ia) ? oa : (ea = ta, ut = ia);
66582
+ }
66583
+ var ct = !1, ea, ut, ra = D === void 0 ? null : D;
66584
+ return [function() {
66585
+ return ae(w());
66586
+ }, ra === null ? void 0 : function() {
66587
+ return ae(ra());
66588
+ }];
66589
+ }, [w, D, G, ne]);
66590
+ var ue = n(C, oe[0], oe[1]);
66591
+ return s(function() {
66592
+ se.hasValue = !0, se.value = ue;
66593
+ }, [ue]), p(ue), ue;
66594
+ }, useSyncExternalStoreWithSelector_production_min;
66595
+ }
66596
+ var useSyncExternalStoreWithSelector_development = {};
66597
+ /**
66598
+ * @license React
66599
+ * use-sync-external-store-with-selector.development.js
66600
+ *
66601
+ * Copyright (c) Facebook, Inc. and its affiliates.
66602
+ *
66603
+ * This source code is licensed under the MIT license found in the
66604
+ * LICENSE file in the root directory of this source tree.
66605
+ */
66606
+ var hasRequiredUseSyncExternalStoreWithSelector_development;
66607
+ function requireUseSyncExternalStoreWithSelector_development() {
66608
+ return hasRequiredUseSyncExternalStoreWithSelector_development || (hasRequiredUseSyncExternalStoreWithSelector_development = 1, process.env.NODE_ENV !== "production" && function() {
66609
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
66610
+ var e = reactExports;
66611
+ function t(w, D) {
66612
+ return w === D && (w !== 0 || 1 / w === 1 / D) || w !== w && D !== D;
66613
+ }
66614
+ var r = typeof Object.is == "function" ? Object.is : t, n = e.useSyncExternalStore, a = e.useRef, s = e.useEffect, u = e.useMemo, p = e.useDebugValue;
66615
+ function C(w, D, G, ne, oe) {
66616
+ var se = a(null), ue;
66617
+ se.current === null ? (ue = {
66618
+ hasValue: !1,
66619
+ value: null
66620
+ }, se.current = ue) : ue = se.current;
66621
+ var ae = u(function() {
66622
+ var ra = !1, ta, oa, ia = function(ya) {
66623
+ if (!ra) {
66624
+ ra = !0, ta = ya;
66625
+ var Ea = ne(ya);
66626
+ if (oe !== void 0 && ue.hasValue) {
66627
+ var ha = ue.value;
66628
+ if (oe(ha, Ea))
66629
+ return oa = ha, ha;
66630
+ }
66631
+ return oa = Ea, Ea;
66632
+ }
66633
+ var ua = ta, Ca = oa;
66634
+ if (r(ua, ya))
66635
+ return Ca;
66636
+ var ba = ne(ya);
66637
+ return oe !== void 0 && oe(Ca, ba) ? Ca : (ta = ya, oa = ba, ba);
66638
+ }, ca = G === void 0 ? null : G, sa = function() {
66639
+ return ia(D());
66640
+ }, va = ca === null ? void 0 : function() {
66641
+ return ia(ca());
66642
+ };
66643
+ return [sa, va];
66644
+ }, [D, G, ne, oe]), ct = ae[0], ea = ae[1], ut = n(w, ct, ea);
66645
+ return s(function() {
66646
+ ue.hasValue = !0, ue.value = ut;
66647
+ }, [ut]), p(ut), ut;
66648
+ }
66649
+ useSyncExternalStoreWithSelector_development.useSyncExternalStoreWithSelector = C, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
66650
+ }()), useSyncExternalStoreWithSelector_development;
66651
+ }
66652
+ process.env.NODE_ENV === "production" ? withSelector.exports = requireUseSyncExternalStoreWithSelector_production_min() : withSelector.exports = requireUseSyncExternalStoreWithSelector_development();
66653
+ var withSelectorExports = withSelector.exports, React = (
66654
+ // prettier-ignore
66655
+ // @ts-ignore
66656
+ "default" in ReactOriginal ? React$1 : ReactOriginal
66657
+ ), ContextKey = Symbol.for("react-redux-context"), gT = typeof globalThis < "u" ? globalThis : (
66658
+ /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */
66659
+ {}
66660
+ );
66661
+ function getContext() {
66662
+ if (!React.createContext)
66663
+ return {};
66664
+ const e = gT[ContextKey] ?? (gT[ContextKey] = /* @__PURE__ */ new Map());
66665
+ let t = e.get(React.createContext);
66666
+ return t || (t = React.createContext(
66667
+ null
66668
+ ), process.env.NODE_ENV !== "production" && (t.displayName = "ReactRedux"), e.set(React.createContext, t)), t;
66669
+ }
66670
+ var ReactReduxContext = /* @__PURE__ */ getContext(), notInitialized = () => {
66671
+ throw new Error("uSES not initialized!");
66672
+ };
66673
+ function createReduxContextHook(e = ReactReduxContext) {
66674
+ return function() {
66675
+ const r = React.useContext(e);
66676
+ if (process.env.NODE_ENV !== "production" && !r)
66677
+ throw new Error(
66678
+ "could not find react-redux context value; please ensure the component is wrapped in a <Provider>"
66679
+ );
66680
+ return r;
66681
+ };
66682
+ }
66683
+ var useReduxContext = /* @__PURE__ */ createReduxContextHook(), useSyncExternalStoreWithSelector = notInitialized, initializeUseSelector = (e) => {
66684
+ useSyncExternalStoreWithSelector = e;
66685
+ }, refEquality = (e, t) => e === t;
66686
+ function createSelectorHook(e = ReactReduxContext) {
66687
+ const t = e === ReactReduxContext ? useReduxContext : createReduxContextHook(e), r = (n, a = {}) => {
66688
+ const { equalityFn: s = refEquality, devModeChecks: u = {} } = typeof a == "function" ? { equalityFn: a } : a;
66689
+ if (process.env.NODE_ENV !== "production") {
66690
+ if (!n)
66691
+ throw new Error("You must pass a selector to useSelector");
66692
+ if (typeof n != "function")
66693
+ throw new Error("You must pass a function as a selector to useSelector");
66694
+ if (typeof s != "function")
66695
+ throw new Error(
66696
+ "You must pass a function as an equality function to useSelector"
66697
+ );
66698
+ }
66699
+ const {
66700
+ store: p,
66701
+ subscription: C,
66702
+ getServerState: w,
66703
+ stabilityCheck: D,
66704
+ identityFunctionCheck: G
66705
+ } = t(), ne = React.useRef(!0), oe = React.useCallback(
66706
+ {
66707
+ [n.name](ue) {
66708
+ const ae = n(ue);
66709
+ if (process.env.NODE_ENV !== "production") {
66710
+ const {
66711
+ identityFunctionCheck: ct,
66712
+ stabilityCheck: ea
66713
+ } = {
66714
+ stabilityCheck: D,
66715
+ identityFunctionCheck: G,
66716
+ ...u
66717
+ };
66718
+ if (ea === "always" || ea === "once" && ne.current) {
66719
+ const ut = n(ue);
66720
+ if (!s(ae, ut)) {
66721
+ let ra;
66722
+ try {
66723
+ throw new Error();
66724
+ } catch (ta) {
66725
+ ({ stack: ra } = ta);
66726
+ }
66727
+ console.warn(
66728
+ "Selector " + (n.name || "unknown") + ` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
66729
+ Selectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization`,
66730
+ {
66731
+ state: ue,
66732
+ selected: ae,
66733
+ selected2: ut,
66734
+ stack: ra
66735
+ }
66736
+ );
66737
+ }
66738
+ }
66739
+ if ((ct === "always" || ct === "once" && ne.current) && ae === ue) {
66740
+ let ut;
66741
+ try {
66742
+ throw new Error();
66743
+ } catch (ra) {
66744
+ ({ stack: ut } = ra);
66745
+ }
66746
+ console.warn(
66747
+ "Selector " + (n.name || "unknown") + ` returned the root state when called. This can lead to unnecessary rerenders.
66748
+ Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,
66749
+ { stack: ut }
66750
+ );
66751
+ }
66752
+ ne.current && (ne.current = !1);
66753
+ }
66754
+ return ae;
66755
+ }
66756
+ }[n.name],
66757
+ [n, D, u.stabilityCheck]
66758
+ ), se = useSyncExternalStoreWithSelector(
66759
+ C.addNestedSub,
66760
+ p.getState,
66761
+ w || p.getState,
66762
+ oe,
66763
+ s
66764
+ );
66765
+ return React.useDebugValue(se), se;
66766
+ };
66767
+ return Object.assign(r, {
66768
+ withTypes: () => r
66769
+ }), r;
66770
+ }
66771
+ var useSelector = /* @__PURE__ */ createSelectorHook();
66772
+ function defaultNoopBatch(e) {
66773
+ e();
66774
+ }
66775
+ function createListenerCollection() {
66776
+ let e = null, t = null;
66777
+ return {
66778
+ clear() {
66779
+ e = null, t = null;
66780
+ },
66781
+ notify() {
66782
+ defaultNoopBatch(() => {
66783
+ let r = e;
66784
+ for (; r; )
66785
+ r.callback(), r = r.next;
66786
+ });
66787
+ },
66788
+ get() {
66789
+ const r = [];
66790
+ let n = e;
66791
+ for (; n; )
66792
+ r.push(n), n = n.next;
66793
+ return r;
66794
+ },
66795
+ subscribe(r) {
66796
+ let n = !0;
66797
+ const a = t = {
66798
+ callback: r,
66799
+ next: null,
66800
+ prev: t
66801
+ };
66802
+ return a.prev ? a.prev.next = a : e = a, function() {
66803
+ !n || e === null || (n = !1, a.next ? a.next.prev = a.prev : t = a.prev, a.prev ? a.prev.next = a.next : e = a.next);
66804
+ };
66805
+ }
66806
+ };
66807
+ }
66808
+ var nullListeners = {
66809
+ notify() {
66810
+ },
66811
+ get: () => []
66812
+ };
66813
+ function createSubscription(e, t) {
66814
+ let r, n = nullListeners, a = 0, s = !1;
66815
+ function u(ue) {
66816
+ D();
66817
+ const ae = n.subscribe(ue);
66818
+ let ct = !1;
66819
+ return () => {
66820
+ ct || (ct = !0, ae(), G());
66821
+ };
66822
+ }
66823
+ function p() {
66824
+ n.notify();
66825
+ }
66826
+ function C() {
66827
+ se.onStateChange && se.onStateChange();
66828
+ }
66829
+ function w() {
66830
+ return s;
66831
+ }
66832
+ function D() {
66833
+ a++, r || (r = e.subscribe(C), n = createListenerCollection());
66834
+ }
66835
+ function G() {
66836
+ a--, r && a === 0 && (r(), r = void 0, n.clear(), n = nullListeners);
66837
+ }
66838
+ function ne() {
66839
+ s || (s = !0, D());
66840
+ }
66841
+ function oe() {
66842
+ s && (s = !1, G());
66843
+ }
66844
+ const se = {
66845
+ addNestedSub: u,
66846
+ notifyNestedSubs: p,
66847
+ handleChangeWrapper: C,
66848
+ isSubscribed: w,
66849
+ trySubscribe: ne,
66850
+ tryUnsubscribe: oe,
66851
+ getListeners: () => n
66852
+ };
66853
+ return se;
66854
+ }
66855
+ var canUseDOM = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", useIsomorphicLayoutEffect = canUseDOM || isReactNative ? React.useLayoutEffect : React.useEffect;
66856
+ function Provider({
66857
+ store: e,
66858
+ context: t,
66859
+ children: r,
66860
+ serverState: n,
66861
+ stabilityCheck: a = "once",
66862
+ identityFunctionCheck: s = "once"
66863
+ }) {
66864
+ const u = React.useMemo(() => {
66865
+ const w = createSubscription(e);
66866
+ return {
66867
+ store: e,
66868
+ subscription: w,
66869
+ getServerState: n ? () => n : void 0,
66870
+ stabilityCheck: a,
66871
+ identityFunctionCheck: s
66872
+ };
66873
+ }, [e, n, a, s]), p = React.useMemo(() => e.getState(), [e]);
66874
+ useIsomorphicLayoutEffect(() => {
66875
+ const { subscription: w } = u;
66876
+ return w.onStateChange = w.notifyNestedSubs, w.trySubscribe(), p !== e.getState() && w.notifyNestedSubs(), () => {
66877
+ w.tryUnsubscribe(), w.onStateChange = void 0;
66878
+ };
66879
+ }, [u, p]);
66880
+ const C = t || ReactReduxContext;
66881
+ return /* @__PURE__ */ React.createElement(C.Provider, { value: u }, r);
66882
+ }
66883
+ var Provider_default = Provider;
66884
+ function createStoreHook(e = ReactReduxContext) {
66885
+ const t = e === ReactReduxContext ? useReduxContext : (
66886
+ // @ts-ignore
66887
+ createReduxContextHook(e)
66888
+ ), r = () => {
66889
+ const { store: n } = t();
66890
+ return n;
66891
+ };
66892
+ return Object.assign(r, {
66893
+ withTypes: () => r
66894
+ }), r;
66895
+ }
66896
+ var useStore = /* @__PURE__ */ createStoreHook();
66897
+ function createDispatchHook(e = ReactReduxContext) {
66898
+ const t = e === ReactReduxContext ? useStore : createStoreHook(e), r = () => t().dispatch;
66899
+ return Object.assign(r, {
66900
+ withTypes: () => r
66901
+ }), r;
66902
+ }
66903
+ var useDispatch = /* @__PURE__ */ createDispatchHook();
66904
+ initializeUseSelector(withSelectorExports.useSyncExternalStoreWithSelector);
66905
+ console.log("AAA", KgSlice, KgWorkStationSlice);
66906
+ const store = configureStore({
66907
+ middleware: (e) => e({
66908
+ serializableCheck: {
66909
+ ignoredActionPaths: ["payload.fn"],
66910
+ ignoredActions: [],
66911
+ ignoredPaths: []
66912
+ }
66913
+ }),
66914
+ reducer: {
66915
+ Kg: KgSlice.reducer,
66916
+ KgWorkStation: KgWorkStationSlice.reducer
66917
+ }
66918
+ });
66917
66919
  var assign = make_assign(), create$1 = make_create(), trim$1 = make_trim(), Global$5 = typeof window < "u" ? window : commonjsGlobal, util$6 = {
66918
66920
  assign,
66919
66921
  create: create$1,
@@ -67586,16 +67588,6 @@ function getWorkStationArea(e = "") {
67586
67588
  return r || (r = storejs.get(LOCAL_STORAGE_KEY__WORK_STATION_AREA, null)), r;
67587
67589
  };
67588
67590
  }
67589
- const kgWorkStationStore = configureStore({
67590
- middleware: (e) => e({
67591
- serializableCheck: {
67592
- ignoredActionPaths: ["payload.fn"],
67593
- ignoredActions: [],
67594
- ignoredPaths: []
67595
- }
67596
- }),
67597
- reducer: KgWorkStationSlice.reducer
67598
- }), useKgWorkStationDispatch = useDispatch.withTypes(), useKgWorkStationSelector = useSelector.withTypes();
67599
67591
  function useKg() {
67600
67592
  const e = useIntl();
67601
67593
  return {
@@ -67618,14 +67610,14 @@ function doKgWorkStation(e = "") {
67618
67610
  let t = {
67619
67611
  closeModal() {
67620
67612
  var r, n;
67621
- ((n = (r = kgStore.getState().option) == null ? void 0 : r.KgWorkStation) == null ? void 0 : n.isOn) !== !1 && kgWorkStationStore.dispatch(closeModal({ id: e }));
67613
+ ((n = (r = store.getState().Kg.option) == null ? void 0 : r.KgWorkStation) == null ? void 0 : n.isOn) !== !1 && store.dispatch(closeModal({ id: e }));
67622
67614
  },
67623
67615
  get(r) {
67624
- const n = ref(kgWorkStationStore.getState()[e]), a = kgWorkStationStore.subscribe(() => n.value = r(kgWorkStationStore.getState()[e]));
67616
+ const n = ref(store.getState().KgWorkStation[e]), a = store.subscribe(() => n.value = r(store.getState().KgWorkStation[e]));
67625
67617
  return [n, a];
67626
67618
  },
67627
67619
  getIsVisible() {
67628
- const r = ref(getIsVisible(e)(kgWorkStationStore.getState())), n = kgWorkStationStore.subscribe(() => r.value = getIsVisible(e)(kgWorkStationStore.getState()));
67620
+ const r = ref(getIsVisible(e)(store.getState().KgWorkStation)), n = store.subscribe(() => r.value = getIsVisible(e)(store.getState().KgWorkStation));
67629
67621
  return [r, n];
67630
67622
  },
67631
67623
  id: e,
@@ -67641,18 +67633,18 @@ function doKgWorkStation(e = "") {
67641
67633
  }),
67642
67634
  openModal() {
67643
67635
  var r, n;
67644
- ((n = (r = kgStore.getState().option) == null ? void 0 : r.KgWorkStation) == null ? void 0 : n.isOn) !== !1 && kgWorkStationStore.dispatch(openModal({ id: e }));
67636
+ ((n = (r = store.getState().Kg.option) == null ? void 0 : r.KgWorkStation) == null ? void 0 : n.isOn) !== !1 && store.dispatch(openModal({ id: e }));
67645
67637
  },
67646
67638
  set(r) {
67647
67639
  var n;
67648
- ii(`${e} | doKgWorkStation | set() | 进入`), ((n = kgWorkStationStore.getState()[e]) == null ? void 0 : n.isMount) === !0 ? kgWorkStationStore.dispatch(set({ fn: r, id: e })) : this.onMount(async () => (ii(`${e} | doKgWorkStation | set() | dispatch set`), setTimeout(() => {
67649
- kgWorkStationStore.dispatch(set({ fn: r, id: e }));
67640
+ ii(`${e} | doKgWorkStation | set() | 进入`), ((n = store.getState().KgWorkStation[e]) == null ? void 0 : n.isMount) === !0 ? store.dispatch(set({ fn: r, id: e })) : this.onMount(async () => (ii(`${e} | doKgWorkStation | set() | dispatch set`), setTimeout(() => {
67641
+ store.dispatch(set({ fn: r, id: e }));
67650
67642
  }), !1), !0);
67651
67643
  },
67652
- store: kgWorkStationStore,
67644
+ store,
67653
67645
  subscribe(r) {
67654
- return kgWorkStationStore.subscribe(() => {
67655
- r(kgWorkStationStore.getState()[e]);
67646
+ return store.subscribe(() => {
67647
+ r(store.getState().KgWorkStation[e]);
67656
67648
  });
67657
67649
  },
67658
67650
  workStation: null,
@@ -67663,13 +67655,13 @@ function doKgWorkStation(e = "") {
67663
67655
  get(r, n) {
67664
67656
  switch (n) {
67665
67657
  case "workStation":
67666
- return getWorkStation(e)(kgWorkStationStore.getState());
67658
+ return getWorkStation(e)(store.getState().KgWorkStation);
67667
67659
  case "workStation$": {
67668
- const a = ref(getWorkStation(e)(kgWorkStationStore.getState())), s = kgWorkStationStore.subscribe(() => a.value = getWorkStation(e)(kgWorkStationStore.getState()));
67660
+ const a = ref(getWorkStation(e)(store.getState().KgWorkStation)), s = store.subscribe(() => a.value = getWorkStation(e)(store.getState().KgWorkStation));
67669
67661
  return [a, s];
67670
67662
  }
67671
67663
  case "workStationArea":
67672
- return getWorkStationArea(e)(kgWorkStationStore.getState());
67664
+ return getWorkStationArea(e)(store.getState().KgWorkStation);
67673
67665
  }
67674
67666
  return Reflect.get(r, n);
67675
67667
  }
@@ -67749,7 +67741,7 @@ class KgUtil {
67749
67741
  }
67750
67742
  function KgWorkStationModal() {
67751
67743
  var ha;
67752
- const e = useID(), t = doKgWorkStation(e), r = useIntl(), n = useKg(), a = useKgWorkStationDispatch(), s = useKgWorkStationSelector(getIsVisible(e)), u = useKgWorkStationSelector(getIsOpen(e)), [p, C] = reactExports.useState([]), [w, D] = reactExports.useState([]), [G, ne] = reactExports.useState([]), [oe, se] = reactExports.useState(""), [ue, ae] = reactExports.useState(""), ct = useKgWorkStationSelector(getWorkStation()), ea = useKgWorkStationSelector(getWorkStationArea()), ut = ((ha = p.find((ua) => ua.devcod === w[0])) == null ? void 0 : ha.workstationAreas) ?? [], ra = p.filter((ua) => {
67744
+ const e = useID(), t = doKgWorkStation(e), r = useIntl(), n = useKg(), a = useDispatch(), s = useSelector(getIsVisible(e)), u = useSelector(getIsOpen(e)), [p, C] = reactExports.useState([]), [w, D] = reactExports.useState([]), [G, ne] = reactExports.useState([]), [oe, se] = reactExports.useState(""), [ue, ae] = reactExports.useState(""), ct = useSelector(getWorkStation()), ea = useSelector(getWorkStationArea()), ut = ((ha = p.find((ua) => ua.devcod === w[0])) == null ? void 0 : ha.workstationAreas) ?? [], ra = p.filter((ua) => {
67753
67745
  var Ca, ba, da, pa;
67754
67746
  return oe ? ((ba = (Ca = ua.devcod) == null ? void 0 : Ca.toLowerCase()) == null ? void 0 : ba.includes(oe.toLowerCase())) || ((pa = (da = ua.devcodDsc) == null ? void 0 : da.toLowerCase()) == null ? void 0 : pa.includes(oe.toLowerCase())) : ua;
67755
67747
  }) ?? [], ta = ut.filter((ua) => {
@@ -67889,30 +67881,30 @@ function KgWorkStationModal() {
67889
67881
  ) });
67890
67882
  }
67891
67883
  function KgWorkStation() {
67892
- var ne;
67893
- const e = useKgSelector(getOption), t = useKgSelector(getOption2);
67894
- if (console.log("333", e), console.log("333:B", t), !(((ne = e == null ? void 0 : e.KgWorkStation) == null ? void 0 : ne.isOn) !== !1))
67884
+ var G;
67885
+ const e = useSelector(getOption);
67886
+ if (console.log("333", e), !(((G = e == null ? void 0 : e.KgWorkStation) == null ? void 0 : G.isOn) !== !1))
67895
67887
  return null;
67896
- const n = useID(), a = useKg(), s = doKgWorkStation(n), u = useKgWorkStationSelector(getIsVisible(n)), p = useKgWorkStationSelector(getWorkStation()), C = useKgWorkStationSelector(getWorkStationArea()), w = (() => {
67897
- let oe = "text";
67898
- return u || (oe += " kgcrant-kg-invisible"), oe;
67899
- })(), D = (() => {
67900
- if (!p)
67901
- return a.t("KgWorkStation.selectWorkStation");
67902
- let oe = ((p == null ? void 0 : p.devcodDsc) || (p == null ? void 0 : p.devcod)) ?? "";
67903
- return C && (oe += " / " + (C.wrkareDsc ?? C.wrkare ?? "")), oe;
67888
+ const r = useID(), n = useKg(), a = doKgWorkStation(r), s = useSelector(getIsVisible(r)), u = useSelector(getWorkStation()), p = useSelector(getWorkStationArea()), C = (() => {
67889
+ let ne = "text";
67890
+ return s || (ne += " kgcrant-kg-invisible"), ne;
67891
+ })(), w = (() => {
67892
+ if (!u)
67893
+ return n.t("KgWorkStation.selectWorkStation");
67894
+ let ne = ((u == null ? void 0 : u.devcodDsc) || (u == null ? void 0 : u.devcod)) ?? "";
67895
+ return p && (ne += " / " + (p.wrkareDsc ?? p.wrkare ?? "")), ne;
67904
67896
  })();
67905
- function G() {
67906
- s.openModal();
67897
+ function D() {
67898
+ a.openModal();
67907
67899
  }
67908
67900
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
67909
67901
  /* @__PURE__ */ jsxRuntimeExports.jsx(
67910
67902
  Tooltip,
67911
67903
  {
67912
- className: w,
67904
+ className: C,
67913
67905
  placement: "bottomRight",
67914
67906
  title: /* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "KgWorkStation.workStationAndWorkStationArea" }),
67915
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { onClick: G, children: D })
67907
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { onClick: D, children: w })
67916
67908
  }
67917
67909
  ),
67918
67910
  /* @__PURE__ */ jsxRuntimeExports.jsx(KgWorkStationModal, {})
@@ -67924,15 +67916,15 @@ class KgWorkStationElement extends HTMLElement {
67924
67916
  D_(this, "unmount", null);
67925
67917
  }
67926
67918
  connectedCallback() {
67927
- this.id || (this.id = h.uuid()), kgWorkStationStore.dispatch(mount({ id: this.id }));
67919
+ this.id || (this.id = h.uuid()), store.dispatch(mount({ id: this.id }));
67928
67920
  const r = createRoot$1(this);
67929
67921
  r.render(
67930
- /* @__PURE__ */ jsxRuntimeExports.jsx(KgProvider, { id: this.id, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Provider_default, { store: kgWorkStationStore, children: /* @__PURE__ */ jsxRuntimeExports.jsx(KgWorkStation, {}) }) })
67922
+ /* @__PURE__ */ jsxRuntimeExports.jsx(KgProvider, { id: this.id, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Provider_default, { store, children: /* @__PURE__ */ jsxRuntimeExports.jsx(KgWorkStation, {}) }) })
67931
67923
  ), this.unmount = () => r.unmount();
67932
67924
  }
67933
67925
  disconnectedCallback() {
67934
67926
  var r;
67935
- (r = this.unmount) == null || r.call(this), this.unmount = null, kgWorkStationStore.dispatch(unmount({ id: this.id }));
67927
+ (r = this.unmount) == null || r.call(this), this.unmount = null, store.dispatch(unmount({ id: this.id }));
67936
67928
  }
67937
67929
  }
67938
67930
  function initKgWorkStationElement() {
@@ -67943,7 +67935,7 @@ function initWebComponents() {
67943
67935
  }
67944
67936
  function initKgCoreReact(e) {
67945
67937
  const { ref: t, option: r } = e ?? {};
67946
- setRef(t), console.log("000", r), kgStore.dispatch(setOption(r)), initWebComponents();
67938
+ setRef(t), store.dispatch(setOption(r)), initWebComponents();
67947
67939
  }
67948
67940
  export {
67949
67941
  doKgWorkStation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/core.react",
3
- "version": "0.0.1-beta.75",
3
+ "version": "0.0.1-beta.77",
4
4
  "type": "module",
5
5
  "main": "./kengic-core.react.js",
6
6
  "module": "./kengic-core.react.js",
@@ -1,3 +1,4 @@
1
+ import { PayloadAction, Slice, SliceSelectors } from '@reduxjs/toolkit';
1
2
  export interface IKgOption {
2
3
  /** 选择工作站. */
3
4
  KgWorkStation?: {
@@ -14,11 +15,8 @@ export type IKgState = {
14
15
  */
15
16
  option: IKgOption;
16
17
  };
17
- export declare const setOption: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<IKgOption | null | undefined, "Kg/setOption">;
18
+ export declare const KgSlice: Slice<IKgState, {
19
+ setOption(state: IKgState, action: PayloadAction<IKgOption | null | undefined>): void;
20
+ }, string, string, SliceSelectors<IKgState>>;
21
+ export declare const setOption: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<IKgOption | null | undefined, `${string}/setOption`>;
18
22
  export declare function getOption(state: IKgState): IKgOption;
19
- export declare const getOption2: (state: IKgState) => IKgOption;
20
- export declare const kgStore: import("@reduxjs/toolkit").EnhancedStore<IKgState, import("@reduxjs/toolkit").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("@reduxjs/toolkit").StoreEnhancer<{
21
- dispatch: import("@reduxjs/toolkit").ThunkDispatch<IKgState, undefined, import("@reduxjs/toolkit").UnknownAction>;
22
- }>, import("@reduxjs/toolkit").StoreEnhancer]>>;
23
- export declare const useKgDispatch: import("react-redux").UseDispatch<import("@reduxjs/toolkit").ThunkDispatch<IKgState, undefined, import("@reduxjs/toolkit").UnknownAction> & import("@reduxjs/toolkit").Dispatch<import("@reduxjs/toolkit").UnknownAction>>;
24
- export declare const useKgSelector: import("react-redux").UseSelector<IKgState>;
@@ -1,2 +1,3 @@
1
1
  export * from './KgWorkStation';
2
2
  export * from './index.hooks';
3
+ export * from './index.store';
@@ -1,7 +1,8 @@
1
1
  import { IRemoveEventListener } from '@kengic/core.core';
2
2
  import { WorkstationAreaDTO, WorkstationDTO } from '../../api/WMS/models.ts';
3
+ import { store } from '../../index.store.ts';
3
4
  import { IKgWorkStationOnMountEventListener, IKgWorkStationOnOkEventListener } from './index.event';
4
- import { IKgWorkStationState, kgWorkStationStore } from './index.store';
5
+ import { IKgWorkStationState } from './index.store';
5
6
  export interface IDoKgWorkStation {
6
7
  /**
7
8
  * 关闭弹窗.
@@ -47,7 +48,7 @@ export interface IDoKgWorkStation {
47
48
  * @param fn 设置函数.
48
49
  */
49
50
  set(fn: (state: IKgWorkStationState[string]) => void): void;
50
- store: typeof kgWorkStationStore;
51
+ store: typeof store;
51
52
  /**
52
53
  * 订阅数据变更.
53
54
  *
@@ -1,3 +1,4 @@
1
+ import { PayloadAction, Slice, SliceSelectors } from '@reduxjs/toolkit';
1
2
  import { WorkstationAreaDTO, WorkstationDTO } from '../../api/WMS/models.ts';
2
3
  import { KgWorkStationProps } from './index.vm';
3
4
  export type IKgWorkStationState = Record<string, {
@@ -15,30 +16,51 @@ export type IKgWorkStationState = Record<string, {
15
16
  */
16
17
  workStationArea: WorkstationAreaDTO | null;
17
18
  }>;
19
+ export declare const KgWorkStationSlice: Slice<IKgWorkStationState, {
20
+ closeModal(state: IKgWorkStationState, action: PayloadAction<{
21
+ id: string | null | undefined;
22
+ }>): void;
23
+ mount(state: IKgWorkStationState, action: PayloadAction<{
24
+ id: string | null | undefined;
25
+ }>): void;
26
+ openModal(state: IKgWorkStationState, action: PayloadAction<{
27
+ id: string | null | undefined;
28
+ }>): void;
29
+ set(state: IKgWorkStationState, action: PayloadAction<{
30
+ id: string | null | undefined;
31
+ fn: (state: IKgWorkStationState[string]) => void;
32
+ }>): void;
33
+ setWorkStation(state: IKgWorkStationState, action: PayloadAction<{
34
+ id?: string | null | undefined;
35
+ workStation: WorkstationDTO | null;
36
+ }>): void;
37
+ setWorkStationArea(state: IKgWorkStationState, action: PayloadAction<{
38
+ id?: string | null | undefined;
39
+ workStationArea: WorkstationAreaDTO | null;
40
+ }>): void;
41
+ unmount(state: IKgWorkStationState, action: PayloadAction<{
42
+ id: string | null | undefined;
43
+ }>): void;
44
+ }, string, string, SliceSelectors<IKgWorkStationState>>;
18
45
  export declare const set: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
19
46
  id: string | null | undefined;
20
47
  fn: (state: IKgWorkStationState[string]) => void;
21
- }, "KgWorkStation/set">, mount: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
48
+ }, `${string}/set`>, mount: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
22
49
  id: string | null | undefined;
23
- }, "KgWorkStation/mount">, openModal: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
50
+ }, `${string}/mount`>, openModal: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
24
51
  id: string | null | undefined;
25
- }, "KgWorkStation/openModal">, closeModal: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
52
+ }, `${string}/openModal`>, closeModal: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
26
53
  id: string | null | undefined;
27
- }, "KgWorkStation/closeModal">, setWorkStation: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
54
+ }, `${string}/closeModal`>, setWorkStation: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
28
55
  id?: string | null | undefined;
29
56
  workStation: WorkstationDTO | null;
30
- }, "KgWorkStation/setWorkStation">, setWorkStationArea: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
57
+ }, `${string}/setWorkStation`>, setWorkStationArea: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
31
58
  id?: string | null | undefined;
32
59
  workStationArea: WorkstationAreaDTO | null;
33
- }, "KgWorkStation/setWorkStationArea">, unmount: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
60
+ }, `${string}/setWorkStationArea`>, unmount: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
34
61
  id: string | null | undefined;
35
- }, "KgWorkStation/unmount">;
62
+ }, `${string}/unmount`>;
36
63
  export declare function getIsVisible(id: string): (state: IKgWorkStationState) => boolean;
37
64
  export declare function getIsOpen(id: string): (state: IKgWorkStationState) => boolean;
38
65
  export declare function getWorkStation(id?: string): (state: IKgWorkStationState) => WorkstationDTO | null;
39
66
  export declare function getWorkStationArea(id?: string): (state: IKgWorkStationState) => WorkstationAreaDTO | null;
40
- export declare const kgWorkStationStore: import("@reduxjs/toolkit").EnhancedStore<IKgWorkStationState, import("@reduxjs/toolkit").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("@reduxjs/toolkit").StoreEnhancer<{
41
- dispatch: import("@reduxjs/toolkit").ThunkDispatch<IKgWorkStationState, undefined, import("@reduxjs/toolkit").UnknownAction>;
42
- }>, import("@reduxjs/toolkit").StoreEnhancer]>>;
43
- export declare const useKgWorkStationDispatch: import("react-redux").UseDispatch<import("@reduxjs/toolkit").ThunkDispatch<IKgWorkStationState, undefined, import("@reduxjs/toolkit").UnknownAction> & import("@reduxjs/toolkit").Dispatch<import("@reduxjs/toolkit").UnknownAction>>;
44
- export declare const useKgWorkStationSelector: import("react-redux").UseSelector<IKgWorkStationState>;
@@ -1,3 +1,4 @@
1
+ export * from './Kg';
1
2
  export * from './KgModal';
2
3
  export * from './KgVarConfig';
3
4
  export * from './KgWorkStation';
package/src/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import './asset/index.css';
2
2
  import './iconify.init';
3
- import { IKgOption } from './component/Kg';
3
+ import { IKgOption } from './component';
4
4
  export { doKgWorkStation, type IDoKgWorkStation } from './component';
5
5
  export { setHttpClient } from './service';
6
6
  export interface IKgCoreReactOptions {
@@ -0,0 +1,9 @@
1
+ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
2
+ Kg: import("./component").IKgState;
3
+ KgWorkStation: import("./component").IKgWorkStationState;
4
+ }, import("@reduxjs/toolkit").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("@reduxjs/toolkit").StoreEnhancer<{
5
+ dispatch: import("@reduxjs/toolkit").ThunkDispatch<{
6
+ Kg: import("./component").IKgState;
7
+ KgWorkStation: import("./component").IKgWorkStationState;
8
+ }, undefined, import("@reduxjs/toolkit").UnknownAction>;
9
+ }>, import("@reduxjs/toolkit").StoreEnhancer]>>;