powerpagestoolkit 1.3.103 → 1.3.201
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 +108 -25
- package/dist/index.bundle.js +1234 -0
- package/index.d.ts +21 -18
- package/package.json +1 -1
- package/dist/index.js +0 -1180
- package/dist/index.js.map +0 -1
- package/dist/types/JS/API.d.ts +0 -24
- package/dist/types/JS/DOMNodeReferences.d.ts +0 -64
- package/dist/types/JS/createInfoElement.d.ts +0 -1
- package/dist/types/JS/errors.d.ts +0 -10
- package/dist/types/JS/safeAjax.d.ts +0 -1
- package/dist/types/JS/waitFor.d.ts +0 -1
- package/dist/types/index.d.ts +0 -3
package/index.d.ts
CHANGED
|
@@ -127,21 +127,18 @@ class DOMNodeReference {
|
|
|
127
127
|
uncheckRadios(): void;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* @param {
|
|
133
|
-
* @param {(this: DOMNodeReference)
|
|
134
|
-
* @param {
|
|
135
|
-
* @param {
|
|
136
|
-
* @param {Array<DOMNodeReference>} [dependencies] - Optional dependencies for setting requirement conditions dynamically.
|
|
130
|
+
* Sets up validation and requirement rules for the field. This function dynamically updates the field's required status and validates its input based on the specified conditions.
|
|
131
|
+
*
|
|
132
|
+
* @param {function(this: DOMNodeReference): boolean} isRequired - A function that determines whether the field should be required. Returns `true` if required, `false` otherwise.
|
|
133
|
+
* @param {function(this: DOMNodeReference): boolean} isValid - A function that checks if the field's input is valid. Returns `true` if valid, `false` otherwise.
|
|
134
|
+
* @param {string} fieldDisplayName - The name of the field, used in error messages if validation fails.
|
|
135
|
+
* @param {Array<DOMNodeReference>} [dependencies] Other fields that this field’s requirement depends on. When these fields change, the required status of this field is re-evaluated. Make sure any DOMNodeReference used in `isRequired` or `isValid` is included in this array.
|
|
137
136
|
*/
|
|
138
137
|
configureValidationAndRequirements(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
validationLogic: (this: this) => boolean;
|
|
142
|
-
},
|
|
138
|
+
isRequired: (this: this) => boolean,
|
|
139
|
+
isValid: (this: this) => boolean,
|
|
143
140
|
fieldDisplayName: string,
|
|
144
|
-
dependencies
|
|
141
|
+
dependencies: Array<DOMNodeReference>
|
|
145
142
|
): void;
|
|
146
143
|
|
|
147
144
|
/**
|
|
@@ -158,6 +155,12 @@ class DOMNodeReference {
|
|
|
158
155
|
*/
|
|
159
156
|
addLabelTooltip(text: string): void;
|
|
160
157
|
|
|
158
|
+
/**
|
|
159
|
+
* Adds a tooltip with the specified text to the element
|
|
160
|
+
* @param {string} text - The text to display in the tooltip
|
|
161
|
+
*/
|
|
162
|
+
addTooltip(text: string): void;
|
|
163
|
+
|
|
161
164
|
/**
|
|
162
165
|
* Sets the inner HTML content of the HTML element.
|
|
163
166
|
* @param {string} text - The text to set as the inner HTML of the element.
|
|
@@ -175,16 +178,16 @@ class DOMNodeReference {
|
|
|
175
178
|
* Configures conditional rendering for the target element based on a condition
|
|
176
179
|
* and the visibility of one or more trigger elements.
|
|
177
180
|
*
|
|
178
|
-
* @param {
|
|
181
|
+
* @param {(this: DOMNodeReference) => boolean} condition - A function that returns a boolean to determine
|
|
179
182
|
* the visibility of the target element. If `condition()` returns true, the element is shown;
|
|
180
183
|
* otherwise, it is hidden.
|
|
181
|
-
* @param {DOMNodeReference
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
+
* @param {DOMNodeReference[]} triggerNodes - An array of `DOMNodeReference` instances. Event listeners are
|
|
185
|
+
* registered on each to toggle the visibility of the target element based on the `condition` and the visibility of
|
|
186
|
+
* the target node.
|
|
184
187
|
*/
|
|
185
188
|
configureConditionalRendering(
|
|
186
|
-
condition: () => boolean,
|
|
187
|
-
triggerNodes
|
|
189
|
+
condition: (this: DOMNodeReference) => boolean,
|
|
190
|
+
triggerNodes: DOMNodeReference[]
|
|
188
191
|
): void;
|
|
189
192
|
|
|
190
193
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerpagestoolkit",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.201",
|
|
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",
|