@open-pioneer/integration 1.0.2 → 2.0.0
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/CHANGELOG.md +20 -0
- package/ExternalEventServiceImpl.js.map +1 -1
- package/README.md +2 -2
- package/api.d.ts +3 -10
- package/index.js +0 -2
- package/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @open-pioneer/integration
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 6f954e3: Compatibility with @open-pioneer/runtime@^2
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [f5c0e31]
|
|
12
|
+
- Updated dependencies [ce9e060]
|
|
13
|
+
- Updated dependencies [6f954e3]
|
|
14
|
+
- @open-pioneer/runtime@2.0.0
|
|
15
|
+
|
|
16
|
+
## 1.0.3
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [6632892]
|
|
21
|
+
- @open-pioneer/runtime@1.1.0
|
|
22
|
+
|
|
3
23
|
## 1.0.2
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalEventServiceImpl.js","sources":["ExternalEventServiceImpl.ts"],"sourcesContent":["// SPDX-FileCopyrightText:
|
|
1
|
+
{"version":3,"file":"ExternalEventServiceImpl.js","sources":["ExternalEventServiceImpl.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { ApplicationContext, Service, ServiceOptions } from \"@open-pioneer/runtime\";\nimport { ExternalEventService } from \"./api\";\n\ninterface References {\n ctx: ApplicationContext;\n}\n\nexport class ExternalEventServiceImpl implements Service<ExternalEventService> {\n #ctx: ApplicationContext;\n\n constructor({ references }: ServiceOptions<References>) {\n this.#ctx = references.ctx;\n }\n\n emitEvent(name: string, detail?: unknown): void;\n emitEvent(event: Event): void;\n emitEvent(nameOrEvent: string | Event, detail: unknown = null) {\n if (nameOrEvent == null) {\n return;\n }\n\n if (nameOrEvent instanceof Event) {\n this.#dispatch(nameOrEvent);\n return;\n }\n\n const event = new CustomEvent(nameOrEvent, {\n bubbles: false,\n cancelable: false,\n detail\n });\n this.#dispatch(event);\n }\n\n #dispatch(event: Event) {\n this.#ctx.getHostElement().dispatchEvent(event);\n }\n}\n"],"names":[],"mappings":"AASO,MAAM,wBAAkE,CAAA;AAAA,EAC3E,IAAA,CAAA;AAAA,EAEA,WAAA,CAAY,EAAE,UAAA,EAA0C,EAAA;AACpD,IAAA,IAAA,CAAK,OAAO,UAAW,CAAA,GAAA,CAAA;AAAA,GAC3B;AAAA,EAIA,SAAA,CAAU,WAA6B,EAAA,MAAA,GAAkB,IAAM,EAAA;AAC3D,IAAA,IAAI,eAAe,IAAM,EAAA;AACrB,MAAA,OAAA;AAAA,KACJ;AAEA,IAAA,IAAI,uBAAuB,KAAO,EAAA;AAC9B,MAAA,IAAA,CAAK,UAAU,WAAW,CAAA,CAAA;AAC1B,MAAA,OAAA;AAAA,KACJ;AAEA,IAAM,MAAA,KAAA,GAAQ,IAAI,WAAA,CAAY,WAAa,EAAA;AAAA,MACvC,OAAS,EAAA,KAAA;AAAA,MACT,UAAY,EAAA,KAAA;AAAA,MACZ,MAAA;AAAA,KACH,CAAA,CAAA;AACD,IAAA,IAAA,CAAK,UAAU,KAAK,CAAA,CAAA;AAAA,GACxB;AAAA,EAEA,UAAU,KAAc,EAAA;AACpB,IAAA,IAAA,CAAK,IAAK,CAAA,cAAA,EAAiB,CAAA,aAAA,CAAc,KAAK,CAAA,CAAA;AAAA,GAClD;AACJ;;;;"}
|
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ Thereupon it is possible to call the provided methods on the returned API instan
|
|
|
62
62
|
For example:
|
|
63
63
|
|
|
64
64
|
```html
|
|
65
|
-
<!
|
|
65
|
+
<!doctype html>
|
|
66
66
|
<html lang="en">
|
|
67
67
|
...
|
|
68
68
|
<body>
|
|
@@ -137,4 +137,4 @@ app.addEventListener("extent-selected", (event) => {
|
|
|
137
137
|
|
|
138
138
|
## License
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
Apache-2.0 (see `LICENSE` file)
|
package/api.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type ApiExtension, type ApiMethods, type ApiMethod } from "@open-pioneer/runtime";
|
|
1
|
+
import { type ApiExtension, type ApiMethods, type ApiMethod, DeclaredService } from "@open-pioneer/runtime";
|
|
2
|
+
export { ApiExtension, ApiMethod, ApiMethods };
|
|
2
3
|
/**
|
|
3
4
|
* Emits events to users of the current web component.
|
|
4
5
|
*
|
|
5
6
|
* Use the interface `"integration.ExternalEventService"` to obtain an instance of this service.
|
|
6
7
|
*/
|
|
7
|
-
export interface ExternalEventService {
|
|
8
|
+
export interface ExternalEventService extends DeclaredService<"integration.ExternalEventService"> {
|
|
8
9
|
/**
|
|
9
10
|
* Emits an event to the host site as a [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent).
|
|
10
11
|
*
|
|
@@ -41,11 +42,3 @@ export interface ExternalEventService {
|
|
|
41
42
|
*/
|
|
42
43
|
emitEvent(event: Event): void;
|
|
43
44
|
}
|
|
44
|
-
export { ApiExtension, ApiMethod, ApiMethods };
|
|
45
|
-
import "@open-pioneer/runtime";
|
|
46
|
-
declare module "@open-pioneer/runtime" {
|
|
47
|
-
interface ServiceRegistry {
|
|
48
|
-
"integration.ApiExtension": ApiExtension;
|
|
49
|
-
"integration.ExternalEventService": ExternalEventService;
|
|
50
|
-
}
|
|
51
|
-
}
|
package/index.js
CHANGED
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["index.ts"],"sourcesContent":["// SPDX-FileCopyrightText:
|
|
1
|
+
{"version":3,"file":"index.js","sources":["index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nexport * from \"./api\";\n\n// Get rid of empty chunk warning\nexport default undefined;\n"],"names":[],"mappings":"AAKA,YAAe,KAAA,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/integration",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"@open-pioneer/runtime": "^
|
|
7
|
+
"@open-pioneer/runtime": "^2.0.0"
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
|
10
10
|
"./package.json": "./package.json",
|