powerpagestoolkit 1.0.0 → 1.0.11
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/index.d.ts +71 -0
- package/index.js +2 -2
- package/package.json +6 -2
- /package/{package → lib}/API.js +0 -0
- /package/{package → lib}/DOMNodeReferences.js +0 -0
- /package/{package → lib}/FieldValidation.class.js +0 -0
- /package/{package → lib}/common_functions.js +0 -0
- /package/{package → lib}/createInfoElement.js +0 -0
- /package/{package → lib}/safeAjax.js +0 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
declare module powerpagestoolkit {
|
|
2
|
+
interface DOMNodeReference {
|
|
3
|
+
constructor(querySelector: string);
|
|
4
|
+
element: HTMLElement | null;
|
|
5
|
+
isLoaded: boolean;
|
|
6
|
+
|
|
7
|
+
init(): Promise<this>;
|
|
8
|
+
|
|
9
|
+
hide(): void;
|
|
10
|
+
show(): void;
|
|
11
|
+
hideParent(): void;
|
|
12
|
+
showParent(): void;
|
|
13
|
+
hideContainer(): void;
|
|
14
|
+
showContainer(): void;
|
|
15
|
+
setValue(value: string): void;
|
|
16
|
+
getValue(): string;
|
|
17
|
+
append(...elements: HTMLElement[]): void;
|
|
18
|
+
after(...elements: HTMLElement[]): void;
|
|
19
|
+
getLabel(): HTMLElement;
|
|
20
|
+
appendToLabel(...elements: HTMLElement[]): void;
|
|
21
|
+
addClickListener(eventHandler: () => void): void;
|
|
22
|
+
addChangeListener(eventHandler: () => void): void;
|
|
23
|
+
uncheckRadios(): void;
|
|
24
|
+
createValidation(
|
|
25
|
+
evaluationFunction: (value: any) => boolean,
|
|
26
|
+
fieldDisplayName: string
|
|
27
|
+
): void;
|
|
28
|
+
addLabelTooltip(text: string): void;
|
|
29
|
+
setTextContent(text: string): void;
|
|
30
|
+
onceLoaded(callback: (instance: this) => void): void;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function createDOMNodeReference(
|
|
34
|
+
querySelector: string
|
|
35
|
+
): Promise<DOMNodeReference>;
|
|
36
|
+
|
|
37
|
+
interface Schema {
|
|
38
|
+
logicalName(): string;
|
|
39
|
+
value(): any; // Adjust this type based on the structure of your schema values
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface API {
|
|
43
|
+
/**
|
|
44
|
+
* Creates a new record in DataVerse.
|
|
45
|
+
* @param schema An instance of a schema class, containing the desired information for the POST request.
|
|
46
|
+
* @returns A Promise resolving the successful results (record ID) of the POST request, or rejecting with the error.
|
|
47
|
+
*/
|
|
48
|
+
createRecord(schema: Schema): Promise<string>;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves a single record from DataVerse.
|
|
52
|
+
* @param tableSetName The DataVerse SET name of the table being queried.
|
|
53
|
+
* @param recordID The GUID of the record to be retrieved.
|
|
54
|
+
* @param selectColumns *OPTIONAL* Custom OData query for advanced GET results. Format: select=column1,column2,column3...
|
|
55
|
+
* @returns A Promise resolving the successful results of the GET request, or rejecting with the error.
|
|
56
|
+
*/
|
|
57
|
+
getRecord(
|
|
58
|
+
tableSetName: string,
|
|
59
|
+
recordID: string,
|
|
60
|
+
selectColumns?: string
|
|
61
|
+
): Promise<any>; // Adjust return type as necessary
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Retrieves multiple records from DataVerse.
|
|
65
|
+
* @param tableSetName The DataVerse SET name of the table being queried.
|
|
66
|
+
* @param queryParameters *OPTIONAL* OData query parameters for refining search results: format = $filter=filters&$select=columns
|
|
67
|
+
* @returns A Promise resolving the successful results of the GET request, or rejecting with the error.
|
|
68
|
+
*/
|
|
69
|
+
getMultiple(tableSetName: string, queryParameters?: string): Promise<any>; // Adjust return type as necessary
|
|
70
|
+
}
|
|
71
|
+
}
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powerpagestoolkit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
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": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,5 +16,9 @@
|
|
|
16
16
|
},
|
|
17
17
|
"author": "KeatonBrewster",
|
|
18
18
|
"license": "SSPL-1.0",
|
|
19
|
-
"type": "module"
|
|
19
|
+
"type": "module",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/Keaton-Brewster/PowerPagesToolKit"
|
|
23
|
+
}
|
|
20
24
|
}
|
/package/{package → lib}/API.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|