@next-bricks/advanced 0.2.7 → 0.2.8
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/bricks.json +1 -1
- package/dist/chunks/{3494.972b2e0f.js → 3494.b8e6c49f.js} +2 -2
- package/dist/chunks/{3494.972b2e0f.js.map → 3494.b8e6c49f.js.map} +1 -1
- package/dist/chunks/4454.a59ada64.js +2 -0
- package/dist/chunks/4454.a59ada64.js.map +1 -0
- package/dist/chunks/7782.d3ee12f3.js +2 -0
- package/dist/chunks/{7782.a1c6ed95.js.map → 7782.d3ee12f3.js.map} +1 -1
- package/dist/chunks/{7822.98f7cdb6.js → 7822.922dd7b8.js} +2 -2
- package/dist/chunks/{7822.98f7cdb6.js.map → 7822.922dd7b8.js.map} +1 -1
- package/dist/chunks/873.8d479b98.js +2 -0
- package/dist/chunks/873.8d479b98.js.map +1 -0
- package/dist/chunks/{9079.b4460562.js → 9079.dff55d61.js} +2 -2
- package/dist/chunks/{9079.b4460562.js.map → 9079.dff55d61.js.map} +1 -1
- package/dist/chunks/{eo-table.5e2117ef.js → eo-table.d4da86be.js} +2 -2
- package/dist/chunks/{eo-table.5e2117ef.js.map → eo-table.d4da86be.js.map} +1 -1
- package/dist/chunks/main.131ed4aa.js +2 -0
- package/dist/chunks/{main.611b436a.js.map → main.131ed4aa.js.map} +1 -1
- package/dist/index.1c07bd60.js +2 -0
- package/dist/{index.203041a4.js.map → index.1c07bd60.js.map} +1 -1
- package/package.json +2 -2
- package/dist/chunks/4454.eec92589.js +0 -2
- package/dist/chunks/4454.eec92589.js.map +0 -1
- package/dist/chunks/7782.a1c6ed95.js +0 -2
- package/dist/chunks/873.8d0551e0.js +0 -2
- package/dist/chunks/873.8d0551e0.js.map +0 -1
- package/dist/chunks/main.611b436a.js +0 -2
- package/dist/index.203041a4.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_next_bricks_advanced=self.webpackChunk_next_bricks_advanced||[]).push([[7822,4795,3494],{4795:(e,t,r)=>{function n(e,t,r,n,a,u,i){try{var c=e[u](i),s=c.value}catch(e){return void r(e)}c.done?t(s):Promise.resolve(s).then(n,a)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(a,u){var i=e.apply(t,r);function c(e){n(i,a,u,c,s,"next",e)}function s(e){n(i,a,u,c,s,"throw",e)}c(void 0)}))}}r.d(t,{Z:()=>a})},7822:(e,t,r)=>{r.r(t),r.d(t,{ReactUseBrick:()=>c,ReactUseMultipleBricks:()=>s,useCurrentApp:()=>v,useCurrentTheme:()=>d,useRecentApps:()=>f});var n,a=r(4795),u=r(8657),i=r(
|
|
2
|
-
//# sourceMappingURL=7822.
|
|
1
|
+
"use strict";(self.webpackChunk_next_bricks_advanced=self.webpackChunk_next_bricks_advanced||[]).push([[7822,4795,3494],{4795:(e,t,r)=>{function n(e,t,r,n,a,u,i){try{var c=e[u](i),s=c.value}catch(e){return void r(e)}c.done?t(s):Promise.resolve(s).then(n,a)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(a,u){var i=e.apply(t,r);function c(e){n(i,a,u,c,s,"next",e)}function s(e){n(i,a,u,c,s,"throw",e)}c(void 0)}))}}r.d(t,{Z:()=>a})},7822:(e,t,r)=>{r.r(t),r.d(t,{ReactUseBrick:()=>c,ReactUseMultipleBricks:()=>s,useCurrentApp:()=>v,useCurrentTheme:()=>d,useRecentApps:()=>f});var n,a=r(4795),u=r(8657),i=r(5135),c=function(e){var{useBrick:t,data:r}=e,[n,c]=(0,u.useState)(null),s=(0,u.useRef)(),[o,l]=(0,u.useState)(),d=(0,u.useRef)(0);(0,u.useEffect)((()=>{function e(){return(e=(0,a.Z)((function*(){try{c(yield i.__secret_internals.renderUseBrick(t,r)),l(++d.current)}catch(e){console.error("Render useBrick failed:",t,"with data:",r),(0,i.handleHttpError)(e)}}))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[r,t]);var f=(0,u.useCallback)((e=>{e?s.current=i.__secret_internals.mountUseBrick(n,e):(i.__secret_internals.unmountUseBrick(n,s.current),s.current=void 0)}),[n]);if(!n)return null;var{tagName:v}=n;if(null===v)return null;var p=v;return u.createElement(p,{key:o,ref:f})},s=function(e){var{useBrick:t,data:r}=e;return Array.isArray(t)?u.createElement(u.Fragment,null,t.map(((e,t)=>u.createElement(c,{key:t,useBrick:e,data:r})))):u.createElement(c,{useBrick:t,data:r})};if(window.dll&&null!==(n=window.BRICK_NEXT_VERSIONS)&&void 0!==n&&null!==(n=n["brick-container"])&&void 0!==n&&n.startsWith("2.")){var{SingleBrickAsComponentFactory:o,BrickAsComponentFactory:l}=window.dll("tYg3");o&&l&&(c=o(u),s=l(u))}function d(){var[e,t]=(0,u.useState)(i.getCurrentTheme);return(0,u.useEffect)((()=>{var e=e=>{t(e.detail)};return window.addEventListener("theme.change",e),()=>{window.removeEventListener("theme.change",e)}}),[]),e}function f(){var[e,t]=u.useState((()=>(0,i.getRuntime)().getRecentApps()));return u.useEffect((()=>{var e=e=>{t(e.detail)};return window.addEventListener("app.change",e),()=>window.removeEventListener("app.change",e)}),[]),e}function v(){return f().currentApp}}}]);
|
|
2
|
+
//# sourceMappingURL=7822.922dd7b8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/7822.
|
|
1
|
+
{"version":3,"file":"chunks/7822.922dd7b8.js","mappings":"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","sources":["webpack:///../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/ReactUseBrick.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useCurrentTheme.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useRecentApps.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useCurrentApp.js"],"sourcesContent":["function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nvar _window$BRICK_NEXT_VE;\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport { __secret_internals, handleHttpError } from \"@next-core/runtime\";\n// Note: always synchronize code in LegacyUseBrick:\n// `bricks/v2-adapter/src/data-providers/legacy-brick-kit/getLegacyUseBrick.ts`\nvar ReactUseBrick = function ReactUseBrick(_ref) {\n var {\n useBrick,\n data\n } = _ref;\n var [renderResult, setRenderResult] = useState(null);\n var mountResult = useRef();\n var [renderKey, setRenderKey] = useState();\n var IdCounterRef = useRef(0);\n useEffect(() => {\n function init() {\n return _init.apply(this, arguments);\n }\n function _init() {\n _init = _asyncToGenerator(function* () {\n try {\n setRenderResult(yield __secret_internals.renderUseBrick(useBrick, data));\n setRenderKey(getUniqueId(IdCounterRef));\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Render useBrick failed:\", useBrick, \"with data:\", data);\n handleHttpError(error);\n }\n });\n return _init.apply(this, arguments);\n }\n init();\n }, [data, useBrick]);\n var refCallback = useCallback(element => {\n if (element) {\n mountResult.current = __secret_internals.mountUseBrick(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n renderResult, element);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n __secret_internals.unmountUseBrick(renderResult, mountResult.current);\n mountResult.current = undefined;\n }\n }, [renderResult]);\n if (!renderResult) {\n // Fallback when loading/\n return null;\n // return <span>🌀 Loading...</span>;\n }\n\n var {\n tagName\n } = renderResult;\n if (tagName === null) {\n return null;\n }\n var WebComponent = tagName;\n return /*#__PURE__*/React.createElement(WebComponent, {\n key: renderKey,\n ref: refCallback\n });\n};\nfunction getUniqueId(ref) {\n return ++ref.current;\n}\nvar ReactUseMultipleBricks = function ReactUseMultipleBricks(_ref2) {\n var {\n useBrick,\n data\n } = _ref2;\n if (Array.isArray(useBrick)) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, useBrick.map((item, index) => /*#__PURE__*/React.createElement(ReactUseBrick, {\n key: index,\n useBrick: item,\n data: data\n })));\n }\n return /*#__PURE__*/React.createElement(ReactUseBrick, {\n useBrick: useBrick,\n data: data\n });\n};\n\n// istanbul ignore next\n// Make v3 bricks compatible with Brick Next v2.\nif (window.dll && (_window$BRICK_NEXT_VE = window.BRICK_NEXT_VERSIONS) !== null && _window$BRICK_NEXT_VE !== void 0 && (_window$BRICK_NEXT_VE = _window$BRICK_NEXT_VE[\"brick-container\"]) !== null && _window$BRICK_NEXT_VE !== void 0 && _window$BRICK_NEXT_VE.startsWith(\"2.\")) {\n var {\n SingleBrickAsComponentFactory,\n BrickAsComponentFactory\n } = window.dll(\"tYg3\");\n if (SingleBrickAsComponentFactory && BrickAsComponentFactory) {\n ReactUseBrick = SingleBrickAsComponentFactory(React);\n ReactUseMultipleBricks = BrickAsComponentFactory(React);\n }\n}\nexport { ReactUseBrick, ReactUseMultipleBricks };\n//# sourceMappingURL=ReactUseBrick.js.map","import { useEffect, useState } from \"react\";\nimport { getCurrentTheme } from \"@next-core/runtime\";\nexport function useCurrentTheme() {\n var [currentTheme, setCurrentTheme] = useState(getCurrentTheme);\n useEffect(() => {\n var listenToThemeChange = event => {\n setCurrentTheme(event.detail);\n };\n window.addEventListener(\"theme.change\", listenToThemeChange);\n return () => {\n window.removeEventListener(\"theme.change\", listenToThemeChange);\n };\n }, []);\n return currentTheme;\n}\n//# sourceMappingURL=useCurrentTheme.js.map","import React from \"react\";\nimport { getRuntime } from \"@next-core/runtime\";\nexport function useRecentApps() {\n var [recentApps, setRecentApps] = React.useState(() => getRuntime().getRecentApps());\n React.useEffect(() => {\n var listener = event => {\n setRecentApps(event.detail);\n };\n window.addEventListener(\"app.change\", listener);\n return () => window.removeEventListener(\"app.change\", listener);\n }, []);\n return recentApps;\n}\n//# sourceMappingURL=useRecentApps.js.map","import { useRecentApps } from \"./useRecentApps.js\";\n\n/**\n * 获取当前所在微应用信息的 React hooks。\n *\n * @example\n *\n * ```tsx\n * function MyReactComponent() {\n * const app = useCurrentApp();\n * return <div>{app.id}</div>;\n * }\n * ```\n *\n * @returns 当前所在微应用的信息。\n */\nexport function useCurrentApp() {\n return useRecentApps().currentApp;\n}\n//# sourceMappingURL=useCurrentApp.js.map"],"names":["asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","this","args","arguments","apply","err","undefined","_window$BRICK_NEXT_VE","ReactUseBrick","_ref","useBrick","data","renderResult","setRenderResult","useState","mountResult","useRef","renderKey","setRenderKey","IdCounterRef","useEffect","_init","__secret_internals","renderUseBrick","current","console","handleHttpError","init","refCallback","useCallback","element","mountUseBrick","unmountUseBrick","tagName","WebComponent","ref","ReactUseMultipleBricks","_ref2","Array","isArray","map","item","index","window","dll","BRICK_NEXT_VERSIONS","startsWith","SingleBrickAsComponentFactory","BrickAsComponentFactory","useCurrentTheme","currentTheme","setCurrentTheme","getCurrentTheme","listenToThemeChange","event","detail","addEventListener","removeEventListener","useRecentApps","recentApps","setRecentApps","getRuntime","getRecentApps","listener","useCurrentApp","currentApp"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_next_bricks_advanced=self.webpackChunk_next_bricks_advanced||[]).push([[873,4795,4454],{4795:(e,r,t)=>{function n(e,r,t,n,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void t(e)}c.done?r(s):Promise.resolve(s).then(n,o)}function o(e){return function(){var r=this,t=arguments;return new Promise((function(o,a){var i=e.apply(r,t);function c(e){n(i,o,a,c,s,"next",e)}function s(e){n(i,o,a,c,s,"throw",e)}c(void 0)}))}}t.d(r,{Z:()=>o})},4454:(e,r,t)=>{t.r(r),t.d(r,{enqueueStableLoadBricks:()=>f,enqueueStableLoadProcessors:()=>v,flushStableLoadBricks:()=>d,loadBricksImperatively:()=>h,loadProcessorsImperatively:()=>w,loadScript:()=>o,loadSharedModule:()=>c});var n=new Map;function o(e,r){if(Array.isArray(e))return Promise.all(e.map((e=>o(e,r))));var t=r&&!/^https?:/.test(e)?"".concat(r).concat(e):e,a=n.get(t);if(a)return a;var i=new Promise(((e,r)=>{var n=()=>{window.dispatchEvent(new Event("request.end"))},o=document.createElement("script");o.src=t,o.type="text/javascript",o.async=!0,o.onload=()=>{e(t),n()},o.onerror=e=>{r(e),n()};var a=document.currentScript||document.getElementsByTagName("script")[0];a.parentNode.insertBefore(o,a),window.dispatchEvent(new Event("request.start"))}));return n.set(t,i),i}var a,i=t(4795);function c(e,r){return s.apply(this,arguments)}function s(){return(s=(0,i.Z)((function*(e,r){yield t.I("default");var n=window[e];return yield n.init(t.S.default),(yield n.get(r))()}))).apply(this,arguments)}var u,l=!1,p=new Promise((e=>{a=e}));function d(){l||a()}function f(e,r){return _(E("bricks",e,r))}function v(e,r){return _(E("processors",e,r))}function h(e,r){return y.apply(this,arguments)}function y(){return(y=(0,i.Z)((function*(e,r){var t=E("bricks",e,r);return d(),_(t)}))).apply(this,arguments)}function w(e,r){var t=E("processors",e,r);return d(),_(t)}var m="v2-adapter.load-bricks";function k(e,r,t){var n=new Map,o=new Set,a=r=>{var i;if(!o.has(r)){var c,s,u;if(o.add(r),"processors"===e||r.includes(".")){[s,u]=r.split(".");var l="bricks/".concat("processors"===e?s.replace(/[A-Z]/g,(e=>"-".concat(e[0].toLocaleLowerCase()))).replace(/_[0-9]/g,(e=>"-".concat(e[1]))):s);c=t.get(l)}else for(var p of(u=r,t.values())){var d;if(null!==(d=p.elements)&&void 0!==d&&d.some((e=>e===u))){c=p;break}}if(!c)throw new Error("Package for ".concat(r," not found."));var f=n.get(c);f||(f=[],n.set(c,f)),f.push(u);var v=null===(i=c.dependencies)||void 0===i?void 0:i[r];if(v)for(var h of v)a(h)}};for(var i of r)a(i);return n}function P(e,r,t){return b.apply(this,arguments)}function b(){return(b=(0,i.Z)((function*(e,r,t){var n="".concat("processors"===e?"./processors/":"./").concat(t);try{yield c(r,n)}catch(t){throw console.error(t),new Error("Load ".concat(e,' of "').concat(r.split("/").pop(),".").concat(n.split("/").pop(),'" failed'))}}))).apply(this,arguments)}function g(e,r,t){return r.map(function(){var r=(0,i.Z)((function*(r){var n;return yield o(r.filePath,null!==(n=window.PUBLIC_ROOT)&&void 0!==n?n:""),yield p,Promise.all(t.get(r).map((t=>P(e,r.id,t))))}));return function(e){return r.apply(this,arguments)}}())}function E(e,r,t){return Z.apply(this,arguments)}function Z(){return Z=(0,i.Z)((function*(e,r,t){var n=new Map;for(var c of t){var s,p=null!==(s=c.id)&&void 0!==s?s:S(c.filePath);n.set(p,c)}var d,f,v=k(e,r,n),h=[],y=[];for(var w of v.keys())w.id?"bricks/basic"===w.id?d=w:y.push(w):(h.push(w),(f=n.get("bricks/v2-adapter"))||console.error("Using v2 bricks, but v2-adapter not found"));var b,E=f,Z=d;if(Z){var _,L=o(Z.filePath,null!==(_=window.PUBLIC_ROOT)&&void 0!==_?_:"");l||(l=!0,L.then((()=>Promise.resolve())).then(a)),b=L.then((()=>Promise.all(v.get(Z).map((r=>P(e,Z.id,r))))))}var B=[b].concat(g(e,y,v));if(E&&h.length>0){if(!u){var q=k("bricks",[m],n),C=[...q.keys()],I=function(){var e=(0,i.Z)((function*(){return yield Promise.all(g("bricks",C,q)),document.createElement(m)}));return function(){return e.apply(this,arguments)}}();u=I()}B.push(u.then((r=>Promise.all(h.map((n=>{var o=S(n.filePath).split("/")[1];return r.resolve(E.filePath,n.filePath,"bricks"===e?v.get(n).map((e=>"".concat(o,".").concat(e))):[],n.dll,t)}))))))}yield Promise.all(B)})),Z.apply(this,arguments)}function _(e){return L.apply(this,arguments)}function L(){return(L=(0,i.Z)((function*(e){window.dispatchEvent(new Event("request.start"));try{yield e}finally{window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function S(e){return e.split("/").slice(0,2).join("/")}}}]);
|
|
2
|
+
//# sourceMappingURL=873.8d479b98.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/873.8d479b98.js","mappings":"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","sources":["webpack:///../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack:///../../node_modules/@next-core/loader/dist/esm/loadScript.js","webpack:///../../node_modules/@next-core/loader/dist/esm/stableLoadBricks.js","webpack:///../../node_modules/@next-core/loader/dist/esm/loadSharedModule.js"],"sourcesContent":["function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","var cache = new Map();\nexport default function loadScript(src, prefix) {\n if (Array.isArray(src)) {\n return Promise.all(src.map(item => loadScript(item, prefix)));\n }\n var fixedSrc = prefix && !/^https?:/.test(src) ? \"\".concat(prefix).concat(src) : src;\n var cachedPromise = cache.get(fixedSrc);\n if (cachedPromise) {\n return cachedPromise;\n }\n var promise = new Promise((resolve, reject) => {\n var end = () => {\n window.dispatchEvent(new Event(\"request.end\"));\n };\n var script = document.createElement(\"script\");\n script.src = fixedSrc;\n script.type = \"text/javascript\";\n script.async = true;\n script.onload = () => {\n resolve(fixedSrc);\n end();\n };\n script.onerror = e => {\n reject(e);\n end();\n };\n var firstScript = document.currentScript || document.getElementsByTagName(\"script\")[0];\n firstScript.parentNode.insertBefore(script, firstScript);\n window.dispatchEvent(new Event(\"request.start\"));\n });\n cache.set(fixedSrc, promise);\n return promise;\n}\n//# sourceMappingURL=loadScript.js.map","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport loadScript from \"./loadScript.js\";\nimport loadSharedModule from \"./loadSharedModule.js\";\nvar resolveBasicPkg;\nvar basicPkgWillBeResolved = false;\nvar waitBasicPkg = new Promise(resolve => {\n resolveBasicPkg = resolve;\n});\nexport function flushStableLoadBricks() {\n if (!basicPkgWillBeResolved) {\n resolveBasicPkg();\n }\n}\n\n/**\n * When loading bundles with webpack module federation concurrently, if\n * these bundles share some modules, webpack will load a singleton module\n * if versions are matched. Webpack will use the first bundle who started\n * to init the shared scope. Generally which bundle to use for a specific\n * module, does not matter. However, it may cause flaky result since the\n * shared module may from different bundles which maybe not exactly the\n * same, especially developers declare dependencies incorrectly sometimes.\n * So in order to make it less flaky, we try to make a BASIC package takes\n * precedence over others. We will always load the shared modules from the\n * basic package bundle if it contains the shared modules.\n */\nexport function enqueueStableLoadBricks(bricks, brickPackages) {\n var promise = enqueueStableLoad(\"bricks\", bricks, brickPackages);\n return dispatchRequestStatus(promise);\n}\nexport function enqueueStableLoadProcessors(processors, brickPackages) {\n var promise = enqueueStableLoad(\"processors\", processors, brickPackages);\n return dispatchRequestStatus(promise);\n}\nexport function loadBricksImperatively(_x, _x2) {\n return _loadBricksImperatively.apply(this, arguments);\n}\nfunction _loadBricksImperatively() {\n _loadBricksImperatively = _asyncToGenerator(function* (bricks, brickPackages) {\n var promise = enqueueStableLoad(\"bricks\", bricks, brickPackages);\n flushStableLoadBricks();\n return dispatchRequestStatus(promise);\n });\n return _loadBricksImperatively.apply(this, arguments);\n}\nexport function loadProcessorsImperatively(processors, brickPackages) {\n var promise = enqueueStableLoad(\"processors\", processors, brickPackages);\n flushStableLoadBricks();\n return dispatchRequestStatus(promise);\n}\nvar v2AdapterPromise;\nvar V2_ADAPTER_LOAD_BRICKS = \"v2-adapter.load-bricks\";\n\n// Get brick/processor items including their dependencies\nfunction getItemsByPkg(type, list, brickPackagesMap) {\n var itemsByPkg = new Map();\n var listToLoad = new Set();\n var add = item => {\n var _pkg$dependencies;\n if (listToLoad.has(item)) {\n return;\n }\n listToLoad.add(item);\n var pkg;\n var namespace;\n var itemName;\n if (type === \"processors\" || item.includes(\".\")) {\n [namespace, itemName] = item.split(\".\");\n var pkgId = \"bricks/\".concat(type === \"processors\" ? getProcessorPackageName(namespace) : namespace);\n pkg = brickPackagesMap.get(pkgId);\n } else {\n itemName = item;\n for (var p of brickPackagesMap.values()) {\n var _p$elements;\n if ((_p$elements = p.elements) !== null && _p$elements !== void 0 && _p$elements.some(e => e === itemName)) {\n pkg = p;\n break;\n }\n }\n }\n if (!pkg) {\n throw new Error(\"Package for \".concat(item, \" not found.\"));\n }\n var groupItems = itemsByPkg.get(pkg);\n if (!groupItems) {\n groupItems = [];\n itemsByPkg.set(pkg, groupItems);\n }\n groupItems.push(itemName);\n\n // Load their dependencies too\n var deps = (_pkg$dependencies = pkg.dependencies) === null || _pkg$dependencies === void 0 ? void 0 : _pkg$dependencies[item];\n if (deps) {\n for (var dep of deps) {\n add(dep);\n }\n }\n };\n for (var item of list) {\n add(item);\n }\n return itemsByPkg;\n}\nfunction loadBrickModule(_x3, _x4, _x5) {\n return _loadBrickModule.apply(this, arguments);\n}\nfunction _loadBrickModule() {\n _loadBrickModule = _asyncToGenerator(function* (type, pkgId, itemName) {\n var moduleName = \"\".concat(type === \"processors\" ? \"./processors/\" : \"./\").concat(itemName);\n try {\n yield loadSharedModule(pkgId, moduleName);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n throw new Error(\"Load \".concat(type, \" of \\\"\").concat(pkgId.split(\"/\").pop(), \".\").concat(moduleName.split(\"/\").pop(), \"\\\" failed\"));\n }\n });\n return _loadBrickModule.apply(this, arguments);\n}\nfunction loadRestBricks(type, pkgs, itemsMap) {\n return pkgs.map( /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (pkg) {\n var _window$PUBLIC_ROOT;\n yield loadScript(pkg.filePath, (_window$PUBLIC_ROOT = window.PUBLIC_ROOT) !== null && _window$PUBLIC_ROOT !== void 0 ? _window$PUBLIC_ROOT : \"\");\n yield waitBasicPkg;\n return Promise.all(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n itemsMap.get(pkg).map(itemName => loadBrickModule(type, pkg.id, itemName)));\n });\n return function (_x6) {\n return _ref.apply(this, arguments);\n };\n }());\n}\nfunction enqueueStableLoad(_x7, _x8, _x9) {\n return _enqueueStableLoad.apply(this, arguments);\n}\nfunction _enqueueStableLoad() {\n _enqueueStableLoad = _asyncToGenerator(function* (type, list, brickPackages) {\n var brickPackagesMap = new Map();\n for (var pkg of brickPackages) {\n var _pkg$id;\n var pkgId = (_pkg$id = pkg.id) !== null && _pkg$id !== void 0 ? _pkg$id : getPkgIdByFilePath(pkg.filePath);\n brickPackagesMap.set(pkgId, pkg);\n }\n var itemsByPkg = getItemsByPkg(type, list, brickPackagesMap);\n var foundBasicPkg;\n var v2Packages = [];\n var v3PackagesOtherThanBasic = [];\n var maybeV2Adapter;\n for (var _pkg of itemsByPkg.keys()) {\n if (_pkg.id) {\n if (_pkg.id === \"bricks/basic\") {\n foundBasicPkg = _pkg;\n } else {\n v3PackagesOtherThanBasic.push(_pkg);\n }\n } else {\n // Brick packages of v2 has no `id`\n v2Packages.push(_pkg);\n maybeV2Adapter = brickPackagesMap.get(\"bricks/v2-adapter\");\n if (!maybeV2Adapter) {\n // eslint-disable-next-line no-console\n console.error(\"Using v2 bricks, but v2-adapter not found\");\n }\n }\n }\n var v2Adapter = maybeV2Adapter;\n var basicPkgPromise;\n var basicPkg = foundBasicPkg;\n if (basicPkg) {\n var _window$PUBLIC_ROOT2;\n var tempPromise = loadScript(basicPkg.filePath, (_window$PUBLIC_ROOT2 = window.PUBLIC_ROOT) !== null && _window$PUBLIC_ROOT2 !== void 0 ? _window$PUBLIC_ROOT2 : \"\");\n // Packages other than BASIC will wait for an extra micro-task tick.\n if (!basicPkgWillBeResolved) {\n basicPkgWillBeResolved = true;\n tempPromise.then(() => Promise.resolve()).then(resolveBasicPkg);\n }\n basicPkgPromise = tempPromise.then(() => Promise.all(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n itemsByPkg.get(basicPkg).map(itemName => loadBrickModule(type, basicPkg.id, itemName))));\n }\n var pkgPromises = [basicPkgPromise].concat(loadRestBricks(type, v3PackagesOtherThanBasic, itemsByPkg));\n if (v2Adapter && v2Packages.length > 0) {\n if (!v2AdapterPromise) {\n // Load `v2-adapter.load-bricks` and its dependencies\n var v2AdapterItemsByPkg = getItemsByPkg(\"bricks\", [V2_ADAPTER_LOAD_BRICKS], brickPackagesMap);\n var v2AdapterPackages = [...v2AdapterItemsByPkg.keys()];\n var loadV2Adapter = /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator(function* () {\n yield Promise.all(loadRestBricks(\"bricks\", v2AdapterPackages, v2AdapterItemsByPkg));\n return document.createElement(V2_ADAPTER_LOAD_BRICKS);\n });\n return function loadV2Adapter() {\n return _ref2.apply(this, arguments);\n };\n }();\n v2AdapterPromise = loadV2Adapter();\n }\n pkgPromises.push(v2AdapterPromise.then(adapter => Promise.all(v2Packages.map(pkg => {\n var pkgId = getPkgIdByFilePath(pkg.filePath);\n var pkgNamespace = pkgId.split(\"/\")[1];\n return adapter.resolve(v2Adapter.filePath, pkg.filePath, type === \"bricks\" ?\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n itemsByPkg.get(pkg).map(itemName => \"\".concat(pkgNamespace, \".\").concat(itemName)) : [], pkg.dll,\n // Todo: remove `brickPackages` as an argument\n brickPackages);\n }))));\n }\n yield Promise.all(pkgPromises);\n });\n return _enqueueStableLoad.apply(this, arguments);\n}\nfunction dispatchRequestStatus(_x10) {\n return _dispatchRequestStatus.apply(this, arguments);\n}\nfunction _dispatchRequestStatus() {\n _dispatchRequestStatus = _asyncToGenerator(function* (promise) {\n window.dispatchEvent(new Event(\"request.start\"));\n try {\n yield promise;\n } finally {\n window.dispatchEvent(new Event(\"request.end\"));\n }\n });\n return _dispatchRequestStatus.apply(this, arguments);\n}\nfunction getProcessorPackageName(camelPackageName) {\n return camelPackageName.replace(/[A-Z]/g, match => \"-\".concat(match[0].toLocaleLowerCase())).replace(/_[0-9]/g, match => \"-\".concat(match[1]));\n}\nfunction getPkgIdByFilePath(filePath) {\n return filePath.split(\"/\").slice(0, 2).join(\"/\");\n}\n//# sourceMappingURL=stableLoadBricks.js.map","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\n// https://github.com/module-federation/module-federation-examples/blob/eda9493f3991a423479fd834cfb1d7b241d9d1f0/advanced-api/dynamic-remotes/app1/src/App.js\nexport default function loadSharedModule(_x, _x2) {\n return _loadSharedModule.apply(this, arguments);\n}\nfunction _loadSharedModule() {\n _loadSharedModule = _asyncToGenerator(function* (scope, module) {\n // Initializes the share scope. This fills it with known provided modules from this build and all remotes\n yield __webpack_init_sharing__(\"default\");\n var container = window[scope]; // or get the container somewhere else\n // Initialize the container, it may provide shared modules\n yield container.init(__webpack_share_scopes__.default);\n var factory = yield container.get(module);\n return factory();\n });\n return _loadSharedModule.apply(this, arguments);\n}\n//# sourceMappingURL=loadSharedModule.js.map"],"names":["asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","this","args","arguments","apply","err","undefined","cache","Map","loadScript","src","prefix","Array","isArray","all","map","item","fixedSrc","test","concat","cachedPromise","get","promise","end","window","dispatchEvent","Event","script","document","createElement","type","async","onload","onerror","e","firstScript","currentScript","getElementsByTagName","parentNode","insertBefore","set","resolveBasicPkg","loadSharedModule","_x","_x2","_loadSharedModule","scope","module","container","init","default","v2AdapterPromise","basicPkgWillBeResolved","waitBasicPkg","flushStableLoadBricks","enqueueStableLoadBricks","bricks","brickPackages","dispatchRequestStatus","enqueueStableLoad","enqueueStableLoadProcessors","processors","loadBricksImperatively","_loadBricksImperatively","loadProcessorsImperatively","V2_ADAPTER_LOAD_BRICKS","getItemsByPkg","list","brickPackagesMap","itemsByPkg","listToLoad","Set","add","_pkg$dependencies","has","pkg","namespace","itemName","includes","split","pkgId","replace","match","toLocaleLowerCase","p","values","_p$elements","elements","some","Error","groupItems","push","deps","dependencies","dep","loadBrickModule","_x3","_x4","_x5","_loadBrickModule","moduleName","console","pop","loadRestBricks","pkgs","itemsMap","_ref","_window$PUBLIC_ROOT","filePath","PUBLIC_ROOT","id","_x6","_x7","_x8","_x9","_enqueueStableLoad","_pkg$id","getPkgIdByFilePath","foundBasicPkg","maybeV2Adapter","v2Packages","v3PackagesOtherThanBasic","_pkg","keys","basicPkgPromise","v2Adapter","basicPkg","_window$PUBLIC_ROOT2","tempPromise","pkgPromises","length","v2AdapterItemsByPkg","v2AdapterPackages","loadV2Adapter","_ref2","adapter","pkgNamespace","dll","_x10","_dispatchRequestStatus","slice","join"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_next_bricks_advanced=self.webpackChunk_next_bricks_advanced||[]).push([[9079],{5202:(e,t,a)=>{a.r(t);var i=a(3028),s=a(6666),l=a(3395),r=a(1815),n=a(381),o=a(687),h=a(2604),d=a(8657),c=a.n(d),u=a(2061),p=a(8978),w=a(2869),g=a(5178),v=a(7975),m=a(7896),Z=a(2159),f=a(4275),b={$eq:g.isEqual,$lt:g.lt,$lte:g.lte,$gt:g.gt,$gte:g.gte,$ne:(e,t)=>!(0,g.isEqual)(e,t),$isEqual:g.isEqual,$notEqual:(e,t)=>!(0,g.isEqual)(e,t),$in:g.includes,$nin:(e,t)=>!(0,g.includes)(e,t),$exists:(e,t)=>e?!(0,g.isUndefined)(t):(0,g.isUndefined)(t)};function y(e,t,a){var{dataIndex:i,mapping:s}=e,l=void 0!==i?(0,g.get)(t,i):a,r=s.find((e=>e.value===l));return r?{borderLeft:"4px solid ".concat(r.leftBorderColor)}:{}}var C=(e,t,a,i)=>{e&&(0,g.forEach)(e,(e=>{var s=(0,g.get)(e,a),l=(0,g.get)(e,t);i.push(l),null!=s&&s.length&&C(s,t,a,i)}))},x=(e,t,a)=>{e&&(0,g.forEach)(e,(e=>{var i=(0,g.get)(e,t);a.push(e),null!=i&&i.length&&x(i,t,a)}))};function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null!=t&&t.length&&t.forEach((t=>{var a;return null!==(a=t[e])&&void 0!==a&&a.length?S(e,t[e]):(delete t[e],t)})),t}var _=a(2779),k=a.n(_),R=a(8533),E=a(2689),W=a(2238),M=a(8683),K=a(4819),P=a.n(K),I=a(9149),N=a(3691),B=["index","moveRow","className","style"],U=["useBrick","valueSuffix","cellStatus","cellStyle","headerBrick","colSpanKey","rowSpanKey","filterDropdownBrick"],D="DraggableBodyRow",z={lib:"antd",icon:"down",theme:"outlined"},A={lib:"antd",icon:"right",theme:"outlined"},T=(0,p.wrapBrick)("eo-icon"),F=e=>{var{index:t,moveRow:a,className:s,style:l}=e,r=(0,Z.Z)(e,B),n=c().useRef(null),[{isOver:o,dropClassName:h},d]=(0,R.L)({accept:D,collect:e=>{var{index:a}=e.getItem()||{};return a===t?{}:{isOver:e.isOver(),dropClassName:a<t?"dropOverDownward":"dropOverUpward"}},drop:e=>{a(e.index,t)}}),[,u]=(0,E.c)({type:D,item:{type:D,index:t},collect:e=>({isDragging:e.isDragging()})});return d(u(n)),c().createElement("tr",(0,m.Z)({ref:n,className:k()(s,{[h]:o}),style:(0,i.Z)({cursor:"move"},l)},r))};function O(e){if(e.error)throw e.error;var{configProps:t={pagination:!0,sortBy:!1},columns:a,rowKey:s="key",expandIconAsCell:l,expandIconColumnIndex:r,childrenColumnName:n,scroll:o,optimizedColumns:h,onDelete:u,ellipsisInfo:p,showHeader:w}=e,v=(0,d.useMemo)((()=>{var t;return null===(t=e.dataSource)||void 0===t?void 0:t.map(((e,t)=>(0,g.isNil)(e[s])?(0,i.Z)((0,i.Z)({},e),{},{[s]:t}):e))}),[e.dataSource,s]),[b,C]=(0,d.useState)(v),x=(0,d.useRef)(new Map),S=(0,d.useRef)(new Map),_=(0,d.useRef)(new Map),R=(0,d.useRef)(new Map);(0,d.useEffect)((()=>{R.current.clear(),C(v)}),[v]);var E=null!=t&&t.rowSelection?-1:0,K=(0,d.useMemo)((()=>{if(a){S.current.clear(),_.current.clear();var e=a.map(((e,t)=>{var a,{useBrick:o,valueSuffix:h,cellStatus:d,cellStyle:u={},headerBrick:w,colSpanKey:v,rowSpanKey:m,filterDropdownBrick:f}=e,b=(0,Z.Z)(e,U);if(null!=w&&w.useBrick){var C=null==w?void 0:w.useBrick,k=S.current.get(e);k||(k={title:b.title},S.current.set(e,k)),b.title=((e,t)=>function(){return c().createElement(I.ReactUseMultipleBricks,{useBrick:e,data:t})})(C,k)}if(null!=f&&f.useBrick&&(b.filterDropdown=c().createElement(I.ReactUseMultipleBricks,{useBrick:f.useBrick})),o?(o&&((a=_.current.get(o))||(a=new Map,_.current.set(o,a))),b.render=((e,t)=>function(a,i,s){if(e){var l=null==t?void 0:t.get(i);return l||(l={cellData:a,rowData:i,columnIndex:s},null==t||t.set(i,l)),c().createElement(I.ReactUseMultipleBricks,{useBrick:e,data:l})}})(o,a),b.shouldCellUpdate=(e,t)=>!(0,g.isEqual)(e,t)):h&&(b.render=e=>e+h),!l&&t===Number(r)+E){var R=b.render;b.render=function(e,t,a){return c().createElement(c().Fragment,null,!t[n]&&x.current.get(s?t[s]:t),R?R(e,t,a):e)}}if(d||v||m||u){var W=b.render;b.render=(e,t,a)=>({children:W?W(e,t,a):e,props:{colSpan:t[v],rowSpan:t[m],style:(0,i.Z)((0,i.Z)({},d?y(d,t,e):{}),u)}})}return"string"==typeof b.dataIndex&&(b.dataIndex=(0,g.toPath)(b.dataIndex)),"top"===b.verticalAlign&&(b.className?b.className+=" alignTop":b.className="alignTop"),"bottom"===b.verticalAlign&&(b.className?b.className+=" alignBottom":b.className="alignBottom"),p&&(b.className?b.className+=" ellipsisInfoCell":b.className="ellipsisInfoCell"),b}));return e}}),[a,n,l,r,E,s,u,p]),B={body:{row:F}},D=(t,a)=>{var i=b[t],s=P()(b,{$splice:[[t,1],[a,0,i]]});C(s),e.onDrag&&e.onDrag(s)},O=(0,g.pickBy)({expandIconColumnIndex:r,expandIconAsCell:l,expandRowByClick:e.expandRowByClick,expandedRowKeys:e.expandedRowKeys,defaultExpandAllRows:e.defaultExpandAllRows},(e=>!(0,g.isNil)(e))),q=c().createElement(f.Z,(0,m.Z)({className:k()("brickTable",{expandIconCellHidden:!l,customDropTable:e.tableDraggable,tableThTransparent:e.thTransparent,zebraPatternTable:(null==b?void 0:b.length)>=2&&e.zebraPattern}),dataSource:b},e.tableDraggable?{components:B,onRow:(e,t)=>({index:t,moveRow:D})}:{},{columns:K,onChange:e.onChange},e.expandedRowBrick?{expandedRowRender:(t,a)=>{var i,s=R.current.get(t);return s||(s={rowData:t,rowIndex:a},R.current.set(t,s)),c().createElement(I.ReactUseMultipleBricks,{useBrick:null===(i=e.expandedRowBrick)||void 0===i?void 0:i.useBrick,data:s})}}:{},O,{onExpand:(t,a)=>{e.onExpand&&e.onExpand(t,a)},showSorterTooltip:!1,onExpandedRowsChange:t=>{e.onExpandedRowsChange&&e.onExpandedRowsChange(t)},rowKey:s,childrenColumnName:n,rowClassName:(t,a)=>t.invalidRow?"invalidRow":t.disabledRow?"disabledRow":e.zebraPattern&&a%2?"brickTableOddRow":"",expandIcon:t=>{var a,i,r,{record:n,expandable:o,expanded:h,onExpand:d}=t,u=(null===(a=e.expandIcon)||void 0===a?void 0:a.collapsedIcon)||z;o?(h||(u=(null===(r=e.expandIcon)||void 0===r?void 0:r.expandedIcon)||A),i=c().createElement("span",{className:"expandIconSpan","data-testid":"expand-icon",onClick:e=>{d(n,e)}},c().createElement(T,u))):i=c().createElement("span",{className:"expandIconSpan","data-testid":"expand-icon"},c().createElement("span",{style:{visibility:"hidden"}},c().createElement(T,u)));return i?(l||x.current.set(s?n[s]:n,i),i):c().createElement(c().Fragment,null)},scroll:o,showHeader:w},t));e.tableDraggable&&(q=c().createElement(W.W,{backend:M.PD},q));var H=(0,d.useMemo)((()=>(0,N.Df)()),[]);return c().createElement(N.V9,{container:e.shadowRoot,cache:H},q)}a(5254);var q,H,L,$,V,Q,j,J,G,X,Y,ee,te,ae,ie,se,le,re,ne,oe,he,de,ce,ue,pe,we,ge,ve,me,Ze,fe,be,ye,Ce,xe,Se,_e,ke,Re,Ee,We,Me,Ke,Pe,Ie,Ne,Be,Ue,De,ze,Ae,Te,Fe,Oe,qe,He,Le,$e,Ve,Qe,je,Je,Ge,Xe,Ye,et,tt,at,it,st,lt,rt,nt,ot,ht,dt,ct,ut,pt,wt,gt,vt,mt,Zt,ft,bt,yt,Ct,xt,St,_t,kt,Rt,Et,Wt,Mt,Kt,Pt,It,Nt,Bt,Ut,Dt,zt,At,Tt,Ft,Ot,qt,Ht,Lt,$t,Vt,Qt,jt,Jt,Gt,Xt,Yt,ea,ta,aa,ia,sa,la,ra,na,oa,{defineElement:ha,property:da,event:ca,method:ua}=(0,u.createDecorators)();H=ha("eo-table",{styleTexts:[w.Z],alias:["advanced.general-table"]}),L=ca({type:"page.update"}),j=ca({type:"filter.update"}),Y=ca({type:"select.update"}),ie=ca({type:"select.row.keys.update"}),ne=ca({type:"sort.update",cancelable:!0}),ce=ca({type:"row.expand"}),ge=ca({type:"expand.rows.change"}),fe=ca({type:"row.drag"}),xe=da({type:Boolean}),_e=da({attribute:!1}),Re=da(),We=da({attribute:!1}),Ke=da({type:Boolean}),Ie=da({attribute:!1}),Be=da({attribute:!1}),De=da(),Ae=da({attribute:!1}),Fe=da({attribute:!1}),qe=da({attribute:!1}),Le=da({attribute:!1}),Ve=da({attribute:!1}),je=da({type:Number}),Ge=da({type:Boolean}),Ye=da({attribute:!1}),tt=da({attribute:!1}),it=da({type:Boolean}),lt=da({type:Boolean}),nt=da({attribute:!1}),ht=da({type:Boolean}),ct=da({type:Boolean}),pt=da({attribute:!1}),gt=da({attribute:!1}),mt=da({type:Boolean}),ft=da(),yt=da({type:Boolean}),xt=da({attribute:!1}),_t=da({type:Number}),Rt=da({type:Number}),Wt=da({attribute:!1}),Kt=da(),It=da({type:Boolean}),Bt=da({type:Boolean}),Dt=da({type:Boolean}),At=da({attribute:!1}),Ft=da({type:Boolean}),qt=da({type:Boolean}),Lt=da({type:Boolean}),Vt=da({attribute:!1}),jt=da(),Gt=da({attribute:!1}),Yt=da({type:Boolean}),ta=da({type:Boolean}),ia=da({attribute:!1}),la=ua(),ra=ua();var pa=new WeakMap,wa=new WeakMap,ga=new WeakMap,va=new WeakMap,ma=new WeakMap,Za=new WeakMap,fa=new WeakMap,ba=new WeakMap,ya=new WeakMap,Ca=new WeakMap,xa=new WeakMap,Sa=new WeakMap,_a=new WeakMap,ka=new WeakMap,Ra=new WeakMap,Ea=new WeakMap,Wa=new WeakMap,Ma=new WeakMap,Ka=new WeakMap,Pa=new WeakMap,Ia=new WeakMap,Na=new WeakMap,Ba=new WeakMap,Ua=new WeakMap,Da=new WeakMap,za=new WeakMap,Aa=new WeakMap,Ta=new WeakMap,Fa=new WeakMap,Oa=new WeakMap,qa=new WeakMap,Ha=new WeakMap,La=new WeakMap,$a=new WeakMap,Va=new WeakMap,Qa=new WeakMap,ja=new WeakMap,Ja=new WeakMap,Ga=new WeakMap,Xa=new WeakMap,Ya=new WeakMap,ei=new WeakMap,ti=new WeakMap,ai=new WeakMap,ii=new WeakMap,si=new WeakMap,li=new WeakMap,ri=new WeakMap,ni=new WeakMap,oi=new WeakMap,hi=new WeakMap,di=new WeakMap,ci=new WeakMap,ui=new WeakMap,pi=new WeakMap,wi=new WeakMap,gi=new WeakMap,vi=new WeakMap,mi=new WeakMap,Zi=new WeakMap,fi=new WeakMap,bi=new WeakMap;class yi extends p.ReactNextElement{constructor(){super(...arguments),(0,l.Z)(this,Ea,{get:Di,set:Ui}),(0,l.Z)(this,ka,{get:Bi,set:Ni}),(0,l.Z)(this,Sa,{get:Ii,set:Pi}),(0,l.Z)(this,Ca,{get:Ki,set:Mi}),(0,l.Z)(this,ba,{get:Wi,set:Ei}),(0,l.Z)(this,Za,{get:Ri,set:ki}),(0,l.Z)(this,va,{get:_i,set:Si}),(0,l.Z)(this,wa,{get:xi,set:Ci}),(0,l.Z)(this,pa,{writable:!0,value:(na(this),$(this))}),(0,l.Z)(this,ga,{writable:!0,value:J(this)}),(0,l.Z)(this,ma,{writable:!0,value:ee(this)}),(0,l.Z)(this,fa,{writable:!0,value:se(this)}),(0,l.Z)(this,ya,{writable:!0,value:oe(this)}),(0,l.Z)(this,xa,{writable:!0,value:ue(this)}),(0,l.Z)(this,_a,{writable:!0,value:ve(this)}),(0,l.Z)(this,Ra,{writable:!0,value:be(this)}),(0,l.Z)(this,Wa,{writable:!0,value:Se(this,!0)}),(0,l.Z)(this,Ma,{writable:!0,value:ke(this)}),(0,l.Z)(this,Ka,{writable:!0,value:Ee(this)}),(0,l.Z)(this,Pa,{writable:!0,value:Me(this)}),(0,l.Z)(this,Ia,{writable:!0,value:Pe(this,!1)}),(0,l.Z)(this,Na,{writable:!0,value:Ne(this)}),(0,l.Z)(this,Ba,{writable:!0,value:Ue(this)}),(0,l.Z)(this,Ua,{writable:!0,value:ze(this)}),(0,l.Z)(this,Da,{writable:!0,value:Te(this)}),(0,l.Z)(this,za,{writable:!0,value:Oe(this)}),(0,l.Z)(this,Aa,{writable:!0,value:He(this)}),(0,l.Z)(this,Ta,{writable:!0,value:$e(this)}),(0,l.Z)(this,Fa,{writable:!0,value:Qe(this,!0)}),(0,l.Z)(this,Oa,{writable:!0,value:Je(this)}),(0,l.Z)(this,qa,{writable:!0,value:Xe(this)}),(0,l.Z)(this,Ha,{writable:!0,value:et(this)}),(0,l.Z)(this,La,{writable:!0,value:at(this,!1)}),(0,l.Z)(this,$a,{writable:!0,value:st(this)}),(0,l.Z)(this,Va,{writable:!0,value:rt(this)}),(0,l.Z)(this,Qa,{writable:!0,value:ot(this)}),(0,l.Z)(this,ja,{writable:!0,value:dt(this)}),(0,l.Z)(this,Ja,{writable:!0,value:ut(this)}),(0,s.Z)(this,"_disabledChildrenKeys",[]),(0,l.Z)(this,Ga,{writable:!0,value:wt(this,"children")}),(0,l.Z)(this,Xa,{writable:!0,value:vt(this,!0)}),(0,l.Z)(this,Ya,{writable:!0,value:Zt(this)}),(0,l.Z)(this,ei,{writable:!0,value:bt(this,"")}),(0,l.Z)(this,ti,{writable:!0,value:Ct(this)}),(0,l.Z)(this,ai,{writable:!0,value:St(this)}),(0,l.Z)(this,ii,{writable:!0,value:kt(this)}),(0,l.Z)(this,si,{writable:!0,value:Et(this)}),(0,l.Z)(this,li,{writable:!0,value:Mt(this,{x:!0})}),(0,l.Z)(this,ri,{writable:!0,value:Pt(this,"q")}),(0,l.Z)(this,ni,{writable:!0,value:Nt(this)}),(0,l.Z)(this,oi,{writable:!0,value:Ut(this)}),(0,l.Z)(this,hi,{writable:!0,value:zt(this)}),(0,l.Z)(this,di,{writable:!0,value:Tt(this,[])}),(0,l.Z)(this,ci,{writable:!0,value:Ot(this)}),(0,l.Z)(this,ui,{writable:!0,value:Ht(this)}),(0,l.Z)(this,pi,{writable:!0,value:$t(this,!0)}),(0,l.Z)(this,wi,{writable:!0,value:Qt(this)}),(0,l.Z)(this,gi,{writable:!0,value:Jt(this)}),(0,l.Z)(this,vi,{writable:!0,value:Xt(this)}),(0,l.Z)(this,mi,{writable:!0,value:ea(this,!0)}),(0,l.Z)(this,Zi,{writable:!0,value:aa(this,!0)}),(0,s.Z)(this,"_originalDataSource",[]),(0,s.Z)(this,"_dataSource",[]),(0,s.Z)(this,"_pureSource",void 0),(0,s.Z)(this,"_columns",void 0),(0,s.Z)(this,"_finalConfigProps",{}),(0,s.Z)(this,"_error",void 0),(0,l.Z)(this,fi,{writable:!0,value:void 0}),(0,s.Z)(this,"_selectUpdateEventName",""),(0,s.Z)(this,"_selectUpdateEventDetailKeys",[]),(0,s.Z)(this,"_selectUpdateEventDetailField",""),(0,s.Z)(this,"_selectUpdateEventDetailExtra",{}),(0,s.Z)(this,"_fields",{page:"page",pageSize:"pageSize",dataSource:"list",total:"total",ascend:"ascend",descend:"descend"}),(0,l.Z)(this,bi,{writable:!0,value:sa(this,[])}),(0,s.Z)(this,"_selected",!1),(0,s.Z)(this,"_selectedRow",void 0),(0,s.Z)(this,"_selectedRows",[]),(0,s.Z)(this,"_allChildren",[]),(0,s.Z)(this,"_isInSelect",!1),(0,s.Z)(this,"_getRowKey",(()=>{var e,t,a,i;return null!==(e=null!==(t=null!==(a=this.rowKey)&&void 0!==a?a:this._fields.rowKey)&&void 0!==t?t:null===(i=this.configProps)||void 0===i?void 0:i.rowKey)&&void 0!==e?e:"key"})),(0,s.Z)(this,"_findParentByChildKeyValue",((e,t,a,i)=>{var s;return a.some((a=>{if(a[t]===e)s=i;else{var l=a[this.childrenColumnName];l&&(s=this._findParentByChildKeyValue(e,t,l,a))}return!!s})),s})),(0,s.Z)(this,"_handleRowSelectChange",((e,t)=>{var a=this._getRowKey(),i=(0,g.keyBy)(t,a);if(this._selected){var s=[...e];if(this._allChildren.forEach((e=>{var t=e[a];s.push(t),i[t]=e})),this.autoSelectParentWhenAllChildrenSelected&&this._selectedRow){var l=new Set(e),r=this._findParentByChildKeyValue(this._selectedRow[a],a,this._dataSource);if(r&&r[this.childrenColumnName].every((e=>l.has(e[a])))){var n=r[a];s.push(n),i[n]=r}}this.selectedRowKeys=(0,g.uniq)(s)}else{var h;this.autoSelectParentWhenAllChildrenSelected&&this._selectedRow&&(h=this._findParentByChildKeyValue(this._selectedRow[a],a,this._dataSource)),this.selectedRowKeys=(0,g.pullAll)(e,(0,g.map)(this._allChildren.concat(h),a))}this._selectedRow=void 0;var d=(0,g.keyBy)(this.extraRows,a);this._selectedRows=this.selectedRowKeys.map((e=>i[e]||d[e]));var c=null,u=(0,g.isEmpty)(this._selectUpdateEventDetailField)?this._selectedRows:(0,g.map)(this._selectedRows,(e=>(0,g.get)(e,this._selectUpdateEventDetailField)));c=(0,g.isEmpty)(this._selectUpdateEventDetailKeys)||(0,g.isEmpty)(u)?u:(0,g.set)({},this._selectUpdateEventDetailKeys,u),(0,g.isEmpty)(c)||(c=(0,g.merge)(c,this._selectUpdateEventDetailExtra)),this._selectUpdateEventName?this.dispatchEvent(new CustomEvent(this._selectUpdateEventName,{detail:c})):(0,o.Z)(this,Za).emit(c),(0,o.Z)(this,ba).emit(e)})),(0,s.Z)(this,"_getSelectedRowsWithChildren",(e=>{var t=[];return!(0,g.isEmpty)(e[this.childrenColumnName])&&(0,g.isArray)(e[this.childrenColumnName])&&(0,g.forEach)(e[this.childrenColumnName],(e=>{t.push(e),t.push(...this._getSelectedRowsWithChildren(e))})),t})),(0,s.Z)(this,"_handleOnSelect",((e,t,a)=>{this._selected=t,this._selectedRow=e,this._isInSelect=!0;var i=this._getRowKey(),s=this.selectAllChildren?this._getSelectedRowsWithChildren(e):[];this._allChildren=s,this.autoSelectParentWhenAllChildrenSelected||(this._disabledChildrenKeys=t?(0,g.uniq)([...this._disabledChildrenKeys,...(0,g.map)(s,i)]):(0,g.pullAll)(this._disabledChildrenKeys,[...(0,g.map)(s,i)])),this.storeCheckedByUrl&&i&&this._updateUrlChecked([e[i]],t)})),(0,s.Z)(this,"_handleSelectAll",((e,t,a)=>{this._selected=e,this._isInSelect=!0;var i=this._getRowKey();if(this.selectAllChildren){var s=(0,g.map)(this._dataSource,i),l=a.filter((e=>s.includes(e[i]))),r=(0,g.flatten)((0,g.map)(l,(e=>(0,g.map)(this._getSelectedRowsWithChildren(e),(e=>e[i]))))),n=(0,g.flatten)((0,g.map)(l,(e=>(0,g.map)(this._getSelectedRowsWithChildren(e),(e=>e)))));this._allChildren=n,this.autoSelectParentWhenAllChildrenSelected||(this._disabledChildrenKeys=e?(0,g.uniq)(this._disabledChildrenKeys.concat(r)):this._disabledChildrenKeys.filter((e=>!r.includes(e))))}this.storeCheckedByUrl&&i&&this._updateUrlChecked((0,g.map)(a,i),e)})),(0,s.Z)(this,"_getCheckedFromUrl",(()=>{var e=(0,v.getHistory)(),t=new URLSearchParams(e.location.search).get("checked");return(0,g.isEmpty)(t)?[]:t.split(",")})),(0,s.Z)(this,"_updateUrlChecked",((e,t)=>{var a=(0,v.getHistory)(),i=this._getCheckedFromUrl();t?i=[...i,...e]:(0,g.pull)(i,...e),this.shouldUpdateUrlParams&&a.pushQuery({checked:i.join(",")},{notify:!1})})),(0,s.Z)(this,"_handleOnChange",((e,t,a)=>{var i=(0,v.getHistory)(),s=new URLSearchParams(i.location.search);if(!(0,g.isEmpty)(e))if(e.pageSize!==this.pageSize)e.current=1,s.set("page","1"),s.set("pageSize",(null==e?void 0:e.pageSize).toString()),(0,o.Z)(this,va).emit({[this._fields.pageSize]:e.pageSize,[this._fields.page]:1}),this.page=1,this.pageSize=e.pageSize;else if(e.current!==this.page){var l=e.current||1;s.set("page",l.toString()),(0,o.Z)(this,wa).emit({[this._fields.page]:l}),this.page=l}this.filters=t,(0,g.isEmpty)(t)||(0,g.forEach)(t,((e,t)=>{(0,g.isNil)(e)||0===e.length?s.delete(t):s.set(t,e)})),a.order&&(0,g.isNil)(a.order)&&(a.columnKey!==this.sort||this._fields[a.order]!==this.order)&&(a.columnKey&&a.order?(s.set("sort",a.columnKey),s.set("order",this._fields[a.order].toString()),this.sort=a.columnKey,this.order=this._fields[a.order]):(s.delete("sort"),s.delete("order"),this.sort=null,this.order=null),(0,o.Z)(this,Ca).emit({sort:this.sort,order:this.order})),this.frontSearch?(this.shouldUpdateUrlParams&&i.push("?".concat(s),{notify:!1}),this.frontendSearch(e,t,a)):this.shouldUpdateUrlParams&&i.push("?".concat(s),{notify:!!this.shouldRenderWhenUrlParamsUpdate})})),(0,s.Z)(this,"renderSelectInfo",(()=>c().createElement("span",{style:{marginLeft:20}},c().createElement("span",null,"已选择",this.selectedRowKeys.length,"项"),c().createElement("a",{role:"button",style:{marginLeft:"10px"},onClick:()=>{this.selectedRowKeys=[],this._selectedRows=[],this._disabledChildrenKeys=[],this._allChildren=[],this._selectUpdateEventName?this.dispatchEvent(new CustomEvent(this._selectUpdateEventName,{detail:[]})):(0,o.Z)(this,Za).emit([])}},"清空")))),(0,s.Z)(this,"_handleOnExpand",((e,t)=>{if(this.expandedRowKeys){var a=this._getRowKey(),i=[(0,g.get)(t,a)],s=(0,g.get)(t,this.childrenColumnName);if(!(0,g.isEmpty)(s)){var l=(0,g.map)((0,g.filter)(s,(e=>(0,g.isEmpty)((0,g.get)(e,this.childrenColumnName)))),a);i.push(...l)}this.expandedRowKeys=e?[...this.expandedRowKeys,...i]:(0,g.pull)(this.expandedRowKeys,...i),this._render()}(0,o.Z)(this,Sa).emit({expanded:e,record:t})})),(0,s.Z)(this,"_handleOnExpandedRowsChange",(e=>{(0,o.Z)(this,ka).emit({expandedRows:e})})),(0,s.Z)(this,"_handleOnDrag",(e=>{(0,o.Z)(this,Ea).emit({data:e})})),(0,s.Z)(this,"_getAllRows",(()=>{var e=[];return x(this._dataSource,this.childrenColumnName,e),e})),(0,s.Z)(this,"_handleDefaultSelectAll",(()=>{this._isInSelect=!0;var e=this._getRowKey();return this._selectedRows=this._getAllRows(),this.selectedRowKeys=(0,g.map)(this._selectedRows,e),this.selectedRowKeys})),(0,s.Z)(this,"_initConfigProps",(()=>{var e,t,a,s={current:this.page,pageSize:this.pageSize,total:(0,o.Z)(this,fi),showSizeChanger:!0,pageSizeOptions:["10","20","50"],showTotal:e=>{var t;return c().createElement(c().Fragment,null,c().createElement("span",{className:"totalText"},"共 ",c().createElement("strong",{className:"total"},e)," 条"),((null===(t=this.configProps)||void 0===t?void 0:t.rowSelection)||this.rowSelection)&&this.showSelectInfo&&0!==this.selectedRowKeys.length&&this.renderSelectInfo())}},l=this._getRowKey();this.rowDisabledConfig&&(a=Array.isArray(this.rowDisabledConfig)?this.rowDisabledConfig:[this.rowDisabledConfig]);var r=(0,i.Z)((0,i.Z)({},l?{selectedRowKeys:this._isInSelect?this.selectedRowKeys:this.storeCheckedByUrl?this._getCheckedFromUrl():this.defaultSelectAll?this._handleDefaultSelectAll():this.selectedRowKeys,onSelect:this._handleOnSelect,onSelectAll:this._handleSelectAll,onChange:this._handleRowSelectChange,preserveSelectedRowKeys:!0}:{onChange:this._handleRowSelectChange,preserveSelectedRowKeys:!0}),{},{getCheckboxProps:e=>!(0,g.isEmpty)(this._disabledChildrenKeys)&&this._disabledChildrenKeys.includes((0,g.get)(e,l))?{disabled:!0}:a?{disabled:a.some((t=>{var{field:a,value:i,operator:s}=t,l=b[s];return null==l?void 0:l(i,(0,g.get)(e,a))}))}:{}});this.configProps?(this._finalConfigProps=(0,g.cloneDeep)(this.configProps),!1!==this.configProps.pagination&&(this._finalConfigProps.pagination=(0,i.Z)((0,i.Z)((0,i.Z)({},s),this.pagination),this.configProps.pagination),void 0!==this.configProps.pagination&&null!==this.configProps.pagination||!1!==this.pagination||(this._finalConfigProps.pagination=!1)),this.configProps.size||(this._finalConfigProps.size=this.size)):(this._finalConfigProps={},this._finalConfigProps.pagination=!1!==this.pagination&&s,this._finalConfigProps.size=this.size);var n,h,d=null!==(e=null===(t=this.configProps)||void 0===t?void 0:t.rowSelection)&&void 0!==e?e:this.rowSelection;d?this._finalConfigProps.rowSelection=!0===d?(0,i.Z)((0,i.Z)({},r),{},{type:null!==(n=this.type)&&void 0!==n?n:"checkbox"}):(0,i.Z)((0,i.Z)((0,i.Z)({},r),{},{type:null!==(h=this.type)&&void 0!==h?h:"checkbox"},d),r.selectedRowKeys?{selectedRowKeys:r.selectedRowKeys}:{}):this.type?this._finalConfigProps.rowSelection=(0,i.Z)((0,i.Z)({},r),{},{type:this.type}):this._finalConfigProps.rowSelection=!1,this._columns&&(this._columns=this._columns.map((e=>{if((0,g.isNil)(e.key)&&(e.key=e.dataIndex),e.sorter&&(e.sortOrder=this.sort===e.key&&!(0,g.isNil)(this.order)&&(this._fields.ascend===this.order?"ascend":"descend")),e.filters){var t,a,i=(0,v.getHistory)(),s=null!==(t=new URLSearchParams(i.location.search).get(e.key))&&void 0!==t?t:null===(a=(0,g.get)(this.filters,e.key))||void 0===a?void 0:a.join(",");(0,g.isNil)(s)||(0,g.isEmpty)(s)?(e.filtered=!1,e.filteredValue=[]):(e.filtered=!0,e.filteredValue=s.split(",").map((t=>{var a,i;return null!==(a=null===(i=(0,g.find)(e.filters,(e=>String(e.value)===t)))||void 0===i?void 0:i.value)&&void 0!==a?a:t})))}return e})))}))}set columns(e){this._columns=e,this._render()}get columns(){return this._columns}set dataSource(e){var t,a,i,s,l,r;this._isInSelect=!1,this._originalDataSource=e,this._dataSource=(0,g.cloneDeep)(this._fields.dataSource?(0,g.get)(e,this._fields.dataSource):e),this._pureSource=(0,g.cloneDeep)(this._dataSource),this.stripEmptyExpandableChildren&&S((null===(r=this.configProps)||void 0===r||null===(r=r.expandable)||void 0===r?void 0:r.childrenColumnName)||"children",this._dataSource),(0,n.Z)(this,fi,(0,g.get)(e,this._fields.total)),this.page=null!==(t=null!==(a=(0,g.get)(e,"page"))&&void 0!==a?a:this.page)&&void 0!==t?t:1,this.pageSize=null!==(i=null!==(s=null!==(l=(0,g.get)(e,"page_size"))&&void 0!==l?l:(0,g.get)(e,"pageSize"))&&void 0!==s?s:this.pageSize)&&void 0!==i?i:10,this._render()}get showCard(){return(0,o.Z)(this,Wa)}set showCard(e){(0,n.Z)(this,Wa,e)}get rowSelection(){return(0,o.Z)(this,Ma)}set rowSelection(e){(0,n.Z)(this,Ma,e)}get rowKey(){return(0,o.Z)(this,Ka)}set rowKey(e){(0,n.Z)(this,Ka,e)}get hiddenColumns(){return(0,o.Z)(this,Pa)}set hiddenColumns(e){(0,n.Z)(this,Pa,e)}get showSelectInfo(){return(0,o.Z)(this,Ia)}set showSelectInfo(e){(0,n.Z)(this,Ia,e)}get filters(){return(0,o.Z)(this,Na)}set filters(e){(0,n.Z)(this,Na,e)}get configProps(){return(0,o.Z)(this,Ba)}set configProps(e){(0,n.Z)(this,Ba,e)}get sort(){return(0,o.Z)(this,Ua)}set sort(e){(0,n.Z)(this,Ua,e)}get order(){return(0,o.Z)(this,Da)}set order(e){(0,n.Z)(this,Da,e)}get rowDisabledConfig(){return(0,o.Z)(this,za)}set rowDisabledConfig(e){(0,n.Z)(this,za,e)}get expandedRowBrick(){return(0,o.Z)(this,Aa)}set expandedRowBrick(e){(0,n.Z)(this,Aa,e)}get expandIcon(){return(0,o.Z)(this,Ta)}set expandIcon(e){(0,n.Z)(this,Ta,e)}get expandIconAsCell(){return(0,o.Z)(this,Fa)}set expandIconAsCell(e){(0,n.Z)(this,Fa,e)}get expandIconColumnIndex(){return(0,o.Z)(this,Oa)}set expandIconColumnIndex(e){(0,n.Z)(this,Oa,e)}get expandRowByClick(){return(0,o.Z)(this,qa)}set expandRowByClick(e){(0,n.Z)(this,qa,e)}get optimizedColumns(){return(0,o.Z)(this,Ha)}set optimizedColumns(e){(0,n.Z)(this,Ha,e)}get stripEmptyExpandableChildren(){return(0,o.Z)(this,La)}set stripEmptyExpandableChildren(e){(0,n.Z)(this,La,e)}get defaultExpandAllRows(){return(0,o.Z)(this,$a)}set defaultExpandAllRows(e){(0,n.Z)(this,$a,e)}get ellipsisInfo(){return(0,o.Z)(this,Va)}set ellipsisInfo(e){(0,n.Z)(this,Va,e)}get expandedRowKeys(){return(0,o.Z)(this,Qa)}set expandedRowKeys(e){(0,n.Z)(this,Qa,e)}get selectAllChildren(){return(0,o.Z)(this,ja)}set selectAllChildren(e){(0,n.Z)(this,ja,e)}get defaultSelectAll(){return(0,o.Z)(this,Ja)}set defaultSelectAll(e){(0,n.Z)(this,Ja,e)}get childrenColumnName(){return(0,o.Z)(this,Ga)}set childrenColumnName(e){(0,n.Z)(this,Ga,e)}get sortable(){return(0,o.Z)(this,Xa)}set sortable(e){(0,n.Z)(this,Xa,e)}set fields(e){this._fields=(0,i.Z)((0,i.Z)({},this._fields),e),this._render()}get frontSearch(){return(0,o.Z)(this,Ya)}set frontSearch(e){(0,n.Z)(this,Ya,e)}get frontSearchQuery(){return(0,o.Z)(this,ei)}set frontSearchQuery(e){(0,n.Z)(this,ei,e)}get exactSearch(){return(0,o.Z)(this,ti)}set exactSearch(e){(0,n.Z)(this,ti,e)}get frontSearchFilterKeys(){return(0,o.Z)(this,ai)}set frontSearchFilterKeys(e){(0,n.Z)(this,ai,e)}get page(){return(0,o.Z)(this,ii)}set page(e){(0,n.Z)(this,ii,e)}get pageSize(){return(0,o.Z)(this,si)}set pageSize(e){(0,n.Z)(this,si,e)}get scrollConfigs(){return(0,o.Z)(this,li)}set scrollConfigs(e){(0,n.Z)(this,li,e)}get qField(){return(0,o.Z)(this,ri)}set qField(e){(0,n.Z)(this,ri,e)}get tableDraggable(){return(0,o.Z)(this,ni)}set tableDraggable(e){(0,n.Z)(this,ni,e)}get zebraPattern(){return(0,o.Z)(this,oi)}set zebraPattern(e){(0,n.Z)(this,oi,e)}get storeCheckedByUrl(){return(0,o.Z)(this,hi)}set storeCheckedByUrl(e){(0,n.Z)(this,hi,e)}get extraRows(){return(0,o.Z)(this,di)}set extraRows(e){(0,n.Z)(this,di,e)}get autoSelectParentWhenAllChildrenSelected(){return(0,o.Z)(this,ci)}set autoSelectParentWhenAllChildrenSelected(e){(0,n.Z)(this,ci,e)}get thTransparent(){return(0,o.Z)(this,ui)}set thTransparent(e){(0,n.Z)(this,ui,e)}get showHeader(){return(0,o.Z)(this,pi)}set showHeader(e){(0,n.Z)(this,pi,e)}get pagination(){return(0,o.Z)(this,wi)}set pagination(e){(0,n.Z)(this,wi,e)}get size(){return(0,o.Z)(this,gi)}set size(e){(0,n.Z)(this,gi,e)}get type(){return(0,o.Z)(this,vi)}set type(e){(0,n.Z)(this,vi,e)}get shouldUpdateUrlParams(){return(0,o.Z)(this,mi)}set shouldUpdateUrlParams(e){(0,n.Z)(this,mi,e)}get shouldRenderWhenUrlParamsUpdate(){return(0,o.Z)(this,Zi)}set shouldRenderWhenUrlParamsUpdate(e){(0,n.Z)(this,Zi,e)}get processedDataSource(){return this._dataSource}get processConfigProps(){return this._finalConfigProps}get processedColumns(){return this.getModifyColumns()}get selectedRowKeys(){return(0,o.Z)(this,bi)}set selectedRowKeys(e){(0,n.Z)(this,bi,e)}filterSourceData(e){var t=this.exactSearch?e.detail.q.trim():e.detail.q.trim().toLowerCase();if(this.shouldUpdateUrlParams){var a=(0,v.getHistory)(),i=new URLSearchParams(a.location.search);i.set("page","1"),t?(i.set(this.qField,t),a.push("?".concat(i),{notify:!this.frontSearch})):(i.delete(this.qField),a.push("?".concat(i),{notify:!this.frontSearch})),this.page=1}this.frontSearchQuery=t}handleFrontendDataChange(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(this.shouldUpdateUrlParams){var a=(0,v.getHistory)(),i=new URLSearchParams(a.location.search);this.frontSearchQuery=i.get(this.qField)}var s=[];s=this.handleFrontendFilterSource(e,this.frontSearchQuery||"",t);var l=(0,g.isNil)(this.order)?null:this._fields.ascend===this.order?"ascend":"descend";return s=this.handleFrontendSorter(s,{columnKey:this.sort,order:l}),s=this.handleFrontendFilters(s),(0,n.Z)(this,fi,s.length),s}handleFrontendFilterSource(e,t,a,s){if(!t)return e;var l=[];return s||(s=this.frontSearchFilterKeys||a.map((e=>e.dataIndex))),e.forEach((e=>{var r,n=e[this.childrenColumnName];if(n){var o=this.handleFrontendFilterSource(n,t,a,s);if(o.length>0)return void l.push((0,i.Z)((0,i.Z)({},e),{},{[this.childrenColumnName]:o}))}(null===(r=s)||void 0===r?void 0:r.some((a=>{var i=(0,g.get)(e,a);return!(0,g.isNil)(i)&&(this.exactSearch?i===t:JSON.stringify(i).toLowerCase().includes(t))})))&&l.push(e)})),l}handleFrontendSorter(e,t){var a=e||[],{columnKey:i,order:s}=t;if(!i||!s)return e;var l=1;return"descend"===s?l=-1:"ascend"===s&&(l=1),void 0!==l&&(a.sort(((e,t)=>{var a=(0,g.get)(e,i),s=(0,g.get)(t,i);if((0,g.isNil)(a)){if(!(0,g.isNil)(s))return 1}else if((0,g.isNil)(s))return-1;return a==s?0:a>s?l:-l})),a.forEach((e=>{var a=e[this.childrenColumnName];a&&this.handleFrontendSorter(a,t)}))),a}handleFrontendFilters(e){var t=e||[],a=(0,g.map)(this.filters,((e,t)=>({key:t,value:e}))).filter((e=>!(0,g.isNil)(e.value)&&0!==e.value.length));return t.filter((e=>(0,g.every)(a,(t=>{var a,i;return null===(a=null===(i=t.value)||void 0===i?void 0:i.includes((0,g.get)(e,t.key)))||void 0===a||a}))))}frontendSearch(e,t,a){this.sort=(0,g.isNil)(a.order)?null:a.columnKey,this.order=(0,g.isNil)(a.order)?null:this._fields[a.order]}expandAll(){var e=[],t=this._getRowKey();this._dataSource&&C(this._dataSource,t,this.childrenColumnName,e),this.expandedRowKeys=e}getModifyColumns(){var e=this._columns;return this._columns&&this.hiddenColumns&&(e=this._columns.filter((e=>{var t,a;return!(null!==(t=this.hiddenColumns)&&void 0!==t&&t.includes(null!==(a=e.dataIndex)&&void 0!==a?a:e.key))}))),!1===this.sortable&&(e=(0,g.map)(e,(e=>(e.sorter=!1,e)))),e}render(){return this.frontSearch&&(this._dataSource=this.handleFrontendDataChange(this._pureSource,this._columns)),this._initConfigProps(),c().createElement(O,{shadowRoot:this.shadowRoot,dataSource:this._dataSource||[],columns:this.getModifyColumns(),configProps:this._finalConfigProps,error:this._error,onChange:this._handleOnChange,showCard:this.showCard,showHeader:this.showHeader,expandedRowBrick:this.expandedRowBrick,expandIconAsCell:this.expandIconAsCell,expandIconColumnIndex:this.expandIconColumnIndex,expandRowByClick:this.expandRowByClick,defaultExpandAllRows:this.defaultExpandAllRows,onExpand:this._handleOnExpand,onExpandedRowsChange:this._handleOnExpandedRowsChange,expandedRowKeys:this.expandedRowKeys,rowKey:this._getRowKey(),childrenColumnName:this.childrenColumnName,tableDraggable:this.tableDraggable||this.draggable,onDrag:this._handleOnDrag,zebraPattern:this.zebraPattern,expandIcon:this.expandIcon,scroll:this.scrollConfigs,optimizedColumns:this.optimizedColumns,ellipsisInfo:this.ellipsisInfo,thTransparent:this.thTransparent})}_test_only_getOriginalDataSource(){return this._originalDataSource}updateData(e){this._dataSource=e.detail,this._error=null,this._render()}updateError(e){this._error=e.detail,this._render()}set selectUpdateEventName(e){this._selectUpdateEventName=e}set selectUpdateEventDetailKeys(e){this._selectUpdateEventDetailKeys=e}set selectUpdateEventDetailField(e){this._selectUpdateEventDetailField=e}set selectUpdateEventDetailExtra(e){this._selectUpdateEventDetailExtra=e}}function Ci(e){Q(this,e)}function xi(){return V(this)}function Si(e){X(this,e)}function _i(){return G(this)}function ki(e){ae(this,e)}function Ri(){return te(this)}function Ei(e){re(this,e)}function Wi(){return le(this)}function Mi(e){de(this,e)}function Ki(){return he(this)}function Pi(e){we(this,e)}function Ii(){return pe(this)}function Ni(e){Ze(this,e)}function Bi(){return me(this)}function Ui(e){Ce(this,e)}function Di(){return ye(this)}({e:[$,V,Q,J,G,X,ee,te,ae,se,le,re,oe,he,de,ue,pe,we,ve,me,Ze,be,ye,Ce,Se,ke,Ee,Me,Pe,Ne,Ue,ze,Te,Oe,He,$e,Qe,Je,Xe,et,at,st,rt,ot,dt,ut,wt,vt,Zt,bt,Ct,St,kt,Et,Mt,Pt,Nt,Ut,zt,Tt,Ot,Ht,$t,Qt,Jt,Xt,ea,aa,sa,na],c:[oa,q]}=(0,h.Z)(yi,[[L,1,"pageUpdate",e=>(0,o.Z)(e,pa),(e,t)=>(0,n.Z)(e,pa,t)],[j,1,"filterUpdate",e=>(0,o.Z)(e,ga),(e,t)=>(0,n.Z)(e,ga,t)],[Y,1,"selectUpdate",e=>(0,o.Z)(e,ma),(e,t)=>(0,n.Z)(e,ma,t)],[ie,1,"selectRowKeysUpdate",e=>(0,o.Z)(e,fa),(e,t)=>(0,n.Z)(e,fa,t)],[ne,1,"sortUpdate",e=>(0,o.Z)(e,ya),(e,t)=>(0,n.Z)(e,ya,t)],[ce,1,"rowExpand",e=>(0,o.Z)(e,xa),(e,t)=>(0,n.Z)(e,xa,t)],[ge,1,"expandRowsChange",e=>(0,o.Z)(e,_a),(e,t)=>(0,n.Z)(e,_a,t)],[fe,1,"rowDrag",e=>(0,o.Z)(e,Ra),(e,t)=>(0,n.Z)(e,Ra,t)],[xe,1,"showCard"],[_e,1,"rowSelection"],[Re,1,"rowKey"],[We,1,"hiddenColumns"],[Ke,1,"showSelectInfo"],[Ie,1,"filters"],[Be,1,"configProps"],[De,1,"sort"],[Ae,1,"order"],[Fe,1,"rowDisabledConfig"],[qe,1,"expandedRowBrick"],[Le,1,"expandIcon"],[Ve,1,"expandIconAsCell"],[je,1,"expandIconColumnIndex"],[Ge,1,"expandRowByClick"],[Ye,1,"optimizedColumns"],[tt,1,"stripEmptyExpandableChildren"],[it,1,"defaultExpandAllRows"],[lt,1,"ellipsisInfo"],[nt,1,"expandedRowKeys"],[ht,1,"selectAllChildren"],[ct,1,"defaultSelectAll"],[pt,1,"childrenColumnName"],[gt,1,"sortable"],[mt,1,"frontSearch"],[ft,1,"frontSearchQuery"],[yt,1,"exactSearch"],[xt,1,"frontSearchFilterKeys"],[_t,1,"page"],[Rt,1,"pageSize"],[Wt,1,"scrollConfigs"],[Kt,1,"qField"],[It,1,"tableDraggable"],[Bt,1,"zebraPattern"],[Dt,1,"storeCheckedByUrl"],[At,1,"extraRows"],[Ft,1,"autoSelectParentWhenAllChildrenSelected"],[qt,1,"thTransparent"],[Lt,1,"showHeader"],[Vt,1,"pagination"],[jt,1,"size"],[Gt,1,"type"],[Yt,1,"shouldUpdateUrlParams"],[ta,1,"shouldRenderWhenUrlParamsUpdate"],[ia,1,"selectedRowKeys"],[la,2,"filterSourceData"],[ra,2,"expandAll"]],[H],0,(e=>fi.has((0,r.Z)(e))))),q();var zi,Ai,Ti,Fi,Oi,qi,Hi,Li,$i,Vi,Qi,ji,Ji,Gi,Xi,Yi,es,ts,as,is,ss,ls,rs,ns,os,hs,ds,cs,us,ps,ws,gs,vs,ms,Zs,fs,bs,ys,Cs=a(8682),{defineElement:xs,property:Ss,event:_s}=(0,u.createDecorators)(),ks=(0,p.wrapBrick)("eo-icon");Ai=xs("eo-cascader",{alias:["advanced.general-cascader"]}),Ti=Ss({attribute:!1}),Oi=Ss({attribute:!1}),Hi=Ss({attribute:!1}),$i=Ss(),Qi=Ss({type:Boolean}),Ji=Ss({type:Boolean}),Xi=Ss({type:Boolean}),es=Ss({type:Boolean}),as=Ss({attribute:!1}),ss=Ss(),rs=Ss(),os=Ss(),ds=Ss({type:Number}),us=Ss({attribute:!1}),ws=Ss({attribute:!1}),vs=_s({type:"cascader.change"});var Rs=new WeakMap,Es=new WeakMap,Ws=new WeakMap,Ms=new WeakMap,Ks=new WeakMap,Ps=new WeakMap,Is=new WeakMap,Ns=new WeakMap,Bs=new WeakMap,Us=new WeakMap,Ds=new WeakMap,zs=new WeakMap,As=new WeakMap,Ts=new WeakMap,Fs=new WeakMap,Os=new WeakMap,qs=new WeakMap,Hs=new WeakMap;class Ls extends p.ReactNextElement{constructor(){super(...arguments),(0,l.Z)(this,qs,{get:Vs,set:$s}),(0,l.Z)(this,Rs,{writable:!0,value:(bs(this),Fi(this))}),(0,l.Z)(this,Es,{writable:!0,value:qi(this,{label:"label",value:"value",children:"children"})}),(0,l.Z)(this,Ws,{writable:!0,value:Li(this)}),(0,l.Z)(this,Ms,{writable:!0,value:Vi(this)}),(0,l.Z)(this,Ks,{writable:!0,value:ji(this)}),(0,l.Z)(this,Ps,{writable:!0,value:Gi(this)}),(0,l.Z)(this,Is,{writable:!0,value:Yi(this,!0)}),(0,l.Z)(this,Ns,{writable:!0,value:ts(this,!0)}),(0,l.Z)(this,Bs,{writable:!0,value:is(this)}),(0,l.Z)(this,Us,{writable:!0,value:ls(this,"click")}),(0,l.Z)(this,Ds,{writable:!0,value:ns(this,"bottomLeft")}),(0,l.Z)(this,zs,{writable:!0,value:hs(this)}),(0,l.Z)(this,As,{writable:!0,value:cs(this,50)}),(0,l.Z)(this,Ts,{writable:!0,value:ps(this)}),(0,l.Z)(this,Fs,{writable:!0,value:gs(this)}),(0,l.Z)(this,Os,{writable:!0,value:ms(this)}),(0,l.Z)(this,Hs,{writable:!0,value:(e,t)=>{this.value=e,Promise.resolve().then((()=>{(0,o.Z)(this,qs).emit({value:e,selectedOptions:t})}))}})}get options(){return(0,o.Z)(this,Rs)}set options(e){(0,n.Z)(this,Rs,e)}get fieldNames(){return(0,o.Z)(this,Es)}set fieldNames(e){(0,n.Z)(this,Es,e)}get value(){return(0,o.Z)(this,Ws)}set value(e){(0,n.Z)(this,Ws,e)}get placeholder(){return(0,o.Z)(this,Ms)}set placeholder(e){(0,n.Z)(this,Ms,e)}get multiple(){return(0,o.Z)(this,Ks)}set multiple(e){(0,n.Z)(this,Ks,e)}get disabled(){return(0,o.Z)(this,Ps)}set disabled(e){(0,n.Z)(this,Ps,e)}get allowClear(){return(0,o.Z)(this,Is)}set allowClear(e){(0,n.Z)(this,Is,e)}get showSearch(){return(0,o.Z)(this,Ns)}set showSearch(e){(0,n.Z)(this,Ns,e)}get suffixIcon(){return(0,o.Z)(this,Bs)}set suffixIcon(e){(0,n.Z)(this,Bs,e)}get expandTrigger(){return(0,o.Z)(this,Us)}set expandTrigger(e){(0,n.Z)(this,Us,e)}get popupPlacement(){return(0,o.Z)(this,Ds)}set popupPlacement(e){(0,n.Z)(this,Ds,e)}get size(){return(0,o.Z)(this,zs)}set size(e){(0,n.Z)(this,zs,e)}get limit(){return(0,o.Z)(this,As)}set limit(e){(0,n.Z)(this,As,e)}get maxTagCount(){return(0,o.Z)(this,Ts)}set maxTagCount(e){(0,n.Z)(this,Ts,e)}get cascaderStyle(){return(0,o.Z)(this,Fs)}set cascaderStyle(e){(0,n.Z)(this,Fs,e)}render(){return c().createElement(Qs,{shadowRoot:this.shadowRoot,options:this.options,fieldNames:this.fieldNames,value:this.value,multiple:this.multiple,placeholder:this.placeholder,disabled:this.disabled,allowClear:this.allowClear,showSearch:this.showSearch,expandTrigger:this.expandTrigger,suffixIcon:this.suffixIcon,size:this.size,limit:this.limit,popupPlacement:this.popupPlacement,maxTagCount:this.maxTagCount,cascaderStyle:this.cascaderStyle,onChange:(0,o.Z)(this,Hs)})}}function $s(e){fs(this,e)}function Vs(){return Zs(this)}function Qs(e){var{shadowRoot:t,options:a,fieldNames:i,value:s,placeholder:l,disabled:r,multiple:n,allowClear:o,showSearch:h,expandTrigger:u,size:p,limit:w,popupPlacement:g,cascaderStyle:v,suffixIcon:m,maxTagCount:Z,onChange:f}=e,b=(0,d.useMemo)((()=>(0,N.Df)()),[]);return c().createElement(N.V9,{container:t,cache:b},c().createElement(Cs.Z,{getPopupContainer:e=>e.parentElement,allowClear:o,disabled:r,multiple:n,expandTrigger:u,fieldNames:i,placeholder:l,size:p,showSearch:h&&{limit:w,filter:(e,t)=>{for(var a=(null==i?void 0:i.label)||"label",s=e.split(" ").filter((e=>e)).map((e=>e.toLocaleLowerCase())),l=function(e){if(!t.some((t=>t[a].toLowerCase().includes(s[e]))))return{v:!1}},r=0;r<s.length;r++){var n=l(r);if("object"==typeof n)return n.v}return!0}},placement:g,style:v,suffixIcon:m&&c().createElement(ks,m),maxTagCount:Z,value:s,options:a,onChange:(e,t)=>null==f?void 0:f(e,t)}))}({e:[Fi,qi,Li,Vi,ji,Gi,Yi,ts,is,ls,ns,hs,cs,ps,gs,ms,Zs,fs,bs],c:[ys,zi]}=(0,h.Z)(Ls,[[Ti,1,"options"],[Oi,1,"fieldNames"],[Hi,1,"value"],[$i,1,"placeholder"],[Qi,1,"multiple"],[Ji,1,"disabled"],[Xi,1,"allowClear"],[es,1,"showSearch"],[as,1,"suffixIcon"],[ss,1,"expandTrigger"],[rs,1,"popupPlacement"],[os,1,"size"],[ds,1,"limit"],[us,1,"maxTagCount"],[ws,1,"cascaderStyle"],[vs,1,"changeEvent",e=>(0,o.Z)(e,Os),(e,t)=>(0,n.Z)(e,Os,t)]],[Ai],0,(e=>Hs.has((0,r.Z)(e))))),zi()},2869:(e,t,a)=>{a.d(t,{Z:()=>n});var i=a(9601),s=a.n(i),l=a(2609),r=a.n(l)()(s());r.push([e.id,".brickTableOddRow{background-color:var(--color-fill-bg-base-4)}.ant-table-small .ant-table-body{margin:0}.ant-table-small .ant-table-thead{background:var(--antd-table-header-bg)}.ant-table-small .ant-table-row{line-height:26px}.ant-table-tbody > tr.invalidRow > td{background-color:var(--color-error-bg)}.ant-table-tbody > tr.invalidRow:hover > td{background-color:var(--color-error-bg)}.ant-table-tbody > tr.disabledRow > td{background-color:var(--theme-gray-border-color)}.ant-table-tbody > .ant-table-row-selected td{background:var(--antd-table-cell-fixed-body-bg)!important}td.alignTop{vertical-align:top}td.alignBottom{vertical-align:bottom}.expandIconCellHidden .ant-table-row-expand-icon-cell,\n.expandIconCellHidden .ant-table-expand-icon-col{width:1px;min-width:auto}.expandIconCellHidden .ant-table-row-expand-icon-cell > *,\n.expandIconCellHidden .ant-table-expand-icon-col > *{display:none}.expandIconSpan{cursor:pointer;margin-right:9px;color:var(--antd-table-row-expand-icon-color);font-size:11px}.expandIconSpan .anticon{background:var(--antd-table-row-expand-icon-action-bg);border-radius:2px;padding:3px}.tableThTransparent thead.ant-table-thead > tr > th{background:var(--antd-table-header-bg)}.zebraPatternTable .ant-table-tbody tr td{border-bottom:0}.ellipsis{max-width:240px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.totalText{color:var(--antd-pagination-total-text)}.total{font-weight:normal;color:var(--antd-pagination-total-strong-text)}",""]);const n=r.toString()}}]);
|
|
2
|
-
//# sourceMappingURL=9079.
|
|
1
|
+
"use strict";(self.webpackChunk_next_bricks_advanced=self.webpackChunk_next_bricks_advanced||[]).push([[9079],{5202:(e,t,a)=>{a.r(t);var i=a(3028),s=a(6666),l=a(3395),r=a(1815),n=a(381),o=a(687),h=a(2604),d=a(8657),c=a.n(d),u=a(2061),p=a(8978),w=a(2869),g=a(5178),v=a(5135),m=a(7896),Z=a(2159),f=a(4275),b={$eq:g.isEqual,$lt:g.lt,$lte:g.lte,$gt:g.gt,$gte:g.gte,$ne:(e,t)=>!(0,g.isEqual)(e,t),$isEqual:g.isEqual,$notEqual:(e,t)=>!(0,g.isEqual)(e,t),$in:g.includes,$nin:(e,t)=>!(0,g.includes)(e,t),$exists:(e,t)=>e?!(0,g.isUndefined)(t):(0,g.isUndefined)(t)};function y(e,t,a){var{dataIndex:i,mapping:s}=e,l=void 0!==i?(0,g.get)(t,i):a,r=s.find((e=>e.value===l));return r?{borderLeft:"4px solid ".concat(r.leftBorderColor)}:{}}var C=(e,t,a,i)=>{e&&(0,g.forEach)(e,(e=>{var s=(0,g.get)(e,a),l=(0,g.get)(e,t);i.push(l),null!=s&&s.length&&C(s,t,a,i)}))},x=(e,t,a)=>{e&&(0,g.forEach)(e,(e=>{var i=(0,g.get)(e,t);a.push(e),null!=i&&i.length&&x(i,t,a)}))};function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null!=t&&t.length&&t.forEach((t=>{var a;return null!==(a=t[e])&&void 0!==a&&a.length?S(e,t[e]):(delete t[e],t)})),t}var _=a(2779),k=a.n(_),R=a(8533),E=a(2689),W=a(2238),M=a(8683),K=a(4819),P=a.n(K),I=a(5055),N=a(3691),B=["index","moveRow","className","style"],U=["useBrick","valueSuffix","cellStatus","cellStyle","headerBrick","colSpanKey","rowSpanKey","filterDropdownBrick"],D="DraggableBodyRow",z={lib:"antd",icon:"down",theme:"outlined"},A={lib:"antd",icon:"right",theme:"outlined"},T=(0,p.wrapBrick)("eo-icon"),F=e=>{var{index:t,moveRow:a,className:s,style:l}=e,r=(0,Z.Z)(e,B),n=c().useRef(null),[{isOver:o,dropClassName:h},d]=(0,R.L)({accept:D,collect:e=>{var{index:a}=e.getItem()||{};return a===t?{}:{isOver:e.isOver(),dropClassName:a<t?"dropOverDownward":"dropOverUpward"}},drop:e=>{a(e.index,t)}}),[,u]=(0,E.c)({type:D,item:{type:D,index:t},collect:e=>({isDragging:e.isDragging()})});return d(u(n)),c().createElement("tr",(0,m.Z)({ref:n,className:k()(s,{[h]:o}),style:(0,i.Z)({cursor:"move"},l)},r))};function O(e){if(e.error)throw e.error;var{configProps:t={pagination:!0,sortBy:!1},columns:a,rowKey:s="key",expandIconAsCell:l,expandIconColumnIndex:r,childrenColumnName:n,scroll:o,optimizedColumns:h,onDelete:u,ellipsisInfo:p,showHeader:w}=e,v=(0,d.useMemo)((()=>{var t;return null===(t=e.dataSource)||void 0===t?void 0:t.map(((e,t)=>(0,g.isNil)(e[s])?(0,i.Z)((0,i.Z)({},e),{},{[s]:t}):e))}),[e.dataSource,s]),[b,C]=(0,d.useState)(v),x=(0,d.useRef)(new Map),S=(0,d.useRef)(new Map),_=(0,d.useRef)(new Map),R=(0,d.useRef)(new Map);(0,d.useEffect)((()=>{R.current.clear(),C(v)}),[v]);var E=null!=t&&t.rowSelection?-1:0,K=(0,d.useMemo)((()=>{if(a){S.current.clear(),_.current.clear();var e=a.map(((e,t)=>{var a,{useBrick:o,valueSuffix:h,cellStatus:d,cellStyle:u={},headerBrick:w,colSpanKey:v,rowSpanKey:m,filterDropdownBrick:f}=e,b=(0,Z.Z)(e,U);if(null!=w&&w.useBrick){var C=null==w?void 0:w.useBrick,k=S.current.get(e);k||(k={title:b.title},S.current.set(e,k)),b.title=((e,t)=>function(){return c().createElement(I.ReactUseMultipleBricks,{useBrick:e,data:t})})(C,k)}if(null!=f&&f.useBrick&&(b.filterDropdown=c().createElement(I.ReactUseMultipleBricks,{useBrick:f.useBrick})),o?(o&&((a=_.current.get(o))||(a=new Map,_.current.set(o,a))),b.render=((e,t)=>function(a,i,s){if(e){var l=null==t?void 0:t.get(i);return l||(l={cellData:a,rowData:i,columnIndex:s},null==t||t.set(i,l)),c().createElement(I.ReactUseMultipleBricks,{useBrick:e,data:l})}})(o,a),b.shouldCellUpdate=(e,t)=>!(0,g.isEqual)(e,t)):h&&(b.render=e=>e+h),!l&&t===Number(r)+E){var R=b.render;b.render=function(e,t,a){return c().createElement(c().Fragment,null,!t[n]&&x.current.get(s?t[s]:t),R?R(e,t,a):e)}}if(d||v||m||u){var W=b.render;b.render=(e,t,a)=>({children:W?W(e,t,a):e,props:{colSpan:t[v],rowSpan:t[m],style:(0,i.Z)((0,i.Z)({},d?y(d,t,e):{}),u)}})}return"string"==typeof b.dataIndex&&(b.dataIndex=(0,g.toPath)(b.dataIndex)),"top"===b.verticalAlign&&(b.className?b.className+=" alignTop":b.className="alignTop"),"bottom"===b.verticalAlign&&(b.className?b.className+=" alignBottom":b.className="alignBottom"),p&&(b.className?b.className+=" ellipsisInfoCell":b.className="ellipsisInfoCell"),b}));return e}}),[a,n,l,r,E,s,u,p]),B={body:{row:F}},D=(t,a)=>{var i=b[t],s=P()(b,{$splice:[[t,1],[a,0,i]]});C(s),e.onDrag&&e.onDrag(s)},O=(0,g.pickBy)({expandIconColumnIndex:r,expandIconAsCell:l,expandRowByClick:e.expandRowByClick,expandedRowKeys:e.expandedRowKeys,defaultExpandAllRows:e.defaultExpandAllRows},(e=>!(0,g.isNil)(e))),q=c().createElement(f.Z,(0,m.Z)({className:k()("brickTable",{expandIconCellHidden:!l,customDropTable:e.tableDraggable,tableThTransparent:e.thTransparent,zebraPatternTable:(null==b?void 0:b.length)>=2&&e.zebraPattern}),dataSource:b},e.tableDraggable?{components:B,onRow:(e,t)=>({index:t,moveRow:D})}:{},{columns:K,onChange:e.onChange},e.expandedRowBrick?{expandedRowRender:(t,a)=>{var i,s=R.current.get(t);return s||(s={rowData:t,rowIndex:a},R.current.set(t,s)),c().createElement(I.ReactUseMultipleBricks,{useBrick:null===(i=e.expandedRowBrick)||void 0===i?void 0:i.useBrick,data:s})}}:{},O,{onExpand:(t,a)=>{e.onExpand&&e.onExpand(t,a)},showSorterTooltip:!1,onExpandedRowsChange:t=>{e.onExpandedRowsChange&&e.onExpandedRowsChange(t)},rowKey:s,childrenColumnName:n,rowClassName:(t,a)=>t.invalidRow?"invalidRow":t.disabledRow?"disabledRow":e.zebraPattern&&a%2?"brickTableOddRow":"",expandIcon:t=>{var a,i,r,{record:n,expandable:o,expanded:h,onExpand:d}=t,u=(null===(a=e.expandIcon)||void 0===a?void 0:a.collapsedIcon)||z;o?(h||(u=(null===(r=e.expandIcon)||void 0===r?void 0:r.expandedIcon)||A),i=c().createElement("span",{className:"expandIconSpan","data-testid":"expand-icon",onClick:e=>{d(n,e)}},c().createElement(T,u))):i=c().createElement("span",{className:"expandIconSpan","data-testid":"expand-icon"},c().createElement("span",{style:{visibility:"hidden"}},c().createElement(T,u)));return i?(l||x.current.set(s?n[s]:n,i),i):c().createElement(c().Fragment,null)},scroll:o,showHeader:w},t));e.tableDraggable&&(q=c().createElement(W.W,{backend:M.PD},q));var H=(0,d.useMemo)((()=>(0,N.Df)()),[]);return c().createElement(N.V9,{container:e.shadowRoot,cache:H},q)}a(5254);var q,H,L,$,V,Q,j,J,G,X,Y,ee,te,ae,ie,se,le,re,ne,oe,he,de,ce,ue,pe,we,ge,ve,me,Ze,fe,be,ye,Ce,xe,Se,_e,ke,Re,Ee,We,Me,Ke,Pe,Ie,Ne,Be,Ue,De,ze,Ae,Te,Fe,Oe,qe,He,Le,$e,Ve,Qe,je,Je,Ge,Xe,Ye,et,tt,at,it,st,lt,rt,nt,ot,ht,dt,ct,ut,pt,wt,gt,vt,mt,Zt,ft,bt,yt,Ct,xt,St,_t,kt,Rt,Et,Wt,Mt,Kt,Pt,It,Nt,Bt,Ut,Dt,zt,At,Tt,Ft,Ot,qt,Ht,Lt,$t,Vt,Qt,jt,Jt,Gt,Xt,Yt,ea,ta,aa,ia,sa,la,ra,na,oa,{defineElement:ha,property:da,event:ca,method:ua}=(0,u.createDecorators)();H=ha("eo-table",{styleTexts:[w.Z],alias:["advanced.general-table"]}),L=ca({type:"page.update"}),j=ca({type:"filter.update"}),Y=ca({type:"select.update"}),ie=ca({type:"select.row.keys.update"}),ne=ca({type:"sort.update",cancelable:!0}),ce=ca({type:"row.expand"}),ge=ca({type:"expand.rows.change"}),fe=ca({type:"row.drag"}),xe=da({type:Boolean}),_e=da({attribute:!1}),Re=da(),We=da({attribute:!1}),Ke=da({type:Boolean}),Ie=da({attribute:!1}),Be=da({attribute:!1}),De=da(),Ae=da({attribute:!1}),Fe=da({attribute:!1}),qe=da({attribute:!1}),Le=da({attribute:!1}),Ve=da({attribute:!1}),je=da({type:Number}),Ge=da({type:Boolean}),Ye=da({attribute:!1}),tt=da({attribute:!1}),it=da({type:Boolean}),lt=da({type:Boolean}),nt=da({attribute:!1}),ht=da({type:Boolean}),ct=da({type:Boolean}),pt=da({attribute:!1}),gt=da({attribute:!1}),mt=da({type:Boolean}),ft=da(),yt=da({type:Boolean}),xt=da({attribute:!1}),_t=da({type:Number}),Rt=da({type:Number}),Wt=da({attribute:!1}),Kt=da(),It=da({type:Boolean}),Bt=da({type:Boolean}),Dt=da({type:Boolean}),At=da({attribute:!1}),Ft=da({type:Boolean}),qt=da({type:Boolean}),Lt=da({type:Boolean}),Vt=da({attribute:!1}),jt=da(),Gt=da({attribute:!1}),Yt=da({type:Boolean}),ta=da({type:Boolean}),ia=da({attribute:!1}),la=ua(),ra=ua();var pa=new WeakMap,wa=new WeakMap,ga=new WeakMap,va=new WeakMap,ma=new WeakMap,Za=new WeakMap,fa=new WeakMap,ba=new WeakMap,ya=new WeakMap,Ca=new WeakMap,xa=new WeakMap,Sa=new WeakMap,_a=new WeakMap,ka=new WeakMap,Ra=new WeakMap,Ea=new WeakMap,Wa=new WeakMap,Ma=new WeakMap,Ka=new WeakMap,Pa=new WeakMap,Ia=new WeakMap,Na=new WeakMap,Ba=new WeakMap,Ua=new WeakMap,Da=new WeakMap,za=new WeakMap,Aa=new WeakMap,Ta=new WeakMap,Fa=new WeakMap,Oa=new WeakMap,qa=new WeakMap,Ha=new WeakMap,La=new WeakMap,$a=new WeakMap,Va=new WeakMap,Qa=new WeakMap,ja=new WeakMap,Ja=new WeakMap,Ga=new WeakMap,Xa=new WeakMap,Ya=new WeakMap,ei=new WeakMap,ti=new WeakMap,ai=new WeakMap,ii=new WeakMap,si=new WeakMap,li=new WeakMap,ri=new WeakMap,ni=new WeakMap,oi=new WeakMap,hi=new WeakMap,di=new WeakMap,ci=new WeakMap,ui=new WeakMap,pi=new WeakMap,wi=new WeakMap,gi=new WeakMap,vi=new WeakMap,mi=new WeakMap,Zi=new WeakMap,fi=new WeakMap,bi=new WeakMap;class yi extends p.ReactNextElement{constructor(){super(...arguments),(0,l.Z)(this,Ea,{get:Di,set:Ui}),(0,l.Z)(this,ka,{get:Bi,set:Ni}),(0,l.Z)(this,Sa,{get:Ii,set:Pi}),(0,l.Z)(this,Ca,{get:Ki,set:Mi}),(0,l.Z)(this,ba,{get:Wi,set:Ei}),(0,l.Z)(this,Za,{get:Ri,set:ki}),(0,l.Z)(this,va,{get:_i,set:Si}),(0,l.Z)(this,wa,{get:xi,set:Ci}),(0,l.Z)(this,pa,{writable:!0,value:(na(this),$(this))}),(0,l.Z)(this,ga,{writable:!0,value:J(this)}),(0,l.Z)(this,ma,{writable:!0,value:ee(this)}),(0,l.Z)(this,fa,{writable:!0,value:se(this)}),(0,l.Z)(this,ya,{writable:!0,value:oe(this)}),(0,l.Z)(this,xa,{writable:!0,value:ue(this)}),(0,l.Z)(this,_a,{writable:!0,value:ve(this)}),(0,l.Z)(this,Ra,{writable:!0,value:be(this)}),(0,l.Z)(this,Wa,{writable:!0,value:Se(this,!0)}),(0,l.Z)(this,Ma,{writable:!0,value:ke(this)}),(0,l.Z)(this,Ka,{writable:!0,value:Ee(this)}),(0,l.Z)(this,Pa,{writable:!0,value:Me(this)}),(0,l.Z)(this,Ia,{writable:!0,value:Pe(this,!1)}),(0,l.Z)(this,Na,{writable:!0,value:Ne(this)}),(0,l.Z)(this,Ba,{writable:!0,value:Ue(this)}),(0,l.Z)(this,Ua,{writable:!0,value:ze(this)}),(0,l.Z)(this,Da,{writable:!0,value:Te(this)}),(0,l.Z)(this,za,{writable:!0,value:Oe(this)}),(0,l.Z)(this,Aa,{writable:!0,value:He(this)}),(0,l.Z)(this,Ta,{writable:!0,value:$e(this)}),(0,l.Z)(this,Fa,{writable:!0,value:Qe(this,!0)}),(0,l.Z)(this,Oa,{writable:!0,value:Je(this)}),(0,l.Z)(this,qa,{writable:!0,value:Xe(this)}),(0,l.Z)(this,Ha,{writable:!0,value:et(this)}),(0,l.Z)(this,La,{writable:!0,value:at(this,!1)}),(0,l.Z)(this,$a,{writable:!0,value:st(this)}),(0,l.Z)(this,Va,{writable:!0,value:rt(this)}),(0,l.Z)(this,Qa,{writable:!0,value:ot(this)}),(0,l.Z)(this,ja,{writable:!0,value:dt(this)}),(0,l.Z)(this,Ja,{writable:!0,value:ut(this)}),(0,s.Z)(this,"_disabledChildrenKeys",[]),(0,l.Z)(this,Ga,{writable:!0,value:wt(this,"children")}),(0,l.Z)(this,Xa,{writable:!0,value:vt(this,!0)}),(0,l.Z)(this,Ya,{writable:!0,value:Zt(this)}),(0,l.Z)(this,ei,{writable:!0,value:bt(this,"")}),(0,l.Z)(this,ti,{writable:!0,value:Ct(this)}),(0,l.Z)(this,ai,{writable:!0,value:St(this)}),(0,l.Z)(this,ii,{writable:!0,value:kt(this)}),(0,l.Z)(this,si,{writable:!0,value:Et(this)}),(0,l.Z)(this,li,{writable:!0,value:Mt(this,{x:!0})}),(0,l.Z)(this,ri,{writable:!0,value:Pt(this,"q")}),(0,l.Z)(this,ni,{writable:!0,value:Nt(this)}),(0,l.Z)(this,oi,{writable:!0,value:Ut(this)}),(0,l.Z)(this,hi,{writable:!0,value:zt(this)}),(0,l.Z)(this,di,{writable:!0,value:Tt(this,[])}),(0,l.Z)(this,ci,{writable:!0,value:Ot(this)}),(0,l.Z)(this,ui,{writable:!0,value:Ht(this)}),(0,l.Z)(this,pi,{writable:!0,value:$t(this,!0)}),(0,l.Z)(this,wi,{writable:!0,value:Qt(this)}),(0,l.Z)(this,gi,{writable:!0,value:Jt(this)}),(0,l.Z)(this,vi,{writable:!0,value:Xt(this)}),(0,l.Z)(this,mi,{writable:!0,value:ea(this,!0)}),(0,l.Z)(this,Zi,{writable:!0,value:aa(this,!0)}),(0,s.Z)(this,"_originalDataSource",[]),(0,s.Z)(this,"_dataSource",[]),(0,s.Z)(this,"_pureSource",void 0),(0,s.Z)(this,"_columns",void 0),(0,s.Z)(this,"_finalConfigProps",{}),(0,s.Z)(this,"_error",void 0),(0,l.Z)(this,fi,{writable:!0,value:void 0}),(0,s.Z)(this,"_selectUpdateEventName",""),(0,s.Z)(this,"_selectUpdateEventDetailKeys",[]),(0,s.Z)(this,"_selectUpdateEventDetailField",""),(0,s.Z)(this,"_selectUpdateEventDetailExtra",{}),(0,s.Z)(this,"_fields",{page:"page",pageSize:"pageSize",dataSource:"list",total:"total",ascend:"ascend",descend:"descend"}),(0,l.Z)(this,bi,{writable:!0,value:sa(this,[])}),(0,s.Z)(this,"_selected",!1),(0,s.Z)(this,"_selectedRow",void 0),(0,s.Z)(this,"_selectedRows",[]),(0,s.Z)(this,"_allChildren",[]),(0,s.Z)(this,"_isInSelect",!1),(0,s.Z)(this,"_getRowKey",(()=>{var e,t,a,i;return null!==(e=null!==(t=null!==(a=this.rowKey)&&void 0!==a?a:this._fields.rowKey)&&void 0!==t?t:null===(i=this.configProps)||void 0===i?void 0:i.rowKey)&&void 0!==e?e:"key"})),(0,s.Z)(this,"_findParentByChildKeyValue",((e,t,a,i)=>{var s;return a.some((a=>{if(a[t]===e)s=i;else{var l=a[this.childrenColumnName];l&&(s=this._findParentByChildKeyValue(e,t,l,a))}return!!s})),s})),(0,s.Z)(this,"_handleRowSelectChange",((e,t)=>{var a=this._getRowKey(),i=(0,g.keyBy)(t,a);if(this._selected){var s=[...e];if(this._allChildren.forEach((e=>{var t=e[a];s.push(t),i[t]=e})),this.autoSelectParentWhenAllChildrenSelected&&this._selectedRow){var l=new Set(e),r=this._findParentByChildKeyValue(this._selectedRow[a],a,this._dataSource);if(r&&r[this.childrenColumnName].every((e=>l.has(e[a])))){var n=r[a];s.push(n),i[n]=r}}this.selectedRowKeys=(0,g.uniq)(s)}else{var h;this.autoSelectParentWhenAllChildrenSelected&&this._selectedRow&&(h=this._findParentByChildKeyValue(this._selectedRow[a],a,this._dataSource)),this.selectedRowKeys=(0,g.pullAll)(e,(0,g.map)(this._allChildren.concat(h),a))}this._selectedRow=void 0;var d=(0,g.keyBy)(this.extraRows,a);this._selectedRows=this.selectedRowKeys.map((e=>i[e]||d[e]));var c=null,u=(0,g.isEmpty)(this._selectUpdateEventDetailField)?this._selectedRows:(0,g.map)(this._selectedRows,(e=>(0,g.get)(e,this._selectUpdateEventDetailField)));c=(0,g.isEmpty)(this._selectUpdateEventDetailKeys)||(0,g.isEmpty)(u)?u:(0,g.set)({},this._selectUpdateEventDetailKeys,u),(0,g.isEmpty)(c)||(c=(0,g.merge)(c,this._selectUpdateEventDetailExtra)),this._selectUpdateEventName?this.dispatchEvent(new CustomEvent(this._selectUpdateEventName,{detail:c})):(0,o.Z)(this,Za).emit(c),(0,o.Z)(this,ba).emit(e)})),(0,s.Z)(this,"_getSelectedRowsWithChildren",(e=>{var t=[];return!(0,g.isEmpty)(e[this.childrenColumnName])&&(0,g.isArray)(e[this.childrenColumnName])&&(0,g.forEach)(e[this.childrenColumnName],(e=>{t.push(e),t.push(...this._getSelectedRowsWithChildren(e))})),t})),(0,s.Z)(this,"_handleOnSelect",((e,t,a)=>{this._selected=t,this._selectedRow=e,this._isInSelect=!0;var i=this._getRowKey(),s=this.selectAllChildren?this._getSelectedRowsWithChildren(e):[];this._allChildren=s,this.autoSelectParentWhenAllChildrenSelected||(this._disabledChildrenKeys=t?(0,g.uniq)([...this._disabledChildrenKeys,...(0,g.map)(s,i)]):(0,g.pullAll)(this._disabledChildrenKeys,[...(0,g.map)(s,i)])),this.storeCheckedByUrl&&i&&this._updateUrlChecked([e[i]],t)})),(0,s.Z)(this,"_handleSelectAll",((e,t,a)=>{this._selected=e,this._isInSelect=!0;var i=this._getRowKey();if(this.selectAllChildren){var s=(0,g.map)(this._dataSource,i),l=a.filter((e=>s.includes(e[i]))),r=(0,g.flatten)((0,g.map)(l,(e=>(0,g.map)(this._getSelectedRowsWithChildren(e),(e=>e[i]))))),n=(0,g.flatten)((0,g.map)(l,(e=>(0,g.map)(this._getSelectedRowsWithChildren(e),(e=>e)))));this._allChildren=n,this.autoSelectParentWhenAllChildrenSelected||(this._disabledChildrenKeys=e?(0,g.uniq)(this._disabledChildrenKeys.concat(r)):this._disabledChildrenKeys.filter((e=>!r.includes(e))))}this.storeCheckedByUrl&&i&&this._updateUrlChecked((0,g.map)(a,i),e)})),(0,s.Z)(this,"_getCheckedFromUrl",(()=>{var e=(0,v.getHistory)(),t=new URLSearchParams(e.location.search).get("checked");return(0,g.isEmpty)(t)?[]:t.split(",")})),(0,s.Z)(this,"_updateUrlChecked",((e,t)=>{var a=(0,v.getHistory)(),i=this._getCheckedFromUrl();t?i=[...i,...e]:(0,g.pull)(i,...e),this.shouldUpdateUrlParams&&a.pushQuery({checked:i.join(",")},{notify:!1})})),(0,s.Z)(this,"_handleOnChange",((e,t,a)=>{var i=(0,v.getHistory)(),s=new URLSearchParams(i.location.search);if(!(0,g.isEmpty)(e))if(e.pageSize!==this.pageSize)e.current=1,s.set("page","1"),s.set("pageSize",(null==e?void 0:e.pageSize).toString()),(0,o.Z)(this,va).emit({[this._fields.pageSize]:e.pageSize,[this._fields.page]:1}),this.page=1,this.pageSize=e.pageSize;else if(e.current!==this.page){var l=e.current||1;s.set("page",l.toString()),(0,o.Z)(this,wa).emit({[this._fields.page]:l}),this.page=l}this.filters=t,(0,g.isEmpty)(t)||(0,g.forEach)(t,((e,t)=>{(0,g.isNil)(e)||0===e.length?s.delete(t):s.set(t,e)})),a.order&&(0,g.isNil)(a.order)&&(a.columnKey!==this.sort||this._fields[a.order]!==this.order)&&(a.columnKey&&a.order?(s.set("sort",a.columnKey),s.set("order",this._fields[a.order].toString()),this.sort=a.columnKey,this.order=this._fields[a.order]):(s.delete("sort"),s.delete("order"),this.sort=null,this.order=null),(0,o.Z)(this,Ca).emit({sort:this.sort,order:this.order})),this.frontSearch?(this.shouldUpdateUrlParams&&i.push("?".concat(s),{notify:!1}),this.frontendSearch(e,t,a)):this.shouldUpdateUrlParams&&i.push("?".concat(s),{notify:!!this.shouldRenderWhenUrlParamsUpdate})})),(0,s.Z)(this,"renderSelectInfo",(()=>c().createElement("span",{style:{marginLeft:20}},c().createElement("span",null,"已选择",this.selectedRowKeys.length,"项"),c().createElement("a",{role:"button",style:{marginLeft:"10px"},onClick:()=>{this.selectedRowKeys=[],this._selectedRows=[],this._disabledChildrenKeys=[],this._allChildren=[],this._selectUpdateEventName?this.dispatchEvent(new CustomEvent(this._selectUpdateEventName,{detail:[]})):(0,o.Z)(this,Za).emit([])}},"清空")))),(0,s.Z)(this,"_handleOnExpand",((e,t)=>{if(this.expandedRowKeys){var a=this._getRowKey(),i=[(0,g.get)(t,a)],s=(0,g.get)(t,this.childrenColumnName);if(!(0,g.isEmpty)(s)){var l=(0,g.map)((0,g.filter)(s,(e=>(0,g.isEmpty)((0,g.get)(e,this.childrenColumnName)))),a);i.push(...l)}this.expandedRowKeys=e?[...this.expandedRowKeys,...i]:(0,g.pull)(this.expandedRowKeys,...i),this._render()}(0,o.Z)(this,Sa).emit({expanded:e,record:t})})),(0,s.Z)(this,"_handleOnExpandedRowsChange",(e=>{(0,o.Z)(this,ka).emit({expandedRows:e})})),(0,s.Z)(this,"_handleOnDrag",(e=>{(0,o.Z)(this,Ea).emit({data:e})})),(0,s.Z)(this,"_getAllRows",(()=>{var e=[];return x(this._dataSource,this.childrenColumnName,e),e})),(0,s.Z)(this,"_handleDefaultSelectAll",(()=>{this._isInSelect=!0;var e=this._getRowKey();return this._selectedRows=this._getAllRows(),this.selectedRowKeys=(0,g.map)(this._selectedRows,e),this.selectedRowKeys})),(0,s.Z)(this,"_initConfigProps",(()=>{var e,t,a,s={current:this.page,pageSize:this.pageSize,total:(0,o.Z)(this,fi),showSizeChanger:!0,pageSizeOptions:["10","20","50"],showTotal:e=>{var t;return c().createElement(c().Fragment,null,c().createElement("span",{className:"totalText"},"共 ",c().createElement("strong",{className:"total"},e)," 条"),((null===(t=this.configProps)||void 0===t?void 0:t.rowSelection)||this.rowSelection)&&this.showSelectInfo&&0!==this.selectedRowKeys.length&&this.renderSelectInfo())}},l=this._getRowKey();this.rowDisabledConfig&&(a=Array.isArray(this.rowDisabledConfig)?this.rowDisabledConfig:[this.rowDisabledConfig]);var r=(0,i.Z)((0,i.Z)({},l?{selectedRowKeys:this._isInSelect?this.selectedRowKeys:this.storeCheckedByUrl?this._getCheckedFromUrl():this.defaultSelectAll?this._handleDefaultSelectAll():this.selectedRowKeys,onSelect:this._handleOnSelect,onSelectAll:this._handleSelectAll,onChange:this._handleRowSelectChange,preserveSelectedRowKeys:!0}:{onChange:this._handleRowSelectChange,preserveSelectedRowKeys:!0}),{},{getCheckboxProps:e=>!(0,g.isEmpty)(this._disabledChildrenKeys)&&this._disabledChildrenKeys.includes((0,g.get)(e,l))?{disabled:!0}:a?{disabled:a.some((t=>{var{field:a,value:i,operator:s}=t,l=b[s];return null==l?void 0:l(i,(0,g.get)(e,a))}))}:{}});this.configProps?(this._finalConfigProps=(0,g.cloneDeep)(this.configProps),!1!==this.configProps.pagination&&(this._finalConfigProps.pagination=(0,i.Z)((0,i.Z)((0,i.Z)({},s),this.pagination),this.configProps.pagination),void 0!==this.configProps.pagination&&null!==this.configProps.pagination||!1!==this.pagination||(this._finalConfigProps.pagination=!1)),this.configProps.size||(this._finalConfigProps.size=this.size)):(this._finalConfigProps={},this._finalConfigProps.pagination=!1!==this.pagination&&s,this._finalConfigProps.size=this.size);var n,h,d=null!==(e=null===(t=this.configProps)||void 0===t?void 0:t.rowSelection)&&void 0!==e?e:this.rowSelection;d?this._finalConfigProps.rowSelection=!0===d?(0,i.Z)((0,i.Z)({},r),{},{type:null!==(n=this.type)&&void 0!==n?n:"checkbox"}):(0,i.Z)((0,i.Z)((0,i.Z)({},r),{},{type:null!==(h=this.type)&&void 0!==h?h:"checkbox"},d),r.selectedRowKeys?{selectedRowKeys:r.selectedRowKeys}:{}):this.type?this._finalConfigProps.rowSelection=(0,i.Z)((0,i.Z)({},r),{},{type:this.type}):this._finalConfigProps.rowSelection=!1,this._columns&&(this._columns=this._columns.map((e=>{if((0,g.isNil)(e.key)&&(e.key=e.dataIndex),e.sorter&&(e.sortOrder=this.sort===e.key&&!(0,g.isNil)(this.order)&&(this._fields.ascend===this.order?"ascend":"descend")),e.filters){var t,a,i=(0,v.getHistory)(),s=null!==(t=new URLSearchParams(i.location.search).get(e.key))&&void 0!==t?t:null===(a=(0,g.get)(this.filters,e.key))||void 0===a?void 0:a.join(",");(0,g.isNil)(s)||(0,g.isEmpty)(s)?(e.filtered=!1,e.filteredValue=[]):(e.filtered=!0,e.filteredValue=s.split(",").map((t=>{var a,i;return null!==(a=null===(i=(0,g.find)(e.filters,(e=>String(e.value)===t)))||void 0===i?void 0:i.value)&&void 0!==a?a:t})))}return e})))}))}set columns(e){this._columns=e,this._render()}get columns(){return this._columns}set dataSource(e){var t,a,i,s,l,r;this._isInSelect=!1,this._originalDataSource=e,this._dataSource=(0,g.cloneDeep)(this._fields.dataSource?(0,g.get)(e,this._fields.dataSource):e),this._pureSource=(0,g.cloneDeep)(this._dataSource),this.stripEmptyExpandableChildren&&S((null===(r=this.configProps)||void 0===r||null===(r=r.expandable)||void 0===r?void 0:r.childrenColumnName)||"children",this._dataSource),(0,n.Z)(this,fi,(0,g.get)(e,this._fields.total)),this.page=null!==(t=null!==(a=(0,g.get)(e,"page"))&&void 0!==a?a:this.page)&&void 0!==t?t:1,this.pageSize=null!==(i=null!==(s=null!==(l=(0,g.get)(e,"page_size"))&&void 0!==l?l:(0,g.get)(e,"pageSize"))&&void 0!==s?s:this.pageSize)&&void 0!==i?i:10,this._render()}get showCard(){return(0,o.Z)(this,Wa)}set showCard(e){(0,n.Z)(this,Wa,e)}get rowSelection(){return(0,o.Z)(this,Ma)}set rowSelection(e){(0,n.Z)(this,Ma,e)}get rowKey(){return(0,o.Z)(this,Ka)}set rowKey(e){(0,n.Z)(this,Ka,e)}get hiddenColumns(){return(0,o.Z)(this,Pa)}set hiddenColumns(e){(0,n.Z)(this,Pa,e)}get showSelectInfo(){return(0,o.Z)(this,Ia)}set showSelectInfo(e){(0,n.Z)(this,Ia,e)}get filters(){return(0,o.Z)(this,Na)}set filters(e){(0,n.Z)(this,Na,e)}get configProps(){return(0,o.Z)(this,Ba)}set configProps(e){(0,n.Z)(this,Ba,e)}get sort(){return(0,o.Z)(this,Ua)}set sort(e){(0,n.Z)(this,Ua,e)}get order(){return(0,o.Z)(this,Da)}set order(e){(0,n.Z)(this,Da,e)}get rowDisabledConfig(){return(0,o.Z)(this,za)}set rowDisabledConfig(e){(0,n.Z)(this,za,e)}get expandedRowBrick(){return(0,o.Z)(this,Aa)}set expandedRowBrick(e){(0,n.Z)(this,Aa,e)}get expandIcon(){return(0,o.Z)(this,Ta)}set expandIcon(e){(0,n.Z)(this,Ta,e)}get expandIconAsCell(){return(0,o.Z)(this,Fa)}set expandIconAsCell(e){(0,n.Z)(this,Fa,e)}get expandIconColumnIndex(){return(0,o.Z)(this,Oa)}set expandIconColumnIndex(e){(0,n.Z)(this,Oa,e)}get expandRowByClick(){return(0,o.Z)(this,qa)}set expandRowByClick(e){(0,n.Z)(this,qa,e)}get optimizedColumns(){return(0,o.Z)(this,Ha)}set optimizedColumns(e){(0,n.Z)(this,Ha,e)}get stripEmptyExpandableChildren(){return(0,o.Z)(this,La)}set stripEmptyExpandableChildren(e){(0,n.Z)(this,La,e)}get defaultExpandAllRows(){return(0,o.Z)(this,$a)}set defaultExpandAllRows(e){(0,n.Z)(this,$a,e)}get ellipsisInfo(){return(0,o.Z)(this,Va)}set ellipsisInfo(e){(0,n.Z)(this,Va,e)}get expandedRowKeys(){return(0,o.Z)(this,Qa)}set expandedRowKeys(e){(0,n.Z)(this,Qa,e)}get selectAllChildren(){return(0,o.Z)(this,ja)}set selectAllChildren(e){(0,n.Z)(this,ja,e)}get defaultSelectAll(){return(0,o.Z)(this,Ja)}set defaultSelectAll(e){(0,n.Z)(this,Ja,e)}get childrenColumnName(){return(0,o.Z)(this,Ga)}set childrenColumnName(e){(0,n.Z)(this,Ga,e)}get sortable(){return(0,o.Z)(this,Xa)}set sortable(e){(0,n.Z)(this,Xa,e)}set fields(e){this._fields=(0,i.Z)((0,i.Z)({},this._fields),e),this._render()}get frontSearch(){return(0,o.Z)(this,Ya)}set frontSearch(e){(0,n.Z)(this,Ya,e)}get frontSearchQuery(){return(0,o.Z)(this,ei)}set frontSearchQuery(e){(0,n.Z)(this,ei,e)}get exactSearch(){return(0,o.Z)(this,ti)}set exactSearch(e){(0,n.Z)(this,ti,e)}get frontSearchFilterKeys(){return(0,o.Z)(this,ai)}set frontSearchFilterKeys(e){(0,n.Z)(this,ai,e)}get page(){return(0,o.Z)(this,ii)}set page(e){(0,n.Z)(this,ii,e)}get pageSize(){return(0,o.Z)(this,si)}set pageSize(e){(0,n.Z)(this,si,e)}get scrollConfigs(){return(0,o.Z)(this,li)}set scrollConfigs(e){(0,n.Z)(this,li,e)}get qField(){return(0,o.Z)(this,ri)}set qField(e){(0,n.Z)(this,ri,e)}get tableDraggable(){return(0,o.Z)(this,ni)}set tableDraggable(e){(0,n.Z)(this,ni,e)}get zebraPattern(){return(0,o.Z)(this,oi)}set zebraPattern(e){(0,n.Z)(this,oi,e)}get storeCheckedByUrl(){return(0,o.Z)(this,hi)}set storeCheckedByUrl(e){(0,n.Z)(this,hi,e)}get extraRows(){return(0,o.Z)(this,di)}set extraRows(e){(0,n.Z)(this,di,e)}get autoSelectParentWhenAllChildrenSelected(){return(0,o.Z)(this,ci)}set autoSelectParentWhenAllChildrenSelected(e){(0,n.Z)(this,ci,e)}get thTransparent(){return(0,o.Z)(this,ui)}set thTransparent(e){(0,n.Z)(this,ui,e)}get showHeader(){return(0,o.Z)(this,pi)}set showHeader(e){(0,n.Z)(this,pi,e)}get pagination(){return(0,o.Z)(this,wi)}set pagination(e){(0,n.Z)(this,wi,e)}get size(){return(0,o.Z)(this,gi)}set size(e){(0,n.Z)(this,gi,e)}get type(){return(0,o.Z)(this,vi)}set type(e){(0,n.Z)(this,vi,e)}get shouldUpdateUrlParams(){return(0,o.Z)(this,mi)}set shouldUpdateUrlParams(e){(0,n.Z)(this,mi,e)}get shouldRenderWhenUrlParamsUpdate(){return(0,o.Z)(this,Zi)}set shouldRenderWhenUrlParamsUpdate(e){(0,n.Z)(this,Zi,e)}get processedDataSource(){return this._dataSource}get processConfigProps(){return this._finalConfigProps}get processedColumns(){return this.getModifyColumns()}get selectedRowKeys(){return(0,o.Z)(this,bi)}set selectedRowKeys(e){(0,n.Z)(this,bi,e)}filterSourceData(e){var t=this.exactSearch?e.detail.q.trim():e.detail.q.trim().toLowerCase();if(this.shouldUpdateUrlParams){var a=(0,v.getHistory)(),i=new URLSearchParams(a.location.search);i.set("page","1"),t?(i.set(this.qField,t),a.push("?".concat(i),{notify:!this.frontSearch})):(i.delete(this.qField),a.push("?".concat(i),{notify:!this.frontSearch})),this.page=1}this.frontSearchQuery=t}handleFrontendDataChange(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(this.shouldUpdateUrlParams){var a=(0,v.getHistory)(),i=new URLSearchParams(a.location.search);this.frontSearchQuery=i.get(this.qField)}var s=[];s=this.handleFrontendFilterSource(e,this.frontSearchQuery||"",t);var l=(0,g.isNil)(this.order)?null:this._fields.ascend===this.order?"ascend":"descend";return s=this.handleFrontendSorter(s,{columnKey:this.sort,order:l}),s=this.handleFrontendFilters(s),(0,n.Z)(this,fi,s.length),s}handleFrontendFilterSource(e,t,a,s){if(!t)return e;var l=[];return s||(s=this.frontSearchFilterKeys||a.map((e=>e.dataIndex))),e.forEach((e=>{var r,n=e[this.childrenColumnName];if(n){var o=this.handleFrontendFilterSource(n,t,a,s);if(o.length>0)return void l.push((0,i.Z)((0,i.Z)({},e),{},{[this.childrenColumnName]:o}))}(null===(r=s)||void 0===r?void 0:r.some((a=>{var i=(0,g.get)(e,a);return!(0,g.isNil)(i)&&(this.exactSearch?i===t:JSON.stringify(i).toLowerCase().includes(t))})))&&l.push(e)})),l}handleFrontendSorter(e,t){var a=e||[],{columnKey:i,order:s}=t;if(!i||!s)return e;var l=1;return"descend"===s?l=-1:"ascend"===s&&(l=1),void 0!==l&&(a.sort(((e,t)=>{var a=(0,g.get)(e,i),s=(0,g.get)(t,i);if((0,g.isNil)(a)){if(!(0,g.isNil)(s))return 1}else if((0,g.isNil)(s))return-1;return a==s?0:a>s?l:-l})),a.forEach((e=>{var a=e[this.childrenColumnName];a&&this.handleFrontendSorter(a,t)}))),a}handleFrontendFilters(e){var t=e||[],a=(0,g.map)(this.filters,((e,t)=>({key:t,value:e}))).filter((e=>!(0,g.isNil)(e.value)&&0!==e.value.length));return t.filter((e=>(0,g.every)(a,(t=>{var a,i;return null===(a=null===(i=t.value)||void 0===i?void 0:i.includes((0,g.get)(e,t.key)))||void 0===a||a}))))}frontendSearch(e,t,a){this.sort=(0,g.isNil)(a.order)?null:a.columnKey,this.order=(0,g.isNil)(a.order)?null:this._fields[a.order]}expandAll(){var e=[],t=this._getRowKey();this._dataSource&&C(this._dataSource,t,this.childrenColumnName,e),this.expandedRowKeys=e}getModifyColumns(){var e=this._columns;return this._columns&&this.hiddenColumns&&(e=this._columns.filter((e=>{var t,a;return!(null!==(t=this.hiddenColumns)&&void 0!==t&&t.includes(null!==(a=e.dataIndex)&&void 0!==a?a:e.key))}))),!1===this.sortable&&(e=(0,g.map)(e,(e=>(e.sorter=!1,e)))),e}render(){return this.frontSearch&&(this._dataSource=this.handleFrontendDataChange(this._pureSource,this._columns)),this._initConfigProps(),c().createElement(O,{shadowRoot:this.shadowRoot,dataSource:this._dataSource||[],columns:this.getModifyColumns(),configProps:this._finalConfigProps,error:this._error,onChange:this._handleOnChange,showCard:this.showCard,showHeader:this.showHeader,expandedRowBrick:this.expandedRowBrick,expandIconAsCell:this.expandIconAsCell,expandIconColumnIndex:this.expandIconColumnIndex,expandRowByClick:this.expandRowByClick,defaultExpandAllRows:this.defaultExpandAllRows,onExpand:this._handleOnExpand,onExpandedRowsChange:this._handleOnExpandedRowsChange,expandedRowKeys:this.expandedRowKeys,rowKey:this._getRowKey(),childrenColumnName:this.childrenColumnName,tableDraggable:this.tableDraggable||this.draggable,onDrag:this._handleOnDrag,zebraPattern:this.zebraPattern,expandIcon:this.expandIcon,scroll:this.scrollConfigs,optimizedColumns:this.optimizedColumns,ellipsisInfo:this.ellipsisInfo,thTransparent:this.thTransparent})}_test_only_getOriginalDataSource(){return this._originalDataSource}updateData(e){this._dataSource=e.detail,this._error=null,this._render()}updateError(e){this._error=e.detail,this._render()}set selectUpdateEventName(e){this._selectUpdateEventName=e}set selectUpdateEventDetailKeys(e){this._selectUpdateEventDetailKeys=e}set selectUpdateEventDetailField(e){this._selectUpdateEventDetailField=e}set selectUpdateEventDetailExtra(e){this._selectUpdateEventDetailExtra=e}}function Ci(e){Q(this,e)}function xi(){return V(this)}function Si(e){X(this,e)}function _i(){return G(this)}function ki(e){ae(this,e)}function Ri(){return te(this)}function Ei(e){re(this,e)}function Wi(){return le(this)}function Mi(e){de(this,e)}function Ki(){return he(this)}function Pi(e){we(this,e)}function Ii(){return pe(this)}function Ni(e){Ze(this,e)}function Bi(){return me(this)}function Ui(e){Ce(this,e)}function Di(){return ye(this)}({e:[$,V,Q,J,G,X,ee,te,ae,se,le,re,oe,he,de,ue,pe,we,ve,me,Ze,be,ye,Ce,Se,ke,Ee,Me,Pe,Ne,Ue,ze,Te,Oe,He,$e,Qe,Je,Xe,et,at,st,rt,ot,dt,ut,wt,vt,Zt,bt,Ct,St,kt,Et,Mt,Pt,Nt,Ut,zt,Tt,Ot,Ht,$t,Qt,Jt,Xt,ea,aa,sa,na],c:[oa,q]}=(0,h.Z)(yi,[[L,1,"pageUpdate",e=>(0,o.Z)(e,pa),(e,t)=>(0,n.Z)(e,pa,t)],[j,1,"filterUpdate",e=>(0,o.Z)(e,ga),(e,t)=>(0,n.Z)(e,ga,t)],[Y,1,"selectUpdate",e=>(0,o.Z)(e,ma),(e,t)=>(0,n.Z)(e,ma,t)],[ie,1,"selectRowKeysUpdate",e=>(0,o.Z)(e,fa),(e,t)=>(0,n.Z)(e,fa,t)],[ne,1,"sortUpdate",e=>(0,o.Z)(e,ya),(e,t)=>(0,n.Z)(e,ya,t)],[ce,1,"rowExpand",e=>(0,o.Z)(e,xa),(e,t)=>(0,n.Z)(e,xa,t)],[ge,1,"expandRowsChange",e=>(0,o.Z)(e,_a),(e,t)=>(0,n.Z)(e,_a,t)],[fe,1,"rowDrag",e=>(0,o.Z)(e,Ra),(e,t)=>(0,n.Z)(e,Ra,t)],[xe,1,"showCard"],[_e,1,"rowSelection"],[Re,1,"rowKey"],[We,1,"hiddenColumns"],[Ke,1,"showSelectInfo"],[Ie,1,"filters"],[Be,1,"configProps"],[De,1,"sort"],[Ae,1,"order"],[Fe,1,"rowDisabledConfig"],[qe,1,"expandedRowBrick"],[Le,1,"expandIcon"],[Ve,1,"expandIconAsCell"],[je,1,"expandIconColumnIndex"],[Ge,1,"expandRowByClick"],[Ye,1,"optimizedColumns"],[tt,1,"stripEmptyExpandableChildren"],[it,1,"defaultExpandAllRows"],[lt,1,"ellipsisInfo"],[nt,1,"expandedRowKeys"],[ht,1,"selectAllChildren"],[ct,1,"defaultSelectAll"],[pt,1,"childrenColumnName"],[gt,1,"sortable"],[mt,1,"frontSearch"],[ft,1,"frontSearchQuery"],[yt,1,"exactSearch"],[xt,1,"frontSearchFilterKeys"],[_t,1,"page"],[Rt,1,"pageSize"],[Wt,1,"scrollConfigs"],[Kt,1,"qField"],[It,1,"tableDraggable"],[Bt,1,"zebraPattern"],[Dt,1,"storeCheckedByUrl"],[At,1,"extraRows"],[Ft,1,"autoSelectParentWhenAllChildrenSelected"],[qt,1,"thTransparent"],[Lt,1,"showHeader"],[Vt,1,"pagination"],[jt,1,"size"],[Gt,1,"type"],[Yt,1,"shouldUpdateUrlParams"],[ta,1,"shouldRenderWhenUrlParamsUpdate"],[ia,1,"selectedRowKeys"],[la,2,"filterSourceData"],[ra,2,"expandAll"]],[H],0,(e=>fi.has((0,r.Z)(e))))),q();var zi,Ai,Ti,Fi,Oi,qi,Hi,Li,$i,Vi,Qi,ji,Ji,Gi,Xi,Yi,es,ts,as,is,ss,ls,rs,ns,os,hs,ds,cs,us,ps,ws,gs,vs,ms,Zs,fs,bs,ys,Cs=a(8682),{defineElement:xs,property:Ss,event:_s}=(0,u.createDecorators)(),ks=(0,p.wrapBrick)("eo-icon");Ai=xs("eo-cascader",{alias:["advanced.general-cascader"]}),Ti=Ss({attribute:!1}),Oi=Ss({attribute:!1}),Hi=Ss({attribute:!1}),$i=Ss(),Qi=Ss({type:Boolean}),Ji=Ss({type:Boolean}),Xi=Ss({type:Boolean}),es=Ss({type:Boolean}),as=Ss({attribute:!1}),ss=Ss(),rs=Ss(),os=Ss(),ds=Ss({type:Number}),us=Ss({attribute:!1}),ws=Ss({attribute:!1}),vs=_s({type:"cascader.change"});var Rs=new WeakMap,Es=new WeakMap,Ws=new WeakMap,Ms=new WeakMap,Ks=new WeakMap,Ps=new WeakMap,Is=new WeakMap,Ns=new WeakMap,Bs=new WeakMap,Us=new WeakMap,Ds=new WeakMap,zs=new WeakMap,As=new WeakMap,Ts=new WeakMap,Fs=new WeakMap,Os=new WeakMap,qs=new WeakMap,Hs=new WeakMap;class Ls extends p.ReactNextElement{constructor(){super(...arguments),(0,l.Z)(this,qs,{get:Vs,set:$s}),(0,l.Z)(this,Rs,{writable:!0,value:(bs(this),Fi(this))}),(0,l.Z)(this,Es,{writable:!0,value:qi(this,{label:"label",value:"value",children:"children"})}),(0,l.Z)(this,Ws,{writable:!0,value:Li(this)}),(0,l.Z)(this,Ms,{writable:!0,value:Vi(this)}),(0,l.Z)(this,Ks,{writable:!0,value:ji(this)}),(0,l.Z)(this,Ps,{writable:!0,value:Gi(this)}),(0,l.Z)(this,Is,{writable:!0,value:Yi(this,!0)}),(0,l.Z)(this,Ns,{writable:!0,value:ts(this,!0)}),(0,l.Z)(this,Bs,{writable:!0,value:is(this)}),(0,l.Z)(this,Us,{writable:!0,value:ls(this,"click")}),(0,l.Z)(this,Ds,{writable:!0,value:ns(this,"bottomLeft")}),(0,l.Z)(this,zs,{writable:!0,value:hs(this)}),(0,l.Z)(this,As,{writable:!0,value:cs(this,50)}),(0,l.Z)(this,Ts,{writable:!0,value:ps(this)}),(0,l.Z)(this,Fs,{writable:!0,value:gs(this)}),(0,l.Z)(this,Os,{writable:!0,value:ms(this)}),(0,l.Z)(this,Hs,{writable:!0,value:(e,t)=>{this.value=e,Promise.resolve().then((()=>{(0,o.Z)(this,qs).emit({value:e,selectedOptions:t})}))}})}get options(){return(0,o.Z)(this,Rs)}set options(e){(0,n.Z)(this,Rs,e)}get fieldNames(){return(0,o.Z)(this,Es)}set fieldNames(e){(0,n.Z)(this,Es,e)}get value(){return(0,o.Z)(this,Ws)}set value(e){(0,n.Z)(this,Ws,e)}get placeholder(){return(0,o.Z)(this,Ms)}set placeholder(e){(0,n.Z)(this,Ms,e)}get multiple(){return(0,o.Z)(this,Ks)}set multiple(e){(0,n.Z)(this,Ks,e)}get disabled(){return(0,o.Z)(this,Ps)}set disabled(e){(0,n.Z)(this,Ps,e)}get allowClear(){return(0,o.Z)(this,Is)}set allowClear(e){(0,n.Z)(this,Is,e)}get showSearch(){return(0,o.Z)(this,Ns)}set showSearch(e){(0,n.Z)(this,Ns,e)}get suffixIcon(){return(0,o.Z)(this,Bs)}set suffixIcon(e){(0,n.Z)(this,Bs,e)}get expandTrigger(){return(0,o.Z)(this,Us)}set expandTrigger(e){(0,n.Z)(this,Us,e)}get popupPlacement(){return(0,o.Z)(this,Ds)}set popupPlacement(e){(0,n.Z)(this,Ds,e)}get size(){return(0,o.Z)(this,zs)}set size(e){(0,n.Z)(this,zs,e)}get limit(){return(0,o.Z)(this,As)}set limit(e){(0,n.Z)(this,As,e)}get maxTagCount(){return(0,o.Z)(this,Ts)}set maxTagCount(e){(0,n.Z)(this,Ts,e)}get cascaderStyle(){return(0,o.Z)(this,Fs)}set cascaderStyle(e){(0,n.Z)(this,Fs,e)}render(){return c().createElement(Qs,{shadowRoot:this.shadowRoot,options:this.options,fieldNames:this.fieldNames,value:this.value,multiple:this.multiple,placeholder:this.placeholder,disabled:this.disabled,allowClear:this.allowClear,showSearch:this.showSearch,expandTrigger:this.expandTrigger,suffixIcon:this.suffixIcon,size:this.size,limit:this.limit,popupPlacement:this.popupPlacement,maxTagCount:this.maxTagCount,cascaderStyle:this.cascaderStyle,onChange:(0,o.Z)(this,Hs)})}}function $s(e){fs(this,e)}function Vs(){return Zs(this)}function Qs(e){var{shadowRoot:t,options:a,fieldNames:i,value:s,placeholder:l,disabled:r,multiple:n,allowClear:o,showSearch:h,expandTrigger:u,size:p,limit:w,popupPlacement:g,cascaderStyle:v,suffixIcon:m,maxTagCount:Z,onChange:f}=e,b=(0,d.useMemo)((()=>(0,N.Df)()),[]);return c().createElement(N.V9,{container:t,cache:b},c().createElement(Cs.Z,{getPopupContainer:e=>e.parentElement,allowClear:o,disabled:r,multiple:n,expandTrigger:u,fieldNames:i,placeholder:l,size:p,showSearch:h&&{limit:w,filter:(e,t)=>{for(var a=(null==i?void 0:i.label)||"label",s=e.split(" ").filter((e=>e)).map((e=>e.toLocaleLowerCase())),l=function(e){if(!t.some((t=>t[a].toLowerCase().includes(s[e]))))return{v:!1}},r=0;r<s.length;r++){var n=l(r);if("object"==typeof n)return n.v}return!0}},placement:g,style:v,suffixIcon:m&&c().createElement(ks,m),maxTagCount:Z,value:s,options:a,onChange:(e,t)=>null==f?void 0:f(e,t)}))}({e:[Fi,qi,Li,Vi,ji,Gi,Yi,ts,is,ls,ns,hs,cs,ps,gs,ms,Zs,fs,bs],c:[ys,zi]}=(0,h.Z)(Ls,[[Ti,1,"options"],[Oi,1,"fieldNames"],[Hi,1,"value"],[$i,1,"placeholder"],[Qi,1,"multiple"],[Ji,1,"disabled"],[Xi,1,"allowClear"],[es,1,"showSearch"],[as,1,"suffixIcon"],[ss,1,"expandTrigger"],[rs,1,"popupPlacement"],[os,1,"size"],[ds,1,"limit"],[us,1,"maxTagCount"],[ws,1,"cascaderStyle"],[vs,1,"changeEvent",e=>(0,o.Z)(e,Os),(e,t)=>(0,n.Z)(e,Os,t)]],[Ai],0,(e=>Hs.has((0,r.Z)(e))))),zi()},2869:(e,t,a)=>{a.d(t,{Z:()=>n});var i=a(9601),s=a.n(i),l=a(2609),r=a.n(l)()(s());r.push([e.id,".brickTableOddRow{background-color:var(--color-fill-bg-base-4)}.ant-table-small .ant-table-body{margin:0}.ant-table-small .ant-table-thead{background:var(--antd-table-header-bg)}.ant-table-small .ant-table-row{line-height:26px}.ant-table-tbody > tr.invalidRow > td{background-color:var(--color-error-bg)}.ant-table-tbody > tr.invalidRow:hover > td{background-color:var(--color-error-bg)}.ant-table-tbody > tr.disabledRow > td{background-color:var(--theme-gray-border-color)}.ant-table-tbody > .ant-table-row-selected td{background:var(--antd-table-cell-fixed-body-bg)!important}td.alignTop{vertical-align:top}td.alignBottom{vertical-align:bottom}.expandIconCellHidden .ant-table-row-expand-icon-cell,\n.expandIconCellHidden .ant-table-expand-icon-col{width:1px;min-width:auto}.expandIconCellHidden .ant-table-row-expand-icon-cell > *,\n.expandIconCellHidden .ant-table-expand-icon-col > *{display:none}.expandIconSpan{cursor:pointer;margin-right:9px;color:var(--antd-table-row-expand-icon-color);font-size:11px}.expandIconSpan .anticon{background:var(--antd-table-row-expand-icon-action-bg);border-radius:2px;padding:3px}.tableThTransparent thead.ant-table-thead > tr > th{background:var(--antd-table-header-bg)}.zebraPatternTable .ant-table-tbody tr td{border-bottom:0}.ellipsis{max-width:240px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.totalText{color:var(--antd-pagination-total-text)}.total{font-weight:normal;color:var(--antd-pagination-total-strong-text)}",""]);const n=r.toString()}}]);
|
|
2
|
+
//# sourceMappingURL=9079.dff55d61.js.map
|