@openli1115/lowcode-edit-pro-table 1.0.98 → 1.0.99

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.
@@ -15,16 +15,6 @@ var _window$React = window.React,
15
15
  useContext = _window$React.useContext,
16
16
  useState = _window$React.useState,
17
17
  useRef = _window$React.useRef;
18
-
19
- /** 与预览 previewFlowDebug 一致:window.__PREVIEW_FLOW_LOG__ === false 时静音 */
20
- function previewFlowCascader(tag, detail) {
21
- if (typeof window !== 'undefined' && window.__PREVIEW_FLOW_LOG__ === false) {
22
- return;
23
- }
24
- console.log('[PreviewFlow][Cascader]', tag, detail);
25
- /** 避免控制台开「正则」筛选时,[] 被当成字符类导致搜不到;用纯文本筛「PreviewFlow Cascader」即可 */
26
- console.log('PreviewFlow Cascader ·', tag, detail);
27
- }
28
18
  function toStr(v) {
29
19
  if (v == null) return '';
30
20
  return String(v);
@@ -390,22 +380,9 @@ var ProCascaderSelect = function ProCascaderSelect(props) {
390
380
  if (pathPersistAttemptsRef.current.has(attemptKey)) return;
391
381
  pathPersistAttemptsRef.current.add(attemptKey);
392
382
  commit(expanded);
393
- previewFlowCascader('persistScalarOrPartialToPath', {
394
- fieldPath: fieldPath,
395
- structureName: structureName,
396
- structureField: structureField,
397
- from: typeof value === 'object' ? JSON.stringify(value).slice(0, 160) : String(value).slice(0, 80),
398
- expanded: expanded
399
- });
400
383
  }, [fieldPath, value, cascaderOptions, commit, structureName, structureField]);
401
384
  var handleChange = function handleChange(newValue, _data, extra) {
402
385
  var next = cascaderChangeToPath(newValue, extra);
403
- previewFlowCascader('onChange', {
404
- fieldPath: fieldPath,
405
- rawValue: newValue,
406
- normalizedPath: next,
407
- selectedPathLen: Array.isArray(extra === null || extra === void 0 ? void 0 : extra.selectedPath) ? extra.selectedPath.length : 0
408
- });
409
386
  commit(next);
410
387
  schemaOnChange === null || schemaOnChange === void 0 ? void 0 : schemaOnChange(next, structureName, structureField);
411
388
  };
