gd-sprest-bs 8.6.1 → 8.6.5
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/README.md +1 -1
- package/build/components/field/index.js +8 -12
- 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 +5 -5
- 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 +8 -13
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## SharePoint Bootstrap Library
|
|
4
4
|
|
|
5
|
-
This library extends the [Bootstrap Library](https://getbootstrap.com/), to help create modern components in SharePoint 2013/Online (Classic) environments. Reference the [SharePoint REST Bootstrap library](https://
|
|
5
|
+
This library extends the [Bootstrap Library](https://getbootstrap.com/), to help create modern components in SharePoint 2013/Online (Classic) environments. Reference the [SharePoint REST Bootstrap library](https://dattabase.com/bs) for information on this library, or [SharePoint REST Framework](https://dattabase.com) for a full overview of the framework.
|
|
6
6
|
|
|
7
7
|
### Bugs/Issues
|
|
8
8
|
|
|
@@ -98,11 +98,12 @@ exports.Field = function (props) {
|
|
|
98
98
|
return items;
|
|
99
99
|
};
|
|
100
100
|
// Method to get the mms dropdown items
|
|
101
|
-
var getMMSItems = function (term, selectedValues) {
|
|
101
|
+
var getMMSItems = function (term, selectedValues, isRoot) {
|
|
102
102
|
if (selectedValues === void 0) { selectedValues = []; }
|
|
103
|
+
if (isRoot === void 0) { isRoot = true; }
|
|
103
104
|
var items = [];
|
|
104
105
|
// See if information exists
|
|
105
|
-
if (term.info) {
|
|
106
|
+
if (term.info && !isRoot) {
|
|
106
107
|
var isSelected = false;
|
|
107
108
|
// Parse the selected values
|
|
108
109
|
for (var i = 0; i < selectedValues.length; i++) {
|
|
@@ -128,7 +129,7 @@ exports.Field = function (props) {
|
|
|
128
129
|
continue;
|
|
129
130
|
}
|
|
130
131
|
// Get the child items
|
|
131
|
-
var childItems = getMMSItems(child, selectedValues);
|
|
132
|
+
var childItems = getMMSItems(child, selectedValues, false);
|
|
132
133
|
// Add the item
|
|
133
134
|
items = items.concat(childItems);
|
|
134
135
|
}
|
|
@@ -893,10 +894,10 @@ exports.Field = function (props) {
|
|
|
893
894
|
default:
|
|
894
895
|
// See if this is a MMS field
|
|
895
896
|
if (mmsFieldInfo) {
|
|
897
|
+
// Update the field name to the value field
|
|
898
|
+
fieldValue.name = mmsFieldInfo ? mmsFieldInfo.valueField.InternalName : fieldValue.name + "_0";
|
|
896
899
|
// See if this is a multi field
|
|
897
900
|
if (mmsFieldInfo.multi) {
|
|
898
|
-
// Update the field name to the value field
|
|
899
|
-
fieldValue.name = mmsFieldInfo ? mmsFieldInfo.valueField.InternalName : fieldValue.name + "_0";
|
|
900
901
|
// Parse the field values
|
|
901
902
|
var fieldValues = fieldValue.value || [];
|
|
902
903
|
fieldValue.value = [];
|
|
@@ -909,13 +910,8 @@ exports.Field = function (props) {
|
|
|
909
910
|
fieldValue.value = fieldValue.value.join(";#");
|
|
910
911
|
}
|
|
911
912
|
else {
|
|
912
|
-
//
|
|
913
|
-
fieldValue.value = fieldValue.value && fieldValue.value.value ?
|
|
914
|
-
__metadata: { type: "SP.Taxonomy.TaxonomyFieldValue" },
|
|
915
|
-
Label: fieldValue.value.text,
|
|
916
|
-
TermGuid: fieldValue.value.value,
|
|
917
|
-
WssId: -1
|
|
918
|
-
} : null;
|
|
913
|
+
// Set the value
|
|
914
|
+
fieldValue.value = fieldValue.value && fieldValue.value.value ? -1 + ";#" + fieldValue.value.text + "|" + fieldValue.value.value : "";
|
|
919
915
|
}
|
|
920
916
|
}
|
|
921
917
|
break;
|