powerpagestoolkit 2.7.104 → 2.7.111
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/@types/index.d.ts +126 -0
- package/package.json +6 -5
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
declare type Schema = {
|
|
2
|
+
logicalName(): string;
|
|
3
|
+
value(): object; // Adjust this type based on the structure of your schema values
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
declare const Page_Validators: any[];
|
|
7
|
+
|
|
8
|
+
declare interface ElementValue {
|
|
9
|
+
value: any;
|
|
10
|
+
checked?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Alias for QuerySelector
|
|
14
|
+
declare type QuerySelector = string;
|
|
15
|
+
|
|
16
|
+
declare interface SystemForm extends Object {
|
|
17
|
+
"@odata.context": string;
|
|
18
|
+
"@odata.etag": string;
|
|
19
|
+
"overwritetime@OData.Community.Display.V1.FormattedValue": string;
|
|
20
|
+
overwritetime: Date;
|
|
21
|
+
"isdesktopenabled@OData.Community.Display.V1.FormattedValue": string;
|
|
22
|
+
isdesktopenabled: boolean;
|
|
23
|
+
"publishedon@OData.Community.Display.V1.FormattedValue": Date;
|
|
24
|
+
publishedon: Date;
|
|
25
|
+
"_organizationid_value@OData.Community.Display.V1.FormattedValue": string;
|
|
26
|
+
"_organizationid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": string;
|
|
27
|
+
"_organizationid_value@Microsoft.Dynamics.CRM.lookuplogicalname": string;
|
|
28
|
+
_organizationid_value: string;
|
|
29
|
+
formxml: string;
|
|
30
|
+
introducedversion: string;
|
|
31
|
+
"isairmerged@OData.Community.Display.V1.FormattedValue": string;
|
|
32
|
+
isairmerged: boolean;
|
|
33
|
+
"istabletenabled@OData.Community.Display.V1.FormattedValue": string;
|
|
34
|
+
istabletenabled: boolean;
|
|
35
|
+
solutionid: string;
|
|
36
|
+
formidunique: string;
|
|
37
|
+
"ismanaged@OData.Community.Display.V1.FormattedValue": string;
|
|
38
|
+
ismanaged: boolean;
|
|
39
|
+
"isdefault@OData.Community.Display.V1.FormattedValue": string;
|
|
40
|
+
isdefault: boolean;
|
|
41
|
+
"objecttypecode@OData.Community.Display.V1.FormattedValue": string;
|
|
42
|
+
objecttypecode: string;
|
|
43
|
+
"type@OData.Community.Display.V1.FormattedValue": string;
|
|
44
|
+
type: number;
|
|
45
|
+
"componentstate@OData.Community.Display.V1.FormattedValue": string;
|
|
46
|
+
componentstate: number;
|
|
47
|
+
"formpresentation@OData.Community.Display.V1.FormattedValue": string;
|
|
48
|
+
formpresentation: number;
|
|
49
|
+
"formactivationstate@OData.Community.Display.V1.FormattedValue": string;
|
|
50
|
+
formactivationstate: number;
|
|
51
|
+
name: string;
|
|
52
|
+
"versionnumber@OData.Community.Display.V1.FormattedValue": string;
|
|
53
|
+
versionnumber: number;
|
|
54
|
+
formjson: string;
|
|
55
|
+
description: string;
|
|
56
|
+
formid: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
declare interface Form extends Partial<SystemForm> {
|
|
60
|
+
formxml: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare interface BoundEventListener {
|
|
64
|
+
element: Element;
|
|
65
|
+
event: keyof HTMLElementEventMap;
|
|
66
|
+
handler: (e: Event) => unknown;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare type FormElement =
|
|
70
|
+
| HTMLInputElement
|
|
71
|
+
| HTMLSelectElement
|
|
72
|
+
| HTMLTextAreaElement
|
|
73
|
+
| HTMLSpanElement
|
|
74
|
+
| HTMLButtonElement
|
|
75
|
+
| HTMLFieldSetElement;
|
|
76
|
+
|
|
77
|
+
declare interface BusinessRule {
|
|
78
|
+
/**
|
|
79
|
+
* @param condition A function that returns a boolean to determine
|
|
80
|
+
* the visibility of the target element. If `condition()` returns true, the element is shown;
|
|
81
|
+
* otherwise, it is hidden.
|
|
82
|
+
|
|
83
|
+
* @param clearValuesOnHide Should the values in the targeted field be cleared when hidden? Defaults to true
|
|
84
|
+
*/
|
|
85
|
+
setVisibility?: [condition: () => boolean, clearValuesOnHide?: boolean];
|
|
86
|
+
/**
|
|
87
|
+
* @param isRequired Function determining if field is required
|
|
88
|
+
* @param isValid Function validating field input.
|
|
89
|
+
*/
|
|
90
|
+
setRequired?: [isRequired: () => boolean, isValid: () => boolean];
|
|
91
|
+
/**
|
|
92
|
+
* @param condition A function to determine if the value provided should be applied to this field
|
|
93
|
+
* @param value The value to set for the HTML element.
|
|
94
|
+
* for parents of boolean radios, pass true or false as value, or
|
|
95
|
+
* an expression returning a boolean
|
|
96
|
+
*/
|
|
97
|
+
setValue?: [condition: () => boolean, value: () => any | any];
|
|
98
|
+
/**
|
|
99
|
+
* @param condition A function to determine if this field
|
|
100
|
+
* should be enabled in a form, or disabled. True || 1 = disabled. False || 0 = enabled
|
|
101
|
+
*/
|
|
102
|
+
setDisabled?: () => boolean;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare interface CreationOptions {
|
|
106
|
+
/**
|
|
107
|
+
* Should this call return an array of instantiated references, or just a single?
|
|
108
|
+
* Defaults to false, returning a single instance.
|
|
109
|
+
*/
|
|
110
|
+
multiple?: (() => boolean) | boolean;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Optionally specify the element within which to search for the element targeted by 'target'.
|
|
114
|
+
* Defaults to 'document.body'.
|
|
115
|
+
*/
|
|
116
|
+
root?: HTMLElement;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Optionally specify the amount of time that should be waited to find the targeted element before throwing an error.
|
|
120
|
+
* Useful for async DOM loading. Relies on MutationObserver.
|
|
121
|
+
* WARNING: Implementing multiple references with timeout can result in infinite loading.
|
|
122
|
+
*/
|
|
123
|
+
timeoutMs?: number;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
declare type RadioType = "truthy" | "falsy";
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerpagestoolkit",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.111",
|
|
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
|
-
"main": "./dist/
|
|
6
|
-
"types": "
|
|
5
|
+
"main": "./dist/bundle.js",
|
|
6
|
+
"types": "./@types/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"typecheck": "tsc",
|
|
9
9
|
"node:build": "node build.js",
|
|
@@ -62,12 +62,13 @@
|
|
|
62
62
|
"dist/index.js",
|
|
63
63
|
"dist/bundle.css",
|
|
64
64
|
"dist/**/*.d.ts",
|
|
65
|
-
"assets/**"
|
|
65
|
+
"assets/**",
|
|
66
|
+
"@types/**"
|
|
66
67
|
],
|
|
67
68
|
"exports": {
|
|
68
69
|
".": {
|
|
69
70
|
"import": "./dist/bundle.js",
|
|
70
|
-
"types": "
|
|
71
|
+
"types": "./dist/index.d.ts"
|
|
71
72
|
},
|
|
72
73
|
"./createDOMNodeReference": {
|
|
73
74
|
"import": "./dist/createDOMNodeReference.js",
|