ywana-core8 0.0.666 → 0.0.668

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.
@@ -5653,14 +5653,13 @@ var CollectionPage = function CollectionPage(props) {
5653
5653
  _props$actions = props.actions,
5654
5654
  actions = _props$actions === void 0 ? [] : _props$actions,
5655
5655
  onSelect = props.onSelect,
5656
+ onChange = props.onChange,
5656
5657
  _props$canFilter = props.canFilter,
5657
5658
  canFilter = _props$canFilter === void 0 ? false : _props$canFilter,
5658
5659
  _props$canAdd = props.canAdd,
5659
5660
  canAdd = _props$canAdd === void 0 ? false : _props$canAdd,
5660
5661
  _props$canDelete = props.canDelete,
5661
5662
  canDelete = _props$canDelete === void 0 ? false : _props$canDelete,
5662
- _props$canEdit = props.canEdit,
5663
- canEdit = _props$canEdit === void 0 ? false : _props$canEdit,
5664
5663
  searchBy = props.searchBy,
5665
5664
  addValidator = props.addValidator,
5666
5665
  _props$autosave = props.autosave,
@@ -5672,6 +5671,7 @@ var CollectionPage = function CollectionPage(props) {
5672
5671
  groupBy = props.groupBy,
5673
5672
  levels = props.levels,
5674
5673
  sorter = props.sorter,
5674
+ namer = props.namer,
5675
5675
  editor = props.editor,
5676
5676
  footer = props.footer,
5677
5677
  children = props.children;
@@ -5750,7 +5750,8 @@ var CollectionPage = function CollectionPage(props) {
5750
5750
  levels: levels,
5751
5751
  onSelect: onSelect,
5752
5752
  sorter: sorter,
5753
- searchBy: searchBy
5753
+ searchBy: searchBy,
5754
+ namer: namer
5754
5755
  }) : /*#__PURE__*/React.createElement(CollectionList, {
5755
5756
  groupBy: groupBy,
5756
5757
  onSelect: onSelect,
@@ -5765,9 +5766,9 @@ var CollectionPage = function CollectionPage(props) {
5765
5766
  autosave: autosave,
5766
5767
  delay: delay,
5767
5768
  canDelete: canDelete,
5768
- canEdit: canEdit,
5769
5769
  onReload: reloadSelection,
5770
- patch: patch
5770
+ patch: patch,
5771
+ onChange: onChange
5771
5772
  }), children ? /*#__PURE__*/React.createElement("article", null, children) : null, /*#__PURE__*/React.createElement("footer", null, footer)));
5772
5773
  };
5773
5774
  var CollectionFilters = function CollectionFilters(props) {
@@ -5951,6 +5952,7 @@ var CollectionTree = function CollectionTree(props) {
5951
5952
  levels = props.levels,
5952
5953
  onSelect = props.onSelect,
5953
5954
  sorter = props.sorter,
5955
+ namer = props.namer,
5954
5956
  _props$searchBy2 = props.searchBy,
5955
5957
  searchBy = _props$searchBy2 === void 0 ? [] : _props$searchBy2,
5956
5958
  schema = props.schema;
@@ -6031,7 +6033,7 @@ var CollectionTree = function CollectionTree(props) {
6031
6033
  icon: icon,
6032
6034
  key: item.id,
6033
6035
  id: item.id,
6034
- label: item.name,
6036
+ label: namer ? namer(item) : item.name,
6035
6037
  onSelect: select,
6036
6038
  selected: selected,
6037
6039
  actions: actions
@@ -6072,6 +6074,7 @@ var CollectionEditor = function CollectionEditor(props) {
6072
6074
  var save = function save() {
6073
6075
  try {
6074
6076
  var _temp3 = function _temp3() {
6077
+ if (onChange) onChange(form);
6075
6078
  setPageContext(Object.assign({}, pageContext));
6076
6079
  };
6077
6080
 
@@ -6114,6 +6117,7 @@ var CollectionEditor = function CollectionEditor(props) {
6114
6117
  delay = _props$delay2 === void 0 ? 1000 : _props$delay2,
6115
6118
  canDelete = props.canDelete,
6116
6119
  onReload = props.onReload,
6120
+ onChange = props.onChange,
6117
6121
  _props$patch2 = props.patch,
6118
6122
  patch = _props$patch2 === void 0 ? false : _props$patch2;
6119
6123
  var timer = useRef(null);