@moser-inc/moser-labs-custom-elements 1.0.1 → 1.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.
@@ -1,45 +1,44 @@
1
- import type Keycloak from 'keycloak-js';
2
- declare const LabsAppSwitcher: import("./apiCustomElement").VueElementConstructor<{}>;
3
- export { LabsAppSwitcher };
4
- /**
5
- * Call this function to register all provided custom elements at once.
6
- *
7
- * @example
8
- * ```ts
9
- * import { registerCustomElements } from '@moser-inc/moser-labs-custom-elements';
10
- * registerCustomElements();
11
- * ```
12
- *
13
- * Then use elements in your HTML or framework of choice.
14
- *
15
- * @example
16
- * ```html
17
- * <labs-app-switcher></labs-app-switcher>
18
- * ```
19
- */
20
- export declare function registerCustomElements(): void;
21
- /**
22
- * Call this function to make sure custom elements have access to the Keycloak
23
- * access token.
24
- *
25
- * @example
26
- * ```ts
27
- * import Keycloak from 'keycloak-js';
28
- * import { authenticateCustomElements, registerCustomElements } from '@moser-inc/moser-labs-custom-elements';
29
- *
30
- * const keycloak = new Keycloak('/keycloak.json');
31
- *
32
- * keycloak.init({ onLoad: 'login-required' }).then((isAuthenticated) => {
33
- * if (!isAuthenticated) return;
34
- *
35
- * authenticateCustomElements(keycloak);
36
- * registerCustomElements();
37
- * });
38
- * ```
39
- */
40
- export declare function authenticateCustomElements(keycloak: Keycloak): void;
41
- declare global {
42
- interface Window {
43
- __CE_KEYCLOAK_TOKEN__?: string;
44
- }
45
- }
1
+ import type { default as default_2 } from 'keycloak-js';
2
+
3
+ /**
4
+ * Call this function to make sure custom elements have access to the Keycloak
5
+ * access token.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import Keycloak from 'keycloak-js';
10
+ * import { authenticateCustomElements, registerCustomElements } from '@moser-inc/moser-labs-custom-elements';
11
+ *
12
+ * const keycloak = new Keycloak('/keycloak.json');
13
+ *
14
+ * keycloak.init({ onLoad: 'login-required' }).then((isAuthenticated) => {
15
+ * if (!isAuthenticated) return;
16
+ *
17
+ * authenticateCustomElements(keycloak);
18
+ * registerCustomElements();
19
+ * });
20
+ * ```
21
+ */
22
+ export declare function authenticateCustomElements(keycloak: default_2): void;
23
+
24
+ export declare const LabsAppSwitcher: any;
25
+
26
+ /**
27
+ * Call this function to register all provided custom elements at once.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * import { registerCustomElements } from '@moser-inc/moser-labs-custom-elements';
32
+ * registerCustomElements();
33
+ * ```
34
+ *
35
+ * Then use elements in your HTML or framework of choice.
36
+ *
37
+ * @example
38
+ * ```html
39
+ * <labs-app-switcher></labs-app-switcher>
40
+ * ```
41
+ */
42
+ export declare function registerCustomElements(): void;
43
+
44
+ export { }