@openli1115/lowcode-edit-pro-table 1.0.76 → 1.0.77

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.
@@ -9,6 +9,7 @@ import { FORM_EMPTY_ARRAY } from "../../context/useComponentContext";
9
9
  var _window$React = window.React,
10
10
  createElement = _window$React.createElement,
11
11
  useCallback = _window$React.useCallback,
12
+ useEffect = _window$React.useEffect,
12
13
  useMemo = _window$React.useMemo;
13
14
  function toStr(v) {
14
15
  if (v == null) return '';
@@ -204,6 +205,12 @@ var ProCascaderSelect = function ProCascaderSelect(props) {
204
205
  }, [dataSource, options]);
205
206
  var handleChange = function handleChange(newValue, _data, extra) {
206
207
  var next = cascaderChangeToPath(newValue, extra);
208
+ console.log('[ProCascaderSelect] onChange', {
209
+ fieldPath: fieldPath,
210
+ rawValue: newValue,
211
+ selectedPath: extra === null || extra === void 0 ? void 0 : extra.selectedPath,
212
+ normalizedPath: next
213
+ });
207
214
  commit(next);
208
215
  schemaOnChange === null || schemaOnChange === void 0 ? void 0 : schemaOnChange(next, structureName, structureField);
209
216
  };
@@ -226,6 +233,28 @@ var ProCascaderSelect = function ProCascaderSelect(props) {
226
233
  if (path.length === 0) return '';
227
234
  return path[path.length - 1];
228
235
  }, [displayValue, isMultiple]);
236
+ useEffect(function () {
237
+ var leaf = displayValue.length > 0 ? displayValue[displayValue.length - 1] : '';
238
+ var resolvedPathFromLeaf = leaf ? findPathByNodeValue(cascaderOptions, toStr(leaf)) : [];
239
+ console.log('[ProCascaderSelect] render-debug', {
240
+ fieldPath: fieldPath,
241
+ structureName: structureName,
242
+ structureField: structureField,
243
+ rawBoundValue: value,
244
+ normalizedDisplayPath: displayValue,
245
+ fusionValue: valueForFusion,
246
+ isMultiple: isMultiple,
247
+ optionsCount: cascaderOptions.length,
248
+ resolvedPathFromLeaf: resolvedPathFromLeaf,
249
+ optionsPreview: cascaderOptions.slice(0, 3).map(function (n) {
250
+ return {
251
+ value: getNodeValue(n),
252
+ label: getNodeLabel(n),
253
+ childrenCount: getNodeChildren(n).length
254
+ };
255
+ })
256
+ });
257
+ }, [fieldPath, structureName, structureField, value, displayValue, valueForFusion, isMultiple, cascaderOptions]);
229
258
 
230
259
  /** dataSource 未就绪或异步时,仍用自定义文案兜底 */
231
260
  var schemaDisplayRender = props.displayRender;
@@ -14,6 +14,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
14
14
  var _window$React = window.React,
15
15
  createElement = _window$React.createElement,
16
16
  useCallback = _window$React.useCallback,
17
+ useEffect = _window$React.useEffect,
17
18
  useMemo = _window$React.useMemo;
18
19
  function toStr(v) {
19
20
  if (v == null) return '';
@@ -209,6 +210,12 @@ var ProCascaderSelect = function ProCascaderSelect(props) {
209
210
  }, [dataSource, options]);
210
211
  var handleChange = function handleChange(newValue, _data, extra) {
211
212
  var next = cascaderChangeToPath(newValue, extra);
213
+ console.log('[ProCascaderSelect] onChange', {
214
+ fieldPath: fieldPath,
215
+ rawValue: newValue,
216
+ selectedPath: extra === null || extra === void 0 ? void 0 : extra.selectedPath,
217
+ normalizedPath: next
218
+ });
212
219
  commit(next);
213
220
  schemaOnChange === null || schemaOnChange === void 0 ? void 0 : schemaOnChange(next, structureName, structureField);
214
221
  };
@@ -231,6 +238,28 @@ var ProCascaderSelect = function ProCascaderSelect(props) {
231
238
  if (path.length === 0) return '';
232
239
  return path[path.length - 1];
233
240
  }, [displayValue, isMultiple]);
241
+ useEffect(function () {
242
+ var leaf = displayValue.length > 0 ? displayValue[displayValue.length - 1] : '';
243
+ var resolvedPathFromLeaf = leaf ? findPathByNodeValue(cascaderOptions, toStr(leaf)) : [];
244
+ console.log('[ProCascaderSelect] render-debug', {
245
+ fieldPath: fieldPath,
246
+ structureName: structureName,
247
+ structureField: structureField,
248
+ rawBoundValue: value,
249
+ normalizedDisplayPath: displayValue,
250
+ fusionValue: valueForFusion,
251
+ isMultiple: isMultiple,
252
+ optionsCount: cascaderOptions.length,
253
+ resolvedPathFromLeaf: resolvedPathFromLeaf,
254
+ optionsPreview: cascaderOptions.slice(0, 3).map(function (n) {
255
+ return {
256
+ value: getNodeValue(n),
257
+ label: getNodeLabel(n),
258
+ childrenCount: getNodeChildren(n).length
259
+ };
260
+ })
261
+ });
262
+ }, [fieldPath, structureName, structureField, value, displayValue, valueForFusion, isMultiple, cascaderOptions]);
234
263
 
235
264
  /** dataSource 未就绪或异步时,仍用自定义文案兜底 */
236
265
  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.76';
104
+ version = '1.0.77';
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.76';
109
+ version = '1.0.77';
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.76",
3
+ "version": "1.0.77",
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.76/build/lowcode/assets-prod.json"
104
+ "materialSchema": "https://unpkg.com/@openli1115/lowcode-edit-pro-table@1.0.77/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.76/build/index.html"
109
+ "homepage": "https://unpkg.com/@openli1115/lowcode-edit-pro-table@1.0.77/build/index.html"
110
110
  }