@@ -414,31 +391,6 @@ var ProCascaderSelect = function ProCascaderSelect(props) {
414
391
  var displayValue = useMemo(function () {
415
392
  return normalizeCascaderPath(value, cascaderOptions);
416
393
  }, [value, cascaderOptions]);
417
- var incomingLeafId = useMemo(function () {
418
- if (Array.isArray(value)) {
419
- var cleaned = value.filter(function (x) {
420
- return x != null && x !== '';
421
- });
422
- return cleaned.length > 0 ? toStr(cleaned[cleaned.length - 1]) : '';
423
- }
424
- if (typeof value === 'number' && !Number.isNaN(value)) return toStr(value);
425
- if (typeof value === 'string' && value.trim()) {
426
- try {
427
- var parsed = JSON.parse(value);
428
- if (Array.isArray(parsed) && parsed.length > 0) {
429
- return toStr(parsed[parsed.length - 1]);
430
- }
431
- } catch (_unused3) {
432
- return value;
433
- }
434
- return value;
435
- }
436
- return '';
437
- }, [value]);
438
- var packedPathFromLeaf = useMemo(function () {
439
- if (!incomingLeafId) return [];
440
- return findPathByNodeValue(cascaderOptions, incomingLeafId);
441
- }, [cascaderOptions, incomingLeafId]);
442
394
 
443
395
  /**
444
396
  * 回显兼容:
@@ -453,24 +405,6 @@ var ProCascaderSelect = function ProCascaderSelect(props) {
453
405
  if (path.length === 0) return '';
454
406
  return path[path.length - 1];
455
407
  }, [displayValue, isMultiple]);
456
- useEffect(function () {
457
- var leaf = displayValue.length > 0 ? displayValue[displayValue.length - 1] : '';
458
- var resolvedPathFromLeaf = leaf ? findPathByNodeValue(cascaderOptions, toStr(leaf)) : [];
459
- previewFlowCascader('echo', {
460
- fieldPath: fieldPath,
461
- structureName: structureName,
462
- structureField: structureField,
463
- rangeInnerTable: rangeInnerTable,
464
- incomingLeafId: incomingLeafId,
465
- packedPathFromLeafLen: packedPathFromLeaf.length,
466
- rawBoundValuePreview: typeof value === 'object' ? JSON.stringify(value).slice(0, 120) : String(value).slice(0, 80),
467
- normalizedDisplayPath: displayValue,
468
- fusionValuePreview: typeof valueForFusion === 'object' ? JSON.stringify(valueForFusion).slice(0, 80) : String(valueForFusion).slice(0, 80),
469
- isMultiple: isMultiple,
470
- optionsCount: cascaderOptions.length,
471
- resolvedPathFromLeafLen: resolvedPathFromLeaf.length
472
- });
473
- }, [fieldPath, structureName, structureField, rangeInnerTable, incomingLeafId, packedPathFromLeaf, value, displayValue, valueForFusion, isMultiple, cascaderOptions]);
474
408
 
475
409
  /** dataSource 未就绪或异步时,仍用自定义文案兜底 */
476
410
  var schemaDisplayRender = props.displayRender;
@@ -20,16 +20,6 @@ var _window$React = window.React,
20
20
  useContext = _window$React.useContext,
21
21
  useState = _window$React.useState,
22
22
  useRef = _window$React.useRef;
23
-
24
- /** 与预览 previewFlowDebug 一致:window.__PREVIEW_FLOW_LOG__ === false 时静音 */
25
- function previewFlowCascader(tag, detail) {
26
- if (typeof window !== 'undefined' && window.__PREVIEW_FLOW_LOG__ === false) {
27
- return;
28
- }
29
- console.log('[PreviewFlow][Cascader]', tag, detail);
30
- /** 避免控制台开「正则」筛选时,[] 被当成字符类导致搜不到;用纯文本筛「PreviewFlow Cascader」即可 */
31
- console.log('PreviewFlow Cascader ·', tag, detail);
32
- }
33
23
  function toStr(v) {
34
24
  if (v == null) return '';
35
25
  return String(v);
@@ -395,22 +385,9 @@ var ProCascaderSelect = function ProCascaderSelect(props) {
395
385
  if (pathPersistAttemptsRef.current.has(attemptKey)) return;
396
386
  pathPersistAttemptsRef.current.add(attemptKey);
397
387
  commit(expanded);
398
- previewFlowCascader('persistScalarOrPartialToPath', {
399
- fieldPath: fieldPath,
400
- structureName: structureName,
401
- structureField: structureField,
402
- from: typeof value === 'object' ? JSON.stringify(value).slice(0, 160) : String(value).slice(0, 80),
403
- expanded: expanded
404
- });
405
388
  }, [fieldPath, value, cascaderOptions, commit, structureName, structureField]);
406
389
  var handleChange = function handleChange(newValue, _data, extra) {
407
390
  var next = cascaderChangeToPath(newValue, extra);
408
- previewFlowCascader('onChange', {
409
- fieldPath: fieldPath,
410
- rawValue: newValue,
411
- normalizedPath: next,
412
- selectedPathLen: Array.isArray(extra === null || extra === void 0 ? void 0 : extra.selectedPath) ? extra.selectedPath.length : 0
413
- });
414
391
  commit(next);
415
392
  schemaOnChange === null || schemaOnChange === void 0 ? void 0 : schemaOnChange(next, structureName, structureField);
416
393
  };
@@ -419,31 +396,6 @@ var ProCascaderSelect = function ProCascaderSelect(props) {
419
396
  var displayValue = useMemo(function () {
420
397
  return normalizeCascaderPath(value, cascaderOptions);
421
398
  }, [value, cascaderOptions]);
422
- var incomingLeafId = useMemo(function () {
423
- if (Array.isArray(value)) {
424
- var cleaned = value.filter(function (x) {
425
- return x != null && x !== '';
426
- });
427
- return cleaned.length > 0 ? toStr(cleaned[cleaned.length - 1]) : '';
428
- }
429
- if (typeof value === 'number' && !Number.isNaN(value)) return toStr(value);
430
- if (typeof value === 'string' && value.trim()) {
431
- try {
432
- var parsed = JSON.parse(value);
433
- if (Array.isArray(parsed) && parsed.length > 0) {
434
- return toStr(parsed[parsed.length - 1]);
435
- }
436
- } catch (_unused3) {
437
- return value;
438
- }
439
- return value;
440
- }
441
- return '';
442
- }, [value]);
443
- var packedPathFromLeaf = useMemo(function () {
444
- if (!incomingLeafId) return [];
445
- return findPathByNodeValue(cascaderOptions, incomingLeafId);
446
- }, [cascaderOptions, incomingLeafId]);
447
399
 
448
400
  /**
449
401
  * 回显兼容:
@@ -458,24 +410,6 @@ var ProCascaderSelect = function ProCascaderSelect(props) {
458
410
  if (path.length === 0) return '';
459
411
  return path[path.length - 1];
460
412
  }, [displayValue, isMultiple]);
461
- useEffect(function () {
462
- var leaf = displayValue.length > 0 ? displayValue[displayValue.length - 1] : '';
463
- var resolvedPathFromLeaf = leaf ? findPathByNodeValue(cascaderOptions, toStr(leaf)) : [];
464
- previewFlowCascader('echo', {
465
- fieldPath: fieldPath,
466
- structureName: structureName,
467
- structureField: structureField,
468
- rangeInnerTable: rangeInnerTable,
469
- incomingLeafId: incomingLeafId,
470
- packedPathFromLeafLen: packedPathFromLeaf.length,
471
- rawBoundValuePreview: typeof value === 'object' ? JSON.stringify(value).slice(0, 120) : String(value).slice(0, 80),
472
- normalizedDisplayPath: displayValue,
473
- fusionValuePreview: typeof valueForFusion === 'object' ? JSON.stringify(valueForFusion).slice(0, 80) : String(valueForFusion).slice(0, 80),
474
- isMultiple: isMultiple,
475
- optionsCount: cascaderOptions.length,
476
- resolvedPathFromLeafLen: resolvedPathFromLeaf.length
477
- });
478
- }, [fieldPath, structureName, structureField, rangeInnerTable, incomingLeafId, packedPathFromLeaf, value, displayValue, valueForFusion, isMultiple, cascaderOptions]);
479
413
 
480
414
  /** dataSource 未就绪或异步时,仍用自定义文案兜底 */
481
415
  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.98';
104
+ version = '1.0.99';
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.98';
109
+ version = '1.0.99';
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.98",
3
+ "version": "1.0.99",
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.98/build/lowcode/assets-prod.json"
104
+ "materialSchema": "https://unpkg.com/@openli1115/lowcode-edit-pro-table@1.0.99/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.98/build/index.html"
109
+ "homepage": "https://unpkg.com/@openli1115/lowcode-edit-pro-table@1.0.99/build/index.html"
110
110
  }