@digipair/skill-web-interact 0.10.12 → 0.10.14
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.cjs.js
CHANGED
|
@@ -33,11 +33,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
33
33
|
async execute(params, _pinsSettingsList, _context) {
|
|
34
34
|
const { selector, name, args = [] } = params;
|
|
35
35
|
const element = document.querySelector(selector);
|
|
36
|
-
element[name](...args);
|
|
36
|
+
return element[name](...args);
|
|
37
37
|
}
|
|
38
|
-
async goTo(
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
async goTo(_params, _pinsSettingsList, _context) {
|
|
39
|
+
window.location.reload();
|
|
40
|
+
}
|
|
41
|
+
async reload(params, _pinsSettingsList, _context) {
|
|
42
|
+
const { url, target = '_self' } = params;
|
|
43
|
+
window.open(url, target);
|
|
41
44
|
}
|
|
42
45
|
};
|
|
43
46
|
const setAttribute = (params, pinsSettingsList, context)=>new DomService().setAttribute(params, pinsSettingsList, context);
|
|
@@ -45,9 +48,11 @@ const getAttribute = (params, pinsSettingsList, context)=>new DomService().getAt
|
|
|
45
48
|
const dispatchEvent = (params, pinsSettingsList, context)=>new DomService().dispatchEvent(params, pinsSettingsList, context);
|
|
46
49
|
const execute = (params, pinsSettingsList, context)=>new DomService().execute(params, pinsSettingsList, context);
|
|
47
50
|
const goTo = (params, pinsSettingsList, context)=>new DomService().goTo(params, pinsSettingsList, context);
|
|
51
|
+
const reload = (params, pinsSettingsList, context)=>new DomService().reload(params, pinsSettingsList, context);
|
|
48
52
|
|
|
49
53
|
exports.dispatchEvent = dispatchEvent;
|
|
50
54
|
exports.execute = execute;
|
|
51
55
|
exports.getAttribute = getAttribute;
|
|
52
56
|
exports.goTo = goTo;
|
|
57
|
+
exports.reload = reload;
|
|
53
58
|
exports.setAttribute = setAttribute;
|
package/index.esm.js
CHANGED
|
@@ -29,11 +29,14 @@
|
|
|
29
29
|
async execute(params, _pinsSettingsList, _context) {
|
|
30
30
|
const { selector, name, args = [] } = params;
|
|
31
31
|
const element = document.querySelector(selector);
|
|
32
|
-
element[name](...args);
|
|
32
|
+
return element[name](...args);
|
|
33
33
|
}
|
|
34
|
-
async goTo(
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
async goTo(_params, _pinsSettingsList, _context) {
|
|
35
|
+
window.location.reload();
|
|
36
|
+
}
|
|
37
|
+
async reload(params, _pinsSettingsList, _context) {
|
|
38
|
+
const { url, target = '_self' } = params;
|
|
39
|
+
window.open(url, target);
|
|
37
40
|
}
|
|
38
41
|
};
|
|
39
42
|
const setAttribute = (params, pinsSettingsList, context)=>new DomService().setAttribute(params, pinsSettingsList, context);
|
|
@@ -41,5 +44,6 @@ const getAttribute = (params, pinsSettingsList, context)=>new DomService().getAt
|
|
|
41
44
|
const dispatchEvent = (params, pinsSettingsList, context)=>new DomService().dispatchEvent(params, pinsSettingsList, context);
|
|
42
45
|
const execute = (params, pinsSettingsList, context)=>new DomService().execute(params, pinsSettingsList, context);
|
|
43
46
|
const goTo = (params, pinsSettingsList, context)=>new DomService().goTo(params, pinsSettingsList, context);
|
|
47
|
+
const reload = (params, pinsSettingsList, context)=>new DomService().reload(params, pinsSettingsList, context);
|
|
44
48
|
|
|
45
|
-
export { dispatchEvent, execute, getAttribute, goTo, setAttribute };
|
|
49
|
+
export { dispatchEvent, execute, getAttribute, goTo, reload, setAttribute };
|
|
@@ -4,3 +4,4 @@ export declare const getAttribute: (params: any, pinsSettingsList: PinsSettings[
|
|
|
4
4
|
export declare const dispatchEvent: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
5
5
|
export declare const execute: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
6
6
|
export declare const goTo: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
7
|
+
export declare const reload: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -164,10 +164,28 @@
|
|
|
164
164
|
"schema": {
|
|
165
165
|
"type": "string"
|
|
166
166
|
}
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"name": "target",
|
|
170
|
+
"summary": "Fenêtre cible",
|
|
171
|
+
"required": true,
|
|
172
|
+
"description": "Fenêtre cible",
|
|
173
|
+
"schema": {
|
|
174
|
+
"type": "string"
|
|
175
|
+
}
|
|
167
176
|
}
|
|
168
177
|
],
|
|
169
178
|
"x-events": []
|
|
170
179
|
}
|
|
180
|
+
},
|
|
181
|
+
"/reload": {
|
|
182
|
+
"post": {
|
|
183
|
+
"tags": ["web", "boost"],
|
|
184
|
+
"summary": "Recharger la page actuelle",
|
|
185
|
+
"description": "Permet de recharger la page actuelle",
|
|
186
|
+
"parameters": [],
|
|
187
|
+
"x-events": []
|
|
188
|
+
}
|
|
171
189
|
}
|
|
172
190
|
},
|
|
173
191
|
"components": {
|