gd-sprest-bs 9.1.5 → 9.1.8
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/build/components/field/index.js +4 -7
- package/build/components/listForm/index.js +14 -0
- package/dist/gd-sprest-bs-icons.js +246 -246
- package/dist/gd-sprest-bs-icons.min.js +1 -1
- package/dist/gd-sprest-bs.js +6 -6
- package/dist/gd-sprest-bs.min.js +1 -1
- package/package.json +2 -2
- package/pnpm-lock.yaml +4 -4
- package/src/components/field/index.ts +4 -7
- package/src/components/listForm/index.ts +15 -0
|
@@ -187,13 +187,10 @@ var Field = function (props) {
|
|
|
187
187
|
case gd_sprest_1.SPTypes.FieldType.Boolean:
|
|
188
188
|
// Set the type
|
|
189
189
|
controlProps.type = core_1.Components.FormControlTypes.Checkbox;
|
|
190
|
-
//
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
// Clear the label
|
|
195
|
-
controlProps.label = "";
|
|
196
|
-
}
|
|
190
|
+
// Create the item
|
|
191
|
+
controlProps.items = [{ label: controlProps.label }];
|
|
192
|
+
// Clear the label
|
|
193
|
+
controlProps.label = "";
|
|
197
194
|
break;
|
|
198
195
|
// Choice
|
|
199
196
|
case gd_sprest_1.SPTypes.FieldType.Choice:
|
|
@@ -177,6 +177,14 @@ exports.ListForm.renderDisplayForm = function (props) {
|
|
|
177
177
|
control.el.innerHTML = control.props.data;
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
+
// Else, detect xml
|
|
181
|
+
else if (/</g.test(html)) {
|
|
182
|
+
// Update the value
|
|
183
|
+
mapper[fieldName].value = html.replace(/</g, '<')
|
|
184
|
+
.replace(/>/g, '>')
|
|
185
|
+
.replace(/&/g, '&')
|
|
186
|
+
.replace(/"/g, '"');
|
|
187
|
+
}
|
|
180
188
|
// Add the row
|
|
181
189
|
rows.push({
|
|
182
190
|
columns: [{
|
|
@@ -664,6 +672,12 @@ exports.ListForm.renderEditForm = function (props) {
|
|
|
664
672
|
// See if this control is readonly
|
|
665
673
|
if (control.isReadonly) {
|
|
666
674
|
var html_1 = (props.info.fieldValuesAsHtml && props.info.fieldValuesAsHtml[field.InternalName]) || "";
|
|
675
|
+
// See if this is a checkbox and the label is not set
|
|
676
|
+
if (control.type == core_1.Components.FormControlTypes.Checkbox && (control.label || "").length == 0) {
|
|
677
|
+
// Update the label
|
|
678
|
+
var item = control.items[0];
|
|
679
|
+
control.label = item ? item.label : control.label;
|
|
680
|
+
}
|
|
667
681
|
// Update the control properties
|
|
668
682
|
control.type = core_1.Components.FormControlTypes.Readonly;
|
|
669
683
|
// Detect html
|