powerpagestoolkit 1.3.303 → 1.3.304
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.bundle.js +21 -1
- package/package.json +1 -1
package/dist/index.bundle.js
CHANGED
|
@@ -935,16 +935,19 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
935
935
|
key: "on",
|
|
936
936
|
value: function on(eventType, eventHandler) {
|
|
937
937
|
this.element.addEventListener(eventType, eventHandler.bind(this));
|
|
938
|
+
return this;
|
|
938
939
|
}
|
|
939
940
|
}, {
|
|
940
941
|
key: "hide",
|
|
941
942
|
value: function hide() {
|
|
942
943
|
this.visibilityController.style.display = "none";
|
|
944
|
+
return this;
|
|
943
945
|
}
|
|
944
946
|
}, {
|
|
945
947
|
key: "show",
|
|
946
948
|
value: function show() {
|
|
947
949
|
this.visibilityController.style.display = this.defaultDisplay;
|
|
950
|
+
return this;
|
|
948
951
|
}
|
|
949
952
|
}, {
|
|
950
953
|
key: "toggleVisibility",
|
|
@@ -954,6 +957,7 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
954
957
|
} else {
|
|
955
958
|
shouldShow ? this.show() : this.hide();
|
|
956
959
|
}
|
|
960
|
+
return this;
|
|
957
961
|
}
|
|
958
962
|
}, {
|
|
959
963
|
key: "setValue",
|
|
@@ -964,6 +968,7 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
964
968
|
} else {
|
|
965
969
|
this.element.value = value;
|
|
966
970
|
}
|
|
971
|
+
return this;
|
|
967
972
|
}
|
|
968
973
|
}, {
|
|
969
974
|
key: "disable",
|
|
@@ -973,6 +978,7 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
973
978
|
} catch (e) {
|
|
974
979
|
throw new Error("There was an error trying to disable the target: ".concat(this.target));
|
|
975
980
|
}
|
|
981
|
+
return this;
|
|
976
982
|
}
|
|
977
983
|
}, {
|
|
978
984
|
key: "enable",
|
|
@@ -982,6 +988,7 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
982
988
|
} catch (e) {
|
|
983
989
|
throw new Error("There was an error trying to disable the target: ".concat(this.target));
|
|
984
990
|
}
|
|
991
|
+
return this;
|
|
985
992
|
}
|
|
986
993
|
}, {
|
|
987
994
|
key: "prepend",
|
|
@@ -997,6 +1004,7 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
997
1004
|
_this.element.prepend(node);
|
|
998
1005
|
}
|
|
999
1006
|
});
|
|
1007
|
+
return this;
|
|
1000
1008
|
}
|
|
1001
1009
|
}, {
|
|
1002
1010
|
key: "append",
|
|
@@ -1012,6 +1020,7 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
1012
1020
|
_this2.element.append(node);
|
|
1013
1021
|
}
|
|
1014
1022
|
});
|
|
1023
|
+
return this;
|
|
1015
1024
|
}
|
|
1016
1025
|
}, {
|
|
1017
1026
|
key: "before",
|
|
@@ -1027,6 +1036,7 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
1027
1036
|
_this3.element.before(node);
|
|
1028
1037
|
}
|
|
1029
1038
|
});
|
|
1039
|
+
return this;
|
|
1030
1040
|
}
|
|
1031
1041
|
}, {
|
|
1032
1042
|
key: "after",
|
|
@@ -1042,6 +1052,7 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
1042
1052
|
_this4.element.after(node);
|
|
1043
1053
|
}
|
|
1044
1054
|
});
|
|
1055
|
+
return this;
|
|
1045
1056
|
}
|
|
1046
1057
|
}, {
|
|
1047
1058
|
key: "getLabel",
|
|
@@ -1058,21 +1069,25 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
1058
1069
|
}
|
|
1059
1070
|
label.append.apply(label, [" "].concat(elements));
|
|
1060
1071
|
}
|
|
1072
|
+
return this;
|
|
1061
1073
|
}
|
|
1062
1074
|
}, {
|
|
1063
1075
|
key: "addLabelTooltip",
|
|
1064
1076
|
value: function addLabelTooltip(text) {
|
|
1065
1077
|
this.appendToLabel(CreateInfoEl(text));
|
|
1078
|
+
return this;
|
|
1066
1079
|
}
|
|
1067
1080
|
}, {
|
|
1068
1081
|
key: "addTooltip",
|
|
1069
1082
|
value: function addTooltip(text) {
|
|
1070
1083
|
this.append(CreateInfoEl(text));
|
|
1084
|
+
return this;
|
|
1071
1085
|
}
|
|
1072
1086
|
}, {
|
|
1073
1087
|
key: "setTextContent",
|
|
1074
1088
|
value: function setTextContent(text) {
|
|
1075
1089
|
this.element.innerHTML = text;
|
|
1090
|
+
return this;
|
|
1076
1091
|
}
|
|
1077
1092
|
}, {
|
|
1078
1093
|
key: "setStyle",
|
|
@@ -1084,6 +1099,7 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
1084
1099
|
Object.keys(options).forEach(function (key) {
|
|
1085
1100
|
_this5.element.style[key] = options[key];
|
|
1086
1101
|
});
|
|
1102
|
+
return this;
|
|
1087
1103
|
}
|
|
1088
1104
|
}, {
|
|
1089
1105
|
key: "uncheckRadios",
|
|
@@ -1094,6 +1110,7 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
1094
1110
|
} else {
|
|
1095
1111
|
console.error("[SYNACT] Attempted to uncheck radios for an element that has no radios");
|
|
1096
1112
|
}
|
|
1113
|
+
return this;
|
|
1097
1114
|
}
|
|
1098
1115
|
}, {
|
|
1099
1116
|
key: "configureConditionalRendering",
|
|
@@ -1120,6 +1137,7 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
1120
1137
|
} catch (e) {
|
|
1121
1138
|
throw new ConditionalRenderingError(this, e);
|
|
1122
1139
|
}
|
|
1140
|
+
return this;
|
|
1123
1141
|
}
|
|
1124
1142
|
}, {
|
|
1125
1143
|
key: "configureValidationAndRequirements",
|
|
@@ -1139,13 +1157,14 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
1139
1157
|
throw new Error("Attempted to add to Validator where Page_Validators do not exist");
|
|
1140
1158
|
}
|
|
1141
1159
|
this.setRequiredLevel(isRequired(this));
|
|
1142
|
-
if (!dependencies) return;
|
|
1160
|
+
if (!dependencies) return this;
|
|
1143
1161
|
dependencies = Array.isArray(dependencies) ? dependencies : [dependencies];
|
|
1144
1162
|
dependencies.forEach(function (dep) {
|
|
1145
1163
|
dep.element.addEventListener("change", function () {
|
|
1146
1164
|
return _this7.setRequiredLevel(isRequired(_this7));
|
|
1147
1165
|
});
|
|
1148
1166
|
});
|
|
1167
|
+
return this;
|
|
1149
1168
|
}
|
|
1150
1169
|
}, {
|
|
1151
1170
|
key: "setRequiredLevel",
|
|
@@ -1155,6 +1174,7 @@ var DOMNodeReference = /*#__PURE__*/function () {
|
|
|
1155
1174
|
} else {
|
|
1156
1175
|
this.getLabel().classList.remove("required-field");
|
|
1157
1176
|
}
|
|
1177
|
+
return this;
|
|
1158
1178
|
}
|
|
1159
1179
|
}, {
|
|
1160
1180
|
key: "onceLoaded",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerpagestoolkit",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.304",
|
|
4
4
|
"description": "Reference, manipulate, and engage with Power Pages sites through the nodes in the DOM; use a variety of custom methods that allow customizing your power pages site quicker and easier. ",
|
|
5
5
|
"main": "./dist/index.bundle.js",
|
|
6
6
|
"types": "index.d.ts",
|