@voplus/morpho-csp 1.3.4 → 1.3.6

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.
Files changed (87) hide show
  1. package/es/components/CorporateUnitSelectDialog/index.d.ts +12 -0
  2. package/es/components/CorporateUnitSelectDialog/index.js +33 -0
  3. package/es/components/CorporateUnitSelectDialog/index.js.map +1 -0
  4. package/es/components/CorporateUnitSelectDialog/index.less +36 -0
  5. package/es/components/CorporateUnitSelectDialog/state.d.ts +65 -0
  6. package/es/components/CorporateUnitSelectDialog/state.js +263 -0
  7. package/es/components/CorporateUnitSelectDialog/state.js.map +1 -0
  8. package/es/components/CorporateUnitSortableTree/index.d.ts +10 -0
  9. package/es/components/CorporateUnitSortableTree/index.js +87 -0
  10. package/es/components/CorporateUnitSortableTree/index.js.map +1 -0
  11. package/es/components/CorporateUnitSortableTree/state.d.ts +62 -0
  12. package/es/components/CorporateUnitSortableTree/state.js +220 -0
  13. package/es/components/CorporateUnitSortableTree/state.js.map +1 -0
  14. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.d.ts +3 -0
  15. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.js +22 -0
  16. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.js.map +1 -0
  17. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.d.ts +4 -0
  18. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js +84 -0
  19. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js.map +1 -0
  20. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.less +319 -0
  21. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.d.ts +3 -0
  22. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js +21 -0
  23. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js.map +1 -0
  24. package/es/components/CorporateUnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.less +4 -0
  25. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.d.ts +4 -0
  26. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.js +23 -0
  27. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/index.js.map +1 -0
  28. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.d.ts +3 -0
  29. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.js +58 -0
  30. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.js.map +1 -0
  31. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.less +45 -0
  32. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.d.ts +3 -0
  33. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js +73 -0
  34. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js.map +1 -0
  35. package/es/components/CorporateUnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.less +12 -0
  36. package/es/data/share-certificate/ShareCertificateStore.d.ts +6 -0
  37. package/es/data/share-certificate/ShareCertificateStore.js +22 -0
  38. package/es/data/share-certificate/ShareCertificateStore.js.map +1 -1
  39. package/es/data/share-certificate/interfaces.d.ts +13 -0
  40. package/es/data/share-certificate/types.d.ts +2 -0
  41. package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.d.ts +6 -2
  42. package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.js +10 -5
  43. package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.js.map +1 -1
  44. package/es/modules/corporate/company/member-register/components/CompanyMemberItem/index.less +9 -1
  45. package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.d.ts +10 -4
  46. package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.js +37 -11
  47. package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.js.map +1 -1
  48. package/es/modules/corporate/company/member-register/components/CompanyMemberList/index.less +15 -12
  49. package/es/modules/corporate/company/member-register/components/CompanyMemberList/state.d.ts +1 -0
  50. package/es/modules/corporate/company/member-register/components/CompanyMemberList/state.js +9 -0
  51. package/es/modules/corporate/company/member-register/components/CompanyMemberList/state.js.map +1 -1
  52. package/es/modules/corporate/company/officer-register/components/OfficerItem/index.d.ts +6 -2
  53. package/es/modules/corporate/company/officer-register/components/OfficerItem/index.js +13 -6
  54. package/es/modules/corporate/company/officer-register/components/OfficerItem/index.js.map +1 -1
  55. package/es/modules/corporate/company/officer-register/components/OfficerItem/index.less +8 -1
  56. package/es/modules/corporate/company/officer-register/components/OfficerList/index.d.ts +9 -4
  57. package/es/modules/corporate/company/officer-register/components/OfficerList/index.js +34 -8
  58. package/es/modules/corporate/company/officer-register/components/OfficerList/index.js.map +1 -1
  59. package/es/modules/corporate/company/officer-register/components/OfficerList/state.d.ts +1 -0
  60. package/es/modules/corporate/company/officer-register/components/OfficerList/state.js +9 -0
  61. package/es/modules/corporate/company/officer-register/components/OfficerList/state.js.map +1 -1
  62. package/es/modules/corporate/share-certificate/components/ShareCertificate/index.js +31 -4
  63. package/es/modules/corporate/share-certificate/components/ShareCertificate/index.js.map +1 -1
  64. package/es/modules/corporate/share-certificate/components/ShareCertificate/index.less +16 -5
  65. package/es/modules/corporate/share-certificate/components/ShareCertificateProperties/index.d.ts +1 -1
  66. package/es/modules/corporate/share-certificate/components/ShareCertificateProperties/index.js +18 -0
  67. package/es/modules/corporate/share-certificate/components/ShareCertificateProperties/index.js.map +1 -1
  68. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/index.js +4 -1
  69. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/index.js.map +1 -1
  70. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToShareholder.d.ts +8 -0
  71. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToShareholder.js +22 -0
  72. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToShareholder.js.map +1 -0
  73. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToSignee.d.ts +8 -0
  74. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToSignee.js +22 -0
  75. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/SendToSignee.js.map +1 -0
  76. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/index.d.ts +2 -0
  77. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/index.js +3 -0
  78. package/es/modules/corporate/share-certificate/controls/ShareCertificateMenu/items/index.js.map +1 -0
  79. package/es/modules/corporate/share-certificate/pages/ShareCertificateClientView/index.d.ts +3 -0
  80. package/es/modules/corporate/share-certificate/pages/ShareCertificateClientView/index.js +53 -0
  81. package/es/modules/corporate/share-certificate/pages/ShareCertificateClientView/index.js.map +1 -0
  82. package/es/modules/corporate/share-certificate/pages/ShareCertificateClientView/index.less +53 -0
  83. package/es/modules/corporate/share-certificate/pages/ShareCertificateDefaultView/index.js +3 -3
  84. package/es/routes.d.ts +6 -0
  85. package/es/routes.js +13 -0
  86. package/es/routes.js.map +1 -1
  87. package/package.json +1 -1
