powerpagestoolkit 2.7.1 → 2.7.2

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
@@ -35,7 +35,7 @@ createRef(
35
35
  options: {
36
36
  multiple: (() => boolean) | boolean = false,
37
37
  root: HTMLElement,
38
- timeout: number
38
+ timeoutMs:number
39
39
  }
40
40
  ): Promise<DOMNodeReference | DOMNodeReference[]>;
41
41
  ```
@@ -66,7 +66,7 @@ createRef takes two main arguments:
66
66
  <pre><code class="language-javascript">{
67
67
  multiple: () => boolean | boolean,
68
68
  root: HTMLElement,
69
- timeout: number
69
+ timeoutMs:number
70
70
  }</code></pre>
71
71
  </td>
72
72
  <td style="border: 1px solid #ddd; padding: 8px;">
@@ -85,10 +85,10 @@ import { createRef } from "powerpagestoolkit";
85
85
  Instantiate one, or multiple instances of a DOMNodeReference, and optionally configure advanced options
86
86
 
87
87
  ```javascript
88
- // Create a single reference
88
+ // Create a single reference (i.e. 'querySelector')
89
89
  const node = await createRef("#myElement");
90
90
 
91
- // Create multiple references
91
+ // Create multiple references (i.e. 'querySelectorAll')
92
92
  const nodes = await createRef(".my-class", { multiple: true });
93
93
 
94
94
  /******************/
@@ -98,7 +98,7 @@ const nodes = await createRef(".my-class", { multiple: true });
98
98
 
99
99
  // If the node you are targeting is not available at the initial execution
100
100
  // of the script, set a timeout for 2 seconds
101
- const node2 = await createRef("#target", { timeout: 2000 });
101
+ const node2 = await createRef("#target", { timeoutMs:2000 });
102
102
 
103
103
  // need to target a node within a specific node? use that node as the root
104
104
  const otherElement = document.getElementById("id");
@@ -107,7 +107,7 @@ const node3 = await createRef("#target", { root: otherElement });
107
107
  // implement all options:
108
108
  const nodes2 = await createRef("#target", {
109
109
  multiple: true,
110
- timeout: 4000,
110
+ timeoutMs:4000,
111
111
  root: otherElement,
112
112
  });
113
113
  ```
@@ -150,7 +150,7 @@ _Method Signature:_
150
150
 
151
151
  ```typescript
152
152
  applyBusinessRule(
153
- rule: IBusinessRule,
153
+ rule: BusinessRule,
154
154
  dependencies: DOMNodeReference[]
155
155
  ): DOMNodeReference; /* Instance of this is returned for optional
156
156
  method chaining */
