@openli1115/lowcode-edit-pro-table 1.0.94 → 1.0.96
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/docs/404.html +3 -3
- package/build/docs/_demos/:uuid +3 -3
- package/build/docs/colorful-button.html +3 -3
- package/build/docs/colorful-input.html +3 -3
- package/build/docs/index.html +3 -3
- package/build/docs/{umi.a6120b28.js → umi.3e1d98ba.js} +1 -1
- package/build/docs/~demos/:uuid.html +3 -3
- package/build/docs/~demos/colorful-button-demo.html +3 -3
- package/build/docs/~demos/colorful-input-demo.html +3 -3
- package/build/lowcode/assets-daily.json +13 -13
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/meta.design.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +5 -5
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +3 -3
- package/dist/BizComps.js +3 -3
- package/dist/BizComps.js.map +1 -1
- package/es/components/ProCascaderSelect/index.js +14 -4
- package/lib/components/ProCascaderSelect/index.js +13 -3
- package/lowcode_es/meta.js +1 -1
- package/lowcode_lib/meta.js +1 -1
- package/package.json +3 -3
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } 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(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
5
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6
|
-
import { get
|
|
6
|
+
import { get } from 'lodash';
|
|
7
7
|
import { resolveProScreenBinding } from "../utils";
|
|
8
8
|
import { getFormContext } from "../../context/FormProvider";
|
|
9
9
|
import { FORM_EMPTY_ARRAY } from "../../context/useComponentContext";
|
|
@@ -21,6 +21,8 @@ function previewFlowCascader(tag, detail) {
|
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
console.log('[PreviewFlow][Cascader]', tag, detail);
|
|
24
|
+
/** 避免控制台开「正则」筛选时,[] 被当成字符类导致搜不到;用纯文本筛「PreviewFlow Cascader」即可 */
|
|
25
|
+
console.log('PreviewFlow Cascader ·', tag, detail);
|
|
24
26
|
}
|
|
25
27
|
function toStr(v) {
|
|
26
28
|
if (v == null) return '';
|
|
@@ -119,7 +121,11 @@ function isValidPathInTree(dataSource, pathValues) {
|
|
|
119
121
|
return true;
|
|
120
122
|
}
|
|
121
123
|
|
|
122
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* 回填仅有叶子 id(与范围内表接口 `data[0].low` / 扁平 `st_xxx.low` 一致)时,
|
|
126
|
+
* 在 dataSource 树上 DFS:沿 children 向下找到 value===叶子的节点,返回从根到叶的 id 数组,
|
|
127
|
+
* 例如 ['2025','2026'] —— 最后一项即 low,前面各项为各级父节点(由树结构决定,非接口另返)。
|
|
128
|
+
*/
|
|
123
129
|
function findPathByNodeValue(dataSource, targetValue, parentPath) {
|
|
124
130
|
if (parentPath === void 0) {
|
|
125
131
|
parentPath = [];
|
|
@@ -138,6 +144,8 @@ function findPathByNodeValue(dataSource, targetValue, parentPath) {
|
|
|
138
144
|
}
|
|
139
145
|
return [];
|
|
140
146
|
}
|
|
147
|
+
|
|
148
|
+
/** 把表单/接口里的值规范成 Fusion 用的路径数组;单叶子字符串会经 findPathByNodeValue 拼成 ['父','…','叶'] */
|
|
141
149
|
function normalizeCascaderPath(v, dataSource) {
|
|
142
150
|
var tryExpandByLeaf = function tryExpandByLeaf(leaf, fallback) {
|
|
143
151
|
if (fallback === void 0) {
|
|
@@ -263,8 +271,10 @@ function useCascaderBoundValue(fieldPath, structureName, structureField, unbound
|
|
|
263
271
|
var ctxValue = useMemo(function () {
|
|
264
272
|
if (!bound || !(formContext !== null && formContext !== void 0 && formContext.initialized)) return FORM_EMPTY_ARRAY;
|
|
265
273
|
var values = formContext.values;
|
|
274
|
+
|
|
275
|
+
/** 不用 has:部分路径 lodash has 与 get 不一致时会导致明明有值却读不到 */
|
|
266
276
|
var tryRead = function tryRead(p) {
|
|
267
|
-
if (!p
|
|
277
|
+
if (!p) return FORM_EMPTY_ARRAY;
|
|
268
278
|
var v = get(values, p);
|
|
269
279
|
if (v !== undefined && v !== null) return v;
|
|
270
280
|
return FORM_EMPTY_ARRAY;
|
|
@@ -277,7 +287,7 @@ function useCascaderBoundValue(fieldPath, structureName, structureField, unbound
|
|
|
277
287
|
if (fromFlat !== FORM_EMPTY_ARRAY) return fromFlat;
|
|
278
288
|
var fromNested = nestedFieldPath ? tryRead(nestedFieldPath) : FORM_EMPTY_ARRAY;
|
|
279
289
|
if (fromNested !== FORM_EMPTY_ARRAY) return fromNested;
|
|
280
|
-
if (structureField && dataBagPath
|
|
290
|
+
if (structureField && dataBagPath) {
|
|
281
291
|
var bag = get(values, dataBagPath);
|
|
282
292
|
if (bag && typeof bag === 'object' && !Array.isArray(bag) && structureField in bag) {
|
|
283
293
|
var v = bag[structureField];
|
|
@@ -26,6 +26,8 @@ function previewFlowCascader(tag, detail) {
|
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
console.log('[PreviewFlow][Cascader]', tag, detail);
|
|
29
|
+
/** 避免控制台开「正则」筛选时,[] 被当成字符类导致搜不到;用纯文本筛「PreviewFlow Cascader」即可 */
|
|
30
|
+
console.log('PreviewFlow Cascader ·', tag, detail);
|
|
29
31
|
}
|
|
30
32
|
function toStr(v) {
|
|
31
33
|
if (v == null) return '';
|
|
@@ -124,7 +126,11 @@ function isValidPathInTree(dataSource, pathValues) {
|
|
|
124
126
|
return true;
|
|
125
127
|
}
|
|
126
128
|
|
|
127
|
-
/**
|
|
129
|
+
/**
|
|
130
|
+
* 回填仅有叶子 id(与范围内表接口 `data[0].low` / 扁平 `st_xxx.low` 一致)时,
|
|
131
|
+
* 在 dataSource 树上 DFS:沿 children 向下找到 value===叶子的节点,返回从根到叶的 id 数组,
|
|
132
|
+
* 例如 ['2025','2026'] —— 最后一项即 low,前面各项为各级父节点(由树结构决定,非接口另返)。
|
|
133
|
+
*/
|
|
128
134
|
function findPathByNodeValue(dataSource, targetValue, parentPath) {
|
|
129
135
|
if (parentPath === void 0) {
|
|
130
136
|
parentPath = [];
|
|
@@ -143,6 +149,8 @@ function findPathByNodeValue(dataSource, targetValue, parentPath) {
|
|
|
143
149
|
}
|
|
144
150
|
return [];
|
|
145
151
|
}
|
|
152
|
+
|
|
153
|
+
/** 把表单/接口里的值规范成 Fusion 用的路径数组;单叶子字符串会经 findPathByNodeValue 拼成 ['父','…','叶'] */
|
|
146
154
|
function normalizeCascaderPath(v, dataSource) {
|
|
147
155
|
var tryExpandByLeaf = function tryExpandByLeaf(leaf, fallback) {
|
|
148
156
|
if (fallback === void 0) {
|
|
@@ -268,8 +276,10 @@ function useCascaderBoundValue(fieldPath, structureName, structureField, unbound
|
|
|
268
276
|
var ctxValue = useMemo(function () {
|
|
269
277
|
if (!bound || !(formContext !== null && formContext !== void 0 && formContext.initialized)) return _useComponentContext.FORM_EMPTY_ARRAY;
|
|
270
278
|
var values = formContext.values;
|
|
279
|
+
|
|
280
|
+
/** 不用 has:部分路径 lodash has 与 get 不一致时会导致明明有值却读不到 */
|
|
271
281
|
var tryRead = function tryRead(p) {
|
|
272
|
-
if (!p
|
|
282
|
+
if (!p) return _useComponentContext.FORM_EMPTY_ARRAY;
|
|
273
283
|
var v = (0, _lodash.get)(values, p);
|
|
274
284
|
if (v !== undefined && v !== null) return v;
|
|
275
285
|
return _useComponentContext.FORM_EMPTY_ARRAY;
|
|
@@ -282,7 +292,7 @@ function useCascaderBoundValue(fieldPath, structureName, structureField, unbound
|
|
|
282
292
|
if (fromFlat !== _useComponentContext.FORM_EMPTY_ARRAY) return fromFlat;
|
|
283
293
|
var fromNested = nestedFieldPath ? tryRead(nestedFieldPath) : _useComponentContext.FORM_EMPTY_ARRAY;
|
|
284
294
|
if (fromNested !== _useComponentContext.FORM_EMPTY_ARRAY) return fromNested;
|
|
285
|
-
if (structureField && dataBagPath
|
|
295
|
+
if (structureField && dataBagPath) {
|
|
286
296
|
var bag = (0, _lodash.get)(values, dataBagPath);
|
|
287
297
|
if (bag && typeof bag === 'object' && !Array.isArray(bag) && structureField in bag) {
|
|
288
298
|
var v = bag[structureField];
|
package/lowcode_es/meta.js
CHANGED
|
@@ -101,7 +101,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
101
101
|
packageName = '@openli1115/lowcode-edit-pro-table';
|
|
102
102
|
}
|
|
103
103
|
if (version === void 0) {
|
|
104
|
-
version = '1.0.
|
|
104
|
+
version = '1.0.96';
|
|
105
105
|
}
|
|
106
106
|
if (basicLibraryVersion === void 0) {
|
|
107
107
|
basicLibraryVersion = {
|
package/lowcode_lib/meta.js
CHANGED
|
@@ -106,7 +106,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
106
106
|
packageName = '@openli1115/lowcode-edit-pro-table';
|
|
107
107
|
}
|
|
108
108
|
if (version === void 0) {
|
|
109
|
-
version = '1.0.
|
|
109
|
+
version = '1.0.96';
|
|
110
110
|
}
|
|
111
111
|
if (basicLibraryVersion === void 0) {
|
|
112
112
|
basicLibraryVersion = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openli1115/lowcode-edit-pro-table",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.96",
|
|
4
4
|
"description": "@openli1115/lowcode-edit-pro-table",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -101,10 +101,10 @@
|
|
|
101
101
|
},
|
|
102
102
|
"componentConfig": {
|
|
103
103
|
"isComponentLibrary": true,
|
|
104
|
-
"materialSchema": "https://unpkg.com/@openli1115/lowcode-edit-pro-table@1.0.
|
|
104
|
+
"materialSchema": "https://unpkg.com/@openli1115/lowcode-edit-pro-table@1.0.96/build/lowcode/assets-prod.json"
|
|
105
105
|
},
|
|
106
106
|
"lcMeta": {
|
|
107
107
|
"type": "component"
|
|
108
108
|
},
|
|
109
|
-
"homepage": "https://unpkg.com/@openli1115/lowcode-edit-pro-table@1.0.
|
|
109
|
+
"homepage": "https://unpkg.com/@openli1115/lowcode-edit-pro-table@1.0.96/build/index.html"
|
|
110
110
|
}
|