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

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.
@@ -14,6 +14,14 @@ var _window$React = window.React,
14
14
  useMemo = _window$React.useMemo,
15
15
  useContext = _window$React.useContext,
16
16
  useState = _window$React.useState;
17
+
18
+ /** 与预览 previewFlowDebug 一致:window.__PREVIEW_FLOW_LOG__ === false 时静音 */
19
+ function previewFlowCascader(tag, detail) {
20
+ if (typeof window !== 'undefined' && window.__PREVIEW_FLOW_LOG__ === false) {
21
+ return;
22
+ }
23
+ console.log('[PreviewFlow][Cascader]', tag, detail);
24
+ }
17
25
  function toStr(v) {
18
26
  if (v == null) return '';
19
27
  return String(v);
@@ -329,11 +337,11 @@ var ProCascaderSelect = function ProCascaderSelect(props) {
329
337
  }, [dataSource, options]);
330
338
  var handleChange = function handleChange(newValue, _data, extra) {
331
339
  var next = cascaderChangeToPath(newValue, extra);
332
- console.log('[ProCascaderSelect] onChange', {
340
+ previewFlowCascader('onChange', {
333
341
  fieldPath: fieldPath,
334
342
  rawValue: newValue,
335
- selectedPath: extra === null || extra === void 0 ? void 0 : extra.selectedPath,
336
- normalizedPath: next
343
+ normalizedPath: next,
344
+ selectedPathLen: Array.isArray(extra === null || extra === void 0 ? void 0 : extra.selectedPath) ? extra.selectedPath.length : 0
337
345
  });
338
346
  commit(next);
339
347
  schemaOnChange === null || schemaOnChange === void 0 ? void 0 : schemaOnChange(next, structureName, structureField);
@@ -385,30 +393,21 @@ var ProCascaderSelect = function ProCascaderSelect(props) {
385
393
  useEffect(function () {
386
394
  var leaf = displayValue.length > 0 ? displayValue[displayValue.length - 1] : '';
387
395
  var resolvedPathFromLeaf = leaf ? findPathByNodeValue(cascaderOptions, toStr(leaf)) : [];
388
- console.log('[ProCascaderSelect] echo-id-and-path', {
389
- fieldPath: fieldPath,
390
- incomingLeafId: incomingLeafId,
391
- packedPathFromLeaf: packedPathFromLeaf
392
- });
393
- console.log('[ProCascaderSelect] render-debug', {
396
+ previewFlowCascader('echo', {
394
397
  fieldPath: fieldPath,
395
398
  structureName: structureName,
396
399
  structureField: structureField,
397
- rawBoundValue: value,
400
+ rangeInnerTable: rangeInnerTable,
401
+ incomingLeafId: incomingLeafId,
402
+ packedPathFromLeafLen: packedPathFromLeaf.length,
403
+ rawBoundValuePreview: typeof value === 'object' ? JSON.stringify(value).slice(0, 120) : String(value).slice(0, 80),
398
404
  normalizedDisplayPath: displayValue,
399
- fusionValue: valueForFusion,
405
+ fusionValuePreview: typeof valueForFusion === 'object' ? JSON.stringify(valueForFusion).slice(0, 80) : String(valueForFusion).slice(0, 80),
400
406
  isMultiple: isMultiple,
401
407
  optionsCount: cascaderOptions.length,
402
- resolvedPathFromLeaf: resolvedPathFromLeaf,
403
- optionsPreview: cascaderOptions.slice(0, 3).map(function (n) {
404
- return {
405
- value: getNodeValue(n),
406
- label: getNodeLabel(n),
407
- childrenCount: getNodeChildren(n).length
408
- };
409
- })
408
+ resolvedPathFromLeafLen: resolvedPathFromLeaf.length
410
409
  });
411
- }, [fieldPath, structureName, structureField, value, displayValue, valueForFusion, isMultiple, cascaderOptions]);
410
+ }, [fieldPath, structureName, structureField, rangeInnerTable, incomingLeafId, packedPathFromLeaf, value, displayValue, valueForFusion, isMultiple, cascaderOptions]);
412
411
 
413
412
  /** dataSource 未就绪或异步时,仍用自定义文案兜底 */
414
413
  var schemaDisplayRender = props.displayRender;
@@ -19,6 +19,14 @@ var _window$React = window.React,
19
19
  useMemo = _window$React.useMemo,
20
20
  useContext = _window$React.useContext,
21
21
  useState = _window$React.useState;
22
+
23
+ /** 与预览 previewFlowDebug 一致:window.__PREVIEW_FLOW_LOG__ === false 时静音 */
24
+ function previewFlowCascader(tag, detail) {
25
+ if (typeof window !== 'undefined' && window.__PREVIEW_FLOW_LOG__ === false) {
26
+ return;
27
+ }
28
+ console.log('[PreviewFlow][Cascader]', tag, detail);
29
+ }
22
30
  function toStr(v) {
23
31
  if (v == null) return '';
24
32
  return String(v);
@@ -334,11 +342,11 @@ var ProCascaderSelect = function ProCascaderSelect(props) {
334
342
  }, [dataSource, options]);
335
343
  var handleChange = function handleChange(newValue, _data, extra) {
336
344
  var next = cascaderChangeToPath(newValue, extra);
337
- console.log('[ProCascaderSelect] onChange', {
345
+ previewFlowCascader('onChange', {
338
346
  fieldPath: fieldPath,
339
347
  rawValue: newValue,
340
- selectedPath: extra === null || extra === void 0 ? void 0 : extra.selectedPath,
341
- normalizedPath: next
348
+ normalizedPath: next,
349
+ selectedPathLen: Array.isArray(extra === null || extra === void 0 ? void 0 : extra.selectedPath) ? extra.selectedPath.length : 0
342
350
  });
343
351
  commit(next);
344
352
  schemaOnChange === null || schemaOnChange === void 0 ? void 0 : schemaOnChange(next, structureName, structureField);
@@ -390,30 +398,21 @@ var ProCascaderSelect = function ProCascaderSelect(props) {
390
398
  useEffect(function () {
391
399
  var leaf = displayValue.length > 0 ? displayValue[displayValue.length - 1] : '';
392
400
  var resolvedPathFromLeaf = leaf ? findPathByNodeValue(cascaderOptions, toStr(leaf)) : [];
393
- console.log('[ProCascaderSelect] echo-id-and-path', {
394
- fieldPath: fieldPath,
395
- incomingLeafId: incomingLeafId,
396
- packedPathFromLeaf: packedPathFromLeaf
397
- });
398
- console.log('[ProCascaderSelect] render-debug', {
401
+ previewFlowCascader('echo', {
399
402
  fieldPath: fieldPath,
400
403
  structureName: structureName,
401
404
  structureField: structureField,
402
- rawBoundValue: value,
405
+ rangeInnerTable: rangeInnerTable,
406
+ incomingLeafId: incomingLeafId,
407
+ packedPathFromLeafLen: packedPathFromLeaf.length,
408
+ rawBoundValuePreview: typeof value === 'object' ? JSON.stringify(value).slice(0, 120) : String(value).slice(0, 80),
403
409
  normalizedDisplayPath: displayValue,
404
- fusionValue: valueForFusion,
410
+ fusionValuePreview: typeof valueForFusion === 'object' ? JSON.stringify(valueForFusion).slice(0, 80) : String(valueForFusion).slice(0, 80),
405
411
  isMultiple: isMultiple,
406
412
  optionsCount: cascaderOptions.length,
407
- resolvedPathFromLeaf: resolvedPathFromLeaf,
408
- optionsPreview: cascaderOptions.slice(0, 3).map(function (n) {
409
- return {
410
- value: getNodeValue(n),
411
- label: getNodeLabel(n),
412
- childrenCount: getNodeChildren(n).length
413
- };
414
- })
413
+ resolvedPathFromLeafLen: resolvedPathFromLeaf.length
415
414
  });
416
- }, [fieldPath, structureName, structureField, value, displayValue, valueForFusion, isMultiple, cascaderOptions]);
415
+ }, [fieldPath, structureName, structureField, rangeInnerTable, incomingLeafId, packedPathFromLeaf, value, displayValue, valueForFusion, isMultiple, cascaderOptions]);
417
416
 
418
417
  /** dataSource 未就绪或异步时,仍用自定义文案兜底 */
419
418
  var schemaDisplayRender = props.displayRender;
@@ -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.93';
104
+ version = '1.0.94';
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.93';
109
+ version = '1.0.94';
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.93",
3
+ "version": "1.0.94",
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.93/build/lowcode/assets-prod.json"
104
+ "materialSchema": "https://unpkg.com/@openli1115/lowcode-edit-pro-table@1.0.94/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.93/build/index.html"
109
+ "homepage": "https://unpkg.com/@openli1115/lowcode-edit-pro-table@1.0.94/build/index.html"
110
110
  }