powerpagestoolkit 2.5.401 → 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.
package/README.md CHANGED
@@ -140,11 +140,18 @@ node.enable();
140
140
  ```typescript
141
141
  // LABEL AND INFO OPERATIONS
142
142
  const label = node.getLabel();
143
- node.appendToLabel(infoElement);
144
143
  // appends a tooltip to the label associated with the element targeted by 'this'
145
- node.addLabelTooltip("Helper text");
144
+ node.addLabelTooltip(
145
+ "Helper text",
146
+ /* Optionally pass in css styles to customize the tooltip icon*/
147
+ { color: "orange", fontSize: "30px" }
148
+ );
146
149
  // appends a tooltip directly to the element targeted by 'this'
147
- node.addTooltip("Inline helper");
150
+ node.addTooltip(
151
+ "Inline helper",
152
+ /* Optionally pass in css styles to customize the tooltip icon*/
153
+ { color: "orange", fontSize: "30px" }
154
+ );
148
155
  ```
149
156
 
150
157
  ### DataVerse API
@@ -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 container of the info element
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 container of the info element
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, 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";
@@ -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 container of the info element
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 container of the info element
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 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.401",
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",
@@ -72,8 +72,5 @@
72
72
  "./style.css": {
73
73
  "import": "./dist/bundle.css"
74
74
  }
75
- },
76
- "dependencies": {
77
- "powerpagestoolkit": "^2.3.4"
78
75
  }
79
76
  }