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.cjs +11 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +11 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +11 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +2 -2
- package/src/domain/ContentEditor.js +4 -1
- package/src/domain/ContentViewer.js +2 -1
package/dist/index.cjs
CHANGED
@@ -4641,8 +4641,9 @@ var StringEditor = function StringEditor(_ref7) {
|
|
4641
4641
|
outlined = _ref7.outlined;
|
4642
4642
|
var id = field.id,
|
4643
4643
|
format = field.format,
|
4644
|
-
label = field.label,
|
4645
4644
|
options = field.options,
|
4645
|
+
_field$required = field.required,
|
4646
|
+
required = _field$required === void 0 ? false : _field$required,
|
4646
4647
|
_field$editable = field.editable,
|
4647
4648
|
editable = _field$editable === void 0 ? true : _field$editable,
|
4648
4649
|
_field$predictive = field.predictive,
|
@@ -4661,6 +4662,8 @@ var StringEditor = function StringEditor(_ref7) {
|
|
4661
4662
|
}
|
4662
4663
|
|
4663
4664
|
function renderFormat(format, options) {
|
4665
|
+
var label = required ? field.label + " *" : field.label;
|
4666
|
+
|
4664
4667
|
switch (format) {
|
4665
4668
|
case FORMATS.IMG:
|
4666
4669
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
@@ -5211,9 +5214,12 @@ var FieldViewer = function FieldViewer(props) {
|
|
5211
5214
|
label = field.label,
|
5212
5215
|
_field$visible = field.visible,
|
5213
5216
|
visible = _field$visible === void 0 ? true : _field$visible,
|
5214
|
-
optional = field.optional
|
5217
|
+
optional = field.optional,
|
5218
|
+
_field$hidden = field.hidden,
|
5219
|
+
hidden = _field$hidden === void 0 ? false : _field$hidden;
|
5215
5220
|
if (!visible) return null;
|
5216
5221
|
if (optional && value === undefined) return null;
|
5222
|
+
if (hidden) return null;
|
5217
5223
|
|
5218
5224
|
switch (type) {
|
5219
5225
|
case TYPES.STRING:
|
@@ -5571,6 +5577,7 @@ var CollectionPage = function CollectionPage(props) {
|
|
5571
5577
|
_props$canEdit = props.canEdit,
|
5572
5578
|
canEdit = _props$canEdit === void 0 ? false : _props$canEdit,
|
5573
5579
|
searchBy = props.searchBy,
|
5580
|
+
addValidator = props.addValidator,
|
5574
5581
|
_props$autosave = props.autosave,
|
5575
5582
|
autosave = _props$autosave === void 0 ? false : _props$autosave,
|
5576
5583
|
_props$delay = props.delay,
|
@@ -5619,7 +5626,8 @@ var CollectionPage = function CollectionPage(props) {
|
|
5619
5626
|
site.openDialog( /*#__PURE__*/React__default["default"].createElement(CreateContentDialog, {
|
5620
5627
|
label: "" + name,
|
5621
5628
|
type: schema,
|
5622
|
-
onOK: onOK
|
5629
|
+
onOK: onOK,
|
5630
|
+
validator: addValidator
|
5623
5631
|
}));
|
5624
5632
|
}
|
5625
5633
|
|