ywana-core8 0.0.596 → 0.0.599

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.
package/dist/index.umd.js CHANGED
@@ -4635,8 +4635,9 @@
4635
4635
  outlined = _ref7.outlined;
4636
4636
  var id = field.id,
4637
4637
  format = field.format,
4638
- label = field.label,
4639
4638
  options = field.options,
4639
+ _field$required = field.required,
4640
+ required = _field$required === void 0 ? false : _field$required,
4640
4641
  _field$editable = field.editable,
4641
4642
  editable = _field$editable === void 0 ? true : _field$editable,
4642
4643
  _field$predictive = field.predictive,
@@ -4655,6 +4656,8 @@
4655
4656
  }
4656
4657
 
4657
4658
  function renderFormat(format, options) {
4659
+ var label = required ? field.label + " *" : field.label;
4660
+
4658
4661
  switch (format) {
4659
4662
  case FORMATS.IMG:
4660
4663
  return /*#__PURE__*/React__default["default"].createElement("div", {
@@ -5205,9 +5208,12 @@
5205
5208
  label = field.label,
5206
5209
  _field$visible = field.visible,
5207
5210
  visible = _field$visible === void 0 ? true : _field$visible,
5208
- optional = field.optional;
5211
+ optional = field.optional,
5212
+ _field$hidden = field.hidden,
5213
+ hidden = _field$hidden === void 0 ? false : _field$hidden;
5209
5214
  if (!visible) return null;
5210
5215
  if (optional && value === undefined) return null;
5216
+ if (hidden) return null;
5211
5217
 
5212
5218
  switch (type) {
5213
5219
  case TYPES.STRING:
@@ -5565,6 +5571,7 @@
5565
5571
  _props$canEdit = props.canEdit,
5566
5572
  canEdit = _props$canEdit === void 0 ? false : _props$canEdit,
5567
5573
  searchBy = props.searchBy,
5574
+ addValidator = props.addValidator,
5568
5575
  _props$autosave = props.autosave,
5569
5576
  autosave = _props$autosave === void 0 ? false : _props$autosave,
5570
5577
  _props$delay = props.delay,
@@ -5613,7 +5620,8 @@
5613
5620
  site.openDialog( /*#__PURE__*/React__default["default"].createElement(CreateContentDialog, {
5614
5621
  label: "" + name,
5615
5622
  type: schema,
5616
- onOK: onOK
5623
+ onOK: onOK,
5624
+ validator: addValidator
5617
5625
  }));
5618
5626
  }
5619
5627