powerpagestoolkit 2.5.404 → 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.
@@ -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>): 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
@@ -669,7 +669,7 @@ var DOMNodeReference = class _DOMNodeReference {
669
669
  * @throws {ConditionalRenderingError} When there's an error in setting up conditional rendering
670
670
  * @returns {DOMNodeReference} - Instance of this [provides option to method chain]
671
671
  */
672
- configureConditionalRendering(condition, dependencies) {
672
+ configureConditionalRendering(condition, dependencies, clearValuesOnHide = true) {
673
673
  try {
674
674
  if (typeof condition !== "function") {
675
675
  throw new TypeError("Condition must be a function");
@@ -692,7 +692,7 @@ var DOMNodeReference = class _DOMNodeReference {
692
692
  const handleChange = () => {
693
693
  try {
694
694
  this.toggleVisibility(condition());
695
- if (condition() === false) {
695
+ if (condition() === false && clearValuesOnHide) {
696
696
  this.clearValues();
697
697
  }
698
698
  } catch (error) {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,7 @@
1
- import './style.css';
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
- export { API, createDOMNodeReference, createMultipleDOMNodeReferences };
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.404",
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",