@ztocwst/rc-pro-materials 0.1.31 → 0.1.32
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +2 -2
- package/dist/SCM_Comps.css +1 -1
- package/dist/SCM_Comps.js +6 -6
- package/dist/SCM_Comps.js.map +1 -1
- package/es/components/z-pointer-block/index.less +1 -1
- package/es/components/z-pointer-block/z-pointer-block.js +1 -1
- package/es/components/z-templates-data-common/components/link-renderer/index.d.ts +2 -2
- package/es/components/z-templates-data-common/components/link-renderer/index.js +7 -3
- package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +7 -6
- package/es/components/z-templates-data-common/data-common.d.ts +2 -0
- package/lib/components/z-pointer-block/index.less +1 -1
- package/lib/components/z-pointer-block/z-pointer-block.js +1 -1
- package/lib/components/z-templates-data-common/components/link-renderer/index.d.ts +2 -2
- package/lib/components/z-templates-data-common/components/link-renderer/index.js +7 -3
- package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +6 -5
- package/lib/components/z-templates-data-common/data-common.d.ts +2 -0
- package/package.json +3 -3
|
@@ -3,12 +3,12 @@ import type { CheckboxValueType } from 'antd/es/checkbox/Group';
|
|
|
3
3
|
import type { TypeChartSettingProps } from '../../data-common';
|
|
4
4
|
import './index.less';
|
|
5
5
|
export interface linkParamsType extends Pick<TypeChartSettingProps, 'dataSetName'> {
|
|
6
|
-
index?: number;
|
|
6
|
+
index?: number | string;
|
|
7
7
|
width?: number;
|
|
8
8
|
dimension?: CheckboxValueType[];
|
|
9
9
|
record?: Record<string, any>;
|
|
10
10
|
}
|
|
11
|
-
export interface linkStateType extends linkParamsType, Pick<TypeChartSettingProps, 'title' | 'autoLoad' | 'refreshRate'> {
|
|
11
|
+
export interface linkStateType extends linkParamsType, Pick<TypeChartSettingProps, 'chartTitle' | 'title' | 'autoLoad' | 'refreshRate'> {
|
|
12
12
|
}
|
|
13
13
|
declare const LinkRenderer: (props: Pick<TypeChartSettingProps, "onConfirm" | "chartRef" | "dimJson" | "linkPage" | "linkPageTitle"> & {
|
|
14
14
|
onBack?: () => void;
|
|
@@ -59,7 +59,7 @@ var LinkRenderer = function LinkRenderer(props) {
|
|
|
59
59
|
return function () {
|
|
60
60
|
handleClearInterval();
|
|
61
61
|
};
|
|
62
|
-
}, [linkState.dataSetName, linkState.autoLoad]);
|
|
62
|
+
}, [linkState.dataSetName, linkState.index, linkState.autoLoad]);
|
|
63
63
|
|
|
64
64
|
// 获取表头
|
|
65
65
|
var handleGetColumns = function handleGetColumns(stateParams) {
|
|
@@ -208,12 +208,14 @@ var LinkRenderer = function LinkRenderer(props) {
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
var _linkPage$index2 = linkPage[index],
|
|
211
|
+
chartTitle = _linkPage$index2.chartTitle,
|
|
211
212
|
title = _linkPage$index2.title,
|
|
212
213
|
autoLoad = _linkPage$index2.autoLoad,
|
|
213
214
|
refreshRate = _linkPage$index2.refreshRate;
|
|
214
215
|
var stateData = _extends({}, state, {
|
|
215
216
|
width: width,
|
|
216
217
|
index: index,
|
|
218
|
+
chartTitle: chartTitle,
|
|
217
219
|
title: title,
|
|
218
220
|
autoLoad: autoLoad,
|
|
219
221
|
refreshRate: refreshRate
|
|
@@ -250,12 +252,14 @@ var LinkRenderer = function LinkRenderer(props) {
|
|
|
250
252
|
dataSetName = _ref6[0],
|
|
251
253
|
index = _ref6[1];
|
|
252
254
|
var _linkPage$index3 = linkPage[index],
|
|
255
|
+
chartTitle = _linkPage$index3.chartTitle,
|
|
253
256
|
title = _linkPage$index3.title,
|
|
254
257
|
autoLoad = _linkPage$index3.autoLoad,
|
|
255
258
|
refreshRate = _linkPage$index3.refreshRate;
|
|
256
259
|
var stateData = _extends({}, linkState, {
|
|
257
260
|
dataSetName: dataSetName,
|
|
258
261
|
index: index,
|
|
262
|
+
chartTitle: chartTitle,
|
|
259
263
|
title: title,
|
|
260
264
|
autoLoad: autoLoad,
|
|
261
265
|
refreshRate: refreshRate
|
|
@@ -270,10 +274,10 @@ var LinkRenderer = function LinkRenderer(props) {
|
|
|
270
274
|
}, /*#__PURE__*/React.createElement(ArrowLeftOutlined, {
|
|
271
275
|
className: "arrow-left",
|
|
272
276
|
onClick: onBack
|
|
273
|
-
}), /*#__PURE__*/React.createElement("span", null, linkPageTitle)), (linkPage === null || linkPage === void 0 ? void 0 : (_linkPage$filter = linkPage.filter(function (field) {
|
|
277
|
+
}), /*#__PURE__*/React.createElement("span", null, linkState.chartTitle || linkPageTitle)), (linkPage === null || linkPage === void 0 ? void 0 : (_linkPage$filter = linkPage.filter(function (field) {
|
|
274
278
|
return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName;
|
|
275
279
|
})) === null || _linkPage$filter === void 0 ? void 0 : _linkPage$filter.length) <= 1 ? null : /*#__PURE__*/React.createElement(_Radio.Group, {
|
|
276
|
-
value: "" + (linkState === null || linkState === void 0 ? void 0 : linkState.
|
|
280
|
+
value: "" + (linkState === null || linkState === void 0 ? void 0 : linkState.dataSetName) + separator + linkState.index,
|
|
277
281
|
onChange: handleLinkChange
|
|
278
282
|
}, linkPage === null || linkPage === void 0 ? void 0 : linkPage.map(function (field, index) {
|
|
279
283
|
return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName ? /*#__PURE__*/React.createElement(_Radio.Button, {
|
package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js
CHANGED
|
@@ -3,7 +3,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
3
3
|
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
4
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
5
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
-
import { computeWidth, handleDecimal, handleThousand, handlePercent, handleLink, handleCondition, getDimTarget } from "../../data-common.helper";
|
|
6
|
+
import { separator, computeWidth, handleDecimal, handleThousand, handlePercent, handleLink, handleCondition, getDimTarget } from "../../data-common.helper";
|
|
7
7
|
export var stringTrim = function stringTrim(str) {
|
|
8
8
|
if (!str) return '';
|
|
9
9
|
return str.replace(/`|'|"/g, '');
|
|
@@ -174,7 +174,7 @@ export var handleValueFormat = function handleValueFormat(value, record, find, c
|
|
|
174
174
|
export var handleColumns = function handleColumns(option, expressions, onLink) {
|
|
175
175
|
var dimTarget = [].concat(option.dimension, option.index);
|
|
176
176
|
return dimTarget.map(function (title) {
|
|
177
|
-
var _find3, _find4, _title$toString;
|
|
177
|
+
var _find3, _find3$link, _find4, _find5, _title$toString;
|
|
178
178
|
var find;
|
|
179
179
|
var dataIndex;
|
|
180
180
|
var condition;
|
|
@@ -199,17 +199,18 @@ export var handleColumns = function handleColumns(option, expressions, onLink) {
|
|
|
199
199
|
// condition = expressions?.filter((item) => item?.index?.includes(find?.name));
|
|
200
200
|
// }
|
|
201
201
|
|
|
202
|
+
var _ref4 = ((_find3 = find) === null || _find3 === void 0 ? void 0 : (_find3$link = _find3.link) === null || _find3$link === void 0 ? void 0 : _find3$link.split(separator)) || [],
|
|
203
|
+
dataSetName = _ref4[0];
|
|
202
204
|
return {
|
|
203
205
|
title: title,
|
|
204
206
|
dataIndex: dataIndex,
|
|
205
207
|
ellipsis: true,
|
|
206
|
-
sorter: (
|
|
207
|
-
width: ((
|
|
208
|
+
sorter: (_find4 = find) === null || _find4 === void 0 ? void 0 : _find4.sorted,
|
|
209
|
+
width: ((_find5 = find) === null || _find5 === void 0 ? void 0 : _find5.width) || computeWidth(title === null || title === void 0 ? void 0 : (_title$toString = title.toString()) === null || _title$toString === void 0 ? void 0 : _title$toString.length),
|
|
208
210
|
render: function render(value, record) {
|
|
209
211
|
return handleValueFormat(value, record, find, condition, function () {
|
|
210
|
-
var _find5;
|
|
211
212
|
return onLink({
|
|
212
|
-
dataSetName:
|
|
213
|
+
dataSetName: dataSetName,
|
|
213
214
|
record: record
|
|
214
215
|
});
|
|
215
216
|
});
|
|
@@ -35,7 +35,7 @@ var ZPointerBlock = function ZPointerBlock(props) {
|
|
|
35
35
|
value: value,
|
|
36
36
|
groupSeparator: ""
|
|
37
37
|
})), icon ? /*#__PURE__*/React.createElement(_col["default"], {
|
|
38
|
-
className: "icon"
|
|
38
|
+
className: "z-pointer-icon"
|
|
39
39
|
}, icon) : null));
|
|
40
40
|
};
|
|
41
41
|
var _default = ZPointerBlock;
|
|
@@ -3,12 +3,12 @@ import type { CheckboxValueType } from 'antd/es/checkbox/Group';
|
|
|
3
3
|
import type { TypeChartSettingProps } from '../../data-common';
|
|
4
4
|
import './index.less';
|
|
5
5
|
export interface linkParamsType extends Pick<TypeChartSettingProps, 'dataSetName'> {
|
|
6
|
-
index?: number;
|
|
6
|
+
index?: number | string;
|
|
7
7
|
width?: number;
|
|
8
8
|
dimension?: CheckboxValueType[];
|
|
9
9
|
record?: Record<string, any>;
|
|
10
10
|
}
|
|
11
|
-
export interface linkStateType extends linkParamsType, Pick<TypeChartSettingProps, 'title' | 'autoLoad' | 'refreshRate'> {
|
|
11
|
+
export interface linkStateType extends linkParamsType, Pick<TypeChartSettingProps, 'chartTitle' | 'title' | 'autoLoad' | 'refreshRate'> {
|
|
12
12
|
}
|
|
13
13
|
declare const LinkRenderer: (props: Pick<TypeChartSettingProps, "onConfirm" | "chartRef" | "dimJson" | "linkPage" | "linkPageTitle"> & {
|
|
14
14
|
onBack?: () => void;
|
|
@@ -64,7 +64,7 @@ var LinkRenderer = function LinkRenderer(props) {
|
|
|
64
64
|
return function () {
|
|
65
65
|
handleClearInterval();
|
|
66
66
|
};
|
|
67
|
-
}, [linkState.dataSetName, linkState.autoLoad]);
|
|
67
|
+
}, [linkState.dataSetName, linkState.index, linkState.autoLoad]);
|
|
68
68
|
|
|
69
69
|
// 获取表头
|
|
70
70
|
var handleGetColumns = function handleGetColumns(stateParams) {
|
|
@@ -213,12 +213,14 @@ var LinkRenderer = function LinkRenderer(props) {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
var _linkPage$index2 = linkPage[index],
|
|
216
|
+
chartTitle = _linkPage$index2.chartTitle,
|
|
216
217
|
title = _linkPage$index2.title,
|
|
217
218
|
autoLoad = _linkPage$index2.autoLoad,
|
|
218
219
|
refreshRate = _linkPage$index2.refreshRate;
|
|
219
220
|
var stateData = (0, _extends2["default"])({}, state, {
|
|
220
221
|
width: width,
|
|
221
222
|
index: index,
|
|
223
|
+
chartTitle: chartTitle,
|
|
222
224
|
title: title,
|
|
223
225
|
autoLoad: autoLoad,
|
|
224
226
|
refreshRate: refreshRate
|
|
@@ -255,12 +257,14 @@ var LinkRenderer = function LinkRenderer(props) {
|
|
|
255
257
|
dataSetName = _ref6[0],
|
|
256
258
|
index = _ref6[1];
|
|
257
259
|
var _linkPage$index3 = linkPage[index],
|
|
260
|
+
chartTitle = _linkPage$index3.chartTitle,
|
|
258
261
|
title = _linkPage$index3.title,
|
|
259
262
|
autoLoad = _linkPage$index3.autoLoad,
|
|
260
263
|
refreshRate = _linkPage$index3.refreshRate;
|
|
261
264
|
var stateData = (0, _extends2["default"])({}, linkState, {
|
|
262
265
|
dataSetName: dataSetName,
|
|
263
266
|
index: index,
|
|
267
|
+
chartTitle: chartTitle,
|
|
264
268
|
title: title,
|
|
265
269
|
autoLoad: autoLoad,
|
|
266
270
|
refreshRate: refreshRate
|
|
@@ -275,10 +279,10 @@ var LinkRenderer = function LinkRenderer(props) {
|
|
|
275
279
|
}, /*#__PURE__*/React.createElement(_icons.ArrowLeftOutlined, {
|
|
276
280
|
className: "arrow-left",
|
|
277
281
|
onClick: onBack
|
|
278
|
-
}), /*#__PURE__*/React.createElement("span", null, linkPageTitle)), (linkPage === null || linkPage === void 0 ? void 0 : (_linkPage$filter = linkPage.filter(function (field) {
|
|
282
|
+
}), /*#__PURE__*/React.createElement("span", null, linkState.chartTitle || linkPageTitle)), (linkPage === null || linkPage === void 0 ? void 0 : (_linkPage$filter = linkPage.filter(function (field) {
|
|
279
283
|
return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName;
|
|
280
284
|
})) === null || _linkPage$filter === void 0 ? void 0 : _linkPage$filter.length) <= 1 ? null : /*#__PURE__*/React.createElement(_radio["default"].Group, {
|
|
281
|
-
value: "" + (linkState === null || linkState === void 0 ? void 0 : linkState.
|
|
285
|
+
value: "" + (linkState === null || linkState === void 0 ? void 0 : linkState.dataSetName) + _dataCommon.separator + linkState.index,
|
|
282
286
|
onChange: handleLinkChange
|
|
283
287
|
}, linkPage === null || linkPage === void 0 ? void 0 : linkPage.map(function (field, index) {
|
|
284
288
|
return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName ? /*#__PURE__*/React.createElement(_radio["default"].Button, {
|
package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js
CHANGED
|
@@ -182,7 +182,7 @@ exports.handleValueFormat = handleValueFormat;
|
|
|
182
182
|
var handleColumns = function handleColumns(option, expressions, onLink) {
|
|
183
183
|
var dimTarget = [].concat(option.dimension, option.index);
|
|
184
184
|
return dimTarget.map(function (title) {
|
|
185
|
-
var _find3, _find4, _title$toString;
|
|
185
|
+
var _find3, _find3$link, _find4, _find5, _title$toString;
|
|
186
186
|
var find;
|
|
187
187
|
var dataIndex;
|
|
188
188
|
var condition;
|
|
@@ -207,17 +207,18 @@ var handleColumns = function handleColumns(option, expressions, onLink) {
|
|
|
207
207
|
// condition = expressions?.filter((item) => item?.index?.includes(find?.name));
|
|
208
208
|
// }
|
|
209
209
|
|
|
210
|
+
var _ref4 = ((_find3 = find) === null || _find3 === void 0 ? void 0 : (_find3$link = _find3.link) === null || _find3$link === void 0 ? void 0 : _find3$link.split(_dataCommon.separator)) || [],
|
|
211
|
+
dataSetName = _ref4[0];
|
|
210
212
|
return {
|
|
211
213
|
title: title,
|
|
212
214
|
dataIndex: dataIndex,
|
|
213
215
|
ellipsis: true,
|
|
214
|
-
sorter: (
|
|
215
|
-
width: ((
|
|
216
|
+
sorter: (_find4 = find) === null || _find4 === void 0 ? void 0 : _find4.sorted,
|
|
217
|
+
width: ((_find5 = find) === null || _find5 === void 0 ? void 0 : _find5.width) || (0, _dataCommon.computeWidth)(title === null || title === void 0 ? void 0 : (_title$toString = title.toString()) === null || _title$toString === void 0 ? void 0 : _title$toString.length),
|
|
216
218
|
render: function render(value, record) {
|
|
217
219
|
return handleValueFormat(value, record, find, condition, function () {
|
|
218
|
-
var _find5;
|
|
219
220
|
return onLink({
|
|
220
|
-
dataSetName:
|
|
221
|
+
dataSetName: dataSetName,
|
|
221
222
|
record: record
|
|
222
223
|
});
|
|
223
224
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ztocwst/rc-pro-materials",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"description": "@ztocwst/rc-pro-materials",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
},
|
|
87
87
|
"componentConfig": {
|
|
88
88
|
"isComponentLibrary": true,
|
|
89
|
-
"materialSchema": "https://npm.onmicrosoft.cn/@ztocwst/rc-pro-materials@0.1.
|
|
89
|
+
"materialSchema": "https://npm.onmicrosoft.cn/@ztocwst/rc-pro-materials@0.1.32/build/lowcode/assets-prod.json"
|
|
90
90
|
},
|
|
91
|
-
"homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.1.
|
|
91
|
+
"homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.1.32/build/index.html",
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"registry": "https://registry.npmjs.org/",
|
|
94
94
|
"access": "public"
|