@digipair/skill-web-interact 0.4.25 → 0.4.27
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
|
@@ -16,7 +16,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
16
16
|
element['__' + attribute] = value;
|
|
17
17
|
element.requestUpdate();
|
|
18
18
|
}
|
|
19
|
-
return;
|
|
20
19
|
}
|
|
21
20
|
async dispatchEvent(params, _pinsSettingsList, _context) {
|
|
22
21
|
const { selector, name, detail } = params;
|
|
@@ -24,11 +23,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
24
23
|
element.dispatchEvent(new CustomEvent(name, {
|
|
25
24
|
detail
|
|
26
25
|
}));
|
|
27
|
-
|
|
26
|
+
}
|
|
27
|
+
async goTo(params, _pinsSettingsList, _context) {
|
|
28
|
+
const { url } = params;
|
|
29
|
+
window.location.href = url;
|
|
28
30
|
}
|
|
29
31
|
};
|
|
30
32
|
const setAttribute = (params, pinsSettingsList, context)=>new DomService().setAttribute(params, pinsSettingsList, context);
|
|
31
33
|
const dispatchEvent = (params, pinsSettingsList, context)=>new DomService().dispatchEvent(params, pinsSettingsList, context);
|
|
34
|
+
const goTo = (params, pinsSettingsList, context)=>new DomService().goTo(params, pinsSettingsList, context);
|
|
32
35
|
|
|
33
36
|
exports.dispatchEvent = dispatchEvent;
|
|
37
|
+
exports.goTo = goTo;
|
|
34
38
|
exports.setAttribute = setAttribute;
|
package/index.esm.js
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
element['__' + attribute] = value;
|
|
13
13
|
element.requestUpdate();
|
|
14
14
|
}
|
|
15
|
-
return;
|
|
16
15
|
}
|
|
17
16
|
async dispatchEvent(params, _pinsSettingsList, _context) {
|
|
18
17
|
const { selector, name, detail } = params;
|
|
@@ -20,10 +19,14 @@
|
|
|
20
19
|
element.dispatchEvent(new CustomEvent(name, {
|
|
21
20
|
detail
|
|
22
21
|
}));
|
|
23
|
-
|
|
22
|
+
}
|
|
23
|
+
async goTo(params, _pinsSettingsList, _context) {
|
|
24
|
+
const { url } = params;
|
|
25
|
+
window.location.href = url;
|
|
24
26
|
}
|
|
25
27
|
};
|
|
26
28
|
const setAttribute = (params, pinsSettingsList, context)=>new DomService().setAttribute(params, pinsSettingsList, context);
|
|
27
29
|
const dispatchEvent = (params, pinsSettingsList, context)=>new DomService().dispatchEvent(params, pinsSettingsList, context);
|
|
30
|
+
const goTo = (params, pinsSettingsList, context)=>new DomService().goTo(params, pinsSettingsList, context);
|
|
28
31
|
|
|
29
|
-
export { dispatchEvent, setAttribute };
|
|
32
|
+
export { dispatchEvent, goTo, setAttribute };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { PinsSettings } from '@digipair/engine';
|
|
2
2
|
export declare const setAttribute: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
3
3
|
export declare const dispatchEvent: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
4
|
+
export declare const goTo: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"openapi": "3.0.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "@digipair/skill-web-interact",
|
|
5
|
-
"summary": "Intéraction avec
|
|
6
|
-
"description": "Cette compétence permet aux utilisateurs de communiquer avec
|
|
5
|
+
"summary": "Intéraction avec une page web",
|
|
6
|
+
"description": "Cette compétence permet aux utilisateurs de communiquer avec une page HTML coté navigateur.",
|
|
7
7
|
"version": "0.1.0",
|
|
8
8
|
"x-icon": "🚀"
|
|
9
9
|
},
|
|
@@ -81,6 +81,25 @@
|
|
|
81
81
|
],
|
|
82
82
|
"x-events": []
|
|
83
83
|
}
|
|
84
|
+
},
|
|
85
|
+
"/goTo": {
|
|
86
|
+
"post": {
|
|
87
|
+
"tags": ["web", "boost"],
|
|
88
|
+
"summary": "Aller vers une page web",
|
|
89
|
+
"description": "Permet d'ouvrir une page web dans le navigateur",
|
|
90
|
+
"parameters": [
|
|
91
|
+
{
|
|
92
|
+
"name": "url",
|
|
93
|
+
"summary": "Adresse",
|
|
94
|
+
"required": true,
|
|
95
|
+
"description": "Adresse de la page web",
|
|
96
|
+
"schema": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"x-events": []
|
|
102
|
+
}
|
|
84
103
|
}
|
|
85
104
|
},
|
|
86
105
|
"components": {
|