@openli1115/lowcode-edit-pro-table 1.0.94 → 1.0.95

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.
@@ -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, has } from 'lodash';
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 '';
@@ -263,8 +265,10 @@ function useCascaderBoundValue(fieldPath, structureName, structureField, unbound
263
265
  var ctxValue = useMemo(function () {
264
266
  if (!bound || !(formContext !== null && formContext !== void 0 && formContext.initialized)) return FORM_EMPTY_ARRAY;
265
267
  var values = formContext.values;
268
+
269
+ /** 不用 has:部分路径 lodash has 与 get 不一致时会导致明明有值却读不到 */
266
270
  var tryRead = function tryRead(p) {
267
- if (!p || !has(values, p)) return FORM_EMPTY_ARRAY;
271
+ if (!p) return FORM_EMPTY_ARRAY;
268
272
  var v = get(values, p);
269
273
  if (v !== undefined && v !== null) return v;
270
274
  return FORM_EMPTY_ARRAY;
@@ -277,7 +281,7 @@ function useCascaderBoundValue(fieldPath, structureName, structureField, unbound
277
281
  if (fromFlat !== FORM_EMPTY_ARRAY) return fromFlat;
278
282
  var fromNested = nestedFieldPath ? tryRead(nestedFieldPath) : FORM_EMPTY_ARRAY;
279
283
  if (fromNested !== FORM_EMPTY_ARRAY) return fromNested;
280
- if (structureField && dataBagPath && has(values, dataBagPath)) {
284
+ if (structureField && dataBagPath) {
281
285
  var bag = get(values, dataBagPath);
282
286
  if (bag && typeof bag === 'object' && !Array.isArray(bag) && structureField in bag) {
283
287
  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 '';
@@ -268,8 +270,10 @@ function useCascaderBoundValue(fieldPath, structureName, structureField, unbound
268
270
  var ctxValue = useMemo(function () {
269
271
  if (!bound || !(formContext !== null && formContext !== void 0 && formContext.initialized)) return _useComponentContext.FORM_EMPTY_ARRAY;
270
272
  var values = formContext.values;
273
+
274
+ /** 不用 has:部分路径 lodash has 与 get 不一致时会导致明明有值却读不到 */
271
275
  var tryRead = function tryRead(p) {
272
- if (!p || !(0, _lodash.has)(values, p)) return _useComponentContext.FORM_EMPTY_ARRAY;
276
+ if (!p) return _useComponentContext.FORM_EMPTY_ARRAY;
273
277
  var v = (0, _lodash.get)(values, p);
274
278
  if (v !== undefined && v !== null) return v;
275
279
  return _useComponentContext.FORM_EMPTY_ARRAY;
@@ -282,7 +286,7 @@ function useCascaderBoundValue(fieldPath, structureName, structureField, unbound
282
286
  if (fromFlat !== _useComponentContext.FORM_EMPTY_ARRAY) return fromFlat;
283
287
  var fromNested = nestedFieldPath ? tryRead(nestedFieldPath) : _useComponentContext.FORM_EMPTY_ARRAY;
284
288
  if (fromNested !== _useComponentContext.FORM_EMPTY_ARRAY) return fromNested;
285
- if (structureField && dataBagPath && (0, _lodash.has)(values, dataBagPath)) {
289
+ if (structureField && dataBagPath) {
286
290
  var bag = (0, _lodash.get)(values, dataBagPath);
287
291
  if (bag && typeof bag === 'object' && !Array.isArray(bag) && structureField in bag) {
288
292
  var v = bag[structureField];
@@ -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.94';
104
+ version = '1.0.95';
105
105
  }
106
106
  if (basicLibraryVersion === void 0) {
107
107
  basicLibraryVersion = {
@@ -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.94';
109
+ version = '1.0.95';
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.94",
3
+ "version": "1.0.95",
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.94/build/lowcode/assets-prod.json"
104
+ "materialSchema": "https://unpkg.com/@openli1115/lowcode-edit-pro-table@1.0.95/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.94/build/index.html"
109
+ "homepage": "https://unpkg.com/@openli1115/lowcode-edit-pro-table@1.0.95/build/index.html"
110
110
  }