@next-bricks/visual-builder 1.39.3 → 1.39.5
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 +13 -12
- package/dist/chunks/{2980.5d997cd9.js → 2980.858c327f.js} +2 -2
- package/dist/chunks/{2980.5d997cd9.js.map → 2980.858c327f.js.map} +1 -1
- package/dist/chunks/{5552.54c4b91f.js → 3171.a0060867.js} +2 -2
- package/dist/chunks/{5552.54c4b91f.js.map → 3171.a0060867.js.map} +1 -1
- package/dist/chunks/{4291.28fadd65.js → 4291.0571a42d.js} +2 -2
- package/dist/chunks/4291.0571a42d.js.map +1 -0
- package/dist/chunks/{4765.e7d388a7.js → 4765.a8431815.js} +2 -2
- package/dist/chunks/4765.a8431815.js.map +1 -0
- package/dist/chunks/{4837.f1be8f56.js → 4837.44891bd8.js} +2 -2
- package/dist/chunks/{7218.ed3768e5.js.map → 4837.44891bd8.js.map} +1 -1
- package/dist/chunks/5247.0c4d653d.js +3 -0
- package/dist/chunks/5247.0c4d653d.js.map +1 -0
- package/dist/chunks/{5522.90ea2bb1.js → 5522.e82b86a6.js} +3 -3
- package/dist/chunks/{5522.90ea2bb1.js.map → 5522.e82b86a6.js.map} +1 -1
- package/dist/chunks/{3171.9ea06832.js → 5552.c4fe27dc.js} +2 -2
- package/dist/chunks/{3171.9ea06832.js.map → 5552.c4fe27dc.js.map} +1 -1
- package/dist/chunks/{7146.3c3de5b5.js → 7146.366e659e.js} +2 -2
- package/dist/chunks/7146.366e659e.js.map +1 -0
- package/dist/chunks/{7218.ed3768e5.js → 7218.f6372435.js} +2 -2
- package/dist/chunks/{4837.f1be8f56.js.map → 7218.f6372435.js.map} +1 -1
- package/dist/chunks/7936.0669d484.js +2 -0
- package/dist/chunks/7936.0669d484.js.map +1 -0
- package/dist/chunks/871.1ae57c39.js +2 -0
- package/dist/chunks/871.1ae57c39.js.map +1 -0
- package/dist/chunks/{batch-update-raw-data-generated-view.86bbe845.js → batch-update-raw-data-generated-view.132fdea5.js} +3 -3
- package/dist/chunks/{batch-update-raw-data-generated-view.86bbe845.js.map → batch-update-raw-data-generated-view.132fdea5.js.map} +1 -1
- package/dist/chunks/{chat-preview.5f83d716.js → chat-preview.0c493f29.js} +3 -3
- package/dist/chunks/{chat-preview.5f83d716.js.map → chat-preview.0c493f29.js.map} +1 -1
- package/dist/chunks/{check-editor-by-name.ada4d4a1.js → check-editor-by-name.ee5b7b3f.js} +2 -2
- package/dist/chunks/{check-editor-by-name.ada4d4a1.js.map → check-editor-by-name.ee5b7b3f.js.map} +1 -1
- package/dist/chunks/contract-select.945ac0e3.js +3 -0
- package/dist/chunks/{contract-select.8bf33272.js.map → contract-select.945ac0e3.js.map} +1 -1
- package/dist/chunks/{generate-snippets-context-menu.e43080ee.js → generate-snippets-context-menu.c0aea3e5.js} +2 -2
- package/dist/chunks/{generate-snippets-context-menu.e43080ee.js.map → generate-snippets-context-menu.c0aea3e5.js.map} +1 -1
- package/dist/chunks/{get-config-by-data-for-ai.d410fd4f.js → get-config-by-data-for-ai.70c6aadd.js} +3 -3
- package/dist/chunks/{get-config-by-data-for-ai.d410fd4f.js.map → get-config-by-data-for-ai.70c6aadd.js.map} +1 -1
- package/dist/chunks/get-data-deps.fa194b75.js +2 -0
- package/dist/chunks/{get-data-deps.ff9171fa.js.map → get-data-deps.fa194b75.js.map} +1 -1
- package/dist/chunks/{get-dependency-tree.da929447.js → get-dependency-tree.924c776e.js} +2 -2
- package/dist/chunks/{get-dependency-tree.da929447.js.map → get-dependency-tree.924c776e.js.map} +1 -1
- package/dist/chunks/{get-raw-data-system-prompts.be36aa28.js → get-raw-data-system-prompts.39d1e783.js} +2 -2
- package/dist/chunks/{get-raw-data-system-prompts.be36aa28.js.map → get-raw-data-system-prompts.39d1e783.js.map} +1 -1
- package/dist/chunks/get-usage-member-statistics.eaa99c53.js +2 -0
- package/dist/chunks/get-usage-member-statistics.eaa99c53.js.map +1 -0
- package/dist/chunks/{inject-chat-preview-agent.2839b6fa.js → inject-chat-preview-agent.8b0fe673.js} +2 -2
- package/dist/chunks/{inject-chat-preview-agent.2839b6fa.js.map → inject-chat-preview-agent.8b0fe673.js.map} +1 -1
- package/dist/chunks/main.0ffa74db.js +2 -0
- package/dist/chunks/{main.091e04e3.js.map → main.0ffa74db.js.map} +1 -1
- package/dist/chunks/{parse-path.b0d40650.js → parse-path.133cb8ef.js} +2 -2
- package/dist/chunks/{parse-path.b0d40650.js.map → parse-path.133cb8ef.js.map} +1 -1
- package/dist/chunks/{pre-generated-config-preview.5fd1ee03.js → pre-generated-config-preview.87199dcf.js} +2 -2
- package/dist/chunks/{pre-generated-config-preview.5fd1ee03.js.map → pre-generated-config-preview.87199dcf.js.map} +1 -1
- package/dist/chunks/{pre-generated-config.346ba745.js → pre-generated-config.4fb27d28.js} +2 -2
- package/dist/chunks/{pre-generated-config.346ba745.js.map → pre-generated-config.4fb27d28.js.map} +1 -1
- package/dist/chunks/pre-generated-container.c8ed336b.js +2 -0
- package/dist/chunks/{pre-generated-container.61d79892.js.map → pre-generated-container.c8ed336b.js.map} +1 -1
- package/dist/chunks/{pre-generated-preview.eed62ca8.js → pre-generated-preview.7e0febcf.js} +3 -3
- package/dist/chunks/{pre-generated-preview.eed62ca8.js.map → pre-generated-preview.7e0febcf.js.map} +1 -1
- package/dist/chunks/property-editor.7045ca95.js +2 -0
- package/dist/chunks/{property-editor.37a0c94a.js.map → property-editor.7045ca95.js.map} +1 -1
- package/dist/chunks/{raw-data-preview.92c2b21b.js → raw-data-preview.6f49113a.js} +3 -3
- package/dist/chunks/{raw-data-preview.92c2b21b.js.map → raw-data-preview.6f49113a.js.map} +1 -1
- package/dist/chunks/{raw-metric-preview.54cf70ad.js → raw-metric-preview.dc642439.js} +3 -3
- package/dist/chunks/{raw-metric-preview.54cf70ad.js.map → raw-metric-preview.dc642439.js.map} +1 -1
- package/dist/chunks/{workbench-action-list.d991c486.js → workbench-action-list.9ee292c8.js} +2 -2
- package/dist/chunks/{workbench-action-list.d991c486.js.map → workbench-action-list.9ee292c8.js.map} +1 -1
- package/dist/chunks/{workbench-history-action.3c741fb6.js → workbench-history-action.61d07ecd.js} +3 -3
- package/dist/chunks/{workbench-history-action.3c741fb6.js.map → workbench-history-action.61d07ecd.js.map} +1 -1
- package/dist/examples.json +3 -3
- package/dist/index.a7b214de.js +2 -0
- package/dist/index.a7b214de.js.map +1 -0
- package/dist/manifest.json +196 -193
- package/dist/types.json +1187 -1038
- package/dist-types/bootstrap.d.ts +1 -0
- package/dist-types/data-providers/get-usage-member-statistics.d.ts +14 -0
- package/dist-types/data-providers/get-usage-member-statistics.spec.d.ts +1 -0
- package/package.json +3 -3
- package/dist/chunks/3831.43a95688.js +0 -2
- package/dist/chunks/3831.43a95688.js.map +0 -1
- package/dist/chunks/4291.28fadd65.js.map +0 -1
- package/dist/chunks/4765.e7d388a7.js.map +0 -1
- package/dist/chunks/5247.e1dcd513.js +0 -3
- package/dist/chunks/5247.e1dcd513.js.map +0 -1
- package/dist/chunks/7146.3c3de5b5.js.map +0 -1
- package/dist/chunks/871.ac452108.js +0 -2
- package/dist/chunks/871.ac452108.js.map +0 -1
- package/dist/chunks/contract-select.8bf33272.js +0 -3
- package/dist/chunks/get-data-deps.ff9171fa.js +0 -2
- package/dist/chunks/main.091e04e3.js +0 -2
- package/dist/chunks/pre-generated-container.61d79892.js +0 -2
- package/dist/chunks/property-editor.37a0c94a.js +0 -2
- package/dist/index.7c65286e.js +0 -2
- package/dist/index.7c65286e.js.map +0 -1
- /package/dist/chunks/{5247.e1dcd513.js.LICENSE.txt → 5247.0c4d653d.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{5522.90ea2bb1.js.LICENSE.txt → 5522.e82b86a6.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{batch-update-raw-data-generated-view.86bbe845.js.LICENSE.txt → batch-update-raw-data-generated-view.132fdea5.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{chat-preview.5f83d716.js.LICENSE.txt → chat-preview.0c493f29.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{contract-select.8bf33272.js.LICENSE.txt → contract-select.945ac0e3.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{get-config-by-data-for-ai.d410fd4f.js.LICENSE.txt → get-config-by-data-for-ai.70c6aadd.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{pre-generated-preview.eed62ca8.js.LICENSE.txt → pre-generated-preview.7e0febcf.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{raw-data-preview.92c2b21b.js.LICENSE.txt → raw-data-preview.6f49113a.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{raw-metric-preview.54cf70ad.js.LICENSE.txt → raw-metric-preview.dc642439.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{workbench-history-action.3c741fb6.js.LICENSE.txt → workbench-history-action.61d07ecd.js.LICENSE.txt} +0 -0
package/dist/bricks.json
CHANGED
|
@@ -2,32 +2,33 @@
|
|
|
2
2
|
"id": "bricks/visual-builder",
|
|
3
3
|
"bricks": [
|
|
4
4
|
"visual-builder.workbench-pane",
|
|
5
|
-
"visual-builder.workbench-sidebar",
|
|
6
5
|
"visual-builder.workbench-action",
|
|
6
|
+
"visual-builder.workbench-sidebar",
|
|
7
7
|
"visual-builder.workbench-action-list",
|
|
8
|
+
"visual-builder.page-arch-node",
|
|
8
9
|
"visual-builder.workbench-tree",
|
|
9
10
|
"visual-builder.workbench-history-action",
|
|
10
|
-
"visual-builder.page-arch-node",
|
|
11
11
|
"visual-builder.contract-select",
|
|
12
12
|
"visual-builder.generate-snippets-context-menu",
|
|
13
13
|
"visual-builder.chat-conversation",
|
|
14
|
-
"visual-builder.
|
|
14
|
+
"visual-builder.pre-generated-preview",
|
|
15
15
|
"visual-builder.batch-update-raw-data-generated-view",
|
|
16
|
+
"visual-builder.chat-preview",
|
|
16
17
|
"visual-builder.check-editor-by-name",
|
|
17
18
|
"visual-builder.get-config-by-data-for-ai",
|
|
18
19
|
"visual-builder.get-data-deps",
|
|
19
20
|
"visual-builder.get-dependency-tree",
|
|
20
21
|
"visual-builder.get-raw-data-system-prompts",
|
|
21
22
|
"visual-builder.inject-chat-preview-agent",
|
|
23
|
+
"visual-builder.get-usage-member-statistics",
|
|
22
24
|
"visual-builder.parse-path",
|
|
23
|
-
"visual-builder.pre-generated-preview",
|
|
24
|
-
"visual-builder.pre-generated-table-view",
|
|
25
25
|
"visual-builder.pre-generated-container",
|
|
26
|
+
"visual-builder.pre-generated-table-view",
|
|
26
27
|
"visual-builder.property-editor",
|
|
27
28
|
"visual-builder.raw-data-preview",
|
|
29
|
+
"visual-builder.raw-metric-preview",
|
|
28
30
|
"visual-builder.pre-generated-config",
|
|
29
|
-
"visual-builder.pre-generated-config-preview"
|
|
30
|
-
"visual-builder.raw-metric-preview"
|
|
31
|
+
"visual-builder.pre-generated-config-preview"
|
|
31
32
|
],
|
|
32
33
|
"elements": [],
|
|
33
34
|
"processors": [],
|
|
@@ -47,6 +48,10 @@
|
|
|
47
48
|
"eo-icon",
|
|
48
49
|
"eo-tooltip"
|
|
49
50
|
],
|
|
51
|
+
"visual-builder.page-arch-node": [
|
|
52
|
+
"eo-icon",
|
|
53
|
+
"eo-tooltip"
|
|
54
|
+
],
|
|
50
55
|
"visual-builder.workbench-tree": [
|
|
51
56
|
"eo-link",
|
|
52
57
|
"eo-icon"
|
|
@@ -58,10 +63,6 @@
|
|
|
58
63
|
"eo-easyops-avatar",
|
|
59
64
|
"eo-popover"
|
|
60
65
|
],
|
|
61
|
-
"visual-builder.page-arch-node": [
|
|
62
|
-
"eo-icon",
|
|
63
|
-
"eo-tooltip"
|
|
64
|
-
],
|
|
65
66
|
"visual-builder.contract-select": [
|
|
66
67
|
"eo-form-item",
|
|
67
68
|
"eo-auto-complete",
|
|
@@ -83,5 +84,5 @@
|
|
|
83
84
|
"eo-tooltip"
|
|
84
85
|
]
|
|
85
86
|
},
|
|
86
|
-
"filePath": "bricks/visual-builder/dist/index.
|
|
87
|
+
"filePath": "bricks/visual-builder/dist/index.a7b214de.js"
|
|
87
88
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[2980],{9406:(e,t,n)=>{n.d(t,{N:()=>a,o:()=>l});var o=n(18769);const a=(0,o.createContext)({});function l(){return(0,o.useContext)(a)}},47995:(e,t,n)=>{n.d(t,{A:()=>i});var o=n(36758),a=n.n(o),l=n(40935),r=n.n(l)()(a());r.push([e.id,':host,\n:host-context(html[data-override-theme="light"]){--search-box-background:#fff;--node-color:#595959;--node-color-focus:#595959;--node-background-active:#e0eeff;--node-background-focus:#e0eeff;--node-icon-background-hover:#fff}:host-context(html[data-theme="dark-v2"]),\n:host-context(html[data-override-theme="dark-v2"]){--search-box-background:#181818;--node-color:#c5c5c5;--node-color-focus:#fff;--node-background-active:rgba(255,255,255,0.08);--node-background-focus:#1a7aff;--node-icon-background-hover:rgba(90,93,94,0.31)}.searchBox{position:sticky;top:0;background-color:var(--search-box-background);padding:5px 10px 10px;z-index:1}.searchBox .filter-input-wrapper{background-color:var(--search-box-background);border:1px solid rgba(255,255,255,0.2);position:relative;width:100%;min-width:0;padding:2px 7px;color:var(--antd-input-color);font-size:14px;line-height:1.5715;display:inline-flex;border-radius:3px;transition:all 0.3s;box-sizing:border-box}.searchBox .filter-input-wrapper.focus{background-color:var(--search-box-background);border:1px solid rgba(255,255,255,0.2);border-right-width:1px!important;outline:0;box-shadow:0 0 0 2px rgba(0,113,235,0.2)}.searchBox .filter-input-wrapper input{text-overflow:ellipsis;border:none;outline:none;border-radius:3px;background-color:var(--search-box-background);box-sizing:border-box;margin:0;padding:0;color:var(--antd-text-color);font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;width:100%;min-width:0;color:var(--antd-input-color);font-size:14px;line-height:1.5715;background-image:none;transition:all 0.3s}.prefix{margin-right:4px}.suffix{margin-left:4px}.searchBox .prefix,\n.searchBox .suffix{display:flex;flex:none;align-items:center}.clear-button{cursor:pointer}.tree{list-style:none;margin:0;padding:0}.placeholder{color:var(--antd-input-placeholder-color);padding:0 15px}.nodeLabelLink{display:block}.nodeLabelLink::part(link){display:flex}.nodeLabelRow{display:flex;cursor:pointer;height:22px;padding-right:10px;flex:1;min-width:0}.nodeLabelRow:hover,\n.nodeLabelRow.hover{background-color:rgba(255,255,255,0.12)}.nodeLabelLink:focus .nodeLabelRow.active{background-color:var(--node-background-focus)}.nodeLabel{display:flex;align-items:center;min-width:0;flex:1}.unreachable{opacity:0.3}.nodeAction,\n.nodeAction:hover,\n.nodeLabelRow .nodeLabel{color:var(--node-color)}.nodeLabelLink:focus .nodeLabel{color:var(--node-color-focus)}.nodeLabelRow.matched .nodeLabel{color:var(--palette-orange-6)}.nodeLabelRow.active{background-color:var(--node-background-active)}.nodeIconWrapper{display:flex;width:24px;flex-shrink:0}.nodeIcon,\n.collapseIcon{display:flex;justify-content:center;align-items:center;width:20px;height:20px;border-radius:5px;font-size:13px}.collapseIcon{display:none}.nodeLabelRow.collapsed .nodeIcon,\n.nodeLabelRow.collapsible .nodeIconWrapper:hover .nodeIcon{display:none}.nodeLabelRow.collapsed .collapseIcon,\n.nodeLabelRow.collapsible .nodeIconWrapper:hover .collapseIcon{display:flex}.nodeLabelRow.collapsible .nodeIcon:hover,\n.nodeLabelRow.collapsible .collapseIcon:hover{background-color:var(--node-icon-background-hover)}.nodeName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nodeLabelRow:not(:hover):not(.fixedActions) .nodeActionsBar{display:none}.badge{margin:0 3px}.collapsed + .tree{display:none}.hightlight{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:#fcd93f}',""]);const i=r.toString()},62559:(e,t,n)=>{n.d(t,{e:()=>a,l:()=>l});var o=n(18769);const a=(0,o.createContext)({});function l(){return(0,o.useContext)(a)}},67758:(e,t,n)=>{n.d(t,{cU:()=>L});var o=n(89575),a=n(18769),l=n.n(a),r=n(41030),i=n.n(r),c=n(53373),s=n.n(c),d=n(9406),u=n(62559);let p=function(e){return e.inside="inside",e.top="top",e.bottom="bottom",e}({});const f=(0,a.createContext)({});function h(){return(0,a.useContext)(f)}var m=n(11280),b=n(23081);const g=(0,m.wrapBrick)("eo-icon");function v(e){let{data:t,className:n,gap:o,isFirst:r,isLast:i,actions:c,actionsHidden:d,onActionClick:u}=e;const p=(0,a.useMemo)((()=>null==c?void 0:c.filter((e=>(0,b.checkIfByTransform)(e,t)))),[c,t]);return d||null==p||!p.length?null:l().createElement("div",{className:s()("actionsBar",n),style:{gap:o}},p.map((e=>l().createElement(x,{key:e.action,action:e,data:t,isFirst:r,isLast:i,onActionClick:u}))))}function x(e){let{action:t,data:n,isFirst:o,isLast:r,onActionClick:i}=e;const c=o&&"move-up"===t.action||r&&"move-down"===t.action,d=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),c||null==i||i({action:t.action,data:n})}),[t.action,n,c,i]),u=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation()}),[]);return l().createElement("a",{className:s()("action",{disabled:c}),title:t.title,role:"button",onClick:d,onContextMenu:u,onMouseDown:u},l().createElement(g,t.icon))}const k=(0,m.wrapBrick)("eo-link"),y=(0,m.wrapBrick)("eo-icon"),w=10,E="0 0 0 1px #ba6d30",C=(0,a.createContext)(!1);function L(e){let{nodes:t,placeholder:n,searchPlaceholder:o,isDrag:r,noSearch:c,allowDrag:u,allowDragToRoot:h,allowDragToInside:m,dropEmit:b}=e;const[g,v]=(0,a.useState)(""),[x,k]=(0,a.useState)(r),[w,E]=(0,a.useState)(),[L,S]=(0,a.useState)(),[I,M]=(0,a.useState)(),[A,B]=(0,a.useState)(),[D,R]=(0,a.useState)(),[P,F]=(0,a.useState)(),{nodeKey:T,onBrickDrop:z,contextMenuFactory:$,matchNode:_}=(0,d.o)(),K=(0,a.useMemo)((()=>{var e;return function(e,t){const n=(e,o,a,l)=>{const r=e.shift();if(r){e.length>0&&e.splice(0,1,`${r}/${e[0]}`);const i=o.find((e=>e&&e.key===r&&e.isContainer));if(i)o[l]=null,n(e,i.children,a);else{const i=r.split("/"),c={name:i.pop(),key:r,parentPath:i?i.join("/"):i,originKey:a.key,data:{[t]:r,isContainer:!0},children:[],icon:{icon:"folder",lib:"antd",theme:"filled",color:"orange"},isContainer:!0};"number"==typeof l?o[l]=c:o.push(c),n(e,c.children,a)}}else o.push(a)};return e.forEach(((t,o)=>{if(t.path){const a=t.path.split("/").filter(Boolean);n(a,e,t,o)}})),e.filter(Boolean)}(null!==(e=null==t?void 0:t.slice())&&void 0!==e?e:[],T)}),[t,T]),O=(0,a.useCallback)((e=>{v(e.target.value)}),[]),j=(0,a.useMemo)((()=>null==$?void 0:$()),[$]),W=null==g?void 0:g.trim().toLowerCase(),H=(0,a.useMemo)((()=>{if(c||!W||!K)return K;const e=t=>{var n;t.matchedSelf=_(t,W);const o=null===(n=t.children)||void 0===n?void 0:n.map(e).includes(!0);return t.matched=t.matchedSelf||o,t.matched};return K.forEach(e),K.slice()}),[c,W,K,_]),U=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e;for(;n;){if(n.draggable&&(t||n!==e)&&"A"!==n.tagName)return n;n=n.parentElement}},Y=function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;for(const a of e)if(a.data[n]===t&&(o=a),a.children&&(o=Y(a.children,t,n,o)),o)break;return o},V=()=>{S(null),B(null),M(null),R(null),k(!1)};return(0,a.useEffect)((()=>{k(r)}),[r]),(0,a.useEffect)((()=>(window.addEventListener("dragend",V),()=>{window.removeEventListener("dragend",V)})),[]),l().createElement("div",{style:{height:"100%"},className:"tree-wrapper",onContextMenu:j},null!=K&&K.length?l().createElement("div",null,!c&&l().createElement("div",{className:"searchBox",onContextMenu:e=>e.stopPropagation()},l().createElement("span",{className:s()("filter-input-wrapper",{focus:P})},l().createElement("span",{className:"prefix"},l().createElement(y,{icon:"search",lib:"antd",theme:"outlined"})),l().createElement("input",{value:g,onChange:O,onFocus:()=>F(!0),onBlur:()=>F(!1),autoComplete:"off",placeholder:o}),l().createElement("span",{className:"suffix"},g?l().createElement(y,{className:"clear-button",icon:"close-circle",lib:"antd",theme:"filled",onClick:()=>{v("")}}):null))),l().createElement(C.Provider,{value:!!g},l().createElement(f.Provider,{value:{allow:u,allowDragToRoot:h,dragElement:L,dragOverElement:A,dragStatus:D,onDragStart:(e,t)=>{var n;if(e.stopPropagation(),!u)return;const o=e.target;null!==(n=o.dataset)&&void 0!==n&&n.container||(k(!0),function(e,t){const n=document.createElement("canvas");document.body.append(n);const o=n.getContext("2d");n.width=o.measureText(t).width+60,n.height=20,n.style.position="absolute",n.style.left="-100%",n.style.zIndex="-100",o.fillStyle="#333333",o.fillRect(0,0,n.width,n.height),o.fillStyle="#999999",o.font="bold 14px Arial",o.fillText(t,20,15),e.dataTransfer.setDragImage(n,0,0)}(e,o.innerText),S(o),E(t))}}},l().createElement("div",{className:s()({hightlight:r}),onDragOver:e=>{if(e.preventDefault(),!x)return;if("workbenchTree-placeholder-dom"===e.target.className)return;const t=(e=>{const t=U(e.target),n=t.dataset.uid;if(t===L||null!=n&&n.includes(":"))return;const{top:o,bottom:a}=t.getBoundingClientRect();let l;const r=m?5:10;return l=e.clientY<o+r?p.top:e.clientY>a-r?p.bottom:m?p.inside:D,{element:t,node:Y(K,n,T),status:l}})(e);!t||null!=L&&L.contains(t.element)||(B(t.element),M(t.node),R(t.status))},onDrop:e=>{if(x){if(z){let t=A;[p.top,p.bottom].includes(D)&&(t=U(t,!1)),z(e,{curElement:L,overElement:A,parentElement:t,overStatus:D})}else if(h||1!==Number(A.dataset.level)){let e=I;const t=(n,o)=>{for(let a=0;a<n.length;a++){if(n[a].key===o){e=n[a];break}n[a].children&&t(n[a].children,o)}},n=A.dataset.uid;t(K,n);const o=t=>{let n=!1;const{container:a,uid:l}=A.dataset,r=a?e.originKey:l,i=t.filter((e=>(e.children&&(e.children=o(e.children)),e.key===r&&(n=!0),e.key!==w.key)));return n&&i.splice(i.findIndex((e=>e.key===r))+("bottom"===D?1:0),0,w),i},a=function(e){const t=[],n=e=>{e.forEach((e=>{e.isContainer?n(e.children):t.push(i().omit(e,["path","icon"]))}))};return n(e),t}(K),l=w.isContainer?a.find((e=>e.key===w.originKey)):w;l.data.path=e.parentPath||e.path,b({nodes:o(a),curNode:l,overNode:e,status:D})}V()}}},l().createElement(N,{nodes:H,level:1}))))):l().createElement("div",{className:"placeholder"},n))}function N(e){let{nodes:t,level:n}=e;const o=t.length-1;return l().createElement("ul",{className:"tree"},t.filter((e=>(0,b.checkIfOfComputed)(e))).map(((e,t)=>l().createElement(I,{key:e.key,node:e,level:n,isFirst:0===t,isLast:t===o}))))}function S(e){let{style:t}=e;const{dragStatus:n}=h(),o={height:22,border:"1px dashed goldenrod",opacity:n===p.inside?"0":"1",...t};return l().createElement("li",{className:"workbenchTree-placeholder-dom",style:o})}function I(e){var t,n,i,c;let{node:f,level:m,isFirst:b,isLast:g}=e;const x=!(null!==(t=f.children)&&void 0!==t&&t.length),L=f.isContainer,{hoverKey:I,activeKey:M,basePaddingLeft:A,showMatchedNodeOnly:B,fixedActionsFor:D,collapsible:R,collapsedNodes:P,nodeKey:F,clickFactory:T,mouseEnterFactory:z,mouseLeaveFactory:$,contextMenuFactory:_,onNodeToggle:K,getCollapsedId:O,skipNotify:j}=(0,d.o)(),{allow:W,allowDragToRoot:H,onDragStart:U,dragElement:Y,dragOverElement:V,dragStatus:q}=h(),{actions:G,actionsHidden:J,onActionClick:Q}=(0,u.l)(),X=m*w+A-2,Z=(0,a.useContext)(C),[ee,te]=(0,a.useState)(null),[ne,oe]=(0,a.useState)(!1),[ae,le]=(0,a.useState)(null!==(n=null==P?void 0:P.includes(null==O?void 0:O(f)))&&void 0!==n&&n),re=(0,a.useMemo)((()=>null==z?void 0:z(f)),[z,f]),ie=(0,a.useMemo)((()=>null==$?void 0:$(f)),[$,f]),ce=(0,a.useCallback)((e=>{var t;e.stopPropagation(),null==_||null===(t=_(f))||void 0===t||t(e)}),[_,f]),se=M&&f.key===M,de=(0,a.useMemo)((()=>se?e=>{var t;null==e||null===(t=e.scrollIntoView)||void 0===t||t.call(e,{block:"center",inline:"center"})}:null),[]),ue=(0,a.useMemo)((()=>{return L?f.key:f.data?"mount-point"===(e=f.data).type?e.parent[F]||`${e.parent.$$uid}:${e.mountPoint}`:e[F]||e.$$uid:void 0;var e}),[F,f,L]);(0,a.useEffect)((()=>{q!==p.inside&&[p.top,p.bottom].includes(q)&&te(q)}),[q]);const pe=(0,a.useMemo)((()=>!!Y&&Y.dataset.uid===String(ue)),[Y,ue]),fe=(0,a.useMemo)((()=>!!V&&V.dataset.uid===String(ue)),[V,ue]),he=(0,a.useMemo)((()=>{let e={opacity:pe?.2:1};return fe&&q===p.inside&&(e={boxShadow:E,background:"rgba(255, 255, 255, 0.1)"}),Object.assign({},e)}),[fe,pe,q]),me=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),oe(!0),le((e=>!e))}),[]),be=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation()}),[]),ge=(0,a.useCallback)((e=>{var t;if(!L)return null==T||null===(t=T(f))||void 0===t?void 0:t();me(e)}),[T,me,L,f]);(0,a.useEffect)((()=>{ne&&(null==K||K(null==O?void 0:O(f),ae))}),[ne,ae,O,f,K]);const ve=R&&!x&&!Z;return Z&&B&&!f.matched?null:l().createElement(l().Fragment,null,fe&&(H||1!==m)&&ee===p.top&&l().createElement(S,{style:{marginLeft:X}}),l().createElement("li",(0,o.A)({draggable:W,onDragStart:e=>U(e,f),"data-uid":ue,"data-level":m,style:he},L?{"data-container":L}:{}),l().createElement(k,(0,o.A)({className:"nodeLabelLink",tabIndex:0,onMouseEnter:re,onMouseLeave:ie,onContextMenu:ce,onClick:ge},j?{url:{pathname:(0,r.get)(f.link,"url","href"),state:{notify:!1}}}:{...(0,r.pick)(f.link,["url","href"])}),l().createElement("span",{className:s()("nodeLabelRow",{active:se,hover:I&&f.key===I,matched:Z&&f.matchedSelf&&!B,fixedActions:D&&[].concat(D).some((e=>(0,r.isMatch)(f.data,e))),collapsed:ve&&ae,collapsible:ve})},l().createElement("span",{className:s()("nodeLabel",{unreachable:f.unreachable}),style:{paddingLeft:X,color:f.labelColor},ref:de},l().createElement("span",{className:"nodeIconWrapper"},ve&&l().createElement("span",{className:"collapseIcon",onClick:me,onMouseDown:be,title:ae?"Expand":"Collapse",role:"button"},l().createElement(y,{lib:"antd",theme:"outlined",icon:ae?"right":"down"})),l().createElement("span",{className:"nodeIcon"},l().createElement(y,(0,o.A)({},f.icon,{style:{fontSize:null!==(i=f.icon)&&void 0!==i&&i.imgSrc?14:null,color:null===(c=f.icon)||void 0===c?void 0:c.color}})))),l().createElement("span",{className:"nodeName"},f.labelPrefix&&l().createElement("span",{style:f.labelPrefix.style},f.labelPrefix.text),f.name)),l().createElement(v,{className:"nodeActionsBar",data:f.data,isFirst:b,isLast:g,actions:G,onActionClick:Q,actionsHidden:J}),f.badge&&l().createElement("span",{className:"badge"},l().createElement(y,(0,o.A)({},f.badge,{style:{color:f.badge.color}}))))),x||l().createElement(N,{nodes:f.children,level:m+1})),fe&&(H||1!==m)&&ee===p.bottom&&l().createElement(S,{style:{marginLeft:X}}))}},70675:(e,t,n)=>{function o(e,t){switch(typeof e){case"string":return e.toLowerCase().includes(t);case"boolean":case"number":return String(e).includes(t);case"object":return null===e?"null".includes(t):(Array.isArray(e)?e:Object.entries(e).flat()).some((e=>o(e,t)));default:return!1}}n.d(t,{U:()=>o})},96275:(e,t,n)=>{n.d(t,{A:()=>i});var o=n(36758),a=n.n(o),l=n(40935),r=n.n(l)()(a());r.push([e.id,".actionsBar{display:flex;align-items:center;padding:0 3px}.action{display:flex;justify-content:center;align-items:center;width:20px;height:20px;border-radius:5px}.action:hover{color:#fff;background-color:rgba(90,93,94,0.31)}.action{color:#c5c5c5}.disabled,\n.disabled:hover{color:var(--color-disabled-text);cursor:not-allowed;background-color:initial}",""]);const i=r.toString()}}]);
|
|
2
|
-
//# sourceMappingURL=2980.
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[2980],{9406:(e,t,n)=>{n.d(t,{N:()=>a,o:()=>l});var o=n(18769);const a=(0,o.createContext)({});function l(){return(0,o.useContext)(a)}},47995:(e,t,n)=>{n.d(t,{A:()=>i});var o=n(36758),a=n.n(o),l=n(40935),r=n.n(l)()(a());r.push([e.id,':host,\n:host-context(html[data-override-theme="light"]){--search-box-background:#fff;--node-color:#595959;--node-color-focus:#595959;--node-background-active:#e0eeff;--node-background-focus:#e0eeff;--node-icon-background-hover:#fff}:host-context(html[data-theme="dark-v2"]),\n:host-context(html[data-override-theme="dark-v2"]){--search-box-background:#181818;--node-color:#c5c5c5;--node-color-focus:#fff;--node-background-active:rgba(255,255,255,0.08);--node-background-focus:#1a7aff;--node-icon-background-hover:rgba(90,93,94,0.31)}.searchBox{position:sticky;top:0;background-color:var(--search-box-background);padding:5px 10px 10px;z-index:1}.searchBox .filter-input-wrapper{background-color:var(--search-box-background);border:1px solid rgba(255,255,255,0.2);position:relative;width:100%;min-width:0;padding:2px 7px;color:var(--antd-input-color);font-size:14px;line-height:1.5715;display:inline-flex;border-radius:3px;transition:all 0.3s;box-sizing:border-box}.searchBox .filter-input-wrapper.focus{background-color:var(--search-box-background);border:1px solid rgba(255,255,255,0.2);border-right-width:1px!important;outline:0;box-shadow:0 0 0 2px rgba(0,113,235,0.2)}.searchBox .filter-input-wrapper input{text-overflow:ellipsis;border:none;outline:none;border-radius:3px;background-color:var(--search-box-background);box-sizing:border-box;margin:0;padding:0;color:var(--antd-text-color);font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;width:100%;min-width:0;color:var(--antd-input-color);font-size:14px;line-height:1.5715;background-image:none;transition:all 0.3s}.prefix{margin-right:4px}.suffix{margin-left:4px}.searchBox .prefix,\n.searchBox .suffix{display:flex;flex:none;align-items:center}.clear-button{cursor:pointer}.tree{list-style:none;margin:0;padding:0}.placeholder{color:var(--antd-input-placeholder-color);padding:0 15px}.nodeLabelLink{display:block}.nodeLabelLink::part(link){display:flex}.nodeLabelRow{display:flex;cursor:pointer;height:22px;padding-right:10px;flex:1;min-width:0}.nodeLabelRow:hover,\n.nodeLabelRow.hover{background-color:rgba(255,255,255,0.12)}.nodeLabelLink:focus .nodeLabelRow.active{background-color:var(--node-background-focus)}.nodeLabel{display:flex;align-items:center;min-width:0;flex:1}.unreachable{opacity:0.3}.nodeAction,\n.nodeAction:hover,\n.nodeLabelRow .nodeLabel{color:var(--node-color)}.nodeLabelLink:focus .nodeLabel{color:var(--node-color-focus)}.nodeLabelRow.matched .nodeLabel{color:var(--palette-orange-6)}.nodeLabelRow.active{background-color:var(--node-background-active)}.nodeIconWrapper{display:flex;width:24px;flex-shrink:0}.nodeIcon,\n.collapseIcon{display:flex;justify-content:center;align-items:center;width:20px;height:20px;border-radius:5px;font-size:13px}.collapseIcon{display:none}.nodeLabelRow.collapsed .nodeIcon,\n.nodeLabelRow.collapsible .nodeIconWrapper:hover .nodeIcon{display:none}.nodeLabelRow.collapsed .collapseIcon,\n.nodeLabelRow.collapsible .nodeIconWrapper:hover .collapseIcon{display:flex}.nodeLabelRow.collapsible .nodeIcon:hover,\n.nodeLabelRow.collapsible .collapseIcon:hover{background-color:var(--node-icon-background-hover)}.nodeName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nodeLabelRow:not(:hover):not(.fixedActions) .nodeActionsBar{display:none}.badge{margin:0 3px}.collapsed + .tree{display:none}.hightlight{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:#fcd93f}',""]);const i=r.toString()},62559:(e,t,n)=>{n.d(t,{e:()=>a,l:()=>l});var o=n(18769);const a=(0,o.createContext)({});function l(){return(0,o.useContext)(a)}},67758:(e,t,n)=>{n.d(t,{cU:()=>L});var o=n(89575),a=n(18769),l=n.n(a),r=n(41030),i=n.n(r),c=n(53373),s=n.n(c),d=n(9406),u=n(62559);let p=function(e){return e.inside="inside",e.top="top",e.bottom="bottom",e}({});const f=(0,a.createContext)({});function h(){return(0,a.useContext)(f)}var m=n(11280),b=n(29475);const g=(0,m.wrapBrick)("eo-icon");function v(e){let{data:t,className:n,gap:o,isFirst:r,isLast:i,actions:c,actionsHidden:d,onActionClick:u}=e;const p=(0,a.useMemo)((()=>null==c?void 0:c.filter((e=>(0,b.checkIfByTransform)(e,t)))),[c,t]);return d||null==p||!p.length?null:l().createElement("div",{className:s()("actionsBar",n),style:{gap:o}},p.map((e=>l().createElement(x,{key:e.action,action:e,data:t,isFirst:r,isLast:i,onActionClick:u}))))}function x(e){let{action:t,data:n,isFirst:o,isLast:r,onActionClick:i}=e;const c=o&&"move-up"===t.action||r&&"move-down"===t.action,d=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),c||null==i||i({action:t.action,data:n})}),[t.action,n,c,i]),u=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation()}),[]);return l().createElement("a",{className:s()("action",{disabled:c}),title:t.title,role:"button",onClick:d,onContextMenu:u,onMouseDown:u},l().createElement(g,t.icon))}const k=(0,m.wrapBrick)("eo-link"),y=(0,m.wrapBrick)("eo-icon"),w=10,E="0 0 0 1px #ba6d30",C=(0,a.createContext)(!1);function L(e){let{nodes:t,placeholder:n,searchPlaceholder:o,isDrag:r,noSearch:c,allowDrag:u,allowDragToRoot:h,allowDragToInside:m,dropEmit:b}=e;const[g,v]=(0,a.useState)(""),[x,k]=(0,a.useState)(r),[w,E]=(0,a.useState)(),[L,S]=(0,a.useState)(),[I,M]=(0,a.useState)(),[A,B]=(0,a.useState)(),[D,R]=(0,a.useState)(),[P,F]=(0,a.useState)(),{nodeKey:T,onBrickDrop:z,contextMenuFactory:$,matchNode:_}=(0,d.o)(),K=(0,a.useMemo)((()=>{var e;return function(e,t){const n=(e,o,a,l)=>{const r=e.shift();if(r){e.length>0&&e.splice(0,1,`${r}/${e[0]}`);const i=o.find((e=>e&&e.key===r&&e.isContainer));if(i)o[l]=null,n(e,i.children,a);else{const i=r.split("/"),c={name:i.pop(),key:r,parentPath:i?i.join("/"):i,originKey:a.key,data:{[t]:r,isContainer:!0},children:[],icon:{icon:"folder",lib:"antd",theme:"filled",color:"orange"},isContainer:!0};"number"==typeof l?o[l]=c:o.push(c),n(e,c.children,a)}}else o.push(a)};return e.forEach(((t,o)=>{if(t.path){const a=t.path.split("/").filter(Boolean);n(a,e,t,o)}})),e.filter(Boolean)}(null!==(e=null==t?void 0:t.slice())&&void 0!==e?e:[],T)}),[t,T]),O=(0,a.useCallback)((e=>{v(e.target.value)}),[]),j=(0,a.useMemo)((()=>null==$?void 0:$()),[$]),W=null==g?void 0:g.trim().toLowerCase(),H=(0,a.useMemo)((()=>{if(c||!W||!K)return K;const e=t=>{var n;t.matchedSelf=_(t,W);const o=null===(n=t.children)||void 0===n?void 0:n.map(e).includes(!0);return t.matched=t.matchedSelf||o,t.matched};return K.forEach(e),K.slice()}),[c,W,K,_]),U=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e;for(;n;){if(n.draggable&&(t||n!==e)&&"A"!==n.tagName)return n;n=n.parentElement}},Y=function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;for(const a of e)if(a.data[n]===t&&(o=a),a.children&&(o=Y(a.children,t,n,o)),o)break;return o},V=()=>{S(null),B(null),M(null),R(null),k(!1)};return(0,a.useEffect)((()=>{k(r)}),[r]),(0,a.useEffect)((()=>(window.addEventListener("dragend",V),()=>{window.removeEventListener("dragend",V)})),[]),l().createElement("div",{style:{height:"100%"},className:"tree-wrapper",onContextMenu:j},null!=K&&K.length?l().createElement("div",null,!c&&l().createElement("div",{className:"searchBox",onContextMenu:e=>e.stopPropagation()},l().createElement("span",{className:s()("filter-input-wrapper",{focus:P})},l().createElement("span",{className:"prefix"},l().createElement(y,{icon:"search",lib:"antd",theme:"outlined"})),l().createElement("input",{value:g,onChange:O,onFocus:()=>F(!0),onBlur:()=>F(!1),autoComplete:"off",placeholder:o}),l().createElement("span",{className:"suffix"},g?l().createElement(y,{className:"clear-button",icon:"close-circle",lib:"antd",theme:"filled",onClick:()=>{v("")}}):null))),l().createElement(C.Provider,{value:!!g},l().createElement(f.Provider,{value:{allow:u,allowDragToRoot:h,dragElement:L,dragOverElement:A,dragStatus:D,onDragStart:(e,t)=>{var n;if(e.stopPropagation(),!u)return;const o=e.target;null!==(n=o.dataset)&&void 0!==n&&n.container||(k(!0),function(e,t){const n=document.createElement("canvas");document.body.append(n);const o=n.getContext("2d");n.width=o.measureText(t).width+60,n.height=20,n.style.position="absolute",n.style.left="-100%",n.style.zIndex="-100",o.fillStyle="#333333",o.fillRect(0,0,n.width,n.height),o.fillStyle="#999999",o.font="bold 14px Arial",o.fillText(t,20,15),e.dataTransfer.setDragImage(n,0,0)}(e,o.innerText),S(o),E(t))}}},l().createElement("div",{className:s()({hightlight:r}),onDragOver:e=>{if(e.preventDefault(),!x)return;if("workbenchTree-placeholder-dom"===e.target.className)return;const t=(e=>{const t=U(e.target),n=t.dataset.uid;if(t===L||null!=n&&n.includes(":"))return;const{top:o,bottom:a}=t.getBoundingClientRect();let l;const r=m?5:10;return l=e.clientY<o+r?p.top:e.clientY>a-r?p.bottom:m?p.inside:D,{element:t,node:Y(K,n,T),status:l}})(e);!t||null!=L&&L.contains(t.element)||(B(t.element),M(t.node),R(t.status))},onDrop:e=>{if(x){if(z){let t=A;[p.top,p.bottom].includes(D)&&(t=U(t,!1)),z(e,{curElement:L,overElement:A,parentElement:t,overStatus:D})}else if(h||1!==Number(A.dataset.level)){let e=I;const t=(n,o)=>{for(let a=0;a<n.length;a++){if(n[a].key===o){e=n[a];break}n[a].children&&t(n[a].children,o)}},n=A.dataset.uid;t(K,n);const o=t=>{let n=!1;const{container:a,uid:l}=A.dataset,r=a?e.originKey:l,i=t.filter((e=>(e.children&&(e.children=o(e.children)),e.key===r&&(n=!0),e.key!==w.key)));return n&&i.splice(i.findIndex((e=>e.key===r))+("bottom"===D?1:0),0,w),i},a=function(e){const t=[],n=e=>{e.forEach((e=>{e.isContainer?n(e.children):t.push(i().omit(e,["path","icon"]))}))};return n(e),t}(K),l=w.isContainer?a.find((e=>e.key===w.originKey)):w;l.data.path=e.parentPath||e.path,b({nodes:o(a),curNode:l,overNode:e,status:D})}V()}}},l().createElement(N,{nodes:H,level:1}))))):l().createElement("div",{className:"placeholder"},n))}function N(e){let{nodes:t,level:n}=e;const o=t.length-1;return l().createElement("ul",{className:"tree"},t.filter((e=>(0,b.checkIfOfComputed)(e))).map(((e,t)=>l().createElement(I,{key:e.key,node:e,level:n,isFirst:0===t,isLast:t===o}))))}function S(e){let{style:t}=e;const{dragStatus:n}=h(),o={height:22,border:"1px dashed goldenrod",opacity:n===p.inside?"0":"1",...t};return l().createElement("li",{className:"workbenchTree-placeholder-dom",style:o})}function I(e){var t,n,i,c;let{node:f,level:m,isFirst:b,isLast:g}=e;const x=!(null!==(t=f.children)&&void 0!==t&&t.length),L=f.isContainer,{hoverKey:I,activeKey:M,basePaddingLeft:A,showMatchedNodeOnly:B,fixedActionsFor:D,collapsible:R,collapsedNodes:P,nodeKey:F,clickFactory:T,mouseEnterFactory:z,mouseLeaveFactory:$,contextMenuFactory:_,onNodeToggle:K,getCollapsedId:O,skipNotify:j}=(0,d.o)(),{allow:W,allowDragToRoot:H,onDragStart:U,dragElement:Y,dragOverElement:V,dragStatus:q}=h(),{actions:G,actionsHidden:J,onActionClick:Q}=(0,u.l)(),X=m*w+A-2,Z=(0,a.useContext)(C),[ee,te]=(0,a.useState)(null),[ne,oe]=(0,a.useState)(!1),[ae,le]=(0,a.useState)(null!==(n=null==P?void 0:P.includes(null==O?void 0:O(f)))&&void 0!==n&&n),re=(0,a.useMemo)((()=>null==z?void 0:z(f)),[z,f]),ie=(0,a.useMemo)((()=>null==$?void 0:$(f)),[$,f]),ce=(0,a.useCallback)((e=>{var t;e.stopPropagation(),null==_||null===(t=_(f))||void 0===t||t(e)}),[_,f]),se=M&&f.key===M,de=(0,a.useMemo)((()=>se?e=>{var t;null==e||null===(t=e.scrollIntoView)||void 0===t||t.call(e,{block:"center",inline:"center"})}:null),[]),ue=(0,a.useMemo)((()=>{return L?f.key:f.data?"mount-point"===(e=f.data).type?e.parent[F]||`${e.parent.$$uid}:${e.mountPoint}`:e[F]||e.$$uid:void 0;var e}),[F,f,L]);(0,a.useEffect)((()=>{q!==p.inside&&[p.top,p.bottom].includes(q)&&te(q)}),[q]);const pe=(0,a.useMemo)((()=>!!Y&&Y.dataset.uid===String(ue)),[Y,ue]),fe=(0,a.useMemo)((()=>!!V&&V.dataset.uid===String(ue)),[V,ue]),he=(0,a.useMemo)((()=>{let e={opacity:pe?.2:1};return fe&&q===p.inside&&(e={boxShadow:E,background:"rgba(255, 255, 255, 0.1)"}),Object.assign({},e)}),[fe,pe,q]),me=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),oe(!0),le((e=>!e))}),[]),be=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation()}),[]),ge=(0,a.useCallback)((e=>{var t;if(!L)return null==T||null===(t=T(f))||void 0===t?void 0:t();me(e)}),[T,me,L,f]);(0,a.useEffect)((()=>{ne&&(null==K||K(null==O?void 0:O(f),ae))}),[ne,ae,O,f,K]);const ve=R&&!x&&!Z;return Z&&B&&!f.matched?null:l().createElement(l().Fragment,null,fe&&(H||1!==m)&&ee===p.top&&l().createElement(S,{style:{marginLeft:X}}),l().createElement("li",(0,o.A)({draggable:W,onDragStart:e=>U(e,f),"data-uid":ue,"data-level":m,style:he},L?{"data-container":L}:{}),l().createElement(k,(0,o.A)({className:"nodeLabelLink",tabIndex:0,onMouseEnter:re,onMouseLeave:ie,onContextMenu:ce,onClick:ge},j?{url:{pathname:(0,r.get)(f.link,"url","href"),state:{notify:!1}}}:{...(0,r.pick)(f.link,["url","href"])}),l().createElement("span",{className:s()("nodeLabelRow",{active:se,hover:I&&f.key===I,matched:Z&&f.matchedSelf&&!B,fixedActions:D&&[].concat(D).some((e=>(0,r.isMatch)(f.data,e))),collapsed:ve&&ae,collapsible:ve})},l().createElement("span",{className:s()("nodeLabel",{unreachable:f.unreachable}),style:{paddingLeft:X,color:f.labelColor},ref:de},l().createElement("span",{className:"nodeIconWrapper"},ve&&l().createElement("span",{className:"collapseIcon",onClick:me,onMouseDown:be,title:ae?"Expand":"Collapse",role:"button"},l().createElement(y,{lib:"antd",theme:"outlined",icon:ae?"right":"down"})),l().createElement("span",{className:"nodeIcon"},l().createElement(y,(0,o.A)({},f.icon,{style:{fontSize:null!==(i=f.icon)&&void 0!==i&&i.imgSrc?14:null,color:null===(c=f.icon)||void 0===c?void 0:c.color}})))),l().createElement("span",{className:"nodeName"},f.labelPrefix&&l().createElement("span",{style:f.labelPrefix.style},f.labelPrefix.text),f.name)),l().createElement(v,{className:"nodeActionsBar",data:f.data,isFirst:b,isLast:g,actions:G,onActionClick:Q,actionsHidden:J}),f.badge&&l().createElement("span",{className:"badge"},l().createElement(y,(0,o.A)({},f.badge,{style:{color:f.badge.color}}))))),x||l().createElement(N,{nodes:f.children,level:m+1})),fe&&(H||1!==m)&&ee===p.bottom&&l().createElement(S,{style:{marginLeft:X}}))}},70675:(e,t,n)=>{function o(e,t){switch(typeof e){case"string":return e.toLowerCase().includes(t);case"boolean":case"number":return String(e).includes(t);case"object":return null===e?"null".includes(t):(Array.isArray(e)?e:Object.entries(e).flat()).some((e=>o(e,t)));default:return!1}}n.d(t,{U:()=>o})},96275:(e,t,n)=>{n.d(t,{A:()=>i});var o=n(36758),a=n.n(o),l=n(40935),r=n.n(l)()(a());r.push([e.id,".actionsBar{display:flex;align-items:center;padding:0 3px}.action{display:flex;justify-content:center;align-items:center;width:20px;height:20px;border-radius:5px}.action:hover{color:#fff;background-color:rgba(90,93,94,0.31)}.action{color:#c5c5c5}.disabled,\n.disabled:hover{color:var(--color-disabled-text);cursor:not-allowed;background-color:initial}",""]);const i=r.toString()}}]);
|
|
2
|
+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,CACd1Q,MAAO,CAAE6E,MAAOnB,EAAKgN,MAAM7L,aAMpCkH,GAAUjM,IAAAA,cAACmL,EAAQ,CAACzJ,MAAOkC,EAAKQ,SAAUgG,MAAOA,EAAQ,KAE3DoE,KACEvM,GAA6B,IAAVmI,IACpB6C,KAAoBtO,EAAe+K,QACjC1J,IAAAA,cAACuL,EAAc,CACbrL,MAAO,CACLiP,WAAYpC,KAM1B,C,kBG/tBO,SAAS8D,EAAU3R,EAAe4R,GACvC,cAAe5R,GACb,IAAK,SACH,OAAOA,EAAKuG,cAAcM,SAAS+K,GACrC,IAAK,UACL,IAAK,SACH,OAAOvC,OAAOrP,GAAM6G,SAAS+K,GAC/B,IAAK,SACH,OAAgB,OAAT5R,EACH,OAAO6G,SAAS+K,IACfC,MAAMC,QAAQ9R,GAAQA,EAAO0P,OAAOqC,QAAQ/R,GAAMgS,QAAQjB,MACxDpQ,GAASgR,EAAUhR,EAAMiR,KAElC,QACE,OAAO,EAEb,C,sFCrBI1S,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,kWACuD,KAEhG,QAAeH,EAAwBI,U","sources":["webpack:///./src/shared/workbench/WorkbenchTreeContext.ts","webpack:///./src/workbench-tree/WorkbenchTree.shadow.css","webpack:///./src/shared/workbench/WorkbenchActionsContext.ts","webpack:///./src/shared/workbench/WorkbenchTreeDndContext.ts","webpack:///./src/shared/workbench-mini-action-bar/WorkbenchMiniActionBar.tsx","webpack:///./src/shared/workbench/WorkbenchTree.tsx","webpack:///./src/utils/normalizeTreeNodeWithPath.ts","webpack:///./src/utils/setDragImage.ts","webpack:///./src/utils/deepMatch.ts","webpack:///./src/shared/workbench-mini-action-bar/WorkbenchMiniActionBar.shadow.css"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport type { WorkbenchNodeData } from \"../../interfaces.js\";\nimport { dragStatusEnum } from \"./WorkbenchTreeDndContext.js\";\n\nexport interface dropOptions {\n curElement: HTMLElement;\n overElement: HTMLElement;\n parentElement: HTMLElement;\n overStatus: dragStatusEnum;\n}\n\nexport interface ContextOfWorkbenchTree {\n hoverKey?: string | number;\n activeKey?: string | number;\n basePaddingLeft?: number;\n showMatchedNodeOnly?: boolean;\n isTransformName?: boolean;\n fixedActionsFor?: Record<string, unknown> | Record<string, unknown>[];\n collapsible?: boolean;\n collapsedNodes?: (string | number)[];\n nodeKey?: string;\n clickFactory?(node: WorkbenchNodeData): () => void;\n mouseEnterFactory?(node: WorkbenchNodeData): () => void;\n mouseLeaveFactory?(node: WorkbenchNodeData): () => void;\n contextMenuFactory?(\n node?: WorkbenchNodeData\n ): (event: React.MouseEvent) => void;\n matchNode?(node: WorkbenchNodeData, lowerTrimmedQuery?: string): boolean;\n onNodeToggle?(nodeId: string | number, collapsed: boolean): void;\n getCollapsedId?(node: WorkbenchNodeData): string | number;\n onBrickDrop?(e: React.DragEvent<HTMLElement>, options: dropOptions): void;\n skipNotify?: boolean;\n}\n\nexport const WorkbenchTreeContext = createContext<ContextOfWorkbenchTree>({});\n\nexport function useWorkbenchTreeContext(): ContextOfWorkbenchTree {\n return useContext(WorkbenchTreeContext);\n}\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host,\n:host-context(html[data-override-theme=\"light\"]){--search-box-background:#fff;--node-color:#595959;--node-color-focus:#595959;--node-background-active:#e0eeff;--node-background-focus:#e0eeff;--node-icon-background-hover:#fff}:host-context(html[data-theme=\"dark-v2\"]),\n:host-context(html[data-override-theme=\"dark-v2\"]){--search-box-background:#181818;--node-color:#c5c5c5;--node-color-focus:#fff;--node-background-active:rgba(255,255,255,0.08);--node-background-focus:#1a7aff;--node-icon-background-hover:rgba(90,93,94,0.31)}.searchBox{position:sticky;top:0;background-color:var(--search-box-background);padding:5px 10px 10px;z-index:1}.searchBox .filter-input-wrapper{background-color:var(--search-box-background);border:1px solid rgba(255,255,255,0.2);position:relative;width:100%;min-width:0;padding:2px 7px;color:var(--antd-input-color);font-size:14px;line-height:1.5715;display:inline-flex;border-radius:3px;transition:all 0.3s;box-sizing:border-box}.searchBox .filter-input-wrapper.focus{background-color:var(--search-box-background);border:1px solid rgba(255,255,255,0.2);border-right-width:1px!important;outline:0;box-shadow:0 0 0 2px rgba(0,113,235,0.2)}.searchBox .filter-input-wrapper input{text-overflow:ellipsis;border:none;outline:none;border-radius:3px;background-color:var(--search-box-background);box-sizing:border-box;margin:0;padding:0;color:var(--antd-text-color);font-variant:tabular-nums;list-style:none;font-feature-settings:\"tnum\";position:relative;display:inline-block;width:100%;min-width:0;color:var(--antd-input-color);font-size:14px;line-height:1.5715;background-image:none;transition:all 0.3s}.prefix{margin-right:4px}.suffix{margin-left:4px}.searchBox .prefix,\n.searchBox .suffix{display:flex;flex:none;align-items:center}.clear-button{cursor:pointer}.tree{list-style:none;margin:0;padding:0}.placeholder{color:var(--antd-input-placeholder-color);padding:0 15px}.nodeLabelLink{display:block}.nodeLabelLink::part(link){display:flex}.nodeLabelRow{display:flex;cursor:pointer;height:22px;padding-right:10px;flex:1;min-width:0}.nodeLabelRow:hover,\n.nodeLabelRow.hover{background-color:rgba(255,255,255,0.12)}.nodeLabelLink:focus .nodeLabelRow.active{background-color:var(--node-background-focus)}.nodeLabel{display:flex;align-items:center;min-width:0;flex:1}.unreachable{opacity:0.3}.nodeAction,\n.nodeAction:hover,\n.nodeLabelRow .nodeLabel{color:var(--node-color)}.nodeLabelLink:focus .nodeLabel{color:var(--node-color-focus)}.nodeLabelRow.matched .nodeLabel{color:var(--palette-orange-6)}.nodeLabelRow.active{background-color:var(--node-background-active)}.nodeIconWrapper{display:flex;width:24px;flex-shrink:0}.nodeIcon,\n.collapseIcon{display:flex;justify-content:center;align-items:center;width:20px;height:20px;border-radius:5px;font-size:13px}.collapseIcon{display:none}.nodeLabelRow.collapsed .nodeIcon,\n.nodeLabelRow.collapsible .nodeIconWrapper:hover .nodeIcon{display:none}.nodeLabelRow.collapsed .collapseIcon,\n.nodeLabelRow.collapsible .nodeIconWrapper:hover .collapseIcon{display:flex}.nodeLabelRow.collapsible .nodeIcon:hover,\n.nodeLabelRow.collapsible .collapseIcon:hover{background-color:var(--node-icon-background-hover)}.nodeName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nodeLabelRow:not(:hover):not(.fixedActions) .nodeActionsBar{display:none}.badge{margin:0 3px}.collapsed + .tree{display:none}.hightlight{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:#fcd93f}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","import { createContext, useContext } from \"react\";\nimport type {\n ActionClickDetail,\n WorkbenchTreeAction,\n} from \"../../interfaces.js\";\n\nexport interface ContextOfWorkbenchActions {\n actions?: WorkbenchTreeAction[];\n actionsHidden?: boolean;\n onActionClick?(detail: ActionClickDetail): void;\n}\n\nexport const WorkbenchActionsContext = createContext<ContextOfWorkbenchActions>(\n {}\n);\n\nexport function useWorkbenchActionsContext(): ContextOfWorkbenchActions {\n return useContext(WorkbenchActionsContext);\n}\n","import { createContext, useContext } from \"react\";\nimport { WorkbenchNodeData } from \"../../interfaces.js\";\n\nexport enum dragStatusEnum {\n inside = \"inside\",\n top = \"top\",\n bottom = \"bottom\",\n}\n\ninterface WorkbenchTreeDndContext {\n allow?: boolean;\n allowDragToRoot?: boolean;\n dragElement?: HTMLElement;\n dragOverElement?: HTMLElement;\n dragStatus?: dragStatusEnum;\n onDragStart?: (\n e: React.DragEvent<HTMLElement>,\n node: WorkbenchNodeData\n ) => void;\n onDragOver?: (e: React.DragEvent<HTMLElement>) => void;\n onDrop?: (e: React.DragEvent<HTMLElement>) => void;\n}\n\nexport const WorkbenchTreeDndContext = createContext<WorkbenchTreeDndContext>(\n {} as WorkbenchTreeDndContext\n);\n\nexport function useWorkbenchTreeDndContext(): WorkbenchTreeDndContext {\n return useContext(WorkbenchTreeDndContext);\n}\n","import React, { useCallback, useMemo } from \"react\";\nimport { wrapBrick } from \"@next-core/react-element\";\nimport classNames from \"classnames\";\nimport { checkIfByTransform } from \"@next-core/runtime\";\nimport { WorkbenchTreeAction, ActionClickDetail } from \"../../interfaces.js\";\nimport type {\n GeneralIcon,\n GeneralIconProps,\n} from \"@next-bricks/icons/general-icon\";\n\nexport const WrappedGeneralIcon = wrapBrick<GeneralIcon, GeneralIconProps>(\n \"eo-icon\"\n);\n\nexport interface WorkbenchSubActionBarProps {\n data?: unknown;\n className?: string;\n gap?: number;\n isFirst?: boolean;\n isLast?: boolean;\n actions?: WorkbenchTreeAction[];\n actionsHidden?: boolean;\n onActionClick?(detail: ActionClickDetail): void;\n}\n\nexport function WorkbenchMiniActionBar({\n data,\n className,\n gap,\n isFirst,\n isLast,\n actions,\n actionsHidden,\n onActionClick,\n}: WorkbenchSubActionBarProps): React.ReactElement {\n const enabledActions = useMemo(\n () => actions?.filter((item) => checkIfByTransform(item, data)),\n [actions, data]\n );\n\n if (actionsHidden || !enabledActions?.length) {\n return null;\n }\n\n return (\n <div className={classNames(\"actionsBar\", className)} style={{ gap }}>\n {enabledActions.map((item) => (\n <WorkbenchSubAction\n key={item.action}\n action={item}\n data={data}\n isFirst={isFirst}\n isLast={isLast}\n onActionClick={onActionClick}\n />\n ))}\n </div>\n );\n}\n\ninterface WorkbenchSubActionProps {\n action: WorkbenchTreeAction;\n data?: unknown;\n isFirst?: boolean;\n isLast?: boolean;\n onActionClick?(detail: ActionClickDetail): void;\n}\n\nfunction WorkbenchSubAction({\n action,\n data,\n isFirst,\n isLast,\n onActionClick,\n}: WorkbenchSubActionProps): React.ReactElement {\n const disabled =\n (isFirst && action.action === \"move-up\") ||\n (isLast && action.action === \"move-down\");\n\n const handleActionClick = useCallback(\n (event: React.MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n disabled ||\n onActionClick?.({\n action: action.action,\n data: data,\n });\n },\n [action.action, data, disabled, onActionClick]\n );\n\n const preventMouseEvent = useCallback((event: React.MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n }, []);\n\n return (\n <a\n className={classNames(\"action\", { disabled: disabled })}\n title={action.title}\n role=\"button\"\n onClick={handleActionClick}\n onContextMenu={preventMouseEvent}\n onMouseDown={preventMouseEvent}\n >\n <WrappedGeneralIcon {...action.icon} />\n </a>\n );\n}\n","import React, {\n type ChangeEvent,\n useCallback,\n useMemo,\n useState,\n type ReactElement,\n createContext,\n useContext,\n useEffect,\n} from \"react\";\n// import { Input } from \"antd\";\nimport { get, isMatch, pick } from \"lodash\";\nimport classNames from \"classnames\";\nimport { useWorkbenchTreeContext } from \"./WorkbenchTreeContext.js\";\nimport { useWorkbenchActionsContext } from \"./WorkbenchActionsContext.js\";\nimport {\n useWorkbenchTreeDndContext,\n dragStatusEnum,\n} from \"./WorkbenchTreeDndContext.js\";\nimport type { WorkbenchNodeData } from \"../../interfaces.js\";\nimport { WorkbenchMiniActionBar } from \"../workbench-mini-action-bar/WorkbenchMiniActionBar.js\";\nimport { checkIfOfComputed } from \"@next-core/runtime\";\nimport { WorkbenchTreeDndContext } from \"./WorkbenchTreeDndContext.js\";\nimport { setDragImage } from \"../../utils/setDragImage.js\";\nimport classnames from \"classnames\";\nimport {\n getNodesByPathTree,\n getNodeTreeByPath,\n} from \"../../utils/normalizeTreeNodeWithPath.js\";\nimport { wrapBrick } from \"@next-core/react-element\";\nimport type { Link, LinkProps } from \"@next-bricks/basic/link\";\nimport type {\n GeneralIcon,\n GeneralIconProps,\n} from \"@next-bricks/icons/general-icon\";\n\nexport const WrappedLink = wrapBrick<Link, LinkProps>(\"eo-link\");\nexport const WrappedGeneralIcon = wrapBrick<GeneralIcon, GeneralIconProps>(\n \"eo-icon\"\n);\n\nconst treeLevelPadding = 10;\nconst borderStyle = \"0 0 0 1px #ba6d30\";\n\nexport interface dropEmitProps {\n nodes: WorkbenchNodeData[];\n curNode: WorkbenchNodeData;\n overNode: WorkbenchNodeData;\n status: dragStatusEnum;\n}\n\nexport interface WorkbenchTreeProps {\n nodes: WorkbenchNodeData[];\n placeholder?: string;\n searchPlaceholder?: string;\n noSearch?: boolean;\n isDrag?: boolean;\n allowDrag?: boolean;\n allowDragToRoot?: boolean;\n allowDragToInside?: boolean;\n dropEmit?: (detail: dropEmitProps) => void;\n}\n\nexport interface TreeListProps {\n nodes: WorkbenchNodeData[];\n level: number;\n}\n\nconst SearchingContext = createContext(false);\n\nexport function WorkbenchTree({\n nodes: originNode,\n placeholder,\n searchPlaceholder,\n isDrag,\n noSearch,\n allowDrag,\n allowDragToRoot,\n allowDragToInside,\n dropEmit,\n}: WorkbenchTreeProps): ReactElement {\n const [q, setQ] = useState<string>(\"\");\n const [isDragging, setIsDragging] = useState<boolean>(isDrag);\n const [curNode, setCurNode] = useState<WorkbenchNodeData>();\n const [curElement, setCurElement] = useState<HTMLElement>();\n const [overNode, setOverNode] = useState<WorkbenchNodeData>();\n const [overElement, setOverElement] = useState<HTMLElement>();\n const [overStatus, setOverStatus] = useState<dragStatusEnum>();\n const [isFocus, setIsFocus] = useState<boolean>();\n const { nodeKey, onBrickDrop, contextMenuFactory, matchNode } =\n useWorkbenchTreeContext();\n const nodes = useMemo(\n () => getNodeTreeByPath(originNode?.slice() ?? [], nodeKey),\n [originNode, nodeKey]\n );\n\n const handleSearchChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n setQ(event.target.value);\n },\n []\n );\n\n const handleClearInput = () => {\n setQ(\"\");\n };\n\n const onContextMenu = useMemo(\n () => contextMenuFactory?.(),\n [contextMenuFactory]\n );\n\n const trimmedLowerQ = q?.trim().toLowerCase();\n const filteredNodes = useMemo(() => {\n if (noSearch || !trimmedLowerQ || !nodes) {\n return nodes;\n }\n const walk = (node: WorkbenchNodeData): boolean => {\n node.matchedSelf = matchNode(node, trimmedLowerQ);\n const hasMatchedChildren = node.children?.map(walk).includes(true);\n node.matched = node.matchedSelf || hasMatchedChildren;\n return node.matched;\n };\n nodes.forEach(walk);\n return nodes.slice();\n }, [noSearch, trimmedLowerQ, nodes, matchNode]);\n\n const findDragParent = (element: HTMLElement, equal = true): HTMLElement => {\n let node = element;\n while (node) {\n if (\n node.draggable &&\n (equal || node !== element) &&\n node.tagName !== \"A\"\n ) {\n return node;\n }\n node = node.parentElement;\n }\n };\n\n const findNode = (\n nodes: WorkbenchNodeData[],\n id: string,\n nodeKey: string,\n node: WorkbenchNodeData = null\n ): WorkbenchNodeData => {\n for (const item of nodes) {\n if ((item.data as Record<string, unknown>)[nodeKey] === id) {\n node = item;\n }\n if (item.children) {\n node = findNode(item.children, id, nodeKey, node);\n }\n if (node) break;\n }\n return node;\n };\n\n const getDragState = (\n e: React.DragEvent<HTMLElement>\n ): {\n element: HTMLElement;\n node: WorkbenchNodeData;\n status: dragStatusEnum;\n } => {\n const element = findDragParent(e.target as HTMLElement);\n const id = element.dataset.uid;\n if (element === curElement || id?.includes(\":\")) {\n return;\n }\n const { top, bottom } = element.getBoundingClientRect();\n let status: dragStatusEnum;\n const repair = allowDragToInside ? 5 : 10;\n if (e.clientY < top + repair) {\n status = dragStatusEnum.top;\n } else if (e.clientY > bottom - repair) {\n status = dragStatusEnum.bottom;\n } else {\n status = allowDragToInside ? dragStatusEnum.inside : overStatus;\n }\n\n return {\n element,\n node: findNode(nodes, id, nodeKey),\n status,\n };\n };\n\n const handleOnDragStart = (\n e: React.DragEvent,\n node: WorkbenchNodeData\n ): void => {\n e.stopPropagation();\n if (!allowDrag) return;\n const element = e.target as HTMLElement;\n if (element.dataset?.container) return;\n setIsDragging(true);\n setDragImage(e, element.innerText);\n setCurElement(element);\n setCurNode(node);\n };\n\n const handleOnDragOver = (e: React.DragEvent<HTMLElement>): void => {\n e.preventDefault();\n if (!isDragging) return;\n if ((e.target as HTMLElement).className === \"workbenchTree-placeholder-dom\")\n return;\n const dom = getDragState(e);\n if (dom && !curElement?.contains(dom.element)) {\n setOverElement(dom.element);\n setOverNode(dom.node);\n setOverStatus(dom.status);\n }\n };\n\n const handleOnDragEnd = (): void => {\n setCurElement(null);\n setOverElement(null);\n setOverNode(null);\n setOverStatus(null);\n setIsDragging(false);\n };\n\n const handleOnDrop = (e: React.DragEvent<HTMLElement>): void => {\n if (!isDragging) return;\n if (onBrickDrop) {\n let parentElement = overElement;\n if ([dragStatusEnum.top, dragStatusEnum.bottom].includes(overStatus)) {\n parentElement = findDragParent(parentElement, false);\n }\n onBrickDrop(e, {\n curElement,\n overElement,\n parentElement,\n overStatus,\n });\n } else {\n if (allowDragToRoot || Number(overElement.dataset.level) !== 1) {\n let realOverNode = overNode;\n const findRealNode = (\n nodes: WorkbenchNodeData[],\n key: string\n ): void => {\n for (let i = 0; i < nodes.length; i++) {\n if (nodes[i].key === key) {\n realOverNode = nodes[i];\n break;\n }\n if (nodes[i].children) {\n findRealNode(nodes[i].children, key);\n }\n }\n };\n const overUid = overElement.dataset.uid;\n findRealNode(nodes, overUid);\n const filterNodes = (\n nodes: WorkbenchNodeData[]\n ): WorkbenchNodeData[] => {\n let flag = false;\n const { container, uid } = overElement.dataset;\n const realOverKey = container ? realOverNode.originKey : uid;\n const newNodes = nodes.filter((node) => {\n if (node.children) {\n node.children = filterNodes(node.children);\n }\n if (node.key === realOverKey) flag = true;\n return node.key !== curNode.key;\n });\n if (flag) {\n newNodes.splice(\n newNodes.findIndex((item) => item.key === realOverKey) +\n (overStatus === \"bottom\" ? 1 : 0),\n 0,\n curNode\n );\n }\n return newNodes;\n };\n\n const normalizeNode = getNodesByPathTree(nodes);\n const realCurNode = curNode.isContainer\n ? normalizeNode.find((item) => item.key === curNode.originKey)\n : curNode;\n const curNodeData = realCurNode.data as Record<string, unknown>;\n curNodeData.path = realOverNode.parentPath || realOverNode.path;\n\n dropEmit({\n nodes: filterNodes(normalizeNode),\n curNode: realCurNode,\n overNode: realOverNode,\n status: overStatus,\n });\n }\n }\n handleOnDragEnd();\n };\n\n useEffect(() => {\n setIsDragging(isDrag);\n }, [isDrag]);\n\n useEffect(() => {\n window.addEventListener(\"dragend\", handleOnDragEnd);\n return () => {\n window.removeEventListener(\"dragend\", handleOnDragEnd);\n };\n }, []);\n\n return (\n <div\n style={{\n height: \"100%\",\n }}\n className=\"tree-wrapper\"\n onContextMenu={onContextMenu}\n >\n {nodes?.length ? (\n <div>\n {!noSearch && (\n <div\n className=\"searchBox\"\n onContextMenu={(e) => e.stopPropagation()}\n >\n <span\n className={classNames(\"filter-input-wrapper\", {\n focus: isFocus,\n })}\n >\n <span className=\"prefix\">\n <WrappedGeneralIcon\n icon=\"search\"\n lib=\"antd\"\n theme=\"outlined\"\n />\n </span>\n <input\n value={q}\n onChange={handleSearchChange}\n onFocus={() => setIsFocus(true)}\n onBlur={() => setIsFocus(false)}\n autoComplete=\"off\"\n placeholder={searchPlaceholder}\n />\n <span className=\"suffix\">\n {q ? (\n <WrappedGeneralIcon\n className=\"clear-button\"\n icon=\"close-circle\"\n lib=\"antd\"\n theme=\"filled\"\n onClick={handleClearInput}\n />\n ) : null}\n </span>\n </span>\n </div>\n )}\n <SearchingContext.Provider value={!!q}>\n <WorkbenchTreeDndContext.Provider\n value={{\n allow: allowDrag,\n allowDragToRoot: allowDragToRoot,\n dragElement: curElement,\n dragOverElement: overElement,\n dragStatus: overStatus,\n onDragStart: handleOnDragStart,\n }}\n >\n <div\n className={classnames({\n hightlight: isDrag,\n })}\n onDragOver={handleOnDragOver}\n onDrop={handleOnDrop}\n >\n <TreeList nodes={filteredNodes} level={1} />\n </div>\n </WorkbenchTreeDndContext.Provider>\n </SearchingContext.Provider>\n </div>\n ) : (\n <div className=\"placeholder\">{placeholder}</div>\n )}\n </div>\n );\n}\n\nfunction TreeList({ nodes, level }: TreeListProps): ReactElement {\n const lastIndex = nodes.length - 1;\n return (\n <ul className=\"tree\">\n {nodes\n .filter((item) => checkIfOfComputed(item))\n .map((node, index) => (\n <TreeNode\n key={node.key}\n node={node}\n level={level}\n isFirst={index === 0}\n isLast={index === lastIndex}\n />\n ))}\n </ul>\n );\n}\n\nfunction PlaceholderDOM({\n style,\n}: {\n style: React.CSSProperties;\n}): React.ReactElement {\n const { dragStatus } = useWorkbenchTreeDndContext();\n const styles: React.CSSProperties = {\n height: 22,\n border: \"1px dashed goldenrod\",\n opacity: dragStatus === dragStatusEnum.inside ? \"0\" : \"1\",\n ...style,\n };\n\n return <li className=\"workbenchTree-placeholder-dom\" style={styles} />;\n}\nexport interface TreeNodeProps {\n node: WorkbenchNodeData;\n level: number;\n isFirst?: boolean;\n isLast?: boolean;\n skipNotify?: boolean;\n}\n\nfunction TreeNode({\n node,\n level,\n isFirst,\n isLast,\n}: TreeNodeProps): ReactElement {\n const isLeaf = !node.children?.length;\n const isContainer = node.isContainer;\n const {\n hoverKey,\n activeKey,\n basePaddingLeft,\n showMatchedNodeOnly,\n fixedActionsFor,\n collapsible,\n collapsedNodes,\n nodeKey,\n clickFactory,\n mouseEnterFactory,\n mouseLeaveFactory,\n contextMenuFactory,\n onNodeToggle,\n getCollapsedId,\n skipNotify,\n } = useWorkbenchTreeContext();\n const {\n allow,\n allowDragToRoot,\n onDragStart,\n dragElement,\n dragOverElement,\n dragStatus,\n } = useWorkbenchTreeDndContext();\n\n const { actions, actionsHidden, onActionClick } =\n useWorkbenchActionsContext();\n\n const nodePaddingLeft = level * treeLevelPadding + basePaddingLeft - 2;\n const searching = useContext(SearchingContext);\n const [cacheDragStatus, setCacheDragStatus] = useState(null);\n const [collapseClicked, setCollapseClicked] = useState(false);\n const [collapsed, setCollapsed] = useState(\n collapsedNodes?.includes(getCollapsedId?.(node)) ?? false\n );\n\n const onMouseEnter = useMemo(\n () => mouseEnterFactory?.(node),\n [mouseEnterFactory, node]\n );\n const onMouseLeave = useMemo(\n () => mouseLeaveFactory?.(node),\n [mouseLeaveFactory, node]\n );\n\n const onContextMenu = useCallback(\n (e: React.MouseEvent) => {\n e.stopPropagation();\n contextMenuFactory?.(node)?.(e);\n },\n [contextMenuFactory, node]\n );\n\n const isActive = activeKey && node.key === activeKey;\n\n const nodeLabelCallback = useMemo(\n () =>\n isActive\n ? (element: HTMLElement) => {\n element?.scrollIntoView?.({\n block: \"center\",\n inline: \"center\",\n // behavior: \"smooth\",\n });\n }\n : null,\n // Only for initial active node.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []\n );\n\n const nodeUid = useMemo(() => {\n if (isContainer) {\n return node.key;\n }\n if (node.data) {\n const getNodeUid = (data: Record<string, any>): number | string => {\n return data.type === \"mount-point\"\n ? data.parent[nodeKey] || `${data.parent.$$uid}:${data.mountPoint}`\n : data[nodeKey] || data.$$uid;\n };\n return getNodeUid(node.data);\n }\n }, [nodeKey, node, isContainer]);\n\n useEffect(() => {\n if (dragStatus === dragStatusEnum.inside) {\n return;\n }\n if ([dragStatusEnum.top, dragStatusEnum.bottom].includes(dragStatus)) {\n setCacheDragStatus(dragStatus);\n }\n }, [dragStatus]);\n\n const isDragElement = useMemo(() => {\n if (dragElement) {\n const dragUid = dragElement.dataset.uid;\n return dragUid === String(nodeUid);\n }\n return false;\n }, [dragElement, nodeUid]);\n\n const isDragActive = useMemo(() => {\n if (dragOverElement) {\n const dragUid = dragOverElement.dataset.uid;\n return dragUid === String(nodeUid);\n }\n return false;\n }, [dragOverElement, nodeUid]);\n\n const nodeStyle = useMemo((): React.CSSProperties => {\n const commomStyle: React.CSSProperties = {};\n let style: React.CSSProperties = {\n opacity: isDragElement ? 0.2 : 1,\n };\n if (isDragActive) {\n if (dragStatus === dragStatusEnum.inside) {\n style = {\n boxShadow: borderStyle,\n background: \"rgba(255, 255, 255, 0.1)\",\n };\n }\n }\n return Object.assign(commomStyle, style);\n }, [isDragActive, isDragElement, dragStatus]);\n\n const handleCollapse = useCallback((event: React.MouseEvent | MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n setCollapseClicked(true);\n setCollapsed((prev) => !prev);\n }, []);\n\n const preventMouseEvent = useCallback((event: React.MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n }, []);\n\n const onLinkClick = useCallback(\n (e: MouseEvent | React.MouseEvent) => {\n if (isContainer) {\n handleCollapse(e);\n } else {\n return clickFactory?.(node)?.();\n }\n },\n [clickFactory, handleCollapse, isContainer, node]\n );\n\n useEffect(() => {\n if (collapseClicked) {\n onNodeToggle?.(getCollapsedId?.(node), collapsed);\n }\n }, [collapseClicked, collapsed, getCollapsedId, node, onNodeToggle]);\n\n // Disallow collapse leaf nodes, or any nodes when searching.\n const allowCollapse = collapsible && !isLeaf && !searching;\n\n if (searching && showMatchedNodeOnly && !node.matched) {\n return null;\n }\n\n return (\n <>\n {isDragActive &&\n (allowDragToRoot || level !== 1) &&\n cacheDragStatus === dragStatusEnum.top && (\n <PlaceholderDOM\n style={{\n marginLeft: nodePaddingLeft,\n }}\n />\n )}\n <li\n draggable={allow}\n onDragStart={(e) => onDragStart(e, node)}\n data-uid={nodeUid}\n data-level={level}\n style={nodeStyle}\n {...(isContainer\n ? {\n \"data-container\": isContainer,\n }\n : {})}\n >\n <WrappedLink\n className=\"nodeLabelLink\"\n tabIndex={0}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onContextMenu={onContextMenu}\n // noEmptyHref={true}\n onClick={onLinkClick}\n {...(skipNotify\n ? {\n // TODO: link should support\n url: {\n pathname: get(node.link, \"url\", \"href\"),\n state: {\n notify: false,\n },\n } as any,\n }\n : { ...pick(node.link, [\"url\", \"href\"]) })}\n >\n <span\n className={classNames(\"nodeLabelRow\", {\n active: isActive,\n hover: hoverKey && node.key === hoverKey,\n matched: searching && node.matchedSelf && !showMatchedNodeOnly,\n fixedActions:\n fixedActionsFor &&\n []\n .concat(fixedActionsFor)\n .some((source) =>\n isMatch(node.data as Record<string, unknown>, source)\n ),\n collapsed: allowCollapse && collapsed,\n collapsible: allowCollapse,\n })}\n >\n <span\n className={classNames(\"nodeLabel\", {\n unreachable: node.unreachable,\n })}\n style={{\n paddingLeft: nodePaddingLeft,\n color: node.labelColor,\n }}\n ref={nodeLabelCallback}\n >\n <span className=\"nodeIconWrapper\">\n {allowCollapse && (\n <span\n className=\"collapseIcon\"\n onClick={handleCollapse}\n onMouseDown={preventMouseEvent}\n title={collapsed ? \"Expand\" : \"Collapse\"}\n role=\"button\"\n >\n <WrappedGeneralIcon\n lib=\"antd\"\n theme=\"outlined\"\n icon={collapsed ? \"right\" : \"down\"}\n />\n </span>\n )}\n <span className=\"nodeIcon\">\n <WrappedGeneralIcon\n {...node.icon}\n style={{\n fontSize: (node.icon as unknown as Record<string, string>)\n ?.imgSrc\n ? 14\n : null,\n color: node.icon?.color,\n }}\n />\n </span>\n </span>\n <span className=\"nodeName\">\n {node.labelPrefix && (\n <span style={node.labelPrefix.style}>\n {node.labelPrefix.text}\n </span>\n )}\n {/* {isTransformName\n ? smartDisplayForEvaluableString(node.name)\n : node.name} */}\n {node.name}\n </span>\n </span>\n <WorkbenchMiniActionBar\n className=\"nodeActionsBar\"\n data={node.data}\n isFirst={isFirst}\n isLast={isLast}\n actions={actions}\n onActionClick={onActionClick}\n actionsHidden={actionsHidden}\n />\n {node.badge && (\n <span className=\"badge\">\n <WrappedGeneralIcon\n {...node.badge}\n style={{ color: node.badge.color }}\n />\n </span>\n )}\n </span>\n </WrappedLink>\n {isLeaf || <TreeList nodes={node.children} level={level + 1} />}\n </li>\n {isDragActive &&\n (allowDragToRoot || level !== 1) &&\n cacheDragStatus === dragStatusEnum.bottom && (\n <PlaceholderDOM\n style={{\n marginLeft: nodePaddingLeft,\n }}\n />\n )}\n </>\n );\n}\n","import _ from \"lodash\";\nimport { WorkbenchNodeData } from \"../interfaces.js\";\n\nexport function getNodeTreeByPath(\n nodes: WorkbenchNodeData[],\n nodeKey: string\n): Array<WorkbenchNodeData> {\n const createNodeByPath = (\n pathList: string[],\n nodes: Array<WorkbenchNodeData>,\n node: WorkbenchNodeData,\n index?: number\n ): void => {\n const path = pathList.shift();\n if (path) {\n pathList.length > 0\n ? pathList.splice(0, 1, `${path}/${pathList[0]}`)\n : pathList;\n const folder = nodes.find(\n (node) => node && node.key === path && node.isContainer\n );\n if (folder) {\n nodes[index] = null;\n createNodeByPath(pathList, folder.children, node);\n } else {\n const newPathList = path.split(\"/\");\n const newNode = {\n name: newPathList.pop(),\n key: path,\n parentPath: newPathList ? newPathList.join(\"/\") : newPathList,\n originKey: node.key,\n data: {\n [nodeKey]: path,\n isContainer: true,\n },\n children: [],\n icon: {\n icon: \"folder\",\n lib: \"antd\",\n theme: \"filled\",\n color: \"orange\",\n },\n isContainer: true,\n } as WorkbenchNodeData;\n if (typeof index === \"number\") {\n nodes[index] = newNode;\n } else {\n nodes.push(newNode);\n }\n createNodeByPath(pathList, newNode.children, node);\n }\n } else {\n nodes.push(node);\n }\n };\n\n nodes.forEach((node, index) => {\n if (node.path) {\n const pathList = node.path.split(\"/\").filter(Boolean);\n createNodeByPath(pathList, nodes, node, index);\n }\n });\n return nodes.filter(Boolean);\n}\n\nexport function getNodesByPathTree(\n nodes: Array<WorkbenchNodeData>\n): Array<WorkbenchNodeData> {\n const result: Array<WorkbenchNodeData> = [];\n const walk = (nodes: Array<WorkbenchNodeData>): void => {\n nodes.forEach((item) => {\n if (item.isContainer) {\n walk(item.children);\n } else {\n result.push(_.omit(item, [\"path\", \"icon\"]) as WorkbenchNodeData);\n }\n });\n };\n walk(nodes);\n return result;\n}\n","export function setDragImage(\n e: DragEvent | React.DragEvent,\n title: string\n): void {\n const canvas = document.createElement(\"canvas\");\n document.body.append(canvas);\n const context = canvas.getContext(\"2d\");\n canvas.width = context.measureText(title).width + 60;\n canvas.height = 20;\n canvas.style.position = \"absolute\";\n canvas.style.left = \"-100%\";\n canvas.style.zIndex = \"-100\";\n\n context.fillStyle = \"#333333\";\n context.fillRect(0, 0, canvas.width, canvas.height);\n\n context.fillStyle = \"#999999\";\n context.font = \"bold 14px Arial\";\n context.fillText(title, 20, 15);\n\n e.dataTransfer.setDragImage(canvas, 0, 0);\n}\n","export function deepFilter<T>(data: Array<T>, q: string): Array<T> {\n const trimmedQuery = q?.trim();\n if (!trimmedQuery) {\n return data.slice();\n }\n return data.filter((item) => deepMatch(item, trimmedQuery.toLowerCase()));\n}\n\nexport function deepMatch(data: unknown, lowerTrimmedQuery: string): boolean {\n switch (typeof data) {\n case \"string\":\n return data.toLowerCase().includes(lowerTrimmedQuery);\n case \"boolean\":\n case \"number\":\n return String(data).includes(lowerTrimmedQuery);\n case \"object\":\n return data === null\n ? \"null\".includes(lowerTrimmedQuery)\n : (Array.isArray(data) ? data : Object.entries(data).flat()).some(\n (item) => deepMatch(item, lowerTrimmedQuery)\n );\n default:\n return false;\n }\n}\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.actionsBar{display:flex;align-items:center;padding:0 3px}.action{display:flex;justify-content:center;align-items:center;width:20px;height:20px;border-radius:5px}.action:hover{color:#fff;background-color:rgba(90,93,94,0.31)}.action{color:#c5c5c5}.disabled,\n.disabled:hover{color:var(--color-disabled-text);cursor:not-allowed;background-color:initial}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n"],"names":["WorkbenchTreeContext","createContext","useWorkbenchTreeContext","useContext","___CSS_LOADER_EXPORT___","push","module","id","toString","WorkbenchActionsContext","useWorkbenchActionsContext","dragStatusEnum","WorkbenchTreeDndContext","useWorkbenchTreeDndContext","WrappedGeneralIcon","wrapBrick","WorkbenchMiniActionBar","_ref","data","className","gap","isFirst","isLast","actions","actionsHidden","onActionClick","enabledActions","useMemo","filter","item","checkIfByTransform","length","React","classNames","style","map","WorkbenchSubAction","key","action","_ref2","disabled","handleActionClick","useCallback","event","preventDefault","stopPropagation","preventMouseEvent","title","role","onClick","onContextMenu","onMouseDown","icon","WrappedLink","treeLevelPadding","borderStyle","SearchingContext","WorkbenchTree","nodes","originNode","placeholder","searchPlaceholder","isDrag","noSearch","allowDrag","allowDragToRoot","allowDragToInside","dropEmit","q","setQ","useState","isDragging","setIsDragging","curNode","setCurNode","curElement","setCurElement","overNode","setOverNode","overElement","setOverElement","overStatus","setOverStatus","isFocus","setIsFocus","nodeKey","onBrickDrop","contextMenuFactory","matchNode","_originNode$slice","createNodeByPath","pathList","node","index","path","shift","splice","folder","find","isContainer","children","newPathList","split","newNode","name","pop","parentPath","join","originKey","lib","theme","color","forEach","Boolean","getNodeTreeByPath","slice","handleSearchChange","target","value","trimmedLowerQ","trim","toLowerCase","filteredNodes","walk","_node$children","matchedSelf","hasMatchedChildren","includes","matched","findDragParent","element","equal","arguments","undefined","draggable","tagName","parentElement","findNode","handleOnDragEnd","useEffect","window","addEventListener","removeEventListener","height","e","focus","onChange","onFocus","onBlur","autoComplete","handleClearInput","Provider","allow","dragElement","dragOverElement","dragStatus","onDragStart","handleOnDragStart","_element$dataset","dataset","container","canvas","document","createElement","body","append","context","getContext","width","measureText","position","left","zIndex","fillStyle","fillRect","font","fillText","dataTransfer","setDragImage","innerText","classnames","hightlight","onDragOver","dom","uid","top","bottom","getBoundingClientRect","status","repair","clientY","inside","getDragState","contains","onDrop","Number","level","realOverNode","findRealNode","i","overUid","filterNodes","flag","realOverKey","newNodes","findIndex","normalizeNode","result","_","getNodesByPathTree","realCurNode","TreeList","lastIndex","checkIfOfComputed","TreeNode","PlaceholderDOM","_ref3","styles","border","opacity","_ref4","_node$children2","_collapsedNodes$inclu","_node$icon","_node$icon2","isLeaf","hoverKey","activeKey","basePaddingLeft","showMatchedNodeOnly","fixedActionsFor","collapsible","collapsedNodes","clickFactory","mouseEnterFactory","mouseLeaveFactory","onNodeToggle","getCollapsedId","skipNotify","nodePaddingLeft","searching","cacheDragStatus","setCacheDragStatus","collapseClicked","setCollapseClicked","collapsed","setCollapsed","onMouseEnter","onMouseLeave","_contextMenuFactory","isActive","nodeLabelCallback","_element$scrollIntoVi","scrollIntoView","call","block","inline","nodeUid","type","parent","$$uid","mountPoint","isDragElement","String","isDragActive","nodeStyle","boxShadow","background","Object","assign","handleCollapse","prev","onLinkClick","_clickFactory","allowCollapse","marginLeft","_extends","tabIndex","url","pathname","get","link","state","notify","pick","active","hover","fixedActions","concat","some","source","isMatch","unreachable","paddingLeft","labelColor","ref","fontSize","imgSrc","labelPrefix","text","badge","deepMatch","lowerTrimmedQuery","Array","isArray","entries","flat"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"chunks/2980.858c327f.js","mappings":"8LAkCO,MAAMA,GAAuBC,EAAAA,EAAAA,eAAsC,CAAC,GAEpE,SAASC,IACd,OAAOC,EAAAA,EAAAA,YAAWH,EACpB,C,sECnCII,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,84GAUyV,KAElY,QAAeH,EAAwBI,U,0DCLhC,MAAMC,GAA0BR,EAAAA,EAAAA,eACrC,CAAC,GAGI,SAASS,IACd,OAAOP,EAAAA,EAAAA,YAAWM,EACpB,C,oICfO,IAAKE,EAAc,SAAdA,GAAc,OAAdA,EAAc,gBAAdA,EAAc,UAAdA,EAAc,gBAAdA,CAAc,MAoBnB,MAAMC,GAA0BX,EAAAA,EAAAA,eACrC,CAAC,GAGI,SAASY,IACd,OAAOV,EAAAA,EAAAA,YAAWS,EACpB,C,0BCnBO,MAAME,GAAqBC,EAAAA,EAAAA,WAChC,WAcK,SAASC,EAAsBC,GASa,IATZ,KACrCC,EAAI,UACJC,EAAS,IACTC,EAAG,QACHC,EAAO,OACPC,EAAM,QACNC,EAAO,cACPC,EAAa,cACbC,GAC2BR,EAC3B,MAAMS,GAAiBC,EAAAA,EAAAA,UACrB,IAAM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,YAK1B/E,IAAAA,cAAA,QAAMb,UAAU,YACbyE,EAAK8M,aACJ1Q,IAAAA,cAAA,QAAME,MAAO0D,EAAK8M,YAAYxQ,OAC3B0D,EAAK8M,YAAYC,MAMrB/M,EAAKY,OAGVxE,IAAAA,cAAChB,EAAsB,CACrBG,UAAU,iBACVD,KAAM0E,EAAK1E,KACXG,QAASA,EACTC,OAAQA,EACRC,QAASA,EACTE,cAAeA,EACfD,cAAeA,IAEhBoE,EAAKgN,OACJ5Q,IAAAA,cAAA,QAAMb,UAAU,SACda,IAAAA,cAAClB,GAAkBsQ,EAAAA,EAAAA,GAAA,GACbxL,EAAKgN,MAAK,CACd1Q,MAAO,CAAE6E,MAAOnB,EAAKgN,MAAM7L,aAMpCkH,GAAUjM,IAAAA,cAACmL,EAAQ,CAACzJ,MAAOkC,EAAKQ,SAAUgG,MAAOA,EAAQ,KAE3DoE,KACEvM,GAA6B,IAAVmI,IACpB6C,KAAoBtO,EAAe+K,QACjC1J,IAAAA,cAACuL,EAAc,CACbrL,MAAO,CACLiP,WAAYpC,KAM1B,C,kBG/tBO,SAAS8D,EAAU3R,EAAe4R,GACvC,cAAe5R,GACb,IAAK,SACH,OAAOA,EAAKuG,cAAcM,SAAS+K,GACrC,IAAK,UACL,IAAK,SACH,OAAOvC,OAAOrP,GAAM6G,SAAS+K,GAC/B,IAAK,SACH,OAAgB,OAAT5R,EACH,OAAO6G,SAAS+K,IACfC,MAAMC,QAAQ9R,GAAQA,EAAO0P,OAAOqC,QAAQ/R,GAAMgS,QAAQjB,MACxDpQ,GAASgR,EAAUhR,EAAMiR,KAElC,QACE,OAAO,EAEb,C,sFCrBI1S,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,kWACuD,KAEhG,QAAeH,EAAwBI,U","sources":["webpack:///./src/shared/workbench/WorkbenchTreeContext.ts","webpack:///./src/workbench-tree/WorkbenchTree.shadow.css","webpack:///./src/shared/workbench/WorkbenchActionsContext.ts","webpack:///./src/shared/workbench/WorkbenchTreeDndContext.ts","webpack:///./src/shared/workbench-mini-action-bar/WorkbenchMiniActionBar.tsx","webpack:///./src/shared/workbench/WorkbenchTree.tsx","webpack:///./src/utils/normalizeTreeNodeWithPath.ts","webpack:///./src/utils/setDragImage.ts","webpack:///./src/utils/deepMatch.ts","webpack:///./src/shared/workbench-mini-action-bar/WorkbenchMiniActionBar.shadow.css"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport type { WorkbenchNodeData } from \"../../interfaces.js\";\nimport { dragStatusEnum } from \"./WorkbenchTreeDndContext.js\";\n\nexport interface dropOptions {\n curElement: HTMLElement;\n overElement: HTMLElement;\n parentElement: HTMLElement;\n overStatus: dragStatusEnum;\n}\n\nexport interface ContextOfWorkbenchTree {\n hoverKey?: string | number;\n activeKey?: string | number;\n basePaddingLeft?: number;\n showMatchedNodeOnly?: boolean;\n isTransformName?: boolean;\n fixedActionsFor?: Record<string, unknown> | Record<string, unknown>[];\n collapsible?: boolean;\n collapsedNodes?: (string | number)[];\n nodeKey?: string;\n clickFactory?(node: WorkbenchNodeData): () => void;\n mouseEnterFactory?(node: WorkbenchNodeData): () => void;\n mouseLeaveFactory?(node: WorkbenchNodeData): () => void;\n contextMenuFactory?(\n node?: WorkbenchNodeData\n ): (event: React.MouseEvent) => void;\n matchNode?(node: WorkbenchNodeData, lowerTrimmedQuery?: string): boolean;\n onNodeToggle?(nodeId: string | number, collapsed: boolean): void;\n getCollapsedId?(node: WorkbenchNodeData): string | number;\n onBrickDrop?(e: React.DragEvent<HTMLElement>, options: dropOptions): void;\n skipNotify?: boolean;\n}\n\nexport const WorkbenchTreeContext = createContext<ContextOfWorkbenchTree>({});\n\nexport function useWorkbenchTreeContext(): ContextOfWorkbenchTree {\n return useContext(WorkbenchTreeContext);\n}\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host,\n:host-context(html[data-override-theme=\"light\"]){--search-box-background:#fff;--node-color:#595959;--node-color-focus:#595959;--node-background-active:#e0eeff;--node-background-focus:#e0eeff;--node-icon-background-hover:#fff}:host-context(html[data-theme=\"dark-v2\"]),\n:host-context(html[data-override-theme=\"dark-v2\"]){--search-box-background:#181818;--node-color:#c5c5c5;--node-color-focus:#fff;--node-background-active:rgba(255,255,255,0.08);--node-background-focus:#1a7aff;--node-icon-background-hover:rgba(90,93,94,0.31)}.searchBox{position:sticky;top:0;background-color:var(--search-box-background);padding:5px 10px 10px;z-index:1}.searchBox .filter-input-wrapper{background-color:var(--search-box-background);border:1px solid rgba(255,255,255,0.2);position:relative;width:100%;min-width:0;padding:2px 7px;color:var(--antd-input-color);font-size:14px;line-height:1.5715;display:inline-flex;border-radius:3px;transition:all 0.3s;box-sizing:border-box}.searchBox .filter-input-wrapper.focus{background-color:var(--search-box-background);border:1px solid rgba(255,255,255,0.2);border-right-width:1px!important;outline:0;box-shadow:0 0 0 2px rgba(0,113,235,0.2)}.searchBox .filter-input-wrapper input{text-overflow:ellipsis;border:none;outline:none;border-radius:3px;background-color:var(--search-box-background);box-sizing:border-box;margin:0;padding:0;color:var(--antd-text-color);font-variant:tabular-nums;list-style:none;font-feature-settings:\"tnum\";position:relative;display:inline-block;width:100%;min-width:0;color:var(--antd-input-color);font-size:14px;line-height:1.5715;background-image:none;transition:all 0.3s}.prefix{margin-right:4px}.suffix{margin-left:4px}.searchBox .prefix,\n.searchBox .suffix{display:flex;flex:none;align-items:center}.clear-button{cursor:pointer}.tree{list-style:none;margin:0;padding:0}.placeholder{color:var(--antd-input-placeholder-color);padding:0 15px}.nodeLabelLink{display:block}.nodeLabelLink::part(link){display:flex}.nodeLabelRow{display:flex;cursor:pointer;height:22px;padding-right:10px;flex:1;min-width:0}.nodeLabelRow:hover,\n.nodeLabelRow.hover{background-color:rgba(255,255,255,0.12)}.nodeLabelLink:focus .nodeLabelRow.active{background-color:var(--node-background-focus)}.nodeLabel{display:flex;align-items:center;min-width:0;flex:1}.unreachable{opacity:0.3}.nodeAction,\n.nodeAction:hover,\n.nodeLabelRow .nodeLabel{color:var(--node-color)}.nodeLabelLink:focus .nodeLabel{color:var(--node-color-focus)}.nodeLabelRow.matched .nodeLabel{color:var(--palette-orange-6)}.nodeLabelRow.active{background-color:var(--node-background-active)}.nodeIconWrapper{display:flex;width:24px;flex-shrink:0}.nodeIcon,\n.collapseIcon{display:flex;justify-content:center;align-items:center;width:20px;height:20px;border-radius:5px;font-size:13px}.collapseIcon{display:none}.nodeLabelRow.collapsed .nodeIcon,\n.nodeLabelRow.collapsible .nodeIconWrapper:hover .nodeIcon{display:none}.nodeLabelRow.collapsed .collapseIcon,\n.nodeLabelRow.collapsible .nodeIconWrapper:hover .collapseIcon{display:flex}.nodeLabelRow.collapsible .nodeIcon:hover,\n.nodeLabelRow.collapsible .collapseIcon:hover{background-color:var(--node-icon-background-hover)}.nodeName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nodeLabelRow:not(:hover):not(.fixedActions) .nodeActionsBar{display:none}.badge{margin:0 3px}.collapsed + .tree{display:none}.hightlight{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:#fcd93f}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","import { createContext, useContext } from \"react\";\nimport type {\n ActionClickDetail,\n WorkbenchTreeAction,\n} from \"../../interfaces.js\";\n\nexport interface ContextOfWorkbenchActions {\n actions?: WorkbenchTreeAction[];\n actionsHidden?: boolean;\n onActionClick?(detail: ActionClickDetail): void;\n}\n\nexport const WorkbenchActionsContext = createContext<ContextOfWorkbenchActions>(\n {}\n);\n\nexport function useWorkbenchActionsContext(): ContextOfWorkbenchActions {\n return useContext(WorkbenchActionsContext);\n}\n","import { createContext, useContext } from \"react\";\nimport { WorkbenchNodeData } from \"../../interfaces.js\";\n\nexport enum dragStatusEnum {\n inside = \"inside\",\n top = \"top\",\n bottom = \"bottom\",\n}\n\ninterface WorkbenchTreeDndContext {\n allow?: boolean;\n allowDragToRoot?: boolean;\n dragElement?: HTMLElement;\n dragOverElement?: HTMLElement;\n dragStatus?: dragStatusEnum;\n onDragStart?: (\n e: React.DragEvent<HTMLElement>,\n node: WorkbenchNodeData\n ) => void;\n onDragOver?: (e: React.DragEvent<HTMLElement>) => void;\n onDrop?: (e: React.DragEvent<HTMLElement>) => void;\n}\n\nexport const WorkbenchTreeDndContext = createContext<WorkbenchTreeDndContext>(\n {} as WorkbenchTreeDndContext\n);\n\nexport function useWorkbenchTreeDndContext(): WorkbenchTreeDndContext {\n return useContext(WorkbenchTreeDndContext);\n}\n","import React, { useCallback, useMemo } from \"react\";\nimport { wrapBrick } from \"@next-core/react-element\";\nimport classNames from \"classnames\";\nimport { checkIfByTransform } from \"@next-core/runtime\";\nimport { WorkbenchTreeAction, ActionClickDetail } from \"../../interfaces.js\";\nimport type {\n GeneralIcon,\n GeneralIconProps,\n} from \"@next-bricks/icons/general-icon\";\n\nexport const WrappedGeneralIcon = wrapBrick<GeneralIcon, GeneralIconProps>(\n \"eo-icon\"\n);\n\nexport interface WorkbenchSubActionBarProps {\n data?: unknown;\n className?: string;\n gap?: number;\n isFirst?: boolean;\n isLast?: boolean;\n actions?: WorkbenchTreeAction[];\n actionsHidden?: boolean;\n onActionClick?(detail: ActionClickDetail): void;\n}\n\nexport function WorkbenchMiniActionBar({\n data,\n className,\n gap,\n isFirst,\n isLast,\n actions,\n actionsHidden,\n onActionClick,\n}: WorkbenchSubActionBarProps): React.ReactElement {\n const enabledActions = useMemo(\n () => actions?.filter((item) => checkIfByTransform(item, data)),\n [actions, data]\n );\n\n if (actionsHidden || !enabledActions?.length) {\n return null;\n }\n\n return (\n <div className={classNames(\"actionsBar\", className)} style={{ gap }}>\n {enabledActions.map((item) => (\n <WorkbenchSubAction\n key={item.action}\n action={item}\n data={data}\n isFirst={isFirst}\n isLast={isLast}\n onActionClick={onActionClick}\n />\n ))}\n </div>\n );\n}\n\ninterface WorkbenchSubActionProps {\n action: WorkbenchTreeAction;\n data?: unknown;\n isFirst?: boolean;\n isLast?: boolean;\n onActionClick?(detail: ActionClickDetail): void;\n}\n\nfunction WorkbenchSubAction({\n action,\n data,\n isFirst,\n isLast,\n onActionClick,\n}: WorkbenchSubActionProps): React.ReactElement {\n const disabled =\n (isFirst && action.action === \"move-up\") ||\n (isLast && action.action === \"move-down\");\n\n const handleActionClick = useCallback(\n (event: React.MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n disabled ||\n onActionClick?.({\n action: action.action,\n data: data,\n });\n },\n [action.action, data, disabled, onActionClick]\n );\n\n const preventMouseEvent = useCallback((event: React.MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n }, []);\n\n return (\n <a\n className={classNames(\"action\", { disabled: disabled })}\n title={action.title}\n role=\"button\"\n onClick={handleActionClick}\n onContextMenu={preventMouseEvent}\n onMouseDown={preventMouseEvent}\n >\n <WrappedGeneralIcon {...action.icon} />\n </a>\n );\n}\n","import React, {\n type ChangeEvent,\n useCallback,\n useMemo,\n useState,\n type ReactElement,\n createContext,\n useContext,\n useEffect,\n} from \"react\";\n// import { Input } from \"antd\";\nimport { get, isMatch, pick } from \"lodash\";\nimport classNames from \"classnames\";\nimport { useWorkbenchTreeContext } from \"./WorkbenchTreeContext.js\";\nimport { useWorkbenchActionsContext } from \"./WorkbenchActionsContext.js\";\nimport {\n useWorkbenchTreeDndContext,\n dragStatusEnum,\n} from \"./WorkbenchTreeDndContext.js\";\nimport type { WorkbenchNodeData } from \"../../interfaces.js\";\nimport { WorkbenchMiniActionBar } from \"../workbench-mini-action-bar/WorkbenchMiniActionBar.js\";\nimport { checkIfOfComputed } from \"@next-core/runtime\";\nimport { WorkbenchTreeDndContext } from \"./WorkbenchTreeDndContext.js\";\nimport { setDragImage } from \"../../utils/setDragImage.js\";\nimport classnames from \"classnames\";\nimport {\n getNodesByPathTree,\n getNodeTreeByPath,\n} from \"../../utils/normalizeTreeNodeWithPath.js\";\nimport { wrapBrick } from \"@next-core/react-element\";\nimport type { Link, LinkProps } from \"@next-bricks/basic/link\";\nimport type {\n GeneralIcon,\n GeneralIconProps,\n} from \"@next-bricks/icons/general-icon\";\n\nexport const WrappedLink = wrapBrick<Link, LinkProps>(\"eo-link\");\nexport const WrappedGeneralIcon = wrapBrick<GeneralIcon, GeneralIconProps>(\n \"eo-icon\"\n);\n\nconst treeLevelPadding = 10;\nconst borderStyle = \"0 0 0 1px #ba6d30\";\n\nexport interface dropEmitProps {\n nodes: WorkbenchNodeData[];\n curNode: WorkbenchNodeData;\n overNode: WorkbenchNodeData;\n status: dragStatusEnum;\n}\n\nexport interface WorkbenchTreeProps {\n nodes: WorkbenchNodeData[];\n placeholder?: string;\n searchPlaceholder?: string;\n noSearch?: boolean;\n isDrag?: boolean;\n allowDrag?: boolean;\n allowDragToRoot?: boolean;\n allowDragToInside?: boolean;\n dropEmit?: (detail: dropEmitProps) => void;\n}\n\nexport interface TreeListProps {\n nodes: WorkbenchNodeData[];\n level: number;\n}\n\nconst SearchingContext = createContext(false);\n\nexport function WorkbenchTree({\n nodes: originNode,\n placeholder,\n searchPlaceholder,\n isDrag,\n noSearch,\n allowDrag,\n allowDragToRoot,\n allowDragToInside,\n dropEmit,\n}: WorkbenchTreeProps): ReactElement {\n const [q, setQ] = useState<string>(\"\");\n const [isDragging, setIsDragging] = useState<boolean>(isDrag);\n const [curNode, setCurNode] = useState<WorkbenchNodeData>();\n const [curElement, setCurElement] = useState<HTMLElement>();\n const [overNode, setOverNode] = useState<WorkbenchNodeData>();\n const [overElement, setOverElement] = useState<HTMLElement>();\n const [overStatus, setOverStatus] = useState<dragStatusEnum>();\n const [isFocus, setIsFocus] = useState<boolean>();\n const { nodeKey, onBrickDrop, contextMenuFactory, matchNode } =\n useWorkbenchTreeContext();\n const nodes = useMemo(\n () => getNodeTreeByPath(originNode?.slice() ?? [], nodeKey),\n [originNode, nodeKey]\n );\n\n const handleSearchChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n setQ(event.target.value);\n },\n []\n );\n\n const handleClearInput = () => {\n setQ(\"\");\n };\n\n const onContextMenu = useMemo(\n () => contextMenuFactory?.(),\n [contextMenuFactory]\n );\n\n const trimmedLowerQ = q?.trim().toLowerCase();\n const filteredNodes = useMemo(() => {\n if (noSearch || !trimmedLowerQ || !nodes) {\n return nodes;\n }\n const walk = (node: WorkbenchNodeData): boolean => {\n node.matchedSelf = matchNode(node, trimmedLowerQ);\n const hasMatchedChildren = node.children?.map(walk).includes(true);\n node.matched = node.matchedSelf || hasMatchedChildren;\n return node.matched;\n };\n nodes.forEach(walk);\n return nodes.slice();\n }, [noSearch, trimmedLowerQ, nodes, matchNode]);\n\n const findDragParent = (element: HTMLElement, equal = true): HTMLElement => {\n let node = element;\n while (node) {\n if (\n node.draggable &&\n (equal || node !== element) &&\n node.tagName !== \"A\"\n ) {\n return node;\n }\n node = node.parentElement;\n }\n };\n\n const findNode = (\n nodes: WorkbenchNodeData[],\n id: string,\n nodeKey: string,\n node: WorkbenchNodeData = null\n ): WorkbenchNodeData => {\n for (const item of nodes) {\n if ((item.data as Record<string, unknown>)[nodeKey] === id) {\n node = item;\n }\n if (item.children) {\n node = findNode(item.children, id, nodeKey, node);\n }\n if (node) break;\n }\n return node;\n };\n\n const getDragState = (\n e: React.DragEvent<HTMLElement>\n ): {\n element: HTMLElement;\n node: WorkbenchNodeData;\n status: dragStatusEnum;\n } => {\n const element = findDragParent(e.target as HTMLElement);\n const id = element.dataset.uid;\n if (element === curElement || id?.includes(\":\")) {\n return;\n }\n const { top, bottom } = element.getBoundingClientRect();\n let status: dragStatusEnum;\n const repair = allowDragToInside ? 5 : 10;\n if (e.clientY < top + repair) {\n status = dragStatusEnum.top;\n } else if (e.clientY > bottom - repair) {\n status = dragStatusEnum.bottom;\n } else {\n status = allowDragToInside ? dragStatusEnum.inside : overStatus;\n }\n\n return {\n element,\n node: findNode(nodes, id, nodeKey),\n status,\n };\n };\n\n const handleOnDragStart = (\n e: React.DragEvent,\n node: WorkbenchNodeData\n ): void => {\n e.stopPropagation();\n if (!allowDrag) return;\n const element = e.target as HTMLElement;\n if (element.dataset?.container) return;\n setIsDragging(true);\n setDragImage(e, element.innerText);\n setCurElement(element);\n setCurNode(node);\n };\n\n const handleOnDragOver = (e: React.DragEvent<HTMLElement>): void => {\n e.preventDefault();\n if (!isDragging) return;\n if ((e.target as HTMLElement).className === \"workbenchTree-placeholder-dom\")\n return;\n const dom = getDragState(e);\n if (dom && !curElement?.contains(dom.element)) {\n setOverElement(dom.element);\n setOverNode(dom.node);\n setOverStatus(dom.status);\n }\n };\n\n const handleOnDragEnd = (): void => {\n setCurElement(null);\n setOverElement(null);\n setOverNode(null);\n setOverStatus(null);\n setIsDragging(false);\n };\n\n const handleOnDrop = (e: React.DragEvent<HTMLElement>): void => {\n if (!isDragging) return;\n if (onBrickDrop) {\n let parentElement = overElement;\n if ([dragStatusEnum.top, dragStatusEnum.bottom].includes(overStatus)) {\n parentElement = findDragParent(parentElement, false);\n }\n onBrickDrop(e, {\n curElement,\n overElement,\n parentElement,\n overStatus,\n });\n } else {\n if (allowDragToRoot || Number(overElement.dataset.level) !== 1) {\n let realOverNode = overNode;\n const findRealNode = (\n nodes: WorkbenchNodeData[],\n key: string\n ): void => {\n for (let i = 0; i < nodes.length; i++) {\n if (nodes[i].key === key) {\n realOverNode = nodes[i];\n break;\n }\n if (nodes[i].children) {\n findRealNode(nodes[i].children, key);\n }\n }\n };\n const overUid = overElement.dataset.uid;\n findRealNode(nodes, overUid);\n const filterNodes = (\n nodes: WorkbenchNodeData[]\n ): WorkbenchNodeData[] => {\n let flag = false;\n const { container, uid } = overElement.dataset;\n const realOverKey = container ? realOverNode.originKey : uid;\n const newNodes = nodes.filter((node) => {\n if (node.children) {\n node.children = filterNodes(node.children);\n }\n if (node.key === realOverKey) flag = true;\n return node.key !== curNode.key;\n });\n if (flag) {\n newNodes.splice(\n newNodes.findIndex((item) => item.key === realOverKey) +\n (overStatus === \"bottom\" ? 1 : 0),\n 0,\n curNode\n );\n }\n return newNodes;\n };\n\n const normalizeNode = getNodesByPathTree(nodes);\n const realCurNode = curNode.isContainer\n ? normalizeNode.find((item) => item.key === curNode.originKey)\n : curNode;\n const curNodeData = realCurNode.data as Record<string, unknown>;\n curNodeData.path = realOverNode.parentPath || realOverNode.path;\n\n dropEmit({\n nodes: filterNodes(normalizeNode),\n curNode: realCurNode,\n overNode: realOverNode,\n status: overStatus,\n });\n }\n }\n handleOnDragEnd();\n };\n\n useEffect(() => {\n setIsDragging(isDrag);\n }, [isDrag]);\n\n useEffect(() => {\n window.addEventListener(\"dragend\", handleOnDragEnd);\n return () => {\n window.removeEventListener(\"dragend\", handleOnDragEnd);\n };\n }, []);\n\n return (\n <div\n style={{\n height: \"100%\",\n }}\n className=\"tree-wrapper\"\n onContextMenu={onContextMenu}\n >\n {nodes?.length ? (\n <div>\n {!noSearch && (\n <div\n className=\"searchBox\"\n onContextMenu={(e) => e.stopPropagation()}\n >\n <span\n className={classNames(\"filter-input-wrapper\", {\n focus: isFocus,\n })}\n >\n <span className=\"prefix\">\n <WrappedGeneralIcon\n icon=\"search\"\n lib=\"antd\"\n theme=\"outlined\"\n />\n </span>\n <input\n value={q}\n onChange={handleSearchChange}\n onFocus={() => setIsFocus(true)}\n onBlur={() => setIsFocus(false)}\n autoComplete=\"off\"\n placeholder={searchPlaceholder}\n />\n <span className=\"suffix\">\n {q ? (\n <WrappedGeneralIcon\n className=\"clear-button\"\n icon=\"close-circle\"\n lib=\"antd\"\n theme=\"filled\"\n onClick={handleClearInput}\n />\n ) : null}\n </span>\n </span>\n </div>\n )}\n <SearchingContext.Provider value={!!q}>\n <WorkbenchTreeDndContext.Provider\n value={{\n allow: allowDrag,\n allowDragToRoot: allowDragToRoot,\n dragElement: curElement,\n dragOverElement: overElement,\n dragStatus: overStatus,\n onDragStart: handleOnDragStart,\n }}\n >\n <div\n className={classnames({\n hightlight: isDrag,\n })}\n onDragOver={handleOnDragOver}\n onDrop={handleOnDrop}\n >\n <TreeList nodes={filteredNodes} level={1} />\n </div>\n </WorkbenchTreeDndContext.Provider>\n </SearchingContext.Provider>\n </div>\n ) : (\n <div className=\"placeholder\">{placeholder}</div>\n )}\n </div>\n );\n}\n\nfunction TreeList({ nodes, level }: TreeListProps): ReactElement {\n const lastIndex = nodes.length - 1;\n return (\n <ul className=\"tree\">\n {nodes\n .filter((item) => checkIfOfComputed(item))\n .map((node, index) => (\n <TreeNode\n key={node.key}\n node={node}\n level={level}\n isFirst={index === 0}\n isLast={index === lastIndex}\n />\n ))}\n </ul>\n );\n}\n\nfunction PlaceholderDOM({\n style,\n}: {\n style: React.CSSProperties;\n}): React.ReactElement {\n const { dragStatus } = useWorkbenchTreeDndContext();\n const styles: React.CSSProperties = {\n height: 22,\n border: \"1px dashed goldenrod\",\n opacity: dragStatus === dragStatusEnum.inside ? \"0\" : \"1\",\n ...style,\n };\n\n return <li className=\"workbenchTree-placeholder-dom\" style={styles} />;\n}\nexport interface TreeNodeProps {\n node: WorkbenchNodeData;\n level: number;\n isFirst?: boolean;\n isLast?: boolean;\n skipNotify?: boolean;\n}\n\nfunction TreeNode({\n node,\n level,\n isFirst,\n isLast,\n}: TreeNodeProps): ReactElement {\n const isLeaf = !node.children?.length;\n const isContainer = node.isContainer;\n const {\n hoverKey,\n activeKey,\n basePaddingLeft,\n showMatchedNodeOnly,\n fixedActionsFor,\n collapsible,\n collapsedNodes,\n nodeKey,\n clickFactory,\n mouseEnterFactory,\n mouseLeaveFactory,\n contextMenuFactory,\n onNodeToggle,\n getCollapsedId,\n skipNotify,\n } = useWorkbenchTreeContext();\n const {\n allow,\n allowDragToRoot,\n onDragStart,\n dragElement,\n dragOverElement,\n dragStatus,\n } = useWorkbenchTreeDndContext();\n\n const { actions, actionsHidden, onActionClick } =\n useWorkbenchActionsContext();\n\n const nodePaddingLeft = level * treeLevelPadding + basePaddingLeft - 2;\n const searching = useContext(SearchingContext);\n const [cacheDragStatus, setCacheDragStatus] = useState(null);\n const [collapseClicked, setCollapseClicked] = useState(false);\n const [collapsed, setCollapsed] = useState(\n collapsedNodes?.includes(getCollapsedId?.(node)) ?? false\n );\n\n const onMouseEnter = useMemo(\n () => mouseEnterFactory?.(node),\n [mouseEnterFactory, node]\n );\n const onMouseLeave = useMemo(\n () => mouseLeaveFactory?.(node),\n [mouseLeaveFactory, node]\n );\n\n const onContextMenu = useCallback(\n (e: React.MouseEvent) => {\n e.stopPropagation();\n contextMenuFactory?.(node)?.(e);\n },\n [contextMenuFactory, node]\n );\n\n const isActive = activeKey && node.key === activeKey;\n\n const nodeLabelCallback = useMemo(\n () =>\n isActive\n ? (element: HTMLElement) => {\n element?.scrollIntoView?.({\n block: \"center\",\n inline: \"center\",\n // behavior: \"smooth\",\n });\n }\n : null,\n // Only for initial active node.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []\n );\n\n const nodeUid = useMemo(() => {\n if (isContainer) {\n return node.key;\n }\n if (node.data) {\n const getNodeUid = (data: Record<string, any>): number | string => {\n return data.type === \"mount-point\"\n ? data.parent[nodeKey] || `${data.parent.$$uid}:${data.mountPoint}`\n : data[nodeKey] || data.$$uid;\n };\n return getNodeUid(node.data);\n }\n }, [nodeKey, node, isContainer]);\n\n useEffect(() => {\n if (dragStatus === dragStatusEnum.inside) {\n return;\n }\n if ([dragStatusEnum.top, dragStatusEnum.bottom].includes(dragStatus)) {\n setCacheDragStatus(dragStatus);\n }\n }, [dragStatus]);\n\n const isDragElement = useMemo(() => {\n if (dragElement) {\n const dragUid = dragElement.dataset.uid;\n return dragUid === String(nodeUid);\n }\n return false;\n }, [dragElement, nodeUid]);\n\n const isDragActive = useMemo(() => {\n if (dragOverElement) {\n const dragUid = dragOverElement.dataset.uid;\n return dragUid === String(nodeUid);\n }\n return false;\n }, [dragOverElement, nodeUid]);\n\n const nodeStyle = useMemo((): React.CSSProperties => {\n const commomStyle: React.CSSProperties = {};\n let style: React.CSSProperties = {\n opacity: isDragElement ? 0.2 : 1,\n };\n if (isDragActive) {\n if (dragStatus === dragStatusEnum.inside) {\n style = {\n boxShadow: borderStyle,\n background: \"rgba(255, 255, 255, 0.1)\",\n };\n }\n }\n return Object.assign(commomStyle, style);\n }, [isDragActive, isDragElement, dragStatus]);\n\n const handleCollapse = useCallback((event: React.MouseEvent | MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n setCollapseClicked(true);\n setCollapsed((prev) => !prev);\n }, []);\n\n const preventMouseEvent = useCallback((event: React.MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n }, []);\n\n const onLinkClick = useCallback(\n (e: MouseEvent | React.MouseEvent) => {\n if (isContainer) {\n handleCollapse(e);\n } else {\n return clickFactory?.(node)?.();\n }\n },\n [clickFactory, handleCollapse, isContainer, node]\n );\n\n useEffect(() => {\n if (collapseClicked) {\n onNodeToggle?.(getCollapsedId?.(node), collapsed);\n }\n }, [collapseClicked, collapsed, getCollapsedId, node, onNodeToggle]);\n\n // Disallow collapse leaf nodes, or any nodes when searching.\n const allowCollapse = collapsible && !isLeaf && !searching;\n\n if (searching && showMatchedNodeOnly && !node.matched) {\n return null;\n }\n\n return (\n <>\n {isDragActive &&\n (allowDragToRoot || level !== 1) &&\n cacheDragStatus === dragStatusEnum.top && (\n <PlaceholderDOM\n style={{\n marginLeft: nodePaddingLeft,\n }}\n />\n )}\n <li\n draggable={allow}\n onDragStart={(e) => onDragStart(e, node)}\n data-uid={nodeUid}\n data-level={level}\n style={nodeStyle}\n {...(isContainer\n ? {\n \"data-container\": isContainer,\n }\n : {})}\n >\n <WrappedLink\n className=\"nodeLabelLink\"\n tabIndex={0}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onContextMenu={onContextMenu}\n // noEmptyHref={true}\n onClick={onLinkClick}\n {...(skipNotify\n ? {\n // TODO: link should support\n url: {\n pathname: get(node.link, \"url\", \"href\"),\n state: {\n notify: false,\n },\n } as any,\n }\n : { ...pick(node.link, [\"url\", \"href\"]) })}\n >\n <span\n className={classNames(\"nodeLabelRow\", {\n active: isActive,\n hover: hoverKey && node.key === hoverKey,\n matched: searching && node.matchedSelf && !showMatchedNodeOnly,\n fixedActions:\n fixedActionsFor &&\n []\n .concat(fixedActionsFor)\n .some((source) =>\n isMatch(node.data as Record<string, unknown>, source)\n ),\n collapsed: allowCollapse && collapsed,\n collapsible: allowCollapse,\n })}\n >\n <span\n className={classNames(\"nodeLabel\", {\n unreachable: node.unreachable,\n })}\n style={{\n paddingLeft: nodePaddingLeft,\n color: node.labelColor,\n }}\n ref={nodeLabelCallback}\n >\n <span className=\"nodeIconWrapper\">\n {allowCollapse && (\n <span\n className=\"collapseIcon\"\n onClick={handleCollapse}\n onMouseDown={preventMouseEvent}\n title={collapsed ? \"Expand\" : \"Collapse\"}\n role=\"button\"\n >\n <WrappedGeneralIcon\n lib=\"antd\"\n theme=\"outlined\"\n icon={collapsed ? \"right\" : \"down\"}\n />\n </span>\n )}\n <span className=\"nodeIcon\">\n <WrappedGeneralIcon\n {...node.icon}\n style={{\n fontSize: (node.icon as unknown as Record<string, string>)\n ?.imgSrc\n ? 14\n : null,\n color: node.icon?.color,\n }}\n />\n </span>\n </span>\n <span className=\"nodeName\">\n {node.labelPrefix && (\n <span style={node.labelPrefix.style}>\n {node.labelPrefix.text}\n </span>\n )}\n {/* {isTransformName\n ? smartDisplayForEvaluableString(node.name)\n : node.name} */}\n {node.name}\n </span>\n </span>\n <WorkbenchMiniActionBar\n className=\"nodeActionsBar\"\n data={node.data}\n isFirst={isFirst}\n isLast={isLast}\n actions={actions}\n onActionClick={onActionClick}\n actionsHidden={actionsHidden}\n />\n {node.badge && (\n <span className=\"badge\">\n <WrappedGeneralIcon\n {...node.badge}\n style={{ color: node.badge.color }}\n />\n </span>\n )}\n </span>\n </WrappedLink>\n {isLeaf || <TreeList nodes={node.children} level={level + 1} />}\n </li>\n {isDragActive &&\n (allowDragToRoot || level !== 1) &&\n cacheDragStatus === dragStatusEnum.bottom && (\n <PlaceholderDOM\n style={{\n marginLeft: nodePaddingLeft,\n }}\n />\n )}\n </>\n );\n}\n","import _ from \"lodash\";\nimport { WorkbenchNodeData } from \"../interfaces.js\";\n\nexport function getNodeTreeByPath(\n nodes: WorkbenchNodeData[],\n nodeKey: string\n): Array<WorkbenchNodeData> {\n const createNodeByPath = (\n pathList: string[],\n nodes: Array<WorkbenchNodeData>,\n node: WorkbenchNodeData,\n index?: number\n ): void => {\n const path = pathList.shift();\n if (path) {\n pathList.length > 0\n ? pathList.splice(0, 1, `${path}/${pathList[0]}`)\n : pathList;\n const folder = nodes.find(\n (node) => node && node.key === path && node.isContainer\n );\n if (folder) {\n nodes[index] = null;\n createNodeByPath(pathList, folder.children, node);\n } else {\n const newPathList = path.split(\"/\");\n const newNode = {\n name: newPathList.pop(),\n key: path,\n parentPath: newPathList ? newPathList.join(\"/\") : newPathList,\n originKey: node.key,\n data: {\n [nodeKey]: path,\n isContainer: true,\n },\n children: [],\n icon: {\n icon: \"folder\",\n lib: \"antd\",\n theme: \"filled\",\n color: \"orange\",\n },\n isContainer: true,\n } as WorkbenchNodeData;\n if (typeof index === \"number\") {\n nodes[index] = newNode;\n } else {\n nodes.push(newNode);\n }\n createNodeByPath(pathList, newNode.children, node);\n }\n } else {\n nodes.push(node);\n }\n };\n\n nodes.forEach((node, index) => {\n if (node.path) {\n const pathList = node.path.split(\"/\").filter(Boolean);\n createNodeByPath(pathList, nodes, node, index);\n }\n });\n return nodes.filter(Boolean);\n}\n\nexport function getNodesByPathTree(\n nodes: Array<WorkbenchNodeData>\n): Array<WorkbenchNodeData> {\n const result: Array<WorkbenchNodeData> = [];\n const walk = (nodes: Array<WorkbenchNodeData>): void => {\n nodes.forEach((item) => {\n if (item.isContainer) {\n walk(item.children);\n } else {\n result.push(_.omit(item, [\"path\", \"icon\"]) as WorkbenchNodeData);\n }\n });\n };\n walk(nodes);\n return result;\n}\n","export function setDragImage(\n e: DragEvent | React.DragEvent,\n title: string\n): void {\n const canvas = document.createElement(\"canvas\");\n document.body.append(canvas);\n const context = canvas.getContext(\"2d\");\n canvas.width = context.measureText(title).width + 60;\n canvas.height = 20;\n canvas.style.position = \"absolute\";\n canvas.style.left = \"-100%\";\n canvas.style.zIndex = \"-100\";\n\n context.fillStyle = \"#333333\";\n context.fillRect(0, 0, canvas.width, canvas.height);\n\n context.fillStyle = \"#999999\";\n context.font = \"bold 14px Arial\";\n context.fillText(title, 20, 15);\n\n e.dataTransfer.setDragImage(canvas, 0, 0);\n}\n","export function deepFilter<T>(data: Array<T>, q: string): Array<T> {\n const trimmedQuery = q?.trim();\n if (!trimmedQuery) {\n return data.slice();\n }\n return data.filter((item) => deepMatch(item, trimmedQuery.toLowerCase()));\n}\n\nexport function deepMatch(data: unknown, lowerTrimmedQuery: string): boolean {\n switch (typeof data) {\n case \"string\":\n return data.toLowerCase().includes(lowerTrimmedQuery);\n case \"boolean\":\n case \"number\":\n return String(data).includes(lowerTrimmedQuery);\n case \"object\":\n return data === null\n ? \"null\".includes(lowerTrimmedQuery)\n : (Array.isArray(data) ? data : Object.entries(data).flat()).some(\n (item) => deepMatch(item, lowerTrimmedQuery)\n );\n default:\n return false;\n }\n}\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.actionsBar{display:flex;align-items:center;padding:0 3px}.action{display:flex;justify-content:center;align-items:center;width:20px;height:20px;border-radius:5px}.action:hover{color:#fff;background-color:rgba(90,93,94,0.31)}.action{color:#c5c5c5}.disabled,\n.disabled:hover{color:var(--color-disabled-text);cursor:not-allowed;background-color:initial}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n"],"names":["WorkbenchTreeContext","createContext","useWorkbenchTreeContext","useContext","___CSS_LOADER_EXPORT___","push","module","id","toString","WorkbenchActionsContext","useWorkbenchActionsContext","dragStatusEnum","WorkbenchTreeDndContext","useWorkbenchTreeDndContext","WrappedGeneralIcon","wrapBrick","WorkbenchMiniActionBar","_ref","data","className","gap","isFirst","isLast","actions","actionsHidden","onActionClick","enabledActions","useMemo","filter","item","checkIfByTransform","length","React","classNames","style","map","WorkbenchSubAction","key","action","_ref2","disabled","handleActionClick","useCallback","event","preventDefault","stopPropagation","preventMouseEvent","title","role","onClick","onContextMenu","onMouseDown","icon","WrappedLink","treeLevelPadding","borderStyle","SearchingContext","WorkbenchTree","nodes","originNode","placeholder","searchPlaceholder","isDrag","noSearch","allowDrag","allowDragToRoot","allowDragToInside","dropEmit","q","setQ","useState","isDragging","setIsDragging","curNode","setCurNode","curElement","setCurElement","overNode","setOverNode","overElement","setOverElement","overStatus","setOverStatus","isFocus","setIsFocus","nodeKey","onBrickDrop","contextMenuFactory","matchNode","_originNode$slice","createNodeByPath","pathList","node","index","path","shift","splice","folder","find","isContainer","children","newPathList","split","newNode","name","pop","parentPath","join","originKey","lib","theme","color","forEach","Boolean","getNodeTreeByPath","slice","handleSearchChange","target","value","trimmedLowerQ","trim","toLowerCase","filteredNodes","walk","_node$children","matchedSelf","hasMatchedChildren","includes","matched","findDragParent","element","equal","arguments","undefined","draggable","tagName","parentElement","findNode","handleOnDragEnd","useEffect","window","addEventListener","removeEventListener","height","e","focus","onChange","onFocus","onBlur","autoComplete","handleClearInput","Provider","allow","dragElement","dragOverElement","dragStatus","onDragStart","handleOnDragStart","_element$dataset","dataset","container","canvas","document","createElement","body","append","context","getContext","width","measureText","position","left","zIndex","fillStyle","fillRect","font","fillText","dataTransfer","setDragImage","innerText","classnames","hightlight","onDragOver","dom","uid","top","bottom","getBoundingClientRect","status","repair","clientY","inside","getDragState","contains","onDrop","Number","level","realOverNode","findRealNode","i","overUid","filterNodes","flag","realOverKey","newNodes","findIndex","normalizeNode","result","_","getNodesByPathTree","realCurNode","TreeList","lastIndex","checkIfOfComputed","TreeNode","PlaceholderDOM","_ref3","styles","border","opacity","_ref4","_node$children2","_collapsedNodes$inclu","_node$icon","_node$icon2","isLeaf","hoverKey","activeKey","basePaddingLeft","showMatchedNodeOnly","fixedActionsFor","collapsible","collapsedNodes","clickFactory","mouseEnterFactory","mouseLeaveFactory","onNodeToggle","getCollapsedId","skipNotify","nodePaddingLeft","searching","cacheDragStatus","setCacheDragStatus","collapseClicked","setCollapseClicked","collapsed","setCollapsed","onMouseEnter","onMouseLeave","_contextMenuFactory","isActive","nodeLabelCallback","_element$scrollIntoVi","scrollIntoView","call","block","inline","nodeUid","type","parent","$$uid","mountPoint","isDragElement","String","isDragActive","nodeStyle","boxShadow","background","Object","assign","handleCollapse","prev","onLinkClick","_clickFactory","allowCollapse","marginLeft","_extends","tabIndex","url","pathname","get","link","state","notify","pick","active","hover","fixedActions","concat","some","source","isMatch","unreachable","paddingLeft","labelColor","ref","fontSize","imgSrc","labelPrefix","text","badge","deepMatch","lowerTrimmedQuery","Array","isArray","entries","flat"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[3171,5552],{75552:(e,n,t)=>{t.r(n),t.d(n,{i18n:()=>d,i18nText:()=>l,initializeI18n:()=>o});var i=t(75630),s=t(99733),r=t(848);let u=!1;const a=new Set;function o(e,n){if(u||(u=!0,s.i18n.use(r.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&n&&!a.has(e)){a.add(e);for(const[t,i]of Object.entries(n))s.i18n.addResourceBundle(t,e,i)}}var c=t(
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[3171,5552],{75552:(e,n,t)=>{t.r(n),t.d(n,{i18n:()=>d,i18nText:()=>l,initializeI18n:()=>o});var i=t(75630),s=t(99733),r=t(848);let u=!1;const a=new Set;function o(e,n){if(u||(u=!0,s.i18n.use(r.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&n&&!a.has(e)){a.add(e);for(const[t,i]of Object.entries(n))s.i18n.addResourceBundle(t,e,i)}}var c=t(94558);function l(e){var n;if(!e)return;const t=null!==(n=s.i18n.language)&&void 0!==n?n:"zh-CN";if((0,c.hasOwnProperty)(e,t))return e[t];const i=t.split("-")[0];if(i!==t)return(0,c.hasOwnProperty)(e,i)?e[i]:void 0;const r=`${i}-`;for(const n of Object.keys(e))if(n.startsWith(r))return e[n]}const d=i.default}}]);
|
|
2
|
+
//# sourceMappingURL=3171.a0060867.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/
|
|
1
|
+
{"version":3,"file":"chunks/3171.a0060867.js","mappings":"8PAEA,IAAIA,GAAc,EAClB,MAAMC,EAAwB,IAAIC,IAC3B,SAASC,EAAeC,EAAIC,GAwBjC,GAvBKL,IACHA,GAAc,EACd,EAAAM,KAICC,IAAmF,WAEnFC,KAAK,CACJC,YAAa,KACbC,OAAO,EACPC,cAAe,CAAC,KAAM,MACtBC,0BAA0B,EAC1BC,cAAe,CACbC,aAAa,GAEfC,MAAO,CACLC,aAAa,GAEfC,kBAAmB,KACnBC,UAAW,CAAC,KAGXd,GAAOC,IAAWJ,EAAsBkB,IAAIf,GAAjD,CAGAH,EAAsBmB,IAAIhB,GAC1B,IAAK,MAAOiB,EAAMH,KAAcI,OAAOC,QAAQlB,GAC7C,EAAAC,KAAKkB,kBAAkBH,EAAMjB,EAAIc,EAHnC,CAKF,C,eCjCO,SAASO,EAASC,GACvB,IAAIC,EACJ,IAAKD,EACH,OAEF,MAAME,EAAgD,QAApCD,EAAiB,EAAArB,KAAKsB,gBAAyC,IAAnBD,EAA4BA,EAAiB,QAE3G,IAAI,IAAAE,gBAAeH,EAAME,GACvB,OAAOF,EAAKE,GAGd,MAAME,EAAkBF,EAASG,MAAM,KAAK,GAC5C,GAAID,IAAoBF,EAGtB,OAAO,IAAAC,gBAAeH,EAAMI,GAAmBJ,EAAKI,QAAmBE,EAKzE,MAAMC,EAAS,GAAGH,KAClB,IAAK,MAAMI,KAAOZ,OAAOa,KAAKT,GAC5B,GAAIQ,EAAIE,WAAWH,GACjB,OAAOP,EAAKQ,EAGlB,CC3BO,MAAM5B,EAA6E,S","sources":["webpack:///../../node_modules/@next-core/i18n/dist/esm/init.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/text.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/index.js"],"sourcesContent":["import { i18n } from \"@next-core/i18n\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nlet initialized = false;\nconst initializedNamespaces = new Set();\nexport function initializeI18n(NS, locales) {\n if (!initialized) {\n initialized = true;\n i18n\n // learn more: https://github.com/i18next/i18next-xhr-backend\n // .use(Backend)\n // learn more: https://github.com/i18next/i18next-browser-languageDetector\n .use(process.env.NODE_ENV === \"test\" ? LanguageDetector : /* istanbul ignore next */LanguageDetector.default)\n // for all options read: https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: \"zh\",\n debug: process.env.NODE_ENV === \"development\",\n supportedLngs: [\"zh\", \"en\"],\n nonExplicitSupportedLngs: true,\n interpolation: {\n escapeValue: false // not needed for react as it escapes by default\n },\n react: {\n useSuspense: false\n },\n compatibilityJSON: \"v3\",\n resources: {}\n });\n }\n if (!NS || !locales || initializedNamespaces.has(NS)) {\n return;\n }\n initializedNamespaces.add(NS);\n for (const [lang, resources] of Object.entries(locales)) {\n i18n.addResourceBundle(lang, NS, resources);\n }\n}\n//# sourceMappingURL=init.js.map","import { i18n } from \"@next-core/i18n\";\nimport { hasOwnProperty } from \"@next-core/utils/general\";\nexport function i18nText(data) {\n var _i18n$language;\n if (!data) {\n return;\n }\n const language = (_i18n$language = i18n.language) !== null && _i18n$language !== void 0 ? _i18n$language : \"zh-CN\";\n // First, make a perfect match.\n if (hasOwnProperty(data, language)) {\n return data[language];\n }\n // https://en.wikipedia.org/wiki/IETF_language_tag\n const primaryLanguage = language.split(\"-\")[0];\n if (primaryLanguage !== language) {\n // Then, match the primary language (which omits other subtags).\n // E.g., match `zh` if the current language is `zh-CN`.\n return hasOwnProperty(data, primaryLanguage) ? data[primaryLanguage] : undefined;\n }\n // At last, match the first key which starts with the primary language,\n // if the current language contains primary subtag only.\n // E.g., match `zh-CN` if the current language is `zh`.\n const prefix = `${primaryLanguage}-`;\n for (const key of Object.keys(data)) {\n if (key.startsWith(prefix)) {\n return data[key];\n }\n }\n}\n//# sourceMappingURL=text.js.map","import i18next from \"i18next\";\nexport const i18n = process.env.NODE_ENV === \"test\" ? i18next : /* istanbul ignore next */i18next.default;\nexport * from \"./init.js\";\nexport * from \"./text.js\";\n//# sourceMappingURL=index.js.map"],"names":["initialized","initializedNamespaces","Set","initializeI18n","NS","locales","i18n","use","init","fallbackLng","debug","supportedLngs","nonExplicitSupportedLngs","interpolation","escapeValue","react","useSuspense","compatibilityJSON","resources","has","add","lang","Object","entries","addResourceBundle","i18nText","data","_i18n$language","language","hasOwnProperty","primaryLanguage","split","undefined","prefix","key","keys","startsWith"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[4291],{54291:(i,e,n)=>{n.r(e),n.d(e,{pipes:()=>t,utils:()=>r});var r={};n.r(r),n.d(r,{convertUnitValueByPrecision:()=>Ti,formatUnitValue:()=>Gi});var t={};function s(i,e){return i+e}function a(i){return"0"!==i&&Boolean(i)}n.r(t),n.d(t,{add:()=>s,atobUnicode:()=>ji,bool:()=>o,boolean:()=>a,btoaUnicode:()=>Ii,cmdbInstanceShowName:()=>d,countBy:()=>c,datetime:()=>p,deltaTime:()=>v,divide:()=>B,equal:()=>m,find:()=>g,findIndex:()=>h,findLast:()=>M,findLastIndex:()=>w,get:()=>k,graphTree:()=>S,groupBy:()=>P,groupByToIndex:()=>L,includes:()=>C,join:()=>N,json:()=>A,jsonStringify:()=>x,keyBy:()=>j,map:()=>I,mapToArray:()=>O,mergeArrayByKey:()=>R,multiply:()=>D,not:()=>E,nullish:()=>U,number:()=>H,parseTimeRange:()=>Y,randomString:()=>q,reverse:()=>F,round:()=>xi,slice:()=>J,sort:()=>W,split:()=>z,string:()=>V,substr:()=>Q,substring:()=>X,subtract:()=>Z,ternary:()=>$,uniq:()=>ii,unitFormat:()=>Li,yaml:()=>Ni,yamlStringify:()=>Ai});var o=a;function d(i){if(Array.isArray(i)){var e=i[0]||"",n=i.slice(1,i.length).join(",");return n?e+(e?"("+n+")":""+n):e||"-"}return i}var u=n(41030);function c(i,e){return(0,u.countBy)(i,e)}var l=n(21302),y=n.n(l);function p(i,e){return y()(i).format(e)}function f(i){return"object"==typeof i&&null!==i}function b(i,e){return"number"==typeof i?y()(i):y()(i,e)}function v(i,e,n){if(void 0===e&&(e=!0),void 0===n&&(n="YYYY-MM-DD HH:mm:ss"),!i)return"";if(f(i)&&i.startTime&&i.endTime){var r=b(i.startTime,n),t=b(i.endTime,n);return y().duration(t.diff(r)).humanize(e)}var s=b(f(i)?i.startTime||i.endTime:i,n);return y().duration(s.diff(y()())).humanize(e)}function B(i,e){return i/e}function m(i,e){return(0,u.isEqual)(i,e)}function g(i,e,n){return(0,u.find)(i,e,n)}function h(i,e,n){return(0,u.findIndex)(i,e,n)}function M(i,e,n){return(0,u.findLast)(i,e,n)}function w(i,e,n){return(0,u.findLastIndex)(i,e,n)}function k(i,e,n){return(0,u.get)(i,e,n)}function S(i,e){var n,r;if(!i)return[];var t=null==e?void 0:e.sort,s=(0,u.groupBy)(i.edges,"out"),a=function(e){var n=s[e.instanceId];if((0,u.forEach)(n,(function(n){var r=n.out_name,t=(0,u.find)(i.vertices,["instanceId",n.in]);if(t){var s=a(t);e[r]?e[r].push(s):e[r]=[s]}})),t){var r=(0,u.uniq)((0,u.map)(n,"out_name"));(0,u.forEach)(r,(function(i){(0,u.isEmpty)(e[i])||(e[i]=(0,u.orderBy)(e[i],(function(i){var e;return null!==(e=(0,u.get)(i,t.key))&&void 0!==e?e:-1/0}),-1===t.order?"desc":"asc"))}))}return e};return null!==(r=null===(n=i.topic_vertices)||void 0===n?void 0:n.map((function(i){return a(i)})))&&void 0!==r?r:[]}function P(i,e){return(0,u.groupBy)(i,e)}var K,T,G=n(85608);function L(i,e,n){var r=i;if(!(0,u.isNil)(e)&&!(0,u.isNil)(n)){var t=(0,u.groupBy)(i,e),s=(0,u.keys)(t).sort();r=r.map((function(i){var r=(0,G.Cl)({},i);return(0,u.set)(r,n,(0,u.indexOf)(s,(0,u.get)(i,e))),r}))}return r}function C(i,e){return i.includes(e)}function N(i,e){return void 0===e&&(e=","),Array.isArray(i)?i.join(e):""}function A(i){if((0,u.isNil)(i))return i;try{return JSON.parse(i)}catch(i){return void console.error(i)}}function x(i,e){void 0===e&&(e=2);try{return JSON.stringify(i,null,e)}catch(i){return void console.error(i)}}function j(i,e){return(0,u.keyBy)(i,e)}function I(i,e){return Array.isArray(i)?i.map((function(i){return(0,u.get)(i,e)})):[]}function O(i,e,n){return"object"==typeof i&&i?Object.entries(i).map((function(i){var r,t=i[0],s=i[1];return(r={})[e]=t,r[n]=s,r})):[]}function R(i,e){return i.reduce((function(i,n){return Object.values((0,u.mergeWith)((0,u.keyBy)(i,e),(0,u.keyBy)(n,e),_))}),[])}function _(i,e){if((0,u.isArray)(i))return i.concat(e)}function D(i,e){return i*e}function E(i){return!i}function U(i,e){return null!=i?i:e}function H(i){return Number(i)}function Y(i){if("now/d"===i)return+y()().startOf("day");if("now/y"===i)return+y()().startOf("year");var e=/^now-(\d+)(\w+)/.exec(i);if(null!==e){var n=e[1],r=e[2];return+y()().subtract(n,r)}return i?+i:+y()()}function q(i,e){i=i>0?i:8,e="string"==typeof e?e:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var n="",r=0;r<i;r++)n+=e.charAt(Math.floor(Math.random()*e.length));return n}function F(i){return Array.isArray(i)?i.slice().reverse():[]}function J(i,e,n){return i.slice(e,n)}function W(i,e){return Array.isArray(i)?(0,u.sortBy)(i,e):[]}function z(i,e){return"string"==typeof i?i.split(e):[]}function V(i){return null==i?"":String(i)}function Q(i,e,n){return"string"==typeof i?i.substr(e,n):""}function X(i,e,n){return"string"==typeof i?i.substring(e,n):""}function Z(i,e){return i-e}function $(i,e,n){return i?e:n}function ii(i){return(0,u.uniq)(i)}!function(i){i.Time="time",i.Byte="byte",i.Bibyte="bibyte",i.BitRate="bitRate",i.ByteRate="byteRate"}(K||(K={})),function(i){i.Percent1="percent(1)",i.Percent100="percent(100)"}(T||(T={}));var ei,ni=[T.Percent1,T.Percent100];!function(i){i.Bytes="bytes",i.Kilobytes="kilobytes",i.Megabytes="megabytes",i.Gigabytes="gigabytes",i.Terabytes="terabytes",i.Petabytes="petabytes",i.Bibytes="bibytes",i.Kibibytes="kibibytes",i.Mebibytes="mebibytes",i.Gibibytes="gibibytes",i.Tebibytes="tebibytes",i.Pebibytes="pebibytes",i.b="b",i.B="B",i.KB="KB",i.MB="MB",i.GB="GB"}(ei||(ei={}));var ri,ti=[{id:ei.Bytes,alias:["B","bytes(B)"],divisor:1,display:"B"},{id:ei.Kilobytes,alias:["KB","kilobytes(KB)"],divisor:1e3,display:"KB"},{id:ei.Megabytes,alias:["MB","megabytes(MB)"],divisor:Math.pow(1e3,2),display:"MB"},{id:ei.Gigabytes,alias:["GB","gigabytes(GB)"],divisor:Math.pow(1e3,3),display:"GB"},{id:ei.Terabytes,alias:["TB","terabytes(TB)"],divisor:Math.pow(1e3,4),display:"TB"},{id:ei.Petabytes,alias:["PB","petabytes(PB)"],divisor:Math.pow(1e3,5),display:"PB"}],si=[{id:ei.Bibytes,alias:["B","bibytes(B)"],divisor:1,display:"B"},{id:ei.Kibibytes,alias:["KiB","kibibytes(KiB)"],divisor:1024,display:"KiB"},{id:ei.Mebibytes,alias:["MiB","mebibytes(MiB)"],divisor:Math.pow(1024,2),display:"MiB"},{id:ei.Gibibytes,alias:["GiB","gibibytes(GiB)"],divisor:Math.pow(1024,3),display:"GiB"},{id:ei.Tebibytes,alias:["TiB","tebibytes(TiB)"],divisor:Math.pow(1024,4),display:"TiB"},{id:ei.Pebibytes,alias:["PiB","pebibytes(PiB)"],divisor:Math.pow(1024,5),display:"PiB"}],ai=[{id:ei.b,divisor:1,display:"b"},{id:ei.B,divisor:8,display:"B"},{id:ei.KB,divisor:8192,display:"KB"},{id:ei.MB,divisor:8388608,display:"MB"},{id:ei.GB,divisor:8589934592,display:"GB"}];!function(i){i.BitsPerSecond="bits/sec",i.KilobitsPerSecond="kilobits/sec",i.MegabitsPerSecond="megabits/sec",i.GigabitsPerSecond="gigabits/sec",i.BytesPerSecond="bytes/sec",i.KilobytesPerSecond="kilobytes/sec",i.MegabytesPerSecond="megabytes/sec",i.GigabytesPerSecond="gigabytes/sec",i.bps="bps",i.Bps="Bps",i.KBps="KBps",i.MBps="MBps",i.GBps="GBps"}(ri||(ri={}));var oi,di=[{id:ri.BitsPerSecond,alias:["bps","bits/sec(bps)"],divisor:1,display:"bps"},{id:ri.KilobitsPerSecond,alias:["Kbps","kilobits/sec(Kbps)"],divisor:1024,display:"Kbps"},{id:ri.MegabitsPerSecond,alias:["Mbps","megabits/sec(Mbps)"],divisor:1048576,display:"Mbps"},{id:ri.GigabitsPerSecond,alias:["Gbps","gigabits/sec(Gbps)"],divisor:1073741824,display:"Gbps"}],ui=[{id:ri.BytesPerSecond,alias:["Bps","bytes/sec(Bps)"],divisor:8,display:"Bps"},{id:ri.KilobytesPerSecond,alias:["KBps","kilobytes/sec(KBps)"],divisor:8192,display:"KBps"},{id:ri.MegabytesPerSecond,alias:["MBps","megabytes/sec(MBps)"],divisor:8388608,display:"MBps"},{id:ri.GigabytesPerSecond,alias:["GBps","gigabytes/sec(GBps)"],divisor:8589934592,display:"GBps"}],ci=[{id:ri.bps,divisor:1,display:"bps"},{id:ri.Bps,divisor:8,display:"Bps"},{id:ri.KBps,divisor:8192,display:"KBps"},{id:ri.MBps,divisor:8388608,display:"MBps"},{id:ri.GBps,divisor:8589934592,display:"GBps"}];!function(i){i.Nanosecond="nanoseconds",i.Microsecond="microseconds",i.Milliseconds="milliseconds",i.Seconds="seconds",i.Minutes="minutes",i.Hours="hours",i.Days="days",i.Weeks="weeks",i.Months="months",i.Years="years",i.ms="ms",i.s="s",i.min="min",i.hour="hour",i.day="day",i.week="week"}(oi||(oi={}));var li,yi,pi=[{id:oi.Nanosecond,alias:["ns","nanoseconds(ns)"],divisor:1,display:"ns"},{id:oi.Microsecond,alias:["μs","microseconds(μs)"],divisor:1e3,display:"μs"},{id:oi.Milliseconds,alias:["ms","milliseconds(ms)"],divisor:1e6,display:"ms"},{id:oi.Seconds,alias:["s","seconds(s)"],divisor:1e9,display:"s"},{id:oi.Minutes,alias:["min","minutes(min)"],divisor:6e10,display:"min"},{id:oi.Hours,alias:["hour","hours(hour)"],divisor:36e11,display:"hour"},{id:oi.Days,alias:["day","days(day)"],divisor:864e11,display:"day"},{id:oi.Weeks,alias:["week","weeks(week)"],divisor:6048e11,display:"week"},{id:oi.Months,alias:["month","months(month)"],divisor:2592e12,display:"month"},{id:oi.Years,alias:["year","years(year)"],divisor:31536e12,display:"year"}];oi.ms,oi.s,oi.min,oi.hour,oi.day,oi.week,(li={})[K.Time]=pi,li[K.Byte]=ti,li[K.Bibyte]=si,li[K.BitRate]=di,li[K.ByteRate]=ui,function(i){i.None="none",i.K="K",i.M="M",i.B="B",i.T="T"}(yi||(yi={}));var fi,bi,vi=[{id:yi.None,divisor:1,display:""},{id:yi.K,divisor:1e3,display:"K"},{id:yi.M,divisor:1e6,display:"M"},{id:yi.B,divisor:1e9,display:"B"},{id:yi.T,divisor:1e12,display:"T"}],Bi=function(i,e){return i.id.toLocaleLowerCase()===(null==e?void 0:e.toLocaleLowerCase())||i.alias&&i.alias.map((function(i){return i.toLocaleLowerCase()})).includes(e)},mi=function(i,e){return i.id.toLocaleLowerCase()===(null==e?void 0:e.toLocaleLowerCase())||i.alias&&i.alias.includes(e)},gi=[pi],hi=[].concat.apply([],gi.map((function(i){return(0,G.aN)(i.map((function(i){return i.id})),[].concat.apply([],i.map((function(i){return i.alias?i.alias:[]}))))}))),Mi=[ti,si,ai],wi=[].concat.apply([],Mi.map((function(i){return(0,G.aN)(i.map((function(i){return i.id})),[].concat.apply([],i.map((function(i){return i.alias?i.alias:[]}))))}))),ki=[di,ui,ci],Si=[].concat.apply([],ki.map((function(i){return(0,G.aN)(i.map((function(i){return i.id})),[].concat.apply([],i.map((function(i){return i.alias?i.alias:[]}))))}))),Pi=function(i,e,n){var r=0,t=Math.sign(i),s=Math.abs(i);if(e){var a=vi.findIndex((function(i){return i.id.toLocaleLowerCase()===e.toLocaleLowerCase()}));-1!==a&&(r=a)}for(var o=vi[r],d=r+1;d<vi.length&&s/(vi[d].divisor/vi[r].divisor)>=1;++d)o=vi[d];return o.id===yi.None?(t*s).toFixed(null!=n?n:2):(s/(o.divisor/vi[r].divisor)*t).toFixed(null!=n?n:2)+o.display};!function(i){i.None="none",i.Short="short",i.Percent="percent",i.Time="time",i.Data="data",i.DataRate="data_rate"}(bi||(bi={}));var Ki=((fi={})[bi.None]=[],fi[bi.Short]=[],fi[bi.Percent]=ni,fi[bi.Time]=hi,fi[bi.Data]=wi,fi[bi.DataRate]=Si,fi),Ti=function(i,e){return void 0===e?i.toString():i.toFixed(e)},Gi=function(i,e){if(!e)return[Pi(i),null];var n=e.type;n||(e.unit?(n=bi.Short,Object.entries(Ki).map((function(i){var r=i[0];i[1].map((function(i){return i.toLocaleLowerCase()})).includes(e.unit.toLocaleLowerCase())&&(n=r)}))):n=bi.None);var r=void 0===(null==e?void 0:e.precision)?2:e.precision;switch(n){case bi.Percent:var t=function(i,e){return e&&e.toLocaleLowerCase()===T.Percent100.toLocaleLowerCase()?i:100*i}(i,e.unit);return[Ti(t,r)+"%",null];case bi.Time:var s=function(i,e,n){var r=0,t=2,s=-1;if(e)for(var a=function(i){var a=-1,o=-1;if(gi[i].forEach((function(i,r){Bi(i,e)&&(a=r),Bi(i,n)&&(o=r)})),-1!==a)return r=i,t=a,s=o,"break"},o=0;o<gi.length&&"break"!==a(o);++o);else n&&(s=gi[r].findIndex((function(i){return Bi(i,n)})));var d=gi[r],u=d[t],c=u;if(-1===s)for(o=t+1;o<d.length&&i/(d[o].divisor/u.divisor)>=1;++o)c=d[o];else c=d[s];return n&&-1===s&&console.warn('Cannot convert unit "'+(e||u.display)+'" to "'+n+'"'),[i/(c.divisor/u.divisor),c.display]}(i,e.unit,e.targetUnit),a=s[0],o=s[1];return[""+Ti(a,void 0===(null==e?void 0:e.precision)?1:e.precision),o];case bi.Data:var d=function(i,e,n){var r=Mi.length-1,t=0,s=-1,a=Math.sign(i),o=Math.abs(i);if(e)for(var d=function(i){var a=-1,o=-1;if(Mi[i].forEach((function(i,r){mi(i,e)&&(a=r),mi(i,n)&&(o=r)})),-1!==a)return r=i,t=a,s=o,"break"},u=0;u<Mi.length&&"break"!==d(u);++u);else n&&(s=Mi[r].findIndex((function(i){return mi(i,n)})));var c=Mi[r],l=c[t],y=l;if(-1===s)for(u=t+1;u<c.length&&o/(c[u].divisor/l.divisor)>=1;++u)y=c[u];else y=c[s];return n&&-1===s&&console.warn('Cannot convert unit "'+(e||l.display)+'" to "'+n+'"'),[o/(y.divisor/l.divisor)*a,y.display]}(i,e.unit,e.targetUnit),u=d[0],c=d[1];return[""+Ti(u,r),c];case bi.DataRate:var l=function(i,e,n){var r=ki.length-1,t=0,s=-1,a=Math.sign(i),o=Math.abs(i);if(e)for(var d=function(i){var a=-1,o=-1;if(ki[i].forEach((function(i,r){Bi(i,e)&&(a=r),Bi(i,n)&&(o=r)})),-1!==a)return r=i,t=a,s=o,"break"},u=0;u<ki.length&&"break"!==d(u);++u);else n&&(s=ki[r].findIndex((function(i){return Bi(i,n)})));var c=ki[r],l=c[t],y=l;if(-1===s)for(u=t+1;u<c.length&&o/(c[u].divisor/l.divisor)>=1;++u)y=c[u];else y=c[s];return n&&-1===s&&console.warn('Cannot convert unit "'+(e||l.display)+'" to "'+n+'"'),[o/(y.divisor/l.divisor)*a,y.display]}(i,e.unit,e.targetUnit),y=l[0],p=l[1];return[""+Ti(y,r),p];case bi.None:return[Ti(i,r),""];default:return[Pi(i,e.unit,r),e.unit]}};function Li(i,e,n,r){return void 0===n&&(n=2),Gi(i,{unit:e,precision:n,targetUnit:r})}var Ci=n(55310);function Ni(i){var e;try{e=(0,Ci.safeLoad)(i,{schema:Ci.JSON_SCHEMA,json:!0})}catch(i){console.error(i)}return e}function Ai(i,e,n){var r;void 0===e&&(e=2);try{r=(0,Ci.safeDump)(i,{indent:e,schema:Ci.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0,sortKeys:null==n?void 0:n.sortKeys})}catch(i){console.error(i)}return r}function xi(i,e){return(0,u.round)(i,e)}function ji(i){return decodeURIComponent(atob(i).split("").map((function(i){return"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)})).join(""))}function Ii(i){return btoa(encodeURIComponent(i).replace(/%([0-9A-F]{2})/g,(function(i,e){return String.fromCharCode(Number("0x"+e))})))}},85608:(i,e,n)=>{n.d(e,{Cl:()=>r,aN:()=>t});var r=function(){return r=Object.assign||function(i){for(var e,n=1,r=arguments.length;n<r;n++)for(var t in e=arguments[n])Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);return i},r.apply(this,arguments)};function t(){for(var i=0,e=0,n=arguments.length;e<n;e++)i+=arguments[e].length;var r=Array(i),t=0;for(e=0;e<n;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,t++)r[t]=s[a];return r}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError}}]);
|
|
2
|
-
//# sourceMappingURL=4291.
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[4291],{54291:(i,e,n)=>{n.r(e),n.d(e,{pipes:()=>t,utils:()=>r});var r={};n.r(r),n.d(r,{convertUnitValueByPrecision:()=>Ti,formatUnitValue:()=>Gi});var t={};function s(i,e){return i+e}function a(i){return"0"!==i&&Boolean(i)}n.r(t),n.d(t,{add:()=>s,atobUnicode:()=>ji,bool:()=>o,boolean:()=>a,btoaUnicode:()=>Ii,cmdbInstanceShowName:()=>d,countBy:()=>c,datetime:()=>p,deltaTime:()=>v,divide:()=>B,equal:()=>m,find:()=>g,findIndex:()=>h,findLast:()=>M,findLastIndex:()=>w,get:()=>k,graphTree:()=>S,groupBy:()=>P,groupByToIndex:()=>C,includes:()=>L,join:()=>N,json:()=>A,jsonStringify:()=>x,keyBy:()=>j,map:()=>I,mapToArray:()=>O,mergeArrayByKey:()=>R,multiply:()=>D,not:()=>E,nullish:()=>U,number:()=>H,parseTimeRange:()=>Y,randomString:()=>q,reverse:()=>F,round:()=>xi,slice:()=>J,sort:()=>W,split:()=>z,string:()=>V,substr:()=>Q,substring:()=>X,subtract:()=>Z,ternary:()=>$,uniq:()=>ii,unitFormat:()=>Ci,yaml:()=>Ni,yamlStringify:()=>Ai});var o=a;function d(i){if(Array.isArray(i)){var e=i[0]||"",n=i.slice(1,i.length).join(",");return n?e+(e?"("+n+")":""+n):e||"-"}return i}var u=n(41030);function c(i,e){return(0,u.countBy)(i,e)}var l=n(21302),y=n.n(l);function p(i,e){return y()(i).format(e)}function f(i){return"object"==typeof i&&null!==i}function b(i,e){return"number"==typeof i?y()(i):y()(i,e)}function v(i,e,n){if(void 0===e&&(e=!0),void 0===n&&(n="YYYY-MM-DD HH:mm:ss"),!i)return"";if(f(i)&&i.startTime&&i.endTime){var r=b(i.startTime,n),t=b(i.endTime,n);return y().duration(t.diff(r)).humanize(e)}var s=b(f(i)?i.startTime||i.endTime:i,n);return y().duration(s.diff(y()())).humanize(e)}function B(i,e){return i/e}function m(i,e){return(0,u.isEqual)(i,e)}function g(i,e,n){return(0,u.find)(i,e,n)}function h(i,e,n){return(0,u.findIndex)(i,e,n)}function M(i,e,n){return(0,u.findLast)(i,e,n)}function w(i,e,n){return(0,u.findLastIndex)(i,e,n)}function k(i,e,n){return(0,u.get)(i,e,n)}function S(i,e){var n,r;if(!i)return[];var t=null==e?void 0:e.sort,s=(0,u.groupBy)(i.edges,"out"),a=function(e){var n=s[e.instanceId];if((0,u.forEach)(n,(function(n){var r=n.out_name,t=(0,u.find)(i.vertices,["instanceId",n.in]);if(t){var s=a(t);e[r]?e[r].push(s):e[r]=[s]}})),t){var r=(0,u.uniq)((0,u.map)(n,"out_name"));(0,u.forEach)(r,(function(i){(0,u.isEmpty)(e[i])||(e[i]=(0,u.orderBy)(e[i],(function(i){var e;return null!==(e=(0,u.get)(i,t.key))&&void 0!==e?e:-1/0}),-1===t.order?"desc":"asc"))}))}return e};return null!==(r=null===(n=i.topic_vertices)||void 0===n?void 0:n.map((function(i){return a(i)})))&&void 0!==r?r:[]}function P(i,e){return(0,u.groupBy)(i,e)}var K,T,G=n(85608);function C(i,e,n){var r=i;if(!(0,u.isNil)(e)&&!(0,u.isNil)(n)){var t=(0,u.groupBy)(i,e),s=(0,u.keys)(t).sort();r=r.map((function(i){var r=(0,G.Cl)({},i);return(0,u.set)(r,n,(0,u.indexOf)(s,(0,u.get)(i,e))),r}))}return r}function L(i,e){return i.includes(e)}function N(i,e){return void 0===e&&(e=","),Array.isArray(i)?i.join(e):""}function A(i){if((0,u.isNil)(i))return i;try{return JSON.parse(i)}catch(i){return void console.error(i)}}function x(i,e){void 0===e&&(e=2);try{return JSON.stringify(i,null,e)}catch(i){return void console.error(i)}}function j(i,e){return(0,u.keyBy)(i,e)}function I(i,e){return Array.isArray(i)?i.map((function(i){return(0,u.get)(i,e)})):[]}function O(i,e,n){return"object"==typeof i&&i?Object.entries(i).map((function(i){var r,t=i[0],s=i[1];return(r={})[e]=t,r[n]=s,r})):[]}function R(i,e){return i.reduce((function(i,n){return Object.values((0,u.mergeWith)((0,u.keyBy)(i,e),(0,u.keyBy)(n,e),_))}),[])}function _(i,e){if((0,u.isArray)(i))return i.concat(e)}function D(i,e){return i*e}function E(i){return!i}function U(i,e){return null!=i?i:e}function H(i){return Number(i)}function Y(i){if("now/d"===i)return+y()().startOf("day");if("now/y"===i)return+y()().startOf("year");var e=/^now-(\d+)(\w+)/.exec(i);if(null!==e){var n=e[1],r=e[2];return+y()().subtract(n,r)}return i?+i:+y()()}function q(i,e){i=i>0?i:8,e="string"==typeof e?e:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var n="",r=0;r<i;r++)n+=e.charAt(Math.floor(Math.random()*e.length));return n}function F(i){return Array.isArray(i)?i.slice().reverse():[]}function J(i,e,n){return i.slice(e,n)}function W(i,e){return Array.isArray(i)?(0,u.sortBy)(i,e):[]}function z(i,e){return"string"==typeof i?i.split(e):[]}function V(i){return null==i?"":String(i)}function Q(i,e,n){return"string"==typeof i?i.substr(e,n):""}function X(i,e,n){return"string"==typeof i?i.substring(e,n):""}function Z(i,e){return i-e}function $(i,e,n){return i?e:n}function ii(i){return(0,u.uniq)(i)}!function(i){i.Time="time",i.Byte="byte",i.Bibyte="bibyte",i.BitRate="bitRate",i.ByteRate="byteRate"}(K||(K={})),function(i){i.Percent1="percent(1)",i.Percent100="percent(100)"}(T||(T={}));var ei,ni=[T.Percent1,T.Percent100];!function(i){i.Bytes="bytes",i.Kilobytes="kilobytes",i.Megabytes="megabytes",i.Gigabytes="gigabytes",i.Terabytes="terabytes",i.Petabytes="petabytes",i.Bibytes="bibytes",i.Kibibytes="kibibytes",i.Mebibytes="mebibytes",i.Gibibytes="gibibytes",i.Tebibytes="tebibytes",i.Pebibytes="pebibytes",i.b="b",i.B="B",i.KB="KB",i.MB="MB",i.GB="GB"}(ei||(ei={}));var ri,ti=[{id:ei.Bytes,alias:["B","bytes(B)"],divisor:1,display:"B"},{id:ei.Kilobytes,alias:["KB","kilobytes(KB)"],divisor:1e3,display:"KB"},{id:ei.Megabytes,alias:["MB","megabytes(MB)"],divisor:Math.pow(1e3,2),display:"MB"},{id:ei.Gigabytes,alias:["GB","gigabytes(GB)"],divisor:Math.pow(1e3,3),display:"GB"},{id:ei.Terabytes,alias:["TB","terabytes(TB)"],divisor:Math.pow(1e3,4),display:"TB"},{id:ei.Petabytes,alias:["PB","petabytes(PB)"],divisor:Math.pow(1e3,5),display:"PB"}],si=[{id:ei.Bibytes,alias:["B","bibytes(B)"],divisor:1,display:"B"},{id:ei.Kibibytes,alias:["KiB","kibibytes(KiB)"],divisor:1024,display:"KiB"},{id:ei.Mebibytes,alias:["MiB","mebibytes(MiB)"],divisor:Math.pow(1024,2),display:"MiB"},{id:ei.Gibibytes,alias:["GiB","gibibytes(GiB)"],divisor:Math.pow(1024,3),display:"GiB"},{id:ei.Tebibytes,alias:["TiB","tebibytes(TiB)"],divisor:Math.pow(1024,4),display:"TiB"},{id:ei.Pebibytes,alias:["PiB","pebibytes(PiB)"],divisor:Math.pow(1024,5),display:"PiB"}],ai=[{id:ei.b,divisor:1,display:"b"},{id:ei.B,divisor:8,display:"B"},{id:ei.KB,divisor:8192,display:"KB"},{id:ei.MB,divisor:8388608,display:"MB"},{id:ei.GB,divisor:8589934592,display:"GB"}];!function(i){i.BitsPerSecond="bits/sec",i.KilobitsPerSecond="kilobits/sec",i.MegabitsPerSecond="megabits/sec",i.GigabitsPerSecond="gigabits/sec",i.BytesPerSecond="bytes/sec",i.KilobytesPerSecond="kilobytes/sec",i.MegabytesPerSecond="megabytes/sec",i.GigabytesPerSecond="gigabytes/sec",i.bps="bps",i.Bps="Bps",i.KBps="KBps",i.MBps="MBps",i.GBps="GBps"}(ri||(ri={}));var oi,di=[{id:ri.BitsPerSecond,alias:["bps","bits/sec(bps)"],divisor:1,display:"bps"},{id:ri.KilobitsPerSecond,alias:["Kbps","kilobits/sec(Kbps)"],divisor:1024,display:"Kbps"},{id:ri.MegabitsPerSecond,alias:["Mbps","megabits/sec(Mbps)"],divisor:1048576,display:"Mbps"},{id:ri.GigabitsPerSecond,alias:["Gbps","gigabits/sec(Gbps)"],divisor:1073741824,display:"Gbps"}],ui=[{id:ri.BytesPerSecond,alias:["Bps","bytes/sec(Bps)"],divisor:8,display:"Bps"},{id:ri.KilobytesPerSecond,alias:["KBps","kilobytes/sec(KBps)"],divisor:8192,display:"KBps"},{id:ri.MegabytesPerSecond,alias:["MBps","megabytes/sec(MBps)"],divisor:8388608,display:"MBps"},{id:ri.GigabytesPerSecond,alias:["GBps","gigabytes/sec(GBps)"],divisor:8589934592,display:"GBps"}],ci=[{id:ri.bps,divisor:1,display:"bps"},{id:ri.Bps,divisor:8,display:"Bps"},{id:ri.KBps,divisor:8192,display:"KBps"},{id:ri.MBps,divisor:8388608,display:"MBps"},{id:ri.GBps,divisor:8589934592,display:"GBps"}];!function(i){i.Nanosecond="nanoseconds",i.Microsecond="microseconds",i.Milliseconds="milliseconds",i.Seconds="seconds",i.Minutes="minutes",i.Hours="hours",i.Days="days",i.Weeks="weeks",i.Months="months",i.Years="years",i.ms="ms",i.s="s",i.min="min",i.hour="hour",i.day="day",i.week="week"}(oi||(oi={}));var li,yi,pi=[{id:oi.Nanosecond,alias:["ns","nanoseconds(ns)"],divisor:1,display:"ns"},{id:oi.Microsecond,alias:["μs","microseconds(μs)"],divisor:1e3,display:"μs"},{id:oi.Milliseconds,alias:["ms","milliseconds(ms)"],divisor:1e6,display:"ms"},{id:oi.Seconds,alias:["s","seconds(s)"],divisor:1e9,display:"s"},{id:oi.Minutes,alias:["min","minutes(min)"],divisor:6e10,display:"min"},{id:oi.Hours,alias:["hour","hours(hour)"],divisor:36e11,display:"hour"},{id:oi.Days,alias:["day","days(day)"],divisor:864e11,display:"day"},{id:oi.Weeks,alias:["week","weeks(week)"],divisor:6048e11,display:"week"},{id:oi.Months,alias:["month","months(month)"],divisor:2592e12,display:"month"},{id:oi.Years,alias:["year","years(year)"],divisor:31536e12,display:"year"}];oi.ms,oi.s,oi.min,oi.hour,oi.day,oi.week,(li={})[K.Time]=pi,li[K.Byte]=ti,li[K.Bibyte]=si,li[K.BitRate]=di,li[K.ByteRate]=ui,function(i){i.None="none",i.K="K",i.M="M",i.B="B",i.T="T"}(yi||(yi={}));var fi,bi,vi=[{id:yi.None,divisor:1,display:""},{id:yi.K,divisor:1e3,display:"K"},{id:yi.M,divisor:1e6,display:"M"},{id:yi.B,divisor:1e9,display:"B"},{id:yi.T,divisor:1e12,display:"T"}],Bi=function(i,e){return i.id.toLocaleLowerCase()===(null==e?void 0:e.toLocaleLowerCase())||i.alias&&i.alias.map((function(i){return i.toLocaleLowerCase()})).includes(e)},mi=function(i,e){return i.id.toLocaleLowerCase()===(null==e?void 0:e.toLocaleLowerCase())||i.alias&&i.alias.includes(e)},gi=[pi],hi=[].concat.apply([],gi.map((function(i){return(0,G.aN)(i.map((function(i){return i.id})),[].concat.apply([],i.map((function(i){return i.alias?i.alias:[]}))))}))),Mi=[ti,si,ai],wi=[].concat.apply([],Mi.map((function(i){return(0,G.aN)(i.map((function(i){return i.id})),[].concat.apply([],i.map((function(i){return i.alias?i.alias:[]}))))}))),ki=[di,ui,ci],Si=[].concat.apply([],ki.map((function(i){return(0,G.aN)(i.map((function(i){return i.id})),[].concat.apply([],i.map((function(i){return i.alias?i.alias:[]}))))}))),Pi=function(i,e,n){var r=0,t=Math.sign(i),s=Math.abs(i);if(e){var a=vi.findIndex((function(i){return i.id.toLocaleLowerCase()===e.toLocaleLowerCase()}));-1!==a&&(r=a)}for(var o=vi[r],d=r+1;d<vi.length&&s/(vi[d].divisor/vi[r].divisor)>=1;++d)o=vi[d];return o.id===yi.None?(t*s).toFixed(null!=n?n:2):(s/(o.divisor/vi[r].divisor)*t).toFixed(null!=n?n:2)+o.display};!function(i){i.None="none",i.Short="short",i.Percent="percent",i.Time="time",i.Data="data",i.DataRate="data_rate"}(bi||(bi={}));var Ki=((fi={})[bi.None]=[],fi[bi.Short]=[],fi[bi.Percent]=ni,fi[bi.Time]=hi,fi[bi.Data]=wi,fi[bi.DataRate]=Si,fi),Ti=function(i,e){return void 0===e?i.toString():i.toFixed(e)},Gi=function(i,e){if(!e)return[Pi(i),null];var n=e.type;n||(e.unit?(n=bi.Short,Object.entries(Ki).map((function(i){var r=i[0];i[1].map((function(i){return i.toLocaleLowerCase()})).includes(e.unit.toLocaleLowerCase())&&(n=r)}))):n=bi.None);var r=void 0===(null==e?void 0:e.precision)?2:e.precision;switch(n){case bi.Percent:var t=function(i,e){return e&&e.toLocaleLowerCase()===T.Percent100.toLocaleLowerCase()?i:100*i}(i,e.unit);return[Ti(t,r)+"%",null];case bi.Time:var s=function(i,e,n){var r=0,t=2,s=-1;if(e)for(var a=function(i){var a=-1,o=-1;if(gi[i].forEach((function(i,r){Bi(i,e)&&(a=r),Bi(i,n)&&(o=r)})),-1!==a)return r=i,t=a,s=o,"break"},o=0;o<gi.length&&"break"!==a(o);++o);else n&&(s=gi[r].findIndex((function(i){return Bi(i,n)})));var d=gi[r],u=d[t],c=u;if(-1===s)for(o=t+1;o<d.length&&i/(d[o].divisor/u.divisor)>=1;++o)c=d[o];else c=d[s];return n&&-1===s&&console.warn('Cannot convert unit "'+(e||u.display)+'" to "'+n+'"'),[i/(c.divisor/u.divisor),c.display]}(i,e.unit,e.targetUnit),a=s[0],o=s[1];return[""+Ti(a,void 0===(null==e?void 0:e.precision)?1:e.precision),o];case bi.Data:var d=function(i,e,n){var r=Mi.length-1,t=0,s=-1,a=Math.sign(i),o=Math.abs(i);if(e)for(var d=function(i){var a=-1,o=-1;if(Mi[i].forEach((function(i,r){mi(i,e)&&(a=r),mi(i,n)&&(o=r)})),-1!==a)return r=i,t=a,s=o,"break"},u=0;u<Mi.length&&"break"!==d(u);++u);else n&&(s=Mi[r].findIndex((function(i){return mi(i,n)})));var c=Mi[r],l=c[t],y=l;if(-1===s)for(u=t+1;u<c.length&&o/(c[u].divisor/l.divisor)>=1;++u)y=c[u];else y=c[s];return n&&-1===s&&console.warn('Cannot convert unit "'+(e||l.display)+'" to "'+n+'"'),[o/(y.divisor/l.divisor)*a,y.display]}(i,e.unit,e.targetUnit),u=d[0],c=d[1];return[""+Ti(u,r),c];case bi.DataRate:var l=function(i,e,n){var r=ki.length-1,t=0,s=-1,a=Math.sign(i),o=Math.abs(i);if(e)for(var d=function(i){var a=-1,o=-1;if(ki[i].forEach((function(i,r){Bi(i,e)&&(a=r),Bi(i,n)&&(o=r)})),-1!==a)return r=i,t=a,s=o,"break"},u=0;u<ki.length&&"break"!==d(u);++u);else n&&(s=ki[r].findIndex((function(i){return Bi(i,n)})));var c=ki[r],l=c[t],y=l;if(-1===s)for(u=t+1;u<c.length&&o/(c[u].divisor/l.divisor)>=1;++u)y=c[u];else y=c[s];return n&&-1===s&&console.warn('Cannot convert unit "'+(e||l.display)+'" to "'+n+'"'),[o/(y.divisor/l.divisor)*a,y.display]}(i,e.unit,e.targetUnit),y=l[0],p=l[1];return[""+Ti(y,r),p];case bi.None:return[Ti(i,r),""];default:return[Pi(i,e.unit,r),e.unit]}};function Ci(i,e,n,r){return void 0===n&&(n=2),Gi(i,{unit:e,precision:n,targetUnit:r})}var Li=n(55310);function Ni(i){var e;try{e=(0,Li.safeLoad)(i,{schema:Li.JSON_SCHEMA,json:!0})}catch(i){console.error(i)}return e}function Ai(i,e,n){var r;void 0===e&&(e=2);try{r=(0,Li.safeDump)(i,(0,G.Cl)({indent:e,schema:Li.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0},n))}catch(i){console.error(i)}return r}function xi(i,e){return(0,u.round)(i,e)}function ji(i){return decodeURIComponent(atob(i).split("").map((function(i){return"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)})).join(""))}function Ii(i){return btoa(encodeURIComponent(i).replace(/%([0-9A-F]{2})/g,(function(i,e){return String.fromCharCode(Number("0x"+e))})))}},85608:(i,e,n)=>{n.d(e,{Cl:()=>r,aN:()=>t});var r=function(){return r=Object.assign||function(i){for(var e,n=1,r=arguments.length;n<r;n++)for(var t in e=arguments[n])Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);return i},r.apply(this,arguments)};function t(){for(var i=0,e=0,n=arguments.length;e<n;e++)i+=arguments[e].length;var r=Array(i),t=0;for(e=0;e<n;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,t++)r[t]=s[a];return r}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError}}]);
|
|
2
|
+
//# sourceMappingURL=4291.0571a42d.js.map
|