@open-pioneer/integration 0.1.0 → 0.1.1
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 +6 -0
- package/ExternalEventServiceImpl.js.map +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalEventServiceImpl.js","sources":["
|
|
1
|
+
{"version":3,"file":"ExternalEventServiceImpl.js","sources":["ExternalEventServiceImpl.ts"],"sourcesContent":["// SPDX-FileCopyrightText: con terra GmbH and contributors\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/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: con terra GmbH and contributors\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;;;;"}
|