powerpagestoolkit 2.5.402 → 2.5.404

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.
@@ -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 text - The text to display in the tooltip.
149
- * @param containerStyle - Optional object with CSS Styles to apply to the container of the info element
148
+ * @param innerHTML - The innerHTML to append into the tooltip.
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(text: string, containerStyle?: Partial<CSSStyleDeclaration>): DOMNodeReference;
152
+ addLabelTooltip(innerHTML: string, containerStyle?: Partial<CSSStyleDeclaration>): DOMNodeReference;
153
153
  /**
154
154
  * Adds a tooltip with the specified text to the element
155
- * @param text - The text to display in the tooltip
156
- * @param containerStyle - Optional object with CSS Styles to apply to the container of the info element
155
+ * @param innerHTML - The innerHTML to append into the tooltip
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(text: string, containerStyle?: Partial<CSSStyleDeclaration>): DOMNodeReference;
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.
package/dist/bundle.js CHANGED
@@ -136,15 +136,15 @@ function waitFor(target) {
136
136
  }
137
137
 
138
138
  // src/createInfoElement.ts
139
- function CreateInfoEl(titleString, containerStyle) {
139
+ function CreateInfoEl(titleString, iconStyle) {
140
140
  if (typeof titleString !== "string") {
141
141
  throw new Error(
142
142
  `argument "titleString" must be of type "string". Received: "${typeof titleString}"`
143
143
  );
144
144
  }
145
- if (containerStyle && typeof containerStyle !== "object") {
145
+ if (iconStyle && typeof iconStyle !== "object") {
146
146
  throw new Error(
147
- `argument "containerStyle" must be of type "object". Received: "${typeof containerStyle}"`
147
+ `argument "iconStyle" must be of type "object". Received: "${typeof iconStyle}"`
148
148
  );
149
149
  }
150
150
  const span = document.createElement("span");
@@ -158,8 +158,8 @@ function CreateInfoEl(titleString, containerStyle) {
158
158
  flyoutContent.classList.add("flyout-content");
159
159
  span.appendChild(icon);
160
160
  span.appendChild(flyoutContent);
161
- if (containerStyle) {
162
- Object.assign(icon.style, containerStyle);
161
+ if (iconStyle) {
162
+ Object.assign(icon.style, iconStyle);
163
163
  }
164
164
  const positionFlyout = () => {
165
165
  flyoutContent.style.display = "block";
@@ -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 text - The text to display in the tooltip.
592
- * @param containerStyle - Optional object with CSS Styles to apply to the container of the info element
591
+ * @param innerHTML - The innerHTML to append into the tooltip.
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(text, containerStyle) {
596
- this.getLabel()?.append(CreateInfoEl(text, containerStyle || void 0));
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 text - The text to display in the tooltip
602
- * @param containerStyle - Optional object with CSS Styles to apply to the container of the info element
603
+ * @param innerHTML - The innerHTML to append into the tooltip
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(text, containerStyle) {
606
- this.append(CreateInfoEl(text, containerStyle || void 0));
607
+ addTooltip(innerHTML, containerStyle) {
608
+ this.append(CreateInfoEl(innerHTML, containerStyle || void 0));
607
609
  return this;
608
610
  }
609
611
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  *
3
3
  * @param {string} titleString The text to display in the tooltip flyout content
4
- * @param containerStyle Optional CSS styles to apply to the info icon
4
+ * @param iconStyle Optional CSS styles to apply to the info icon
5
5
  * @returns
6
6
  */
7
- export default function CreateInfoEl(titleString: string, containerStyle?: Partial<CSSStyleDeclaration>): HTMLSpanElement;
7
+ export default function CreateInfoEl(titleString: string, iconStyle?: Partial<CSSStyleDeclaration>): HTMLSpanElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powerpagestoolkit",
3
- "version": "2.5.402",
3
+ "version": "2.5.404",
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",