@@ -0,0 +1,220 @@
1
+ import { __decorate } from "tslib";
2
+ import { action, computed, makeObservable, observable } from "mobx";
3
+ export class State {
4
+ constructor(_store) {
5
+ Object.defineProperty(this, "_store", {
6
+ enumerable: true,
7
+ configurable: true,
8
+ writable: true,
9
+ value: _store
10
+ });
11
+ Object.defineProperty(this, "id", {
12
+ enumerable: true,
13
+ configurable: true,
14
+ writable: true,
15
+ value: ""
16
+ }); //加载时id
17
+ /** 如果effect 是null就不执行 useUnitListEffect*/
18
+ Object.defineProperty(this, "effect", {
19
+ enumerable: true,
20
+ configurable: true,
21
+ writable: true,
22
+ value: null
23
+ });
24
+ Object.defineProperty(this, "treeNodeChildren", {
25
+ enumerable: true,
26
+ configurable: true,
27
+ writable: true,
28
+ value: void 0
29
+ });
30
+ /** dummy placeholder data */
31
+ Object.defineProperty(this, "treeChildren", {
32
+ enumerable: true,
33
+ configurable: true,
34
+ writable: true,
35
+ value: [
36
+ {
37
+ id: "",
38
+ containerId: "11",
39
+ name: "dummy placeholder data",
40
+ type: "Organization",
41
+ isGroup: false,
42
+ address: { country: "", line1: "" },
43
+ primaryLegalIdentity: { number: "", name: "", type: "IdentityCard", country: "" },
44
+ },
45
+ ]
46
+ });
47
+ /** 沒load之前, 看看現在這個文件有沒有子文件, 有的話要放個 dummy placeholder data 在children里, */
48
+ Object.defineProperty(this, "treeData", {
49
+ enumerable: true,
50
+ configurable: true,
51
+ writable: true,
52
+ value: []
53
+ });
54
+ /** filter type for unit */
55
+ Object.defineProperty(this, "filterType", {
56
+ enumerable: true,
57
+ configurable: true,
58
+ writable: true,
59
+ value: void 0
60
+ });
61
+ /** onDragStateChanged 在拖动开始或结束时调用。拖动开始时为true,拖动结束时为false */
62
+ Object.defineProperty(this, "isDragging", {
63
+ enumerable: true,
64
+ configurable: true,
65
+ writable: true,
66
+ value: void 0
67
+ });
68
+ /** update useUnitListEffect */
69
+ Object.defineProperty(this, "updateNodes", {
70
+ enumerable: true,
71
+ configurable: true,
72
+ writable: true,
73
+ value: (list) => {
74
+ if (this.treeNodeChildren && this.treeNodeChildren.childrenListLoading) {
75
+ const docList = list;
76
+ docList.map((item) => {
77
+ // if (item.documents > 0) {
78
+ item.children = this.treeChildren;
79
+ // }
80
+ });
81
+ this.treeNodeChildren.children = docList || [];
82
+ this.treeNodeChildren.childrenListLoading = false;
83
+ this.treeData = [...this.treeData];
84
+ }
85
+ }
86
+ });
87
+ makeObservable(this);
88
+ }
89
+ /** 根据path查找文件 */
90
+ findFiles(path) {
91
+ var _a;
92
+ let list;
93
+ for (let i = 0; i < path.length; i++) {
94
+ if (i == 0) {
95
+ list = this.treeData.filter((item) => item.id === path[i]);
96
+ }
97
+ else {
98
+ list = (_a = list[0].children) === null || _a === void 0 ? void 0 : _a.filter((item) => item.id === path[i]);
99
+ }
100
+ }
101
+ return (list === null || list === void 0 ? void 0 : list.length) ? list[0] : null;
102
+ }
103
+ /** 接收@treeData state.treeData
104
+ * @id 找id 文件 */
105
+ editTreeData(treeData, id) {
106
+ for (let i = 0, len = treeData.length; i < len; i++) {
107
+ if (treeData[i].children) {
108
+ this.editTreeData(treeData[i].children, id);
109
+ }
110
+ if (treeData[i].id === id) {
111
+ this.treeNodeChildren = treeData[i];
112
+ }
113
+ }
114
+ return;
115
+ }
116
+ /** 更新 TreeData */
117
+ updateTreeData(val) {
118
+ this.treeData = val;
119
+ }
120
+ /**在子节点折叠或者展开后调用*/
121
+ onVisibilityToggle(val) {
122
+ /** 如果是已展开 或者 已经加载过,不用再重新去加载 */
123
+ if (!val.expanded || val.node.children[0].id !== "")
124
+ return;
125
+ this.id = val.path[val.path.length - 1];
126
+ this.treeNodeChildren = this.findFiles(val.path);
127
+ /** 加载中 */
128
+ this.treeNodeChildren.childrenListLoading = true;
129
+ this.treeNodeChildren.children = [];
130
+ this.effect = this.updateNodes;
131
+ }
132
+ /** 在节点移动操作之后调用 */
133
+ async onMoveNode(val) {
134
+ const id = val.nextPath[val.nextPath.length - 1];
135
+ const leg = val.nextParentNode.children.indexOf(val.node);
136
+ const afterId = leg - 1 >= 0 ? val.nextParentNode.children[leg - 1].id : "";
137
+ const nextParent = this.findFiles(val.nextPath.slice(0, -1));
138
+ const prevParent = this.findFiles(val.prevPath.slice(0, -1));
139
+ /** 判断下一个父级 与 上一个父级 是不是同一个 */
140
+ if (nextParent.id === prevParent.id) {
141
+ this._store.moveAfter(id, afterId);
142
+ }
143
+ else {
144
+ await this._store.move([id], nextParent.id);
145
+ if (afterId !== "") {
146
+ this._store.moveAfter(id, afterId);
147
+ }
148
+ }
149
+ }
150
+ /**
151
+ * 确定节点是否可以具有子级的功能,对于在canDrop有条件时防止悬停预览很有用。默认设置为返回的函数true。函数应为类型(node): bool
152
+ */
153
+ toHaveChildren(node) {
154
+ const isLoaded = node.loaded ? node.loaded : false;
155
+ if (node.documents !== 0 && !isLoaded) {
156
+ return false;
157
+ }
158
+ return true;
159
+ }
160
+ /**
161
+ * unit filters
162
+ * @return unit filters
163
+ */
164
+ get filters() {
165
+ const filters = [];
166
+ if (this.id) {
167
+ filters.push({ c: "ParentNodeId", o: "=", l: "And", v1: this.id });
168
+ }
169
+ if (this.filterType) {
170
+ filters.push(this.filterType);
171
+ }
172
+ return filters;
173
+ }
174
+ }
175
+ __decorate([
176
+ observable
177
+ ], State.prototype, "id", void 0);
178
+ __decorate([
179
+ observable
180
+ ], State.prototype, "effect", void 0);
181
+ __decorate([
182
+ observable
183
+ ], State.prototype, "treeNodeChildren", void 0);
184
+ __decorate([
185
+ observable
186
+ ], State.prototype, "treeChildren", void 0);
187
+ __decorate([
188
+ observable
189
+ ], State.prototype, "treeData", void 0);
190
+ __decorate([
191
+ observable
192
+ ], State.prototype, "filterType", void 0);
193
+ __decorate([
194
+ observable
195
+ ], State.prototype, "isDragging", void 0);
196
+ __decorate([
197
+ action
198
+ ], State.prototype, "findFiles", null);
199
+ __decorate([
200
+ action
201
+ ], State.prototype, "editTreeData", null);
202
+ __decorate([
203
+ action
204
+ ], State.prototype, "updateTreeData", null);
205
+ __decorate([
206
+ action
207
+ ], State.prototype, "updateNodes", void 0);
208
+ __decorate([
209
+ action
210
+ ], State.prototype, "onVisibilityToggle", null);
211
+ __decorate([
212
+ action
213
+ ], State.prototype, "onMoveNode", null);
214
+ __decorate([
215
+ action
216
+ ], State.prototype, "toHaveChildren", null);
217
+ __decorate([
218
+ computed
219
+ ], State.prototype, "filters", null);
220
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/CorporateUnitSortableTree/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,QA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,OAAO,OAAO,CAAC;IAChB,CAAC;CACD;AArIY;IAAX,UAAU;iCAAgB;AAEf;IAAX,UAAU;qCAAqE;AACpE;IAAX,UAAU;+CAA8B;AAE7B;IAAX,UAAU;2CAUT;AAEU;IAAX,UAAU;uCAAuC;AAEtC;IAAX,UAAU;yCAA6C;AAE5C;IAAX,UAAU;yCAA6B;AAIxC;IADC,MAAM;sCAWN;AAKD;IADC,MAAM;yCAWN;AAID;IADC,MAAM;2CAGN;AAID;IADC,MAAM;0CAaL;AAIF;IADC,MAAM;+CAUN;AAIY;IADZ,MAAM;uCAgBN;AAMD;IADC,MAAM;2CAON;AAOD;IADC,QAAQ;oCAUR"}
@@ -0,0 +1,3 @@
1
+ import { ThemeProps } from "@voplus/react-sortable-tree";
2
+ declare const FileExplorerTheme: ThemeProps;
3
+ export default FileExplorerTheme;
@@ -0,0 +1,22 @@
1
+ // Can override the following:
2
+ //
3
+ // style: PropTypes.shape({}),
4
+ // innerStyle: PropTypes.shape({}),
5
+ // reactVirtualizedListProps: PropTypes.shape({}),
6
+ // scaffoldBlockPxWidth: PropTypes.number,
7
+ // slideRegionSize: PropTypes.number,
8
+ // rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
9
+ // treeNodeRenderer: PropTypes.func,
10
+ // nodeContentRenderer: PropTypes.func,
11
+ // placeholderRenderer: PropTypes.func,
12
+ import nodeContentRenderer from "./node-content-renderer";
13
+ import treeNodeRenderer from "./tree-node-renderer";
14
+ const FileExplorerTheme = {
15
+ nodeContentRenderer,
16
+ treeNodeRenderer,
17
+ scaffoldBlockPxWidth: 25,
18
+ rowHeight: 25,
19
+ slideRegionSize: 50,
20
+ };
21
+ export default FileExplorerTheme;
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/CorporateUnitSortableTree/themes/FileExplorerTheme/index.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,8BAA8B;AAC9B,mCAAmC;AACnC,kDAAkD;AAClD,0CAA0C;AAC1C,qCAAqC;AACrC,sEAAsE;AACtE,oCAAoC;AACpC,uCAAuC;AACvC,uCAAuC;AAGvC,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAEpD,MAAM,iBAAiB,GAAe;IACrC,mBAAmB;IACnB,gBAAgB;IAChB,oBAAoB,EAAE,EAAE;IACxB,SAAS,EAAE,EAAE;IACb,eAAe,EAAE,EAAE;CACnB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import "./node-content-renderer.less";
2
+ import { NodeRenderer } from "@voplus/react-sortable-tree";
3
+ declare const FileThemeNodeContentRenderer: NodeRenderer;
4
+ export default FileThemeNodeContentRenderer;
@@ -0,0 +1,84 @@
1
+ import "./node-content-renderer.less";
2
+ import { faChevronRight, faUser, faUsers, faUserVneck, faUserTag, } from "@fortawesome/pro-light-svg-icons";
3
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
4
+ import React from "react";
5
+ import { Spin } from "@voplus/antd";
6
+ import UnitIcon from "@voplus/morpho-org/es/components/UnitIcon";
7
+ import classnames from "classnames";
8
+ import { useUnitContext } from "@voplus/morpho-org/es/data/UnitContext";
9
+ function isDescendant(older, younger) {
10
+ return (!!older.children &&
11
+ typeof older.children !== "function" &&
12
+ older.children.some((child) => child === younger || isDescendant(child, younger)));
13
+ }
14
+ const FileThemeNodeContentRenderer = (props) => {
15
+ const { scaffoldBlockPxWidth, toggleChildrenVisibility, connectDragPreview, connectDragSource, isDragging, canDrop, canDrag, node, title, draggedNode, path, treeIndex, isSearchMatch, isSearchFocus, icons, buttons, className, style, didDrop, lowerSiblingCounts, listIndex, swapFrom, swapLength, swapDepth, treeId, // Not needed, but preserved for other renderers
16
+ isOver, // Not needed, but preserved for other renderers
17
+ parentNode, // Needed for dndManager
18
+ rowDirection, ...otherProps } = props;
19
+ const store = useUnitContext();
20
+ const isDraggedDescendant = draggedNode && isDescendant(draggedNode, node);
21
+ const isLandingPadActive = !didDrop && isDragging;
22
+ /** 比較一下id是否active, 加上active css (点击当前id时,显示active背景色) */
23
+ const active = store.active === node.id;
24
+ // Construct the scaffold representing the structure of the tree
25
+ const scaffold = [];
26
+ lowerSiblingCounts.forEach((lowerSiblingCount, i) => {
27
+ scaffold.push(React.createElement("div", { key: `pre_${1 + i}`, style: { width: scaffoldBlockPxWidth }, className: "lineBlock" }));
28
+ if (treeIndex !== listIndex && i === swapDepth) {
29
+ // This row has been shifted, and is at the depth of
30
+ // the line pointing to the new destination
31
+ let highlightLineClass = "";
32
+ if (listIndex === swapFrom + swapLength - 1) {
33
+ // This block is on the bottom (target) line
34
+ // This block points at the target block (where the row will go when released)
35
+ highlightLineClass = "highlightBottomLeftCorner";
36
+ }
37
+ else if (treeIndex === swapFrom) {
38
+ // This block is on the top (source) line
39
+ highlightLineClass = "highlightTopLeftCorner";
40
+ }
41
+ else {
42
+ // This block is between the bottom and top
43
+ highlightLineClass = "highlightLineVertical";
44
+ }
45
+ scaffold.push(React.createElement("div", { key: `highlight_${1 + i}`, style: {
46
+ width: scaffoldBlockPxWidth,
47
+ left: scaffoldBlockPxWidth * i,
48
+ }, className: classnames("absoluteLineBlock", "highlightLineClass") }));
49
+ }
50
+ });
51
+ const nodeContent = (React.createElement("div", { className: classnames("explorer-theme-node", { active: active }), ...otherProps },
52
+ toggleChildrenVisibility && node.children && node.children.length > 0 && (React.createElement("button", { type: "button", className: node.expanded ? "collapseButton" : "expandButton", style: {
53
+ left: (lowerSiblingCounts.length - 0.7) * scaffoldBlockPxWidth,
54
+ }, onClick: () => toggleChildrenVisibility({
55
+ node,
56
+ path,
57
+ treeIndex,
58
+ }) },
59
+ React.createElement("span", { className: "arrows" },
60
+ React.createElement(FAIcon, { icon: faChevronRight })))),
61
+ node.childrenListLoading && node.expanded && (React.createElement("div", { className: "doc-spin", style: {
62
+ left: (lowerSiblingCounts.length - 0.7) * scaffoldBlockPxWidth,
63
+ } },
64
+ React.createElement(Spin, { size: "small" }))),
65
+ React.createElement("div", { className: classnames("rowWrapper", !canDrag ? "rowWrapperDragDisabled" : "") }, connectDragPreview(React.createElement("div", { style: { display: "flex" } },
66
+ scaffold,
67
+ React.createElement("div", { className: classnames("row", {
68
+ rowLandingPad: isLandingPadActive,
69
+ rowCancelPad: isLandingPadActive && !canDrop,
70
+ rowSearchMatch: isSearchMatch,
71
+ rowSearchFocus: isSearchFocus,
72
+ }, className), style: {
73
+ opacity: isDraggedDescendant ? 0.5 : 1,
74
+ ...style,
75
+ } },
76
+ React.createElement("div", { className: classnames("rowContents", { rowContentsDragDisabled: !canDrag }) },
77
+ React.createElement("div", { className: "rowLabel" },
78
+ React.createElement("div", { className: "file-document-name", onClick: () => { var _a; return (_a = store.onUnitSelected) === null || _a === void 0 ? void 0 : _a.call(store, node.id); } },
79
+ React.createElement("div", { className: "file-type" }, node.id === "" ? (React.createElement(FAIcon, { icon: faUser })) : node.id === "c896a84e-b31a-4d10-a181-5d34a21b172d" ? (React.createElement(FAIcon, { icon: faUsers })) : node.id === "members" ? (React.createElement(FAIcon, { icon: faUserVneck })) : node.id === "officers" ? (React.createElement(FAIcon, { icon: faUserTag })) : (React.createElement(UnitIcon, { type: node.type }))),
80
+ React.createElement("div", { className: "file-name" }, node.name))))))))));
81
+ return canDrag ? connectDragSource(nodeContent, { dropEffect: "copy" }) : nodeContent;
82
+ };
83
+ export default FileThemeNodeContentRenderer;
84
+ //# sourceMappingURL=node-content-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-content-renderer.js","sourceRoot":"","sources":["../../../../../src/components/CorporateUnitSortableTree/themes/FileExplorerTheme/node-content-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAGtC,OAAO,EACN,cAAc,EACd,MAAM,EACN,OAAO,EACP,WAAW,EACX,SAAS,GACT,MAAM,kCAAkC,CAAC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explorer-theme-node {
3
+ &:hover {
4
+ background: #f5f5f5;
5
+ }
6
+ &.active {
7
+ background: #1ea7fd;
8
+ svg,
9
+ .file-name {
10
+ color: white;
11
+ }
12
+ }
13
+ :global {
14
+ .doc-spin {
15
+ z-index: 2;
16
+ position: absolute;
17
+ top: 50%;
18
+ width: 30px;
19
+ height: 30px;
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ transform: translate3d(-50%, -50%, 0);
24
+ }
25
+ .collapseButton,
26
+ .expandButton {
27
+ appearance: none;
28
+ border: none;
29
+ background: transparent;
30
+ padding: 0;
31
+ z-index: 2;
32
+ position: absolute;
33
+ top: 45%;
34
+ width: 30px;
35
+ height: 30px;
36
+ transform: translate3d(-50%, -50%, 0);
37
+ cursor: pointer;
38
+ .arrows {
39
+ display: inline-block;
40
+ font-size: 10px;
41
+ transform: translate3d(50%, 0, 0) rotateZ(90deg);
42
+ }
43
+ &:focus {
44
+ outline: none;
45
+ }
46
+ }
47
+ .expandButton .arrows {
48
+ display: inline-block;
49
+ font-size: 10px;
50
+ transform: translate3d(50%, 0, 0);
51
+ }
52
+ .rowWrapper {
53
+ height: 100%;
54
+ box-sizing: border-box;
55
+ }
56
+ .rowWrapperDragDisabled {
57
+ cursor: default;
58
+ }
59
+ .row {
60
+ height: 100%;
61
+ white-space: nowrap;
62
+ display: flex;
63
+ position: relative;
64
+
65
+ & > * {
66
+ box-sizing: border-box;
67
+ }
68
+ }
69
+
70
+ /**
71
+ * The outline of where the element will go if dropped, displayed while dragging
72
+ */
73
+ .rowLandingPad {
74
+ border: none;
75
+ box-shadow: none;
76
+ outline: none;
77
+
78
+ * {
79
+ opacity: 0 !important;
80
+ }
81
+
82
+ &::before {
83
+ background-color: lightblue;
84
+ border: 2px dotted black;
85
+ content: "";
86
+ position: absolute;
87
+ top: 0;
88
+ right: 0;
89
+ bottom: 0;
90
+ left: 0;
91
+ z-index: -1;
92
+ }
93
+ }
94
+
95
+ /**
96
+ * Alternate appearance of the landing pad when the dragged location is invalid
97
+ */
98
+ .rowCancelPad {
99
+ // @extend .rowLandingPad;
100
+
101
+ &::before {
102
+ background-color: #e6a8ad;
103
+ }
104
+ }
105
+
106
+ /**
107
+ * Nodes matching the search conditions are highlighted
108
+ */
109
+ .rowSearchMatch {
110
+ box-shadow: inset 0 -7px 7px -3px #0080ff;
111
+ }
112
+
113
+ /**
114
+ * The node that matches the search conditions and is currently focused
115
+ */
116
+ .rowSearchFocus {
117
+ box-shadow: inset 0 -7px 7px -3px #fc6421;
118
+ }
119
+
120
+ // %rowItem {
121
+ // display: inline-block;
122
+ // vertical-align: middle;
123
+ // }
124
+
125
+ .rowContents {
126
+ // @extend %rowItem;
127
+ position: relative;
128
+ height: 100%;
129
+ flex: 1 0 auto;
130
+ display: flex;
131
+ align-items: center;
132
+ justify-content: space-between;
133
+ }
134
+
135
+ .rowLabel {
136
+ // @extend %rowItem;
137
+ display: flex;
138
+ flex: 0 1 auto;
139
+ padding-right: 20px;
140
+ // .doc-spin{
141
+ // padding-right: 6px;
142
+ // }
143
+ }
144
+
145
+ .file-document-name {
146
+ display: flex;
147
+ align-items: center;
148
+ .file-type {
149
+ display: flex;
150
+ align-items: center;
151
+ width: 22px;
152
+ }
153
+ .file-name {
154
+ display: inline-block;
155
+ color: #000;
156
+ font-size: 15px;
157
+ font-weight: 500;
158
+ z-index: 100;
159
+ cursor: pointer;
160
+ }
161
+ }
162
+
163
+ // .rowToolbar {
164
+ // // @extend %rowItem;
165
+ // flex: 0 1 auto;
166
+ // display: flex;
167
+ // }
168
+
169
+ .toolbarButton {
170
+ // @extend %rowItem;
171
+ }
172
+
173
+ /**
174
+ * Line for under a node with children
175
+ */
176
+ .lineChildren {
177
+ height: 100%;
178
+ display: inline-block;
179
+ }
180
+
181
+ /* ==========================================================================
182
+ Scaffold
183
+
184
+ Line-overlaid blocks used for showing the tree structure
185
+ ========================================================================== */
186
+ .lineBlock {
187
+ height: 100%;
188
+ position: relative;
189
+ display: inline-block;
190
+ flex: 0 0 auto;
191
+ }
192
+
193
+ .absoluteLineBlock {
194
+ // @extend .lineBlock;
195
+ position: absolute;
196
+ top: 0;
197
+ }
198
+
199
+ /* Highlight line for pointing to dragged row destination
200
+ ========================================================================== */
201
+ // $highlight-color: #36c2f6;
202
+ // $highlight-line-size: 6px; // Make it an even number for clean rendering
203
+
204
+ /**
205
+ * +--+--+
206
+ * | | |
207
+ * | | |
208
+ * | | |
209
+ * +--+--+
210
+ */
211
+ .highlightLineVertical {
212
+ z-index: 3;
213
+
214
+ &::before {
215
+ position: absolute;
216
+ content: "";
217
+ // background-color: $highlight-color;
218
+ // width: $highlight-line-size;
219
+ // margin-left: $highlight-line-size / -2;
220
+ left: 50%;
221
+ top: 0;
222
+ height: 100%;
223
+ }
224
+
225
+ // @keyframes arrow-pulse {
226
+ // $base-multiplier: 10;
227
+ // 0% {
228
+ // transform: translate(0, 0);
229
+ // opacity: 0;
230
+ // }
231
+ // 30% {
232
+ // transform: translate(0, 30% * $base-multiplier);
233
+ // opacity: 1;
234
+ // }
235
+ // 70% {
236
+ // transform: translate(0, 70% * $base-multiplier);
237
+ // opacity: 1;
238
+ // }
239
+ // 100% {
240
+ // transform: translate(0, 100% * $base-multiplier);
241
+ // opacity: 0;
242
+ // }
243
+ // }
244
+
245
+ &::after {
246
+ content: "";
247
+ position: absolute;
248
+ height: 0;
249
+ // margin-left: -1 * $highlight-line-size / 2;
250
+ left: 50%;
251
+ top: 0;
252
+ // border-left: $highlight-line-size / 2 solid transparent;
253
+ // border-right: $highlight-line-size / 2 solid transparent;
254
+ // border-top: $highlight-line-size / 2 solid white;
255
+ animation: arrow-pulse 1s infinite linear both;
256
+ }
257
+ }
258
+
259
+ /**
260
+ * +-----+
261
+ * | |
262
+ * | +--+
263
+ * | | |
264
+ * +--+--+
265
+ */
266
+ .highlightTopLeftCorner {
267
+ &::before {
268
+ z-index: 3;
269
+ content: "";
270
+ position: absolute;
271
+ // border-top: solid $highlight-line-size $highlight-color;
272
+ // border-left: solid $highlight-line-size $highlight-color;
273
+ box-sizing: border-box;
274
+ // height: calc(50% + #{$highlight-line-size / 2});
275
+ // top: 50%;
276
+ // margin-top: $highlight-line-size / -2;
277
+ // right: 0;
278
+ // width: calc(50% + #{$highlight-line-size / 2});
279
+ }
280
+ }
281
+
282
+ /**
283
+ * +--+--+
284
+ * | | |
285
+ * | | |
286
+ * | +->|
287
+ * +-----+
288
+ */
289
+ .highlightBottomLeftCorner {
290
+ // $arrow-size: 7px;
291
+ z-index: 3;
292
+
293
+ &::before {
294
+ content: "";
295
+ position: absolute;
296
+ // border-bottom: solid $highlight-line-size $highlight-color;
297
+ // border-left: solid $highlight-line-size $highlight-color;
298
+ box-sizing: border-box;
299
+ // height: calc(100% + #{$highlight-line-size / 2});
300
+ // top: 0;
301
+ // right: $arrow-size;
302
+ // width: calc(50% - #{$arrow-size - ($highlight-line-size / 2)});
303
+ }
304
+
305
+ &::after {
306
+ content: "";
307
+ position: absolute;
308
+ height: 0;
309
+ right: 0;
310
+ top: 100%;
311
+ // margin-top: -1 * $arrow-size;
312
+ // border-top: $arrow-size solid transparent;
313
+ // border-bottom: $arrow-size solid transparent;
314
+ // border-left: $arrow-size solid $highlight-color;
315
+ }
316
+ }
317
+ }
318
+ }
319
+ }
@@ -0,0 +1,3 @@
1
+ import { TreeRenderer } from "@voplus/react-sortable-tree";
2
+ declare const FileThemeTreeNodeRenderer: TreeRenderer;
3
+ export default FileThemeTreeNodeRenderer;