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