eiam-user-preference 0.0.56 → 0.0.59

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.
Files changed (67) hide show
  1. package/LICENSE +22 -22
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -1
  3. package/dist/cjs/eiam-user-preference.cjs.entry.js +15 -5
  4. package/dist/cjs/eiam-user-preference.cjs.js +3 -5
  5. package/dist/cjs/eiam-user-preference.cjs.js.map +1 -1
  6. package/dist/cjs/eiam-user-preference.entry.cjs.js.map +1 -1
  7. package/dist/cjs/{index-BwhDU6Rv.js → index-DFm_LKOZ.js} +250 -138
  8. package/dist/cjs/index-DFm_LKOZ.js.map +1 -0
  9. package/dist/cjs/index.cjs.js +0 -2
  10. package/dist/cjs/index.cjs.js.map +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -4
  12. package/dist/cjs/my-component.cjs.entry.js +2 -4
  13. package/dist/cjs/my-component.entry.cjs.js.map +1 -1
  14. package/dist/collection/collection-manifest.json +2 -2
  15. package/dist/collection/components/eiam-user-preference/eiam-user-preference.js +22 -10
  16. package/dist/collection/components/eiam-user-preference/eiam-user-preference.js.map +1 -1
  17. package/dist/collection/components/my-component/my-component.css +3 -3
  18. package/dist/collection/components/my-component/my-component.js +7 -7
  19. package/dist/collection/components/my-component/my-component.js.map +1 -1
  20. package/dist/collection/index.js.map +1 -1
  21. package/dist/collection/utils/utils.js.map +1 -1
  22. package/dist/components/eiam-user-preference.js +20 -6
  23. package/dist/components/eiam-user-preference.js.map +1 -1
  24. package/dist/components/index.js +1 -1
  25. package/dist/components/index.js.map +1 -1
  26. package/dist/components/my-component.js +7 -5
  27. package/dist/components/my-component.js.map +1 -1
  28. package/dist/components/{p-Bg8L3BtK.js → p-Dk6Z16y5.js} +234 -136
  29. package/dist/components/p-Dk6Z16y5.js.map +1 -0
  30. package/dist/eiam-user-preference/eiam-user-preference.entry.esm.js.map +1 -1
  31. package/dist/eiam-user-preference/eiam-user-preference.esm.js +1 -1
  32. package/dist/eiam-user-preference/eiam-user-preference.esm.js.map +1 -1
  33. package/dist/eiam-user-preference/index.esm.js.map +1 -1
  34. package/dist/eiam-user-preference/my-component.entry.esm.js.map +1 -1
  35. package/dist/eiam-user-preference/p-D1G58aKM.js +3 -0
  36. package/dist/eiam-user-preference/p-D1G58aKM.js.map +1 -0
  37. package/dist/eiam-user-preference/p-DQuL1Twl.js.map +1 -1
  38. package/dist/eiam-user-preference/p-a3ad7926.entry.js +2 -0
  39. package/dist/eiam-user-preference/p-a3ad7926.entry.js.map +1 -0
  40. package/dist/eiam-user-preference/{p-7478358c.entry.js → p-c60f171a.entry.js} +2 -2
  41. package/dist/eiam-user-preference/p-c60f171a.entry.js.map +1 -0
  42. package/dist/esm/app-globals-DQuL1Twl.js.map +1 -1
  43. package/dist/esm/eiam-user-preference.entry.js +15 -5
  44. package/dist/esm/eiam-user-preference.entry.js.map +1 -1
  45. package/dist/esm/eiam-user-preference.js +4 -6
  46. package/dist/esm/eiam-user-preference.js.map +1 -1
  47. package/dist/esm/{index-Ko8ax98F.js → index-D1G58aKM.js} +250 -138
  48. package/dist/esm/index-D1G58aKM.js.map +1 -0
  49. package/dist/esm/index.js +0 -2
  50. package/dist/esm/index.js.map +1 -1
  51. package/dist/esm/loader.js +3 -5
  52. package/dist/esm/my-component.entry.js +2 -4
  53. package/dist/esm/my-component.entry.js.map +1 -1
  54. package/dist/types/components/eiam-user-preference/eiam-user-preference.d.ts +3 -0
  55. package/dist/types/stencil-public-runtime.d.ts +82 -9
  56. package/package.json +81 -81
  57. package/readme.md +86 -86
  58. package/dist/cjs/eiam-user-preference.cjs.entry.js.map +0 -1
  59. package/dist/cjs/index-BwhDU6Rv.js.map +0 -1
  60. package/dist/cjs/my-component.cjs.entry.js.map +0 -1
  61. package/dist/components/p-Bg8L3BtK.js.map +0 -1
  62. package/dist/eiam-user-preference/p-43c6e6ba.entry.js +0 -2
  63. package/dist/eiam-user-preference/p-43c6e6ba.entry.js.map +0 -1
  64. package/dist/eiam-user-preference/p-7478358c.entry.js.map +0 -1
  65. package/dist/eiam-user-preference/p-Ko8ax98F.js +0 -3
  66. package/dist/eiam-user-preference/p-Ko8ax98F.js.map +0 -1
  67. package/dist/esm/index-Ko8ax98F.js.map +0 -1
