powerpagestoolkit 2.5.403 → 2.5.405
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/DOMNodeReference.d.ts +5 -5
- package/dist/List.d.ts +28 -0
- package/dist/bundle.js +10 -8
- package/dist/index.d.ts +5 -2
- package/package.json +1 -1
|
@@ -145,18 +145,18 @@ export default class DOMNodeReference {
|
|
|
145
145
|
getLabel(): HTMLElement | null;
|
|
146
146
|
/**
|
|
147
147
|
* Adds a tooltip with specified text to the label associated with the HTML element.
|
|
148
|
-
* @param
|
|
148
|
+
* @param innerHTML - The innerHTML to append into the tooltip.
|
|
149
149
|
* @param containerStyle - Optional object with CSS Styles to apply to the info element
|
|
150
150
|
* @returns - Instance of this [provides option to method chain]
|
|
151
151
|
*/
|
|
152
|
-
addLabelTooltip(
|
|
152
|
+
addLabelTooltip(innerHTML: string, containerStyle?: Partial<CSSStyleDeclaration>): DOMNodeReference;
|
|
153
153
|
/**
|
|
154
154
|
* Adds a tooltip with the specified text to the element
|
|
155
|
-
* @param
|
|
155
|
+
* @param innerHTML - The innerHTML to append into the tooltip
|
|
156
156
|
* @param containerStyle - Optional object with CSS Styles to apply to the info element
|
|
157
157
|
* @returns - Instance of this [provides option to method chain]
|
|
158
158
|
*/
|
|
159
|
-
addTooltip(
|
|
159
|
+
addTooltip(innerHTML: string, containerStyle?: Partial<CSSStyleDeclaration>): DOMNodeReference;
|
|
160
160
|
/**
|
|
161
161
|
* Sets the inner HTML content of the HTML element.
|
|
162
162
|
* @param {string} string - The text to set as the inner HTML of the element.
|
|
@@ -192,7 +192,7 @@ export default class DOMNodeReference {
|
|
|
192
192
|
* @throws {ConditionalRenderingError} When there's an error in setting up conditional rendering
|
|
193
193
|
* @returns {DOMNodeReference} - Instance of this [provides option to method chain]
|
|
194
194
|
*/
|
|
195
|
-
configureConditionalRendering(condition: () => boolean, dependencies?: Array<DOMNodeReference
|
|
195
|
+
configureConditionalRendering(condition: () => boolean, dependencies?: Array<DOMNodeReference>, clearValuesOnHide?: boolean): DOMNodeReference;
|
|
196
196
|
/**
|
|
197
197
|
* Sets up validation and requirement rules for the field with enhanced error handling and dynamic updates.
|
|
198
198
|
*
|
package/dist/List.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* so far this whole thing is a moot point
|
|
3
|
+
* Microsoft provides no way to get important specific information
|
|
4
|
+
* about the records represented by each 'row' in a list
|
|
5
|
+
* rendering this effort particularly useless
|
|
6
|
+
*
|
|
7
|
+
* Saving for in case things change in the future and this
|
|
8
|
+
* could be re-factored/extended to provide some usable value
|
|
9
|
+
*/
|
|
10
|
+
export declare const _init: symbol;
|
|
11
|
+
/**
|
|
12
|
+
* Provides information about how to target elements in
|
|
13
|
+
* the construction of the list
|
|
14
|
+
*/
|
|
15
|
+
interface ListOptions {
|
|
16
|
+
containerSelector: string;
|
|
17
|
+
rowSelector: string;
|
|
18
|
+
cellSelector: string;
|
|
19
|
+
}
|
|
20
|
+
interface ListItem extends Array<Element> {
|
|
21
|
+
}
|
|
22
|
+
export default class List {
|
|
23
|
+
items: ListItem[];
|
|
24
|
+
private options;
|
|
25
|
+
private container;
|
|
26
|
+
constructor(options?: Partial<ListOptions>);
|
|
27
|
+
}
|
|
28
|
+
export {};
|
package/dist/bundle.js
CHANGED
|
@@ -588,22 +588,24 @@ var DOMNodeReference = class _DOMNodeReference {
|
|
|
588
588
|
}
|
|
589
589
|
/**
|
|
590
590
|
* Adds a tooltip with specified text to the label associated with the HTML element.
|
|
591
|
-
* @param
|
|
591
|
+
* @param innerHTML - The innerHTML to append into the tooltip.
|
|
592
592
|
* @param containerStyle - Optional object with CSS Styles to apply to the info element
|
|
593
593
|
* @returns - Instance of this [provides option to method chain]
|
|
594
594
|
*/
|
|
595
|
-
addLabelTooltip(
|
|
596
|
-
this.getLabel()?.append(
|
|
595
|
+
addLabelTooltip(innerHTML, containerStyle) {
|
|
596
|
+
this.getLabel()?.append(
|
|
597
|
+
CreateInfoEl(innerHTML, containerStyle || void 0)
|
|
598
|
+
);
|
|
597
599
|
return this;
|
|
598
600
|
}
|
|
599
601
|
/**
|
|
600
602
|
* Adds a tooltip with the specified text to the element
|
|
601
|
-
* @param
|
|
603
|
+
* @param innerHTML - The innerHTML to append into the tooltip
|
|
602
604
|
* @param containerStyle - Optional object with CSS Styles to apply to the info element
|
|
603
605
|
* @returns - Instance of this [provides option to method chain]
|
|
604
606
|
*/
|
|
605
|
-
addTooltip(
|
|
606
|
-
this.append(CreateInfoEl(
|
|
607
|
+
addTooltip(innerHTML, containerStyle) {
|
|
608
|
+
this.append(CreateInfoEl(innerHTML, containerStyle || void 0));
|
|
607
609
|
return this;
|
|
608
610
|
}
|
|
609
611
|
/**
|
|
@@ -667,7 +669,7 @@ var DOMNodeReference = class _DOMNodeReference {
|
|
|
667
669
|
* @throws {ConditionalRenderingError} When there's an error in setting up conditional rendering
|
|
668
670
|
* @returns {DOMNodeReference} - Instance of this [provides option to method chain]
|
|
669
671
|
*/
|
|
670
|
-
configureConditionalRendering(condition, dependencies) {
|
|
672
|
+
configureConditionalRendering(condition, dependencies, clearValuesOnHide = true) {
|
|
671
673
|
try {
|
|
672
674
|
if (typeof condition !== "function") {
|
|
673
675
|
throw new TypeError("Condition must be a function");
|
|
@@ -690,7 +692,7 @@ var DOMNodeReference = class _DOMNodeReference {
|
|
|
690
692
|
const handleChange = () => {
|
|
691
693
|
try {
|
|
692
694
|
this.toggleVisibility(condition());
|
|
693
|
-
if (condition() === false) {
|
|
695
|
+
if (condition() === false && clearValuesOnHide) {
|
|
694
696
|
this.clearValues();
|
|
695
697
|
}
|
|
696
698
|
} catch (error) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./style.css";
|
|
2
2
|
import API from "./API.js";
|
|
3
|
+
import DOMNodeReference from "./DOMNodeReference.js";
|
|
3
4
|
import { createDOMNodeReference, createMultipleDOMNodeReferences } from "./createDOMNodeReferences.js";
|
|
4
|
-
|
|
5
|
+
interface DOMNodeRef extends DOMNodeReference {
|
|
6
|
+
}
|
|
7
|
+
export { API, createDOMNodeReference, createMultipleDOMNodeReferences, DOMNodeRef, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerpagestoolkit",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.405",
|
|
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/bundle.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|