@@ -159,9 +159,9 @@ applyBusinessRule(
159
159
  **BusinessRule Definition**
160
160
 
161
161
  ```typescript
162
- interface IBusinessRule {
162
+ interface BusinessRule {
163
163
  setVisibility?: [
164
- condition: () => boolean,
164
+ condition: () => boolean,
165
165
  clearValuesOnHide?: boolean = true
166
166
  ];
167
167
  setRequired?: [
@@ -169,7 +169,7 @@ interface IBusinessRule {
169
169
  isValid: () => boolean
170
170
  ];
171
171
  setValue?: [
172
- condition: () => boolean,
172
+ condition: () => boolean,
173
173
  value: () => any | any
174
174
  ];
175
175
  setDisabled?: () => boolean;
@@ -192,7 +192,7 @@ taxIdField.applyBusinessRule(
192
192
  [businessTypeField] // Re-evaluate when businessTypeField changes
193
193
  );
194
194
 
195
- // Optionally disable 'clearValuesOnHide:
195
+ // Optionally disable 'clearValuesOnHide':
196
196
  taxIdField.applyBusinessRule(
197
197
  {
198
198
  setVisibility: [
@@ -234,7 +234,10 @@ taxIdField.applyBusinessRule(
234
234
  // Set default industry value when 'businessTypeField' is 'Corporation'
235
235
  industryField.applyBusinessRule(
236
236
  {
237
- setValue: [() => businessTypeField.value === "Corporation", "Corporate"],
237
+ setValue: [
238
+ () => businessTypeField.value === "Corporation",
239
+ "Corporate"
240
+ ],
238
241
  },
239
242
  [businessTypeField] // Apply value when businessTypeField changes
240
243
  );
@@ -246,7 +249,7 @@ industryField.applyBusinessRule(
246
249
  // Disable 'taxIdField' when 'businessTypeField' is 'Individual'
247
250
  taxIdField.applyBusinessRule(
248
251
  {
249
- setDisabled: [() => businessTypeField.value === "Individual"],
252
+ setDisabled: () => businessTypeField.value === "Individual",
250
253
  },
251
254
  [businessTypeField] // Enable/disable when businessTypeField changes
252
255
  );
@@ -0,0 +1,6 @@
1
+ {
2
+ "imports": {
3
+ "powerpagestoolkit/": "./",
4
+ "powerpagestoolkit": "./index.js"
5
+ }
6
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference path="../globals.d.ts" />
2
+ /**
3
+ * For use in setting up event management in the instances of DOMNodeReference
4
+ * @see {@link DOMNodeReference}
5
+ */
6
+ declare const eventMapping: Record<string, keyof HTMLElementEventMap>;
7
+ export default eventMapping;
@@ -0,0 +1,14 @@
1
+ /// <reference path="../globals.d.ts" />
2
+ export declare const init: unique symbol;
3
+ export declare const destroy: unique symbol;
4
+ export declare const valueSync: unique symbol;
5
+ export declare const dateSync: unique symbol;
6
+ export declare const getElementValue: unique symbol;
7
+ export declare const attachVisibilityController: unique symbol;
8
+ export declare const attachRadioButtons: unique symbol;
9
+ export declare const bindMethods: unique symbol;
10
+ export declare const debounceTime: unique symbol;
11
+ export declare const observers: unique symbol;
12
+ export declare const boundEventListeners: unique symbol;
13
+ export declare const isValidFormElement: unique symbol;
14
+ export declare const registerEventListener: unique symbol;
@@ -1,10 +1,18 @@
1
- declare const API: {
1
+ /// <reference path="../globals.d.ts" />
2
+ /**
3
+ * Provides abstract class `API` that allows basic create, read, and update operations in DataVerse via the PowerPages API
4
+ * @method `createRecord` - Create a record in DataVerse
5
+ * @method `getRecord<T>` - Get a record by ID from DataVerse
6
+ * @method `getMultiple` - Get multiple records from DataVerse; with optional OData filtering
7
+ * @method `updateRecord` - Update a record by ID in DataVerse
8
+ */
9
+ declare abstract class API {
2
10
  /**
3
11
  * @param tableSetName The dataverse set name for the table that you are updating a record in
4
12
  * @param data The JSON of the fields and data that are to be updated on the targeted record
5
13
  * @returns a Promise resolving the successful results *[record id]* of the POST request, or rejecting the failed results *[error]* of the POST request.
6
14
  */
7
- createRecord(tableSetName: string, data: object): Promise<string>;
15
+ static createRecord(tableSetName: string, data: JSON): Promise<string>;
8
16
  /**
9
17
  *
10
18
  * @param tableSetName The DataVerse SET name of the table being queried
@@ -12,14 +20,14 @@ declare const API: {
12
20
  * @param selectColumns *OPTIONAL* if desired, enter your own custom OData query for advanced GET results. Format = select=column1,column2,column3...
13
21
  * @returns a Promise resolving the successful results of the GET request, or rejecting the failed results of the GET request
14
22
  */
15
- getRecord<T>(tableSetName: string, recordID: string, selectColumns?: string): Promise<T>;
23
+ static getRecord<T>(tableSetName: string, recordID: string, selectColumns?: string): Promise<T>;
16
24
  /**
17
25
  *
18
26
  * @param tableSetName The dataverse set name of the table being queried
19
27
  * @param queryParameters *OPTIONAL* the OData query parameters for refining search results: *format = $filter=filters&$select=columns*
20
28
  * @returns a Promise resolving the successful results of the GET request, or rejecting the failed results of the GET request
21
29
  */
22
- getMultiple(tableSetName: string, queryParameters?: string): Promise<Array<object>>;
30
+ static getMultiple(tableSetName: string, queryParameters?: string): Promise<Array<object>>;
23
31
  /**
24
32
  *
25
33
  * @param tableSetName The dataverse set name for the table that you are updating a record in
@@ -27,6 +35,6 @@ declare const API: {
27
35
  * @param data The JSON of the fields and data that are to be updated on the targeted record
28
36
  * @returns A Promise with the results of the API execution
29
37
  */
30
- updateRecord(tableSetName: string, recordId: string, data: object): Promise<any>;
31
- };
38
+ static updateRecord(tableSetName: string, recordId: string, data: object): Promise<any>;
39
+ }
32
40
  export default API;
@@ -1,51 +1,16 @@
1
- interface IBusinessRule {
2
- /**
3
- * @param condition A function that returns a boolean to determine
4
- * the visibility of the target element. If `condition()` returns true, the element is shown;
5
- * otherwise, it is hidden.
6
-
7
- * @param clearValuesOnHide Should the values in the targeted field be cleared when hidden? Defaults to true
8
- */
9
- setVisibility?: [condition: () => boolean, clearValuesOnHide?: boolean];
10
- /**
11
- * @param isRequired Function determining if field is required
12
- * @param isValid Function validating field input.
13
- */
14
- setRequired?: [isRequired: () => boolean, isValid: () => boolean];
15
- /**
16
- * @param condition A function to determine if the value provided should be applied to this field
17
- * @param value The value to set for the HTML element.
18
- * for parents of boolean radios, pass true or false as value, or
19
- * an expression returning a boolean
20
- */
21
- setValue?: [condition: () => boolean, value: () => any | any];
22
- /**
23
- * @param condition A function to determine if this field
24
- * should be enabled in a form, or disabled. True || 1 = disabled. False || 0 = enabled
25
- */
26
- setDisabled?: () => boolean;
27
- }
28
- export declare const _init: unique symbol;
29
- declare const _destroy: unique symbol;
30
- declare const _valueSync: unique symbol;
31
- declare const _dateSync: unique symbol;
32
- declare const _getElementValue: unique symbol;
33
- declare const _updateRadioGroup: unique symbol;
34
- declare const _attachVisibilityController: unique symbol;
35
- declare const _attachRadioButtons: unique symbol;
36
- declare const _bindMethods: unique symbol;
37
- declare const _debounceTime: unique symbol;
38
- declare const _observers: unique symbol;
39
- declare const _boundEventListeners: unique symbol;
1
+ /// <reference path="../globals.d.ts" />
2
+ import * as s from "../constants/symbols.d.ts";
40
3
  export default class DOMNodeReference {
41
4
  target: Element | string;
42
5
  logicalName?: string;
43
6
  root: Element;
44
- private [_debounceTime];
45
- private isLoaded;
46
- private defaultDisplay;
47
- private [_observers];
48
- private [_boundEventListeners];
7
+ protected [s.debounceTime]: number;
8
+ protected isLoaded: boolean;
9
+ protected defaultDisplay: string;
10
+ protected [s.observers]: Array<MutationObserver>;
11
+ protected [s.boundEventListeners]: Array<BoundEventListener>;
12
+ protected isRadio: boolean;
13
+ protected radioType: RadioType | null;
49
14
  /**
50
15
  * The value of the element that this node represents
51
16
  * stays in syncs with the live DOM elements?.,m via event handler
@@ -57,7 +22,7 @@ export default class DOMNodeReference {
57
22
  * or access properties not available through this class.
58
23
  */
59
24
  element: HTMLElement;
60
- private visibilityController;
25
+ protected visibilityController: HTMLElement;
61
26
  checked: boolean;
62
27
  /**
63
28
  * Represents the 'yes' option of a boolean radio field.
@@ -78,35 +43,33 @@ export default class DOMNodeReference {
78
43
  * Defaults to 'document.body'
79
44
  */
80
45
  /******/ /******/ constructor(target: Element | string, root: Element | undefined, debounceTime: number);
81
- [_init](): Promise<void>;
82
- private eventMapping;
46
+ private extractLogicalName;
47
+ [s.init](): Promise<void>;
83
48
  /**
84
49
  * Initializes value synchronization with appropriate event listeners
85
50
  * based on element type.
86
- * @private
87
51
  */
88
- private [_valueSync];
89
- private [_dateSync];
52
+ protected [s.valueSync](): void;
53
+ private determineEventType;
54
+ private isDateInput;
55
+ protected [s.isValidFormElement](element: Element): element is FormElement;
56
+ protected [s.registerEventListener](element: Element, eventType: keyof HTMLElementEventMap, handler: (e: Event) => unknown): void;
57
+ protected [s.dateSync](element: HTMLInputElement): Promise<void>;
90
58
  /**
91
59
  * Gets the current value of the element based on its type
92
- * @private
60
+ * @protected
93
61
  * @returns Object containing value and optional checked state
94
62
  */
95
- private [_getElementValue];
96
- /**
97
- * Updates related radio buttons if this is part of a radio group
98
- * @private
99
- */
100
- private [_updateRadioGroup];
101
- private [_attachVisibilityController];
102
- private [_attachRadioButtons];
103
- private [_bindMethods];
104
- private [_destroy];
63
+ protected [s.getElementValue](): ElementValue;
64
+ protected [s.attachVisibilityController](): void;
65
+ protected [s.attachRadioButtons](): Promise<void>;
66
+ protected [s.bindMethods](): void;
67
+ protected [s.destroy](): void;
105
68
  /**
106
69
  * Updates the value and checked state based on element type
107
70
  * @public
108
71
  */
109
- updateValue(): void;
72
+ updateValue(e?: Event): void;
110
73
  /**
111
74
  * Sets up an event listener based on the specified event type, executing the specified
112
75
  * event handler
@@ -127,7 +90,6 @@ export default class DOMNodeReference {
127
90
  */
128
91
  show(): DOMNodeReference;
129
92
  /**
130
- *
131
93
  * @param shouldShow - Either a function that returns true or false,
132
94
  * or a natural boolean to determine the visibility of this
133
95
  * @returns - Instance of this [provides option to method chain]
@@ -161,7 +123,6 @@ export default class DOMNodeReference {
161
123
  */
162
124
  enable(): DOMNodeReference;
163
125
  /**
164
- *
165
126
  * @param elements - The elements to prepend to the element targeted by this.
166
127
  * @returns - Instance of this [provides option to method chain]
167
128
  */
@@ -215,7 +176,6 @@ export default class DOMNodeReference {
215
176
  */
216
177
  remove(): this;
217
178
  /**
218
- *
219
179
  * @param options and object containing the styles you want to set : {key: value} e.g.: {'display': 'block'}
220
180
  * @returns - Instance of this [provides option to method chain]
221
181
  */
@@ -227,12 +187,12 @@ export default class DOMNodeReference {
227
187
  uncheckRadios(): DOMNodeReference;
228
188
  /**
229
189
  * Applies a business rule to manage visibility, required state, value, and disabled state dynamically.
230
- *
190
+ * @see {@link BusinessRule}
231
191
  * @param rule The business rule containing conditions for various actions.
232
192
  * @param dependencies For re-evaluation conditions when the state of the dependencies change
233
193
  * @returns Instance of this for method chaining.
234
194
  */
235
- applyBusinessRule(rule: IBusinessRule, dependencies: DOMNodeReference[]): DOMNodeReference;
195
+ applyBusinessRule(rule: BusinessRule, dependencies: DOMNodeReference[]): DOMNodeReference;
236
196
  /**
237
197
  * Configures conditional rendering for the target element based on a condition
238
198
  * and the visibility of one or more trigger elements.
@@ -260,13 +220,18 @@ export default class DOMNodeReference {
260
220
  configureValidationAndRequirements(isRequired: () => boolean, isValid: () => boolean, fieldDisplayName: string, dependencies: Array<DOMNodeReference>): DOMNodeReference;
261
221
  /**
262
222
  * Sets up tracking for dependencies using both event listeners and mutation observers.
263
- * @private
223
+ * @protected
264
224
  * @param handler The function to execute when dependencies change
265
225
  * @param dependencies Array of dependent DOM nodes to track
266
226
  * @param options Additional configuration options. clearValuesOnHide defaults to false.
267
227
  * all other options defaults to true
268
228
  */
269
- private _configDependencyTracking;
229
+ protected _configDependencyTracking(handler: () => void, dependencies: Array<DOMNodeReference>, options?: {
230
+ clearValuesOnHide?: boolean;
231
+ observeVisibility?: boolean;
232
+ trackInputEvents?: boolean;
233
+ trackRadioButtons?: boolean;
234
+ }): void;
270
235
  /**
271
236
  * Sets the required level for the field by adding or removing the "required-field" class on the label.
272
237
  *
@@ -284,4 +249,3 @@ export default class DOMNodeReference {
284
249
  */
285
250
  onceLoaded(callback: (instance: DOMNodeReference) => any): any;
286
251
  }
287
- export {};
@@ -1,5 +1,6 @@
1
- import DOMNodeReference from "./DOMNodeReference.js";
2
- export declare class DOMNodeReferenceArray extends Array<DOMNodeReference> {
1
+ /// <reference path="../globals.d.ts" />
2
+ import type DOMNodeReference from "./DOMNodeReference.d.ts";
3
+ export default class DOMNodeReferenceArray extends Array<DOMNodeReference> {
3
4
  /**
4
5
  * Hides all the containers of the DOMNodeReference instances in the array.
5
6
  */
@@ -9,4 +10,3 @@ export declare class DOMNodeReferenceArray extends Array<DOMNodeReference> {
9
10
  */
10
11
  showAll(this: DOMNodeReferenceArray): DOMNodeReferenceArray;
11
12
  }
12
- export declare function enhanceArray<T extends string>(array: DOMNodeReference[]): DOMNodeReferenceArray & Record<T, DOMNodeReference>;
@@ -0,0 +1,13 @@
1
+ /// <reference path="../globals.d.ts" />
2
+ export default class List {
3
+ private static _instance;
4
+ private _root;
5
+ private _listItems;
6
+ private _observer;
7
+ private constructor();
8
+ static get(): List;
9
+ private _observe;
10
+ private _update;
11
+ private _destroy;
12
+ destroy(): void;
13
+ }
@@ -0,0 +1,28 @@
1
+ /// <reference path="../globals.d.ts" />
2
+ import type DOMNodeReference from "./DOMNodeReference.d.ts";
3
+ import type DOMNodeReferenceArray from "./DOMNodeReferenceArray.d.ts";
4
+ /**
5
+ * When loading into a page in PowerPages that has a form,
6
+ * you can use this function by passing in the GUID of the form, and you will receive an array/record
7
+ * of {@link DOMNodeReference}s that represent all fields, sections, sub-grids, and tabs of the given form.
8
+ * Access these properties of the {@link BoundForm} using the logical name of the control you need to access: form['logical_name']
9
+ * you can then execute all the methods available from DOMNodeReference
10
+ * @param formId - The string GUID of the form you want to bind to
11
+ * @returns An array of DOMNodeReferences, accessible as properties of a Record<string, DOMNodeReference> i.e. formProp = form["some_logicalName"]
12
+ * @example
13
+ * ```js
14
+ * bindForm("form-guid-0000").then((form) => {
15
+ * //...use the form
16
+ * const field = form["field_logical_name"]
17
+ * // or
18
+ * form["other_logical_name"].someMethod()
19
+ * })
20
+ *
21
+ * // or
22
+ *
23
+ * const form = await bindForm("form-guid-0000")
24
+ * ```
25
+ * @see {@link BoundForm}
26
+ * @see {@link DOMNodeReference}
27
+ */
28
+ export default function bindForm(formId: string): Promise<DOMNodeReferenceArray & Record<string, DOMNodeReference>>;
@@ -0,0 +1,88 @@
1
+ /// <reference path="../globals.d.ts" />
2
+ import DOMNodeReference from "./DOMNodeReference.d.ts";
3
+ import type DOMNodeReferenceArray from "./DOMNodeReferenceArray.d.ts";
4
+ /**
5
+ * Creates and initializes a DOMNodeReference instance.
6
+ * @see {@link CreationOptions}
7
+ * @param **target** - The selector, using `querySelector` syntax, for the desired DOM element. Or, the `HTMLElement` itself for which to create a DOMNodeReference.
8
+ * @param **options** - Options for advanced retrieval of elements
9
+ * @param **options.multiple** - Should this call return an array of instantiated references, or just a single? Defaults to false, returning a single instance
10
+ * @param **options.root** - Optionally specify the element within to search for the element targeted by 'target'. Defaults to `document.body`
11
+ * @param **options.timeoutMs** - Optionally specify the amount of time that should be waited to find the targeted element before throwing error - useful for async DOM loading. Relies on MutationObserver. ***WARNING***: Implementing multiple references with timeout can result in infinite loading.
12
+ * @returns A promise that resolves to a Proxy of the initialized DOMNodeReference instance.
13
+ *
14
+ * @see {@link DOMNodeReference}
15
+ * @see {@link DOMNodeReferenceArray}
16
+ * @see {@link enhanceArray}
17
+ */
18
+ export default function createDOMNodeReference(target: string | HTMLElement, options?: {
19
+ /**
20
+ * Should this call return an array of instantiated references, or just a single?
21
+ * Defaults to false, returning a single instance.
22
+ */
23
+ multiple?: (() => boolean) | boolean;
24
+ /**
25
+ * Optionally specify the element within which to search for the element targeted by 'target'.
26
+ * Defaults to 'document.body'.
27
+ */
28
+ root?: HTMLElement;
29
+ /**
30
+ * Optionally specify the amount of time that should be waited to find the targeted element before throwing an error.
31
+ * Useful for async DOM loading. Relies on MutationObserver.
32
+ * WARNING: Implementing multiple references with timeout can result in infinite loading.
33
+ */
34
+ timeoutMs?: number;
35
+ }): Promise<DOMNodeReference>;
36
+ export default function createDOMNodeReference(target: string, options?: {
37
+ /**
38
+ * Should this call return an array of instantiated references, or just a single?
39
+ * Defaults to false, returning a single instance.
40
+ */
41
+ multiple?: false;
42
+ /**
43
+ * Optionally specify the element within which to search for the element targeted by 'target'.
44
+ * Defaults to 'document.body'.
45
+ */
46
+ root?: HTMLElement;
47
+ /**
48
+ * Optionally specify the amount of time that should be waited to find the targeted element before throwing an error.
49
+ * Useful for async DOM loading. Relies on MutationObserver.
50
+ * WARNING: Implementing multiple references with timeout can result in infinite loading.
51
+ */
52
+ timeoutMs?: number;
53
+ }): Promise<DOMNodeReference>;
54
+ export default function createDOMNodeReference(target: Element, options?: {
55
+ /**
56
+ * Optionally specify the element within which to search for the element targeted by 'target'.
57
+ * Defaults to 'document.body'.
58
+ */
59
+ root?: HTMLElement;
60
+ /**
61
+ * Optionally specify the amount of time that should be waited to find the targeted element before throwing an error.
62
+ * Useful for async DOM loading. Relies on MutationObserver.
63
+ * WARNING: Implementing multiple references with timeout can result in infinite loading.
64
+ */
65
+ timeoutMs?: number;
66
+ }): Promise<DOMNodeReference>;
67
+ export default function createDOMNodeReference(target: string, options?: {
68
+ /**
69
+ * Should this call return an array of instantiated references, or just a single?
70
+ * Defaults to false, returning a single instance.
71
+ */
72
+ multiple?: true;
73
+ /**
74
+ * Optionally specify the element within which to search for the element targeted by 'target'.
75
+ * Defaults to 'document.body'.
76
+ */
77
+ root?: HTMLElement;
78
+ /**
79
+ * Optionally specify the amount of time that should be waited to find the targeted element before throwing an error.
80
+ * Useful for async DOM loading. Relies on MutationObserver.
81
+ * WARNING: Implementing multiple references with timeout can result in infinite loading.
82
+ */
83
+ timeoutMs?: number;
84
+ }): Promise<DOMNodeReferenceArray>;
85
+ export declare function validateOptions(options: Partial<CreationOptions>): void;
86
+ export declare function createProxyHandler(): {
87
+ get: (target: DOMNodeReference, prop: string | symbol) => any;
88
+ };
@@ -0,0 +1,9 @@
1
+ /// <reference path="../globals.d.ts" />
2
+ /**
3
+ * Provides an async way to capture DOM elements; for when querySelector cannot capture the target due to async DOM content loading
4
+ * @param **target** - basic querySelector syntax to select an element
5
+ * @param **root** - optional parameter to replace document as the root from which to perform the node search
6
+ * @returns the element(s) targeted by the `querySelector` string
7
+ */
8
+ export default function waitFor(target: string, root: Element | Document, multiple: false, debounceTime: number): Promise<HTMLElement>;
9
+ export default function waitFor(target: string, root: Element | Document, multiple: true, debounceTime: number): Promise<HTMLElement[]>;
@@ -1,4 +1,5 @@
1
- import DOMNodeReference from "./DOMNodeReference.js";
1
+ /// <reference path="../globals.d.ts" />
2
+ import type DOMNodeReference from "../core/DOMNodeReference.d.ts";
2
3
  export declare class DOMNodeInitializationError extends Error {
3
4
  constructor(instance: DOMNodeReference, error: string);
4
5
  }