@zat-design/sisyphus-react 4.6.3-beta.2 → 4.6.4-beta.1

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.
@@ -242,7 +242,15 @@
242
242
  .@{ant-prefix}-table-tbody
243
243
  .is-editing:not(.@{ant-prefix}-table-measure-row):not(.@{ant-prefix}-table-row-extra)
244
244
  .@{ant-prefix}-form-item.@{ant-prefix}-form-item-has-error {
245
- margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1)) !important;
245
+ margin-bottom: 0px !important;
246
+
247
+ .@{ant-prefix}-form-item-control {
248
+ min-height: calc(
249
+ var(--zaui-height-size-lg; 32px) * var(--zaui-size; 1) +
250
+ var(--zaui-space-size-md; 16px) * var(--zaui-line-height-base; 1.5) *
251
+ var(--zaui-size; 1)
252
+ ) !important;
253
+ }
246
254
  }
247
255
 
248
256
  .@{ant-prefix}-table.@{ant-prefix}-table-bordered > .@{ant-prefix}-table-container {
@@ -24,18 +24,6 @@
24
24
  }
25
25
 
26
26
  .pro-container {
27
- .pro-collapse {
28
- .pro-collapse-panel {
29
- .@{ant-prefix}-collapse-header {
30
- border-radius: var(--zaui-border-radius, 8px) !important;
31
- }
32
- &.@{ant-prefix}-collapse-item-active {
33
- .@{ant-prefix}-collapse-header {
34
- border-radius: var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px) 0 0 !important;
35
- }
36
- }
37
- }
38
- }
39
27
  .pro-collapse-content {
40
28
  margin: 0;
41
29
  border-radius: 0 0 var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px);
@@ -88,6 +76,10 @@
88
76
  }
89
77
 
90
78
  &.pro-form-view {
79
+ .pro-container {
80
+ width: 100%;
81
+ }
82
+
91
83
  .pro-group {
92
84
  .@{ant-prefix}-space-item,
93
85
  .pro-form-view-container {
@@ -75,6 +75,7 @@
75
75
  }
76
76
 
77
77
  &.pro-collapse-level2 {
78
+ border-radius: 0;
78
79
  background: var(--zaui-base-bg, #ffffff);
79
80
  .pro-collapse-panel {
80
81
  margin-bottom: 0;
@@ -114,6 +115,7 @@
114
115
  }
115
116
 
116
117
  .pro-collapse-level2-collapse {
118
+ border-radius: 0;
117
119
  margin-bottom: var(--zaui-space-size-md, 16px);
118
120
  &.@{ant-prefix}-collapse-item-active {
119
121
  margin-bottom: 0;
@@ -146,19 +146,20 @@ const ProLayout = (props) => {
146
146
  return {
147
147
  ...tabs,
148
148
  onTabChange: (activeKey, activeTab, allTabs) => {
149
- var _a2, _b, _c, _d, _e;
149
+ var _a2, _b, _c, _d, _e, _f;
150
150
  if (!allTabs || allTabs.length === 0) {
151
151
  setState({ selectedPath: "##EMPTY##" });
152
+ (_a2 = tabs.onTabChange) == null ? void 0 : _a2.call(tabs, activeKey, activeTab, allTabs ?? []);
152
153
  return;
153
154
  }
154
- const menuCodeSource = (_a2 = activeTab == null ? void 0 : activeTab.menuCodeSource) == null ? void 0 : _a2.trim();
155
+ const menuCodeSource = (_b = activeTab == null ? void 0 : activeTab.menuCodeSource) == null ? void 0 : _b.trim();
155
156
  const sourceMenu = menuCodeSource ? flattenMenuData(menuDataSource.menus).find((menu) => menu.code === menuCodeSource) : void 0;
156
157
  const sourcePath = (sourceMenu == null ? void 0 : sourceMenu.redirectUrl) || (sourceMenu == null ? void 0 : sourceMenu.url) || (sourceMenu == null ? void 0 : sourceMenu.router);
157
- const targetPath = sourcePath || (activeTab == null ? void 0 : activeTab.url) || ((_b = activeTab == null ? void 0 : activeTab.menuItem) == null ? void 0 : _b.router) || ((_c = activeTab == null ? void 0 : activeTab.menuItem) == null ? void 0 : _c.redirectUrl) || ((_d = activeTab == null ? void 0 : activeTab.menuItem) == null ? void 0 : _d.url);
158
+ const targetPath = sourcePath || (activeTab == null ? void 0 : activeTab.url) || ((_c = activeTab == null ? void 0 : activeTab.menuItem) == null ? void 0 : _c.router) || ((_d = activeTab == null ? void 0 : activeTab.menuItem) == null ? void 0 : _d.redirectUrl) || ((_e = activeTab == null ? void 0 : activeTab.menuItem) == null ? void 0 : _e.url);
158
159
  if (targetPath && targetPath !== selectedPath) {
159
160
  setState({ selectedPath: targetPath });
160
161
  }
161
- (_e = tabs.onTabChange) == null ? void 0 : _e.call(tabs, activeKey, activeTab, allTabs);
162
+ (_f = tabs.onTabChange) == null ? void 0 : _f.call(tabs, activeKey, activeTab, allTabs);
162
163
  }
163
164
  };
164
165
  }, [isTabsLayout, menuDataSource.menus, tabs, selectedPath]);
@@ -38,10 +38,6 @@ const RenderColumn = (props) => {
38
38
  tooltip: isEllipsisActive(e.target)
39
39
  });
40
40
  };
41
- const tooltipProps = {
42
- getPopupContainer: (triggerNode) => triggerNode.parentNode,
43
- ...toolTipProps
44
- };
45
41
  if (isBoolean(props == null ? void 0 : props.isChanged) || isInNewRowFlag) {
46
42
  let renderNode = value ? node : "-";
47
43
  const isXMaxContent = (scroll == null ? void 0 : scroll.x) === "max-content";
@@ -97,13 +93,16 @@ const RenderColumn = (props) => {
97
93
  Tooltip,
98
94
  {
99
95
  title: currentValue,
96
+ placement: "topLeft",
97
+ autoAdjustOverflow: false,
100
98
  onOpenChange: (open) => {
101
99
  setState({
102
100
  tooltip: false
103
101
  });
104
102
  },
105
103
  open: tooltip,
106
- ...tooltipProps,
104
+ ...toolTipProps,
105
+ getPopupContainer: () => document.body,
107
106
  children: /* @__PURE__ */ jsx(
108
107
  Text,
109
108
  {
@@ -154,6 +153,7 @@ const RenderColumn = (props) => {
154
153
  ] }) : null })
155
154
  ] }) : node }),
