powerpagestoolkit 2.5.402 → 2.5.403
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.
|
@@ -146,14 +146,14 @@ export default class DOMNodeReference {
|
|
|
146
146
|
/**
|
|
147
147
|
* Adds a tooltip with specified text to the label associated with the HTML element.
|
|
148
148
|
* @param text - The text to display in the tooltip.
|
|
149
|
-
* @param containerStyle - Optional object with CSS Styles to apply to the
|
|
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
152
|
addLabelTooltip(text: string, containerStyle?: Partial<CSSStyleDeclaration>): DOMNodeReference;
|
|
153
153
|
/**
|
|
154
154
|
* Adds a tooltip with the specified text to the element
|
|
155
155
|
* @param text - The text to display in the tooltip
|
|
156
|
-
* @param containerStyle - Optional object with CSS Styles to apply to the
|
|
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
159
|
addTooltip(text: string, containerStyle?: Partial<CSSStyleDeclaration>): DOMNodeReference;
|
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,
|
|
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 (
|
|
145
|
+
if (iconStyle && typeof iconStyle !== "object") {
|
|
146
146
|
throw new Error(
|
|
147
|
-
`argument "
|
|
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 (
|
|
162
|
-
Object.assign(icon.style,
|
|
161
|
+
if (iconStyle) {
|
|
162
|
+
Object.assign(icon.style, iconStyle);
|
|
163
163
|
}
|
|
164
164
|
const positionFlyout = () => {
|
|
165
165
|
flyoutContent.style.display = "block";
|
|
@@ -589,7 +589,7 @@ var DOMNodeReference = class _DOMNodeReference {
|
|
|
589
589
|
/**
|
|
590
590
|
* Adds a tooltip with specified text to the label associated with the HTML element.
|
|
591
591
|
* @param text - The text to display in the tooltip.
|
|
592
|
-
* @param containerStyle - Optional object with CSS Styles to apply to the
|
|
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
595
|
addLabelTooltip(text, containerStyle) {
|
|
@@ -599,7 +599,7 @@ var DOMNodeReference = class _DOMNodeReference {
|
|
|
599
599
|
/**
|
|
600
600
|
* Adds a tooltip with the specified text to the element
|
|
601
601
|
* @param text - The text to display in the tooltip
|
|
602
|
-
* @param containerStyle - Optional object with CSS Styles to apply to the
|
|
602
|
+
* @param containerStyle - Optional object with CSS Styles to apply to the info element
|
|
603
603
|
* @returns - Instance of this [provides option to method chain]
|
|
604
604
|
*/
|
|
605
605
|
addTooltip(text, containerStyle) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
3
|
* @param {string} titleString The text to display in the tooltip flyout content
|
|
4
|
-
* @param
|
|
4
|
+
* @param iconStyle Optional CSS styles to apply to the info icon
|
|
5
5
|
* @returns
|
|
6
6
|
*/
|
|
7
|
-
export default function CreateInfoEl(titleString: string,
|
|
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.
|
|
3
|
+
"version": "2.5.403",
|
|
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",
|