@@ -1,14 +1,12 @@
1
- import { b as bootstrapLazy } from './index-Ko8ax98F.js';
2
- export { s as setNonce } from './index-Ko8ax98F.js';
1
+ import { b as bootstrapLazy } from './index-D1G58aKM.js';
2
+ export { s as setNonce } from './index-D1G58aKM.js';
3
3
  import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["eiam-user-preference",[[1,"eiam-user-preference",{"pageId":[8,"page-id"],"cultureCode":[1,"culture-code"],"applicationId":[1,"application-id"],"apiUrl":[1,"api-url"],"currentRouteSlug":[32],"payload":[32],"userPreferences":[32],"dateFormates":[32],"timeFormats":[32],"fontSizes":[32],"displayFormats":[32],"userApplications":[32],"pages":[32],"isModalOpen":[32],"currentPage":[32],"pageSize":[32],"isPageModalOpen":[32],"selectedPage":[32],"showToastFlag":[32],"toastType":[32],"toastMessage":[32]},null,{"cultureCode":["componentWillLoad"],"applicationId":["componentWillLoad"],"pageId":["componentWillLoad"],"apiUrl":["componentWillLoad"]}]]],["my-component",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]]], options);
8
+ return bootstrapLazy([["eiam-user-preference",[[257,"eiam-user-preference",{"pageId":[8,"page-id"],"cultureCode":[1,"culture-code"],"applicationId":[1,"application-id"],"apiUrl":[1,"api-url"],"currentRouteSlug":[32],"payload":[32],"userPreferences":[32],"dateFormates":[32],"timeFormats":[32],"fontSizes":[32],"displayFormats":[32],"userApplications":[32],"pages":[32],"isModalOpen":[32],"currentPage":[32],"pageSize":[32],"isPageModalOpen":[32],"selectedPage":[32],"showToastFlag":[32],"toastType":[32],"toastMessage":[32]},null,{"cultureCode":["componentWillLoad"],"applicationId":["componentWillLoad"],"pageId":["componentWillLoad"],"apiUrl":["componentWillLoad"]}]]],["my-component",[[257,"my-component",{"first":[1],"middle":[1],"last":[1]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
12
12
  //# sourceMappingURL=loader.js.map
13
-
14
- //# sourceMappingURL=loader.js.map
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-Ko8ax98F.js';
1
+ import { r as registerInstance, h } from './index-D1G58aKM.js';
2
2
  import { format } from './index.js';
3
3
 
4
4
  const myComponentCss = ":host{display:block}";
@@ -23,12 +23,10 @@ const MyComponent = class {
23
23
  return format(this.first, this.middle, this.last);
24
24
  }
25
25
  render() {
26
- return h("div", { key: '57decd4aec03992e22486b0ab0d7cc68f1931c30' }, "Hello, World! I'm ", this.getText());
26
+ return h("div", { key: 'd4ea8660d4a25fd69ed93427fcb906d0631c9750' }, "Hello, World! I'm ", this.getText());
27
27
  }
28
28
  };
29
29
  MyComponent.style = myComponentCss;
30
30
 
31
31
  export { MyComponent as my_component };
32
32
  //# sourceMappingURL=my-component.entry.js.map
33
-
34
- //# sourceMappingURL=my-component.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"my-component.entry.js","sources":["src/components/my-component/my-component.css?tag=my-component&encapsulation=shadow","src/components/my-component/my-component.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Prop, h } from '@stencil/core';\nimport { format } from '../../utils/utils';\n\n@Component({\n tag: 'my-component',\n styleUrl: 'my-component.css',\n shadow: true,\n})\nexport class MyComponent {\n /**\n * The first name\n */\n @Prop() first: string;\n\n /**\n * The middle name\n */\n @Prop() middle: string;\n\n /**\n * The last name\n */\n @Prop() last: string;\n\n private getText(): string {\n return format(this.first, this.middle, this.last);\n }\n\n render() {\n return <div>Hello, World! I'm {this.getText()}</div>;\n }\n}\n"],"names":[],"mappings":";;;AAAA,MAAM,cAAc,GAAG,sBAAsB;;MCQhC,WAAW,GAAA,MAAA;;;;AACtB;;AAEG;AACK,IAAA,KAAK;AAEb;;AAEG;AACK,IAAA,MAAM;AAEd;;AAEG;AACK,IAAA,IAAI;IAEJ,OAAO,GAAA;AACb,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;;IAGnD,MAAM,GAAA;AACJ,QAAA,OAAO,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,wBAAwB,IAAI,CAAC,OAAO,EAAE,CAAO;;;;;;;"}
1
+ {"version":3,"file":"my-component.entry.js","sources":["src/components/my-component/my-component.css?tag=my-component&encapsulation=shadow","src/components/my-component/my-component.tsx"],"sourcesContent":[":host {\r\n display: block;\r\n}\r\n","import { Component, Prop, h } from '@stencil/core';\r\nimport { format } from '../../utils/utils';\r\n\r\n@Component({\r\n tag: 'my-component',\r\n styleUrl: 'my-component.css',\r\n shadow: true,\r\n})\r\nexport class MyComponent {\r\n /**\r\n * The first name\r\n */\r\n @Prop() first: string;\r\n\r\n /**\r\n * The middle name\r\n */\r\n @Prop() middle: string;\r\n\r\n /**\r\n * The last name\r\n */\r\n @Prop() last: string;\r\n\r\n private getText(): string {\r\n return format(this.first, this.middle, this.last);\r\n }\r\n\r\n render() {\r\n return <div>Hello, World! I'm {this.getText()}</div>;\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAAA,MAAM,cAAc,GAAG,sBAAsB;;MCQhC,WAAW,GAAA,MAAA;;;;AACtB;;AAEG;AACK,IAAA,KAAK;AAEb;;AAEG;AACK,IAAA,MAAM;AAEd;;AAEG;AACK,IAAA,IAAI;IAEJ,OAAO,GAAA;AACb,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;;IAGnD,MAAM,GAAA;AACJ,QAAA,OAAO,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,wBAAwB,IAAI,CAAC,OAAO,EAAE,CAAO;;;;;;;"}
@@ -45,6 +45,9 @@ export declare class EiamUserPreference {
45
45
  applicationId: string;
46
46
  apiUrl: string;
47
47
  componentWillLoad(): Promise<void>;
48
+ private isFetchingDisplayFormats;
49
+ private isFetchingUserPreferences;
50
+ private isFetchingApplications;
48
51
  getDisplayFormats(): Promise<void>;
49
52
  getUserPreferences(): Promise<void>;
50
53
  private showToast;
@@ -1,4 +1,6 @@
1
- declare type CustomMethodDecorator<T> = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
1
+ type CustomMethodDecorator<T> = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
2
+ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
3
+ type MixinInstance<F> = F extends (base: MixedInCtor) => MixedInCtor<infer I> ? I : never;
2
4
  export interface ComponentDecorator {
3
5
  (opts?: ComponentOptions): ClassDecorator;
4
6
  }
@@ -151,7 +153,13 @@ export interface StateDecorator {
151
153
  (): PropertyDecorator;
152
154
  }
153
155
  export interface WatchDecorator {
154
- (propName: string): CustomMethodDecorator<any>;
156
+ (propName: any): CustomMethodDecorator<(newValue?: any, oldValue?: any, propName?: any, ...args: any[]) => any | void>;
157
+ }
158
+ export interface PropSerializeDecorator {
159
+ (propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => string | null>;
160
+ }
161
+ export interface AttrDeserializeDecorator {
162
+ (propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => any>;
155
163
  }
156
164
  export interface UserBuildConditionals {
157
165
  isDev: boolean;
@@ -233,6 +241,14 @@ export declare const State: StateDecorator;
233
241
  * https://stenciljs.com/docs/reactive-data#watch-decorator
234
242
  */
235
243
  export declare const Watch: WatchDecorator;
244
+ /**
245
+ * Decorator to serialize a property to an attribute string.
246
+ */
247
+ export declare const PropSerialize: PropSerializeDecorator;
248
+ /**
249
+ * Decorator to deserialize an attribute string to a property.
250
+ */
251
+ export declare const AttrDeserialize: AttrDeserializeDecorator;
236
252
  export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
237
253
  export type ErrorHandler = (err: any, element?: HTMLElement) => void;
238
254
  /**
@@ -260,6 +276,25 @@ export declare function setPlatformHelpers(helpers: {
260
276
  * @returns the base path
261
277
  */
262
278
  export declare function getAssetPath(path: string): string;
279
+ /**
280
+ * Method to render a virtual DOM tree to a container element.
281
+ *
282
+ * @example
283
+ * ```tsx
284
+ * import { render } from '@stencil/core';
285
+ *
286
+ * const vnode = (
287
+ * <div>
288
+ * <h1>Hello, world!</h1>
289
+ * </div>
290
+ * );
291
+ * render(vnode, document.body);
292
+ * ```
293
+ *
294
+ * @param vnode - The virtual DOM tree to render
295
+ * @param container - The container element to render the virtual DOM tree to
296
+ */
297
+ export declare function render(vnode: VNode, container: Element): void;
263
298
  /**
264
299
  * Used to manually set the base path where assets can be found. For lazy-loaded
265
300
  * builds the asset path is automatically set and assets copied to the correct
@@ -304,7 +339,7 @@ export declare function forceUpdate(ref: any): void;
304
339
  * @returns the rendering ref
305
340
  */
306
341
  export declare function getRenderingRef(): any;
307
- export interface HTMLStencilElement extends HTMLElement {
342
+ export interface HTMLStencilElement extends Omit<HTMLElement, 'autocorrect'> {
308
343
  componentOnReady(): Promise<this>;
309
344
  }
310
345
  /**
@@ -330,6 +365,37 @@ export declare function readTask(task: RafCallback): void;
330
365
  * Unhandled exception raised while rendering, during event handling, or lifecycles will trigger the custom event handler.
331
366
  */
332
367
  export declare const setErrorHandler: (handler: ErrorHandler) => void;
368
+ /**
369
+ * @deprecated - Use `MixedInCtor` instead:
370
+ * ```ts
371
+ * import { MixedInCtor } from '@stencil/core';
372
+ *
373
+ * const AFactoryFn = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
374
+ * ```
375
+ */
376
+ export type MixinFactory = (base: MixedInCtor) => MixedInCtor;
377
+ export type MixedInCtor<T = {}> = new (...args: any[]) => T;
378
+ /**
379
+ * Compose multiple mixin classes into a single constructor.
380
+ * The resulting class has the combined instance types of all mixed-in classes.
381
+ *
382
+ * Example:
383
+ * ```ts
384
+ * import { Mixin, MixedInCtor } from '@stencil/core';
385
+ *
386
+ * const AWrap = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
387
+ * const BWrap = <B extends MixedInCtor>(Base: B) => {class B extends Base { propB = B }; return B;}
388
+ * const CWrap = <B extends MixedInCtor>(Base: B) => {class C extends Base { propC = C }; return C;}
389
+ *
390
+ * class X extends Mixin(AWrap, BWrap, CWrap) {
391
+ * render() { return <div>{this.propA} {this.propB} {this.propC}</div>; }
392
+ * }
393
+ * ```
394
+ *
395
+ * @param mixinFactories mixin factory functions that return a class which extends from the provided class.
396
+ * @returns a class that is composed from extending each of the provided classes in the order they were provided.
397
+ */
398
+ export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
333
399
  /**
334
400
  * This file gets copied to all distributions of stencil component collections.
335
401
  * - no imports
@@ -827,7 +893,7 @@ export declare namespace JSXBase {
827
893
  interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
828
894
  open?: boolean;
829
895
  name?: string;
830
- onToggle?: (event: Event) => void;
896
+ onToggle?: (event: ToggleEvent) => void;
831
897
  }
832
898
  interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
833
899
  cite?: string;
@@ -1533,6 +1599,13 @@ export declare namespace JSXBase {
1533
1599
  z?: number | string;
1534
1600
  zoomAndPan?: string;
1535
1601
  }
1602
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
1603
+ interface ToggleEvent extends Event {
1604
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */
1605
+ readonly newState: string;
1606
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/oldState) */
1607
+ readonly oldState: string;
1608
+ }
1536
1609
  interface DOMAttributes<T> extends JSXAttributes<T> {
1537
1610
  slot?: string;
1538
1611
  part?: string;
@@ -1549,6 +1622,10 @@ export declare namespace JSXBase {
1549
1622
  onCompositionstartCapture?: (event: CompositionEvent) => void;
1550
1623
  onCompositionupdate?: (event: CompositionEvent) => void;
1551
1624
  onCompositionupdateCapture?: (event: CompositionEvent) => void;
1625
+ onBeforeToggle?: (event: ToggleEvent) => void;
1626
+ onBeforeToggleCapture?: (event: ToggleEvent) => void;
1627
+ onToggle?: (event: ToggleEvent) => void;
1628
+ onToggleCapture?: (event: ToggleEvent) => void;
1552
1629
  onFocus?: (event: FocusEvent) => void;
1553
1630
  onFocusCapture?: (event: FocusEvent) => void;
1554
1631
  onFocusin?: (event: FocusEvent) => void;
@@ -1567,10 +1644,6 @@ export declare namespace JSXBase {
1567
1644
  onSubmitCapture?: (event: Event) => void;
1568
1645
  onInvalid?: (event: Event) => void;
1569
1646
  onInvalidCapture?: (event: Event) => void;
1570
- onBeforeToggle?: (event: Event) => void;
1571
- onBeforeToggleCapture?: (event: Event) => void;
1572
- onToggle?: (event: Event) => void;
1573
- onToggleCapture?: (event: Event) => void;
1574
1647
  onLoad?: (event: Event) => void;
1575
1648
  onLoadCapture?: (event: Event) => void;
1576
1649
  onError?: (event: Event) => void;
@@ -1582,7 +1655,7 @@ export declare namespace JSXBase {
1582
1655
  onKeyUp?: (event: KeyboardEvent) => void;
1583
1656
  onKeyUpCapture?: (event: KeyboardEvent) => void;
1584
1657
  onAuxClick?: (event: MouseEvent) => void;
1585
- onClick?: (event: MouseEvent) => void;
1658
+ onClick?: (event: PointerEvent) => void;
1586
1659
  onClickCapture?: (event: MouseEvent) => void;
1587
1660
  onContextMenu?: (event: MouseEvent) => void;
1588
1661
  onContextMenuCapture?: (event: MouseEvent) => void;
package/package.json CHANGED
@@ -1,81 +1,81 @@
1
- {
2
- "name": "eiam-user-preference",
3
- "version": "0.0.56",
4
- "description": "Stencil Component Starter",
5
- "main": "dist/index.cjs.js",
6
- "module": "dist/index.js",
7
- "types": "dist/types/index.d.ts",
8
- "collection": "dist/collection/collection-manifest.json",
9
- "collection:main": "dist/collection/index.js",
10
- "unpkg": "dist/eiam-user-preference/eiam-user-preference.esm.js",
11
- "exports": {
12
- ".": {
13
- "import": "./dist/eiam-user-preference/eiam-user-preference.esm.js",
14
- "require": "./dist/eiam-user-preference/eiam-user-preference.cjs.js"
15
- },
16
- "./my-component": {
17
- "import": "./dist/components/my-component.js",
18
- "types": "./dist/components/my-component.d.ts"
19
- },
20
- "./loader": {
21
- "import": "./loader/index.js",
22
- "require": "./loader/index.cjs",
23
- "types": "./loader/index.d.ts"
24
- }
25
- },
26
- "repository": {
27
- "type": "git",
28
- "url": "https://github.com/stenciljs/component-starter.git"
29
- },
30
- "files": [
31
- "dist/",
32
- "loader/"
33
- ],
34
- "scripts": {
35
- "build": "stencil build",
36
- "start": "stencil build --dev --watch --serve",
37
- "test": "stencil test --spec --e2e",
38
- "test.watch": "stencil test --spec --e2e --watchAll",
39
- "generate": "stencil generate"
40
- },
41
- "devDependencies": {
42
- "@stencil/core": "^4.27.1",
43
- "@types/jest": "^29.5.14",
44
- "@types/node": "^22.13.5",
45
- "jest": "^29.7.0",
46
- "jest-cli": "^29.7.0",
47
- "puppeteer": "^24.3.0"
48
- },
49
- "peerDependencies": {
50
- "@angular/common": ">=14.0.0",
51
- "@angular/core": ">=14.0.0",
52
- "typescript": ">=4.7.0"
53
- },
54
- "engines": {
55
- "node": ">=16.0.0",
56
- "npm": ">=8.0.0"
57
- },
58
- "license": "MIT",
59
- "dependencies": {},
60
- "keywords": [
61
- "angular",
62
- "stencil",
63
- "web components",
64
- "user preference",
65
- "user settings",
66
- "date format",
67
- "time format",
68
- "font size",
69
- "landing page",
70
- "user display format",
71
- "preferences component",
72
- "portal settings",
73
- "EIAM",
74
- "eiam user preference",
75
- "user profile",
76
- "dynamic preferences",
77
- "theme settings",
78
- "stenciljs",
79
- "angular integration"
80
- ]
81
- }
1
+ {
2
+ "name": "eiam-user-preference",
3
+ "version": "0.0.59",
4
+ "description": "Stencil Component Starter",
5
+ "main": "dist/index.cjs.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/types/index.d.ts",
8
+ "collection": "dist/collection/collection-manifest.json",
9
+ "collection:main": "dist/collection/index.js",
10
+ "unpkg": "dist/eiam-user-preference/eiam-user-preference.esm.js",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/eiam-user-preference/eiam-user-preference.esm.js",
14
+ "require": "./dist/eiam-user-preference/eiam-user-preference.cjs.js"
15
+ },
16
+ "./my-component": {
17
+ "import": "./dist/components/my-component.js",
18
+ "types": "./dist/components/my-component.d.ts"
19
+ },
20
+ "./loader": {
21
+ "import": "./loader/index.js",
22
+ "require": "./loader/index.cjs",
23
+ "types": "./loader/index.d.ts"
24
+ }
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": ""
29
+ },
30
+ "homepage": "",
31
+ "files": [
32
+ "dist/",
33
+ "loader/"
34
+ ],
35
+ "scripts": {
36
+ "build": "stencil build",
37
+ "start": "stencil build --dev --watch --serve",
38
+ "test": "stencil test --spec --e2e",
39
+ "test.watch": "stencil test --spec --e2e --watchAll",
40
+ "generate": "stencil generate"
41
+ },
42
+ "devDependencies": {
43
+ "@stencil/core": "^4.38.2",
44
+ "@types/jest": "^29.5.14",
45
+ "@types/node": "^22.18.12",
46
+ "jest": "^29.7.0",
47
+ "jest-cli": "^29.7.0",
48
+ "puppeteer": "^24.3.0"
49
+ },
50
+ "peerDependencies": {
51
+ "@angular/common": ">=14.0.0",
52
+ "@angular/core": ">=14.0.0",
53
+ "typescript": ">=4.7.0"
54
+ },
55
+ "engines": {
56
+ "node": ">=16.0.0",
57
+ "npm": ">=8.0.0"
58
+ },
59
+ "license": "MIT",
60
+ "keywords": [
61
+ "angular",
62
+ "stencil",
63
+ "web components",
64
+ "user preference",
65
+ "user settings",
66
+ "date format",
67
+ "time format",
68
+ "font size",
69
+ "landing page",
70
+ "user display format",
71
+ "preferences component",
72
+ "portal settings",
73
+ "EIAM",
74
+ "eiam user preference",
75
+ "user profile",
76
+ "dynamic preferences",
77
+ "theme settings",
78
+ "stenciljs",
79
+ "angular integration"
80
+ ]
81
+ }
package/readme.md CHANGED
@@ -1,86 +1,86 @@
1
- # EIAM User-preference
2
-
3
- > A Web Component built with StencilJS, used for managing user preferences in an Angular project.
4
-
5
- ## ✨ Features
6
- Change user settings related to the portal:
7
-
8
- - Date Format
9
-
10
- - Time Format
11
-
12
- - Font Size
13
-
14
- - User Display Format
15
-
16
- - Default Landing Page
17
-
18
- - Reset preferences
19
-
20
- - Emits changes back to the host Angular app
21
-
22
-
23
-
24
-
25
- ## 🚀 Getting Started
26
-
27
- ### Install the component:
28
-
29
- > First, install the component in your Angular project:
30
-
31
- ```bash
32
- 1. npm i eiam-user-preference
33
-
34
-
35
- 2. Import and define custom elements in your application:
36
- In your main.ts, import and define custom elements:
37
-
38
- import { defineCustomElements } from 'eiam-user-preference/loader';
39
-
40
- defineCustomElements(window);
41
-
42
- 3. import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
43
-
44
- @NgModule({
45
- declarations: [...],
46
- imports: [...],
47
- schemas: [CUSTOM_ELEMENTS_SCHEMA]
48
- })
49
- export class AppModule {}
50
-
51
-
52
- 4. Now you can use the custom elements in your HTML BUT you need to pass the dynamic properties:apiUrl, pageId, cultureCode and applicationId to the component:
53
-
54
- In your HTML:
55
-
56
- <eiam-user-preference
57
- [cultureCode]="cultureCode"
58
- [applicationId]="applicationId"
59
- [pageId]="pageId"
60
- [apiUrl]="apiURL"
61
- (preferencesChanged)="onPreferencesChanged($event)"
62
- ></eiam-user-preference>
63
-
64
-
65
- In your Angular component, make sure to dynamically provide all required input values. If any value is missing, an error message will be displayed.
66
-
67
- export class YourComponent implements OnInit {
68
- cultureCode: string;
69
- applicationId: string;
70
- apiUrl :string
71
- pageId :number
72
- ngOnInit() {
73
- // You can update these values.
74
-
75
- onPreferencesChanged(event: any) {
76
- // Handle the emitted preferences update
77
- }
78
- }
79
- }
80
-
81
- 🔁 Listening to Changes
82
-
83
- The (preferencesChanged) event emits an object containing the updated preferences.
84
- You can use this data to update features/settings in your application dynamically.
85
-
86
-
1
+ # EIAM User-preference
2
+
3
+ > A Web Component built with StencilJS, used for managing user preferences in an Angular project.
4
+
5
+ ## ✨ Features
6
+ Change user settings related to the portal:
7
+
8
+ - Date Format
9
+
10
+ - Time Format
11
+
12
+ - Font Size
13
+
14
+ - User Display Format
15
+
16
+ - Default Landing Page
17
+
18
+ - Reset preferences
19
+
20
+ - Emits changes back to the host Angular app
21
+
22
+
23
+
24
+
25
+ ## 🚀 Getting Started
26
+
27
+ ### Install the component:
28
+
29
+ > First, install the component in your Angular project:
30
+
31
+ ```bash
32
+ 1. npm i eiam-user-preference
33
+
34
+
35
+ 2. Import and define custom elements in your application:
36
+ In your main.ts, import and define custom elements:
37
+
38
+ import { defineCustomElements } from 'eiam-user-preference/loader';
39
+
40
+ defineCustomElements(window);
41
+
42
+ 3. import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
43
+
44
+ @NgModule({
45
+ declarations: [...],
46
+ imports: [...],
47
+ schemas: [CUSTOM_ELEMENTS_SCHEMA]
48
+ })
49
+ export class AppModule {}
50
+
51
+
52
+ 4. Now you can use the custom elements in your HTML BUT you need to pass the dynamic properties:apiUrl, pageId, cultureCode and applicationId to the component:
53
+
54
+ In your HTML:
55
+
56
+ <eiam-user-preference
57
+ [cultureCode]="cultureCode"
58
+ [applicationId]="applicationId"
59
+ [pageId]="pageId"
60
+ [apiUrl]="apiURL"
61
+ (preferencesChanged)="onPreferencesChanged($event)"
62
+ ></eiam-user-preference>
63
+
64
+
65
+ In your Angular component, make sure to dynamically provide all required input values. If any value is missing, an error message will be displayed.
66
+
67
+ export class YourComponent implements OnInit {
68
+ cultureCode: string;
69
+ applicationId: string;
70
+ apiUrl :string
71
+ pageId :number
72
+ ngOnInit() {
73
+ // You can update these values.
74
+
75
+ onPreferencesChanged(event: any) {
76
+ // Handle the emitted preferences update
77
+ }
78
+ }
79
+ }
80
+
81
+ 🔁 Listening to Changes
82
+
83
+ The (preferencesChanged) event emits an object containing the updated preferences.
84
+ You can use this data to update features/settings in your application dynamically.
85
+
86
+