156
155
  ...toolTipProps,
156
+ getPopupContainer: () => document.body,
157
157
  children: /* @__PURE__ */ jsx("div", { className: cellDiffCls, children: renderNode })
158
158
  }
159
159
  );
@@ -193,7 +193,7 @@ const RenderColumn = (props) => {
193
193
  });
194
194
  },
195
195
  open: tooltip,
196
- ...tooltipProps,
196
+ ...toolTipProps,
197
197
  getPopupContainer: () => document.body,
198
198
  children: /* @__PURE__ */ jsx(
199
199
  Text,
@@ -75,11 +75,30 @@ const ProTreeSelect = (props, ref) => {
75
75
  if (!data || !Array.isArray(data) || !data.length) {
76
76
  return data || [];
77
77
  }
78
- return tools.transformDataName(data, {
78
+ const normalizedData = tools.transformDataName(data, {
79
79
  label: finalFieldNames.label,
80
80
  value: finalFieldNames.value,
81
81
  children: finalFieldNames.children
82
82
  });
83
+ if (!Array.isArray(normalizedData)) {
84
+ return normalizedData;
85
+ }
86
+ const mergeOriginalFields = (sourceNodes, normalizedNodes) => normalizedNodes.map((normalizedNode, index) => {
87
+ const sourceNode = typeof sourceNodes[index] === "object" && sourceNodes[index] !== null ? sourceNodes[index] : {};
88
+ const sourceChildren = sourceNode[finalFieldNames.children];
89
+ const normalizedChildren = normalizedNode.children;
90
+ const sourceFields = { ...sourceNode };
91
+ delete sourceFields[finalFieldNames.children];
92
+ return {
93
+ ...sourceFields,
94
+ ...normalizedNode,
95
+ children: Array.isArray(sourceChildren) && Array.isArray(normalizedChildren) ? mergeOriginalFields(
96
+ sourceChildren,
97
+ normalizedChildren
98
+ ) : normalizedChildren
99
+ };
100
+ });
101
+ return mergeOriginalFields(data, normalizedData);
83
102
  },
84
103
  [finalFieldNames]
85
104
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "4.6.3-beta.2",
3
+ "version": "4.6.4-beta.1",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -18,8 +18,12 @@
18
18
  "typings": "es/index.d.ts",
19
19
  "typesVersions": {
20
20
  "*": {
21
- "tokens": ["es/tokens.d.ts"],
22
- "es/*": ["es/*"]
21
+ "tokens": [
22
+ "es/tokens.d.ts"
23
+ ],
24
+ "es/*": [
25
+ "es/*"
26
+ ]
23
27
  }
24
28
  },
25
29
  "exports": {
@@ -116,6 +120,7 @@
116
120
  "big.js": "^6.2.1",
117
121
  "classnames": "^2.3.1",
118
122
  "dayjs": "^1.11.13",
123
+ "i": "^0.3.7",
119
124
  "idb-keyval": "^6.2.2",
120
125
  "lodash": "^4.17.21",
121
126
  "react-intersection-observer": "^9.13.0",