@acorex/components 18.14.1-next.3 → 18.14.1-next.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. package/check-box/lib/check-box.component.d.ts +4 -2
  2. package/common/lib/components/selection-base.component.class.d.ts +1 -0
  3. package/drawer/lib/drawer/drawer-item/drawer.component.d.ts +2 -6
  4. package/esm2022/check-box/lib/check-box.component.mjs +23 -27
  5. package/esm2022/common/lib/classes/components.class.mjs +1 -1
  6. package/esm2022/common/lib/components/selection-base.component.class.mjs +5 -1
  7. package/esm2022/cron-job/lib/cron-job-container/cron-job-container.component.mjs +2 -2
  8. package/esm2022/cron-job/lib/day/day.component.mjs +7 -6
  9. package/esm2022/cron-job/lib/hours/hours.component.mjs +7 -6
  10. package/esm2022/cron-job/lib/minutes/minutes.component.mjs +7 -6
  11. package/esm2022/cron-job/lib/month/month.component.mjs +7 -6
  12. package/esm2022/cron-job/lib/seconds/seconds.component.mjs +7 -6
  13. package/esm2022/cron-job/lib/year/year.component.mjs +7 -6
  14. package/esm2022/drawer/lib/drawer/drawer-item/drawer.component.mjs +6 -9
  15. package/esm2022/form/lib/form.component.mjs +5 -2
  16. package/esm2022/password-box/index.mjs +2 -1
  17. package/esm2022/password-box/lib/password-box.component.mjs +8 -8
  18. package/esm2022/password-box/lib/password-box.module.mjs +6 -4
  19. package/esm2022/password-box/lib/password-strength-validation/password-strength-validation.component.mjs +41 -0
  20. package/esm2022/phone-box/lib/phone-box.component.mjs +17 -5
  21. package/esm2022/select-box/lib/select-box.component.mjs +7 -24
  22. package/esm2022/selection-list/lib/selection-list.component.mjs +4 -4
  23. package/esm2022/side-menu/index.mjs +2 -2
  24. package/esm2022/side-menu/lib/side-menu-item/side-menu-item.component.mjs +81 -0
  25. package/esm2022/side-menu/lib/side-menu.module.mjs +2 -2
  26. package/esm2022/step-wizard/lib/step-wizard-item/step-wizard-item.component.mjs +5 -4
  27. package/esm2022/step-wizard/lib/step-wizard.class.mjs +1 -1
  28. package/esm2022/step-wizard/lib/step-wizard.component.mjs +21 -32
  29. package/fesm2022/acorex-components-check-box.mjs +23 -27
  30. package/fesm2022/acorex-components-check-box.mjs.map +1 -1
  31. package/fesm2022/acorex-components-common.mjs +4 -0
  32. package/fesm2022/acorex-components-common.mjs.map +1 -1
  33. package/fesm2022/acorex-components-cron-job.mjs +19 -18
  34. package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
  35. package/fesm2022/acorex-components-drawer.mjs +6 -9
  36. package/fesm2022/acorex-components-drawer.mjs.map +1 -1
  37. package/fesm2022/acorex-components-form.mjs +4 -1
  38. package/fesm2022/acorex-components-form.mjs.map +1 -1
  39. package/fesm2022/acorex-components-password-box.mjs +50 -11
  40. package/fesm2022/acorex-components-password-box.mjs.map +1 -1
  41. package/fesm2022/acorex-components-phone-box.mjs +16 -4
  42. package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
  43. package/fesm2022/acorex-components-select-box.mjs +6 -23
  44. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  45. package/fesm2022/acorex-components-selection-list.mjs +3 -3
  46. package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
  47. package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
  48. package/fesm2022/acorex-components-step-wizard.mjs +24 -34
  49. package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
  50. package/package.json +1 -1
  51. package/password-box/index.d.ts +1 -0
  52. package/password-box/lib/password-box.component.d.ts +7 -7
  53. package/password-box/lib/password-box.module.d.ts +7 -5
  54. package/password-box/lib/password-strength-validation/password-strength-validation.component.d.ts +12 -0
  55. package/phone-box/lib/phone-box.component.d.ts +4 -2
  56. package/select-box/lib/select-box.component.d.ts +0 -8
  57. package/side-menu/index.d.ts +1 -1
  58. package/side-menu/lib/side-menu.module.d.ts +1 -1
  59. package/step-wizard/lib/step-wizard-item/step-wizard-item.component.d.ts +10 -9
  60. package/step-wizard/lib/step-wizard.class.d.ts +1 -1
  61. package/step-wizard/lib/step-wizard.component.d.ts +7 -13
  62. package/esm2022/side-menu/lib/side-menu-item/side-menu-item.compoent.mjs +0 -81
  63. /package/side-menu/lib/side-menu-item/{side-menu-item.compoent.d.ts → side-menu-item.component.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { signal, Injectable, inject, afterNextRender, Component, ChangeDetectionStrategy, ViewEncapsulation, model, input, HostBinding, NgModule } from '@angular/core';
3
+ import { signal, Injectable, inject, afterNextRender, Component, ChangeDetectionStrategy, ViewEncapsulation, model, input, NgZone, HostBinding, NgModule } from '@angular/core';
4
4
  import { MXBaseComponent, AXComponent, AXClosbaleComponent } from '@acorex/components/common';
5
5
  import { isBrowser } from '@acorex/core/platform';
6
6
 
@@ -49,12 +49,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
49
49
  * @category Components
50
50
  */
51
51
  class AXDrawerComponent extends MXBaseComponent {
52
- /**
53
- * @ignore
54
- */
55
- constructor(_zone) {
56
- super();
57
- this._zone = _zone;
52
+ constructor() {
53
+ super(...arguments);
58
54
  this.location = model('start');
59
55
  this.showBackdrop = input(true);
60
56
  this.mode = model('overlay');
@@ -63,6 +59,7 @@ class AXDrawerComponent extends MXBaseComponent {
63
59
  this.backdropElement = signal(null);
64
60
  this.loaded = signal(false);
65
61
  this.service = inject(AXDrawerService);
62
+ this._zone = inject(NgZone);
66
63
  }
67
64
  /**
68
65
  * @ignore
@@ -164,7 +161,7 @@ class AXDrawerComponent extends MXBaseComponent {
164
161
  get __hostClass() {
165
162
  return `ax-drawer-${this.mode()} ax-drawer-${this.location()} ${this.collapsed() ? 'ax-collapsed' : 'ax-expanded'} ${this.loaded() && 'ax-state-loaded'}`;
166
163
  }
167
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXDrawerComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
164
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXDrawerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
168
165
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: AXDrawerComponent, selector: "ax-drawer", inputs: { location: { classPropertyName: "location", publicName: "location", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, closeOthers: { classPropertyName: "closeOthers", publicName: "closeOthers", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { location: "locationChange", mode: "modeChange", collapsed: "collapsedChange" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
169
166
  { provide: AXComponent, useExisting: AXDrawerComponent },
170
167
  { provide: AXClosbaleComponent, useExisting: AXDrawerComponent },
@@ -182,7 +179,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
182
179
  { provide: AXComponent, useExisting: AXDrawerComponent },
183
180
  { provide: AXClosbaleComponent, useExisting: AXDrawerComponent },
184
181
  ], styles: ["ax-drawer{display:flex;height:100%;max-width:95%;flex-direction:column;background-color:rgba(var(--ax-color-surface))}ax-drawer.ax-state-loaded{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer ax-header,ax-drawer ax-footer{padding:.75rem}ax-drawer ax-footer{border-top-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-drawer ax-header{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-drawer>ax-content{flex:1 1 0%;overflow:auto}ax-drawer.ax-drawer-overlay{position:absolute;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-drawer.ax-drawer-overlay.ax-expanded{z-index:20}ax-drawer.ax-drawer-overlay.ax-collapsed{z-index:0}ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-expanded{inset-inline-start:0px}ax-drawer.ax-drawer-overlay.ax-drawer-start.ax-collapsed{inset-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-expanded{inset-inline-end:0px}ax-drawer.ax-drawer-overlay.ax-drawer-end.ax-collapsed{inset-inline-end:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-push{flex:0 1 auto}ax-drawer.ax-drawer-push.ax-expanded{z-index:20}ax-drawer.ax-drawer-push.ax-collapsed{z-index:0}ax-drawer.ax-drawer-push.ax-drawer-start{order:-9999}ax-drawer.ax-drawer-push.ax-drawer-start.ax-expanded{margin-inline-start:0px}ax-drawer.ax-drawer-push.ax-drawer-start.ax-collapsed{margin-inline-start:calc(-1 * var(--ax-el-width))}ax-drawer.ax-drawer-push.ax-drawer-end{order:9999}ax-drawer.ax-drawer-push.ax-drawer-end.ax-expanded{margin-inline-end:0px}ax-drawer.ax-drawer-push.ax-drawer-end.ax-collapsed{margin-inline-end:calc(-1 * var(--ax-el-width))}\n"] }]
185
- }], ctorParameters: () => [{ type: i0.NgZone }], propDecorators: { __hostClass: [{
182
+ }], propDecorators: { __hostClass: [{
186
183
  type: HostBinding,
187
184
  args: ['class']
188
185
  }] } });
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-drawer.mjs","sources":["../../../../libs/components/drawer/src/lib/drawer.service.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-container/drawer-container.component.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-item/drawer.component.ts","../../../../libs/components/drawer/src/lib/drawer.module.ts","../../../../libs/components/drawer/src/acorex-components-drawer.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\n@Injectable()\nexport class AXDrawerService {\n drawerElements = signal<AXDrawerComponent[]>(null);\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\nimport { AXDrawerComponent } from '../drawer-item/drawer.component';\n\n/**\n * A container component that organizes and positions drawer components.\n * @category component\n */\n@Component({\n selector: 'ax-drawer-container',\n template: `\n <ng-content select=\"ax-drawer\"> </ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [AXDrawerService],\n})\nexport class AXDrawerContainerComponent extends MXBaseComponent {\n private service = inject(AXDrawerService);\n\n constructor() {\n super();\n afterNextRender(() => {\n const host = this.getHostElement();\n const drawerClasses = Array.from(host.querySelectorAll(`ax-drawer`)).map(\n (c) => c['__axContext__'] as AXDrawerComponent,\n );\n this.service.drawerElements.set(drawerClasses);\n });\n }\n}\n","import { AXClosbaleComponent, AXComponent, MXBaseComponent } from '@acorex/components/common';\nimport { isBrowser } from '@acorex/core/platform';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n HostBinding,\n inject,\n input,\n model,\n NgZone,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\n\nexport type AXDrawerMode = 'push' | 'overlay';\nexport type AXDrawerLocation = 'start' | 'end';\n\n/**\n * A component that represents a drawer with header and content sections.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-drawer',\n template: `\n <ng-content select=\"ax-header\"></ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXDrawerComponent },\n { provide: AXClosbaleComponent, useExisting: AXDrawerComponent },\n ],\n})\nexport class AXDrawerComponent extends MXBaseComponent implements AfterContentInit, DoCheck {\n location = model<AXDrawerLocation>('start');\n\n showBackdrop = input(true);\n\n mode = model<AXDrawerMode>('overlay');\n\n closeOthers = input(false);\n\n collapsed = model(true);\n\n private backdropElement = signal<HTMLElement>(null);\n\n protected loaded = signal(false);\n\n private service = inject(AXDrawerService);\n\n /**\n * @ignore\n */\n constructor(private _zone: NgZone) {\n super();\n }\n\n /**\n * @ignore\n */\n ngAfterContentInit(): void {\n this._detectBoundingSize();\n setTimeout(() => {\n this.loaded.set(true);\n }, 5000);\n }\n\n /**\n * @ignore\n */\n ngDoCheck() {\n this._detectBoundingSize();\n }\n\n /**\n * @ignore\n */\n private _detectBoundingSize() {\n this._zone.runOutsideAngular(() => {\n const host = this.getHostElement();\n if (host.clientWidth) {\n host.style.setProperty('--ax-el-width', `${host.clientWidth}px`);\n }\n });\n }\n\n /**\n * Toggles the collapsed state of the drawer.\n */\n toggle() {\n if (this.collapsed()) {\n this.open();\n } else {\n this.close();\n }\n }\n\n /**\n * Collapses the drawer.\n * @ignore\n */\n close() {\n this.collapsed.set(true);\n this._removeBackdrop();\n }\n\n /**\n * Expands the drawer.\n */\n open() {\n if (!this.collapsed()) return;\n\n this.collapsed.set(false);\n\n if (!this.closeOthers()) {\n this.service.drawerElements().forEach((element) => {\n if (element.location() === this.location() && element.id !== this.id) {\n element.close();\n }\n });\n }\n\n if (this.showBackdrop() && this.mode() === 'overlay') {\n this._addBackdrop();\n }\n }\n\n /**\n * @ignore\n */\n private _addBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n const backDropElem = document.createElement('div');\n backDropElem.classList.add('ax-backdrop');\n backDropElem.onclick = () => {\n this._zone.run(() => {\n this.close();\n });\n };\n this.getHostElement()?.parentElement?.appendChild(backDropElem);\n this.backdropElement.set(backDropElem);\n });\n }\n }\n\n /**\n * @ignore\n */\n private _removeBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n if (this.backdropElement()) {\n this.getHostElement()?.parentElement?.removeChild(this.backdropElement());\n this.backdropElement.set(null);\n }\n });\n }\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-drawer-${this.mode()} ax-drawer-${this.location()} ${\n this.collapsed() ? 'ax-collapsed' : 'ax-expanded'\n } ${this.loaded() && 'ax-state-loaded'}`;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDrawerContainerComponent } from './drawer/drawer-container/drawer-container.component';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\nconst COMPONENT = [AXDrawerComponent, AXDrawerContainerComponent];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAIa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAsB,IAAI,CAAC;AACnD;8GAFY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAf,eAAe,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B;;;ACQD;;;AAGG;AAYG,MAAO,0BAA2B,SAAQ,eAAe,CAAA;AAG7D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AAHD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;QAIvC,eAAe,CAAC,MAAK;AACnB,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE;YAClC,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA,SAAA,CAAW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awer.service.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-container/drawer-container.component.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-item/drawer.component.ts","../../../../libs/components/drawer/src/lib/drawer.module.ts","../../../../libs/components/drawer/src/acorex-components-drawer.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\n@Injectable()\nexport class AXDrawerService {\n drawerElements = signal<AXDrawerComponent[]>(null);\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\nimport { AXDrawerComponent } from '../drawer-item/drawer.component';\n\n/**\n * A container component that organizes and positions drawer components.\n * @category component\n */\n@Component({\n selector: 'ax-drawer-container',\n template: `\n <ng-content select=\"ax-drawer\"> </ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [AXDrawerService],\n})\nexport class AXDrawerContainerComponent extends MXBaseComponent {\n private service = inject(AXDrawerService);\n\n constructor() {\n super();\n afterNextRender(() => {\n const host = this.getHostElement();\n const drawerClasses = Array.from(host.querySelectorAll(`ax-drawer`)).map(\n (c) => c['__axContext__'] as AXDrawerComponent,\n );\n this.service.drawerElements.set(drawerClasses);\n });\n }\n}\n","import { AXClosbaleComponent, AXComponent, MXBaseComponent } from '@acorex/components/common';\nimport { isBrowser } from '@acorex/core/platform';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n HostBinding,\n inject,\n input,\n model,\n NgZone,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\n\nexport type AXDrawerMode = 'push' | 'overlay';\nexport type AXDrawerLocation = 'start' | 'end';\n\n/**\n * A component that represents a drawer with header and content sections.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-drawer',\n template: `\n <ng-content select=\"ax-header\"></ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXDrawerComponent },\n { provide: AXClosbaleComponent, useExisting: AXDrawerComponent },\n ],\n})\nexport class AXDrawerComponent extends MXBaseComponent implements AfterContentInit, DoCheck {\n location = model<AXDrawerLocation>('start');\n\n showBackdrop = input(true);\n\n mode = model<AXDrawerMode>('overlay');\n\n closeOthers = input(false);\n\n collapsed = model(true);\n\n private backdropElement = signal<HTMLElement>(null);\n\n protected loaded = signal(false);\n\n private service = inject(AXDrawerService);\n\n private _zone = inject(NgZone);\n\n /**\n * @ignore\n */\n ngAfterContentInit(): void {\n this._detectBoundingSize();\n setTimeout(() => {\n this.loaded.set(true);\n }, 5000);\n }\n\n /**\n * @ignore\n */\n ngDoCheck() {\n this._detectBoundingSize();\n }\n\n /**\n * @ignore\n */\n private _detectBoundingSize() {\n this._zone.runOutsideAngular(() => {\n const host = this.getHostElement();\n if (host.clientWidth) {\n host.style.setProperty('--ax-el-width', `${host.clientWidth}px`);\n }\n });\n }\n\n /**\n * Toggles the collapsed state of the drawer.\n */\n toggle() {\n if (this.collapsed()) {\n this.open();\n } else {\n this.close();\n }\n }\n\n /**\n * Collapses the drawer.\n * @ignore\n */\n close() {\n this.collapsed.set(true);\n this._removeBackdrop();\n }\n\n /**\n * Expands the drawer.\n */\n open() {\n if (!this.collapsed()) return;\n\n this.collapsed.set(false);\n\n if (!this.closeOthers()) {\n this.service.drawerElements().forEach((element) => {\n if (element.location() === this.location() && element.id !== this.id) {\n element.close();\n }\n });\n }\n\n if (this.showBackdrop() && this.mode() === 'overlay') {\n this._addBackdrop();\n }\n }\n\n /**\n * @ignore\n */\n private _addBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n const backDropElem = document.createElement('div');\n backDropElem.classList.add('ax-backdrop');\n backDropElem.onclick = () => {\n this._zone.run(() => {\n this.close();\n });\n };\n this.getHostElement()?.parentElement?.appendChild(backDropElem);\n this.backdropElement.set(backDropElem);\n });\n }\n }\n\n /**\n * @ignore\n */\n private _removeBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n if (this.backdropElement()) {\n this.getHostElement()?.parentElement?.removeChild(this.backdropElement());\n this.backdropElement.set(null);\n }\n });\n }\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-drawer-${this.mode()} ax-drawer-${this.location()} ${\n this.collapsed() ? 'ax-collapsed' : 'ax-expanded'\n } ${this.loaded() && 'ax-state-loaded'}`;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDrawerContainerComponent } from './drawer/drawer-container/drawer-container.component';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\nconst COMPONENT = [AXDrawerComponent, AXDrawerContainerComponent];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAIa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAsB,IAAI,CAAC;AACnD;8GAFY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAf,eAAe,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B;;;ACQD;;;AAGG;AAYG,MAAO,0BAA2B,SAAQ,eAAe,CAAA;AAG7D,IAAA,WAAA,GAAA;AACE,QA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AC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACbD;;AAEG;;;;"}
@@ -77,7 +77,9 @@ class AXFormComponent extends MXBaseComponent {
77
77
  this.content = contentChildren(AXFormFieldComponent, { descendants: true });
78
78
  this.#applyLooks = effect(() => {
79
79
  this.content().forEach((item) => {
80
- item.input.look = this.look();
80
+ if (item.input) {
81
+ item.input.look = this.look();
82
+ }
81
83
  });
82
84
  });
83
85
  /**
@@ -172,6 +174,7 @@ class AXFormComponent extends MXBaseComponent {
172
174
  */
173
175
  reset() {
174
176
  this.fields.forEach((c) => c.reset(false));
177
+ this.fields.forEach((c) => c.resetErrors());
175
178
  }
176
179
  /**
177
180
  * Resets validation errors for all form fields.
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-form.mjs","sources":["../../../../libs/components/form/src/lib/form.component.ts","../../../../libs/components/form/src/lib/form-field.component.ts","../../../../libs/components/form/src/lib/form.config.ts","../../../../libs/components/form/src/lib/validation-rule.directive.ts","../../../../libs/components/form/src/lib/validation-summary.component.ts","../../../../libs/components/form/src/lib/form.module.ts","../../../../libs/components/form/src/acorex-components-form.ts"],"sourcesContent":["import { AXEvent, AXStyleLookType, AXValuableComponent, MXBaseComponent } from '@acorex/components/common';\nimport { AXValidationSummary } from '@acorex/core/validation';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n InputSignal,\n OnDestroy,\n Output,\n ViewEncapsulation,\n contentChildren,\n effect,\n input,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXFormFieldComponent } from './form-field.component';\n\n/**\n * Contains native event\n * @category Events\n */\nexport class AXFormValidationEvent extends AXEvent {\n result: AXValidationSummary;\n}\n\n/**\n * Contains native event\n * @category Events\n */\nexport type AXFormUpdateOn = 'change' | 'blur' | 'submit';\nexport type AXFormMessageStyle = 'bottom' | 'float';\nexport type AXLabelMode = 'static' | 'floating' | 'over';\n\n/**\n * The AXForm is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-form',\n template: `<form\n (submit)=\"_handleSubmit($event)\"\n (reset)=\"_handleReset()\"\n class=\"ax-{{ messageStyle() }}-error\"\n >\n <ng-content></ng-content>\n </form>`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXFormComponent extends MXBaseComponent implements OnDestroy {\n /**\n * Specifies the mode of the label in the form field.\n * @defaultValue 'static'\n */\n labelMode = input<AXLabelMode>('static');\n\n look = input<AXStyleLookType>('solid');\n\n content = contentChildren(AXFormFieldComponent, { descendants: true });\n\n #applyLooks = effect(() => {\n this.content().forEach((item: any) => {\n item.input.look = this.look();\n });\n });\n\n /**\n * Determines the style of the message in the form field.\n * @defaultValue 'bottom'\n */\n messageStyle: InputSignal<AXFormMessageStyle> = input<AXFormMessageStyle>('bottom');\n\n /**\n * Emitted when the form is validated.\n *\n * @event\n */\n @Output()\n onValidate: EventEmitter<AXFormValidationEvent> = new EventEmitter<AXFormValidationEvent>();\n\n /**\n * Emitted when the form's update mode changes.\n *\n * @event\n */\n @Output()\n updateOnChange: EventEmitter<AXFormUpdateOn> = new EventEmitter<AXFormUpdateOn>();\n\n /**\n * @ignore\n */\n private _updateOn: AXFormUpdateOn = 'blur';\n\n /**\n * Determines when the form should be updated.\n */\n @Input()\n public get updateOn(): AXFormUpdateOn {\n return this._updateOn;\n }\n\n /**\n * Sets the criteria for when the form should be updated.\n * @param v The criteria to set (e.g., 'change', 'blur').\n */\n public set updateOn(v: AXFormUpdateOn) {\n this.setOption({\n name: 'updateOn',\n value: v,\n afterCallback: () => {\n //this._bindEvents();\n },\n });\n }\n\n /**\n * @ignore\n */\n private _subs: Subscription[] = [];\n\n /**\n * @ignore\n */\n protected async _handleSubmit(e: SubmitEvent) {\n e.preventDefault();\n await this.validate();\n }\n\n /**\n * @ignore\n */\n protected _handleReset() {\n this.reset();\n }\n\n /**\n * @ignore\n */\n constructor() {\n super();\n }\n\n //TODO: check update on\n\n // ngAfterViewInit(): void {\n // //this._bindEvents();\n // }\n\n // private _bindEvents() {\n // this._clearSubs();\n // const widgets = this._getComponenets();\n // //\n // widgets.forEach((w) => {\n // if (this.updateOn == 'change') {\n // this._subs.push(\n // w.onValueChanged?.subscribe((v: AXValueChangedEvent) => {\n // if (v.isUserInteraction) w.validate();\n // }),\n // );\n // } else if (this.updateOn == 'blur') {\n // this._subs.push(\n // w.onBlur?.subscribe((v) => {\n // w.validate();\n // }),\n // );\n // }\n // });\n // }\n\n /**\n * @ignore\n */\n private _clearSubs() {\n this._subs.forEach((c) => c?.unsubscribe());\n this._subs = [];\n }\n\n /**\n * @ignore\n */\n private get fields(): AXValuableComponent[] {\n return Array.from(this.getHostElement().querySelectorAll('[ax-form-item=\"true\"]'))\n .map((c) => (c as any).__axContext__)\n .filter((c) => c != null);\n }\n\n async validate(...names: string[]): Promise<AXValidationSummary> {\n const results = await Promise.all(\n this.fields\n .filter((c) => names == null || names.length == 0 || names.includes(c.name))\n .map((field) => field.validate()),\n );\n // Merge all validation summaries into one\n const mergedSummary: AXValidationSummary = {\n result: results.every((res) => res.result),\n rules: results.flatMap((res) => res.rules),\n };\n this._emitOnValidateEvent(mergedSummary);\n return mergedSummary;\n }\n\n /**\n * @ignore\n */\n private _emitOnValidateEvent(e: AXValidationSummary) {\n this.onValidate.emit({\n component: this,\n result: e,\n htmlElement: this.getHostElement(),\n });\n }\n\n /**\n * Resets all form fields without clearing errors.\n */\n reset() {\n this.fields.forEach((c) => c.reset(false));\n }\n\n /**\n * Resets validation errors for all form fields.\n */\n resetErrors() {\n this.fields.forEach((c) => c.resetErrors());\n }\n\n /**\n * @ignore\n */\n ngOnDestroy(): void {\n this._clearSubs();\n }\n}\n","import { AXValuableComponent, MXBaseComponent } from '@acorex/components/common';\nimport { AXLabelComponent } from '@acorex/components/label';\nimport { AXSelectBoxComponent } from '@acorex/components/select-box';\nimport { AXUnsubscriber } from '@acorex/core/utils';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n HostBinding,\n ViewContainerRef,\n ViewEncapsulation,\n WritableSignal,\n afterNextRender,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { AXFormComponent, AXLabelMode } from './form.component';\n\n/**\n * A container component for form fields that provides styling and structure.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-form-field',\n template: `<ng-content></ng-content>`,\n styleUrls: ['./form-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [AXUnsubscriber],\n})\nexport class AXFormFieldComponent extends MXBaseComponent {\n /**\n * Specifies the mode of the label in the form field.\n * @defaultValue 'static'\n */\n labelMode = input<AXLabelMode>('static');\n\n /**\n * @ignore\n */\n protected _labelMode: WritableSignal<AXLabelMode> = signal(this.labelMode());\n\n private unsubscriber = inject(AXUnsubscriber);\n\n @ContentChild(AXValuableComponent)\n private input: AXValuableComponent;\n\n /**\n * @ignore\n */\n @ContentChild(AXLabelComponent)\n private label: AXLabelComponent;\n\n form = inject(AXFormComponent, { optional: true });\n\n host = inject(ViewContainerRef);\n\n /**\n * @ignore\n */\n prefix: HTMLElement;\n\n /**\n * @ignore\n */\n constructor() {\n super();\n\n afterNextRender(() => {\n this.calcIndentSize();\n this.setRequired();\n this.setLabelMode();\n this.listeningEvent();\n });\n\n effect(\n () => {\n this.setLabelMode();\n },\n { allowSignalWrites: true },\n );\n }\n\n /**\n * Calculates and sets the indentation size for the label based on the width of the prefix element.\n * @ignore\n */\n calcIndentSize() {\n const prefix = (this.input as any)?.getHostElement()?.querySelector('ax-prefix') as HTMLElement;\n if (prefix) {\n this.label.getHostElement().style.insetInlineStart = prefix?.clientWidth + 'px';\n }\n }\n\n /**\n * Sets the required attribute for the input field based on validation rules.\n * Automatically updates if validation rules change.\n * @ignore\n */\n setRequired() {\n this.autoSetRequired();\n this.input?.validationRulesChange.pipe(this.unsubscriber.takeUntilDestroy).subscribe(() => {\n this.autoSetRequired();\n });\n }\n /**\n * Sets the label mode based on the form's label mode configuration.\n * @ignore\n */\n setLabelMode() {\n this._labelMode.set(this.form?.labelMode());\n }\n\n /**\n * Subscribes to focus and blur events on the input element.\n * Adds or removes the 'ax-state-focused' class to/from the host element based on the focus state.\n * @ignone\n */\n listeningEvent() {\n const focusEvent = this.input?.['onFocus'] as Subject<any>;\n focusEvent?.subscribe((e) => {\n // this.handleFloating('focus');\n this.host.element.nativeElement.classList.add('ax-state-focused');\n });\n //\n const blurEvent = this.input?.['onBlur'] as Subject<any>;\n blurEvent?.subscribe((e) => {\n // this.handleFloating('blur');\n this.host.element.nativeElement.classList.remove('ax-state-focused');\n });\n }\n // protected handleFloating(mode: 'focus' | 'blur') {\n // const _host = this.host.element.nativeElement as HTMLElement;\n // const placeholder = this.input;\n\n // switch (mode) {\n // case 'focus':\n // _host.classList.add('ax-state-floating');\n // this.label.getHostElement().style.insetInlineStart = 'inherit';\n\n // break;\n // case 'blur':\n // _host.classList.remove('ax-state-floating');\n\n // break;\n // }\n // }\n\n /**\n * @ignore\n */\n private autoSetRequired() {\n if (this.label && this.input) {\n if (this.label.required == null || this.label['autoSetRequired']) {\n this.label.required = this.input.isRequired;\n this.label['autoSetRequired'] = true;\n }\n }\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n get __hostClass(): string[] {\n let hasValue;\n if (this.input) {\n if (this.input instanceof AXSelectBoxComponent && this.input.multiple) {\n hasValue = (this.input as any).value?.length;\n } else {\n hasValue = this.input.value;\n }\n }\n return [`ax-state-${this._labelMode()}-label`, `${hasValue && 'ax-state-has-value'}`];\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface AXFormConfig {}\n\nexport const AX_FORM_CONFIG = new InjectionToken<AXFormConfig>('AX_FORM_CONFIG', {\n providedIn: 'root',\n factory: () => {\n return AXFormDefaultConfig;\n },\n});\n\nexport const AXFormDefaultConfig: AXFormConfig = {};\n\nexport type PartialFormConfig = Partial<AXFormConfig>;\n\nexport function formConfig(config: PartialFormConfig = {}): AXFormConfig {\n const result = {\n ...AXFormDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { AXValuableComponent } from '@acorex/components/common';\nimport { AXValidationRuleOptions } from '@acorex/core/validation';\nimport { Directive, Input, OnDestroy, OnInit } from '@angular/core';\n\n@Directive({\n selector: 'ax-validation-rule',\n})\nexport class AXValidationRuleDirective implements OnInit, OnDestroy {\n @Input() rule: string;\n @Input() options: Omit<AXValidationRuleOptions, 'message'>;\n @Input() message: string;\n\n constructor(private host: AXValuableComponent) {}\n\n ngOnInit() {\n this.host.addValidationRule({ rule: this.rule, options: this.ruleOptions });\n }\n\n ngOnDestroy() {\n this.host.removeValidationRule({\n rule: this.rule,\n options: this.ruleOptions,\n });\n }\n\n private get ruleOptions(): AXValidationRuleOptions {\n return Object.assign({ message: this.message, name: this.host.name }, this.options);\n }\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { AXToastService } from '@acorex/components/toast';\nimport { translateSync } from '@acorex/core/translation';\nimport { ChangeDetectionStrategy, Component, Inject, Input, OnDestroy, Optional, ViewEncapsulation } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXFormComponent, AXFormValidationEvent } from './form.component';\n\nexport type AXValidationSummaryDisplayMode = 'toast' | 'alert';\n\n/**\n * Displays validation summaries in the form of an alert.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-validation-summary',\n template: `\n @if (displayMode === 'alert' && _content) {\n <ax-alert color=\"danger\" [timeOut]=\"_timeOut\" #a (onClosed)=\"_handleOnDismissed()\">\n <ax-icon></ax-icon>\n <ax-title>{{ title | translate | async }}</ax-title>\n <ax-content>\n <div [innerHTML]=\"_content\"></div>\n </ax-content>\n <ax-footer>\n <ax-suffix>\n <ax-button text=\"Dismiss\" (onClick)=\"a.close()\"></ax-button>\n </ax-suffix>\n </ax-footer>\n </ax-alert>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXValidationSummaryComponent extends MXBaseComponent implements OnDestroy {\n /**\n * @ignore\n */\n protected _content?: string = null;\n\n /**\n * @ignore\n */\n private _title = 'validation.messages.title';\n\n /**\n * The title of the validation summary alert.\n */\n @Input()\n public get title(): string {\n return this._title;\n }\n\n /**\n * Sets the title of the validation summary alert.\n *\n * @param v The title to be set.\n */\n public set title(v: string) {\n this._title = v;\n }\n\n /**\n * Specifies the display mode for the validation summary.\n *\n * @defaultValue 'toast'\n */\n @Input()\n displayMode: AXValidationSummaryDisplayMode = 'toast';\n\n /**\n * Specifies the time in milliseconds before the validation summary automatically hides.\n */\n @Input()\n timeOut?: number;\n\n /**\n * Determines whether the validation summary should automatically hide after a specified time.\n * @defaultValue false\n */\n @Input()\n autoHide = false;\n\n /**\n * @ignore\n */\n protected _timeOut: number;\n\n /**\n * @ignore\n */\n private sub: Subscription;\n\n /**\n * @ignore\n */\n constructor(\n private _tosatService: AXToastService,\n @Optional()\n @Inject(AXFormComponent)\n private host: AXFormComponent,\n ) {\n super();\n //\n this.sub = host.onValidate.subscribe((e: AXFormValidationEvent) => {\n if (e.result.result) {\n this._content = null;\n } else {\n const failedRules = e.result.rules.filter((c) => !c.result && c.message);\n\n this._content = `<ul>${failedRules.map((c) => this.formatRule({ title: c['title'] as string, message: c.message })).join('')}</ul>`;\n this._timeOut = this.autoHide ? this.timeOut ?? Math.max(failedRules.length * 1000, 2000) : 0;\n\n if (this.displayMode == 'toast') {\n this._tosatService.show({\n color: 'danger',\n closeButton: true,\n timeOut: this._timeOut,\n timeOutProgress: true,\n content: this._content,\n title: translateSync(this.title),\n location: 'bottom-center',\n });\n }\n }\n this.cdr.markForCheck();\n });\n }\n\n /**\n * @ignore\n */\n private formatRule(rule: { title?: string; message: string }): string {\n return rule.title ? `<li><b>${rule.title}:</b> ${rule.message}</li>` : `<li>${rule.message}</li>`;\n }\n\n /**\n * @ignore\n */\n protected _handleOnDismissed() {\n this._content = null;\n }\n\n /**\n * @ignore\n */\n ngOnDestroy() {\n this.sub?.unsubscribe();\n }\n}\n","import { AXAlertModule } from '@acorex/components/alert';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXFormFieldComponent } from './form-field.component';\nimport { AXFormComponent } from './form.component';\nimport { AXValidationRuleDirective } from './validation-rule.directive';\nimport { AXValidationSummaryComponent } from './validation-summary.component';\n\n@NgModule({\n declarations: [AXFormFieldComponent, AXFormComponent, AXValidationRuleDirective, AXValidationSummaryComponent],\n imports: [CommonModule, AXDecoratorModule, AXAlertModule, AXButtonModule, AXValidationModule, AXTranslationModule],\n exports: [AXFormFieldComponent, AXFormComponent, AXValidationRuleDirective, AXValidationSummaryComponent],\n providers: [],\n})\nexport class AXFormModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBA;;;AAGG;AACG,MAAO,qBAAsB,SAAQ,OAAO,CAAA;AAEjD;AAUD;;;;AAIG;AAaG,MAAO,eAAgB,SAAQ,eAAe,CAAA;AAWlD,IAAA,WAAW;AAiCX;;AAEG;AACH,IAAA,IACW,QAAQ,GAAA;QACjB,OAAO,IAAI,CAAC,SAAS;;AAGvB;;;AAGG;IACH,IAAW,QAAQ,CAAC,CAAiB,EAAA;QACnC,IAAI,CAAC,SAAS,CAAC;AACb,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,KAAK,EAAE,CAAC;YACR,aAAa,EAAE,MAAK;;aAEnB;AACF,SAAA,CAAC;;AAQJ;;AAEG;IACO,MAAM,aAAa,CAAC,CAAc,EAAA;QAC1C,CAAC,CAAC,cAAc,EAAE;AAClB,QAAA,MAAM,IAAI,CAAC,QAAQ,EAAE;;AAGvB;;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CAAA;;2FAItG,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;AAC9G,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,CAAC;oBAClH,OAAO,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;AACzG,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACjBD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-form.mjs","sources":["../../../../libs/components/form/src/lib/form.component.ts","../../../../libs/components/form/src/lib/form-field.component.ts","../../../../libs/components/form/src/lib/form.config.ts","../../../../libs/components/form/src/lib/validation-rule.directive.ts","../../../../libs/components/form/src/lib/validation-summary.component.ts","../../../../libs/components/form/src/lib/form.module.ts","../../../../libs/components/form/src/acorex-components-form.ts"],"sourcesContent":["import { AXEvent, AXStyleLookType, AXValuableComponent, MXBaseComponent } from '@acorex/components/common';\nimport { AXValidationSummary } from '@acorex/core/validation';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n InputSignal,\n OnDestroy,\n Output,\n ViewEncapsulation,\n contentChildren,\n effect,\n input,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXFormFieldComponent } from './form-field.component';\n\n/**\n * Contains native event\n * @category Events\n */\nexport class AXFormValidationEvent extends AXEvent {\n result: AXValidationSummary;\n}\n\n/**\n * Contains native event\n * @category Events\n */\nexport type AXFormUpdateOn = 'change' | 'blur' | 'submit';\nexport type AXFormMessageStyle = 'bottom' | 'float';\nexport type AXLabelMode = 'static' | 'floating' | 'over';\n\n/**\n * The AXForm is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-form',\n template: `<form\n (submit)=\"_handleSubmit($event)\"\n (reset)=\"_handleReset()\"\n class=\"ax-{{ messageStyle() }}-error\"\n >\n <ng-content></ng-content>\n </form>`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXFormComponent extends MXBaseComponent implements OnDestroy {\n /**\n * Specifies the mode of the label in the form field.\n * @defaultValue 'static'\n */\n labelMode = input<AXLabelMode>('static');\n\n look = input<AXStyleLookType>('solid');\n\n content = contentChildren(AXFormFieldComponent, { descendants: true });\n\n #applyLooks = effect(() => {\n this.content().forEach((item: any) => {\n if (item.input) {\n item.input.look = this.look();\n }\n });\n });\n\n /**\n * Determines the style of the message in the form field.\n * @defaultValue 'bottom'\n */\n messageStyle: InputSignal<AXFormMessageStyle> = input<AXFormMessageStyle>('bottom');\n\n /**\n * Emitted when the form is validated.\n *\n * @event\n */\n @Output()\n onValidate: EventEmitter<AXFormValidationEvent> = new EventEmitter<AXFormValidationEvent>();\n\n /**\n * Emitted when the form's update mode changes.\n *\n * @event\n */\n @Output()\n updateOnChange: EventEmitter<AXFormUpdateOn> = new EventEmitter<AXFormUpdateOn>();\n\n /**\n * @ignore\n */\n private _updateOn: AXFormUpdateOn = 'blur';\n\n /**\n * Determines when the form should be updated.\n */\n @Input()\n public get updateOn(): AXFormUpdateOn {\n return this._updateOn;\n }\n\n /**\n * Sets the criteria for when the form should be updated.\n * @param v The criteria to set (e.g., 'change', 'blur').\n */\n public set updateOn(v: AXFormUpdateOn) {\n this.setOption({\n name: 'updateOn',\n value: v,\n afterCallback: () => {\n //this._bindEvents();\n },\n });\n }\n\n /**\n * @ignore\n */\n private _subs: Subscription[] = [];\n\n /**\n * @ignore\n */\n protected async _handleSubmit(e: SubmitEvent) {\n e.preventDefault();\n await this.validate();\n }\n\n /**\n * @ignore\n */\n protected _handleReset() {\n this.reset();\n }\n\n /**\n * @ignore\n */\n constructor() {\n super();\n }\n\n //TODO: check update on\n\n // ngAfterViewInit(): void {\n // //this._bindEvents();\n // }\n\n // private _bindEvents() {\n // this._clearSubs();\n // const widgets = this._getComponenets();\n // //\n // widgets.forEach((w) => {\n // if (this.updateOn == 'change') {\n // this._subs.push(\n // w.onValueChanged?.subscribe((v: AXValueChangedEvent) => {\n // if (v.isUserInteraction) w.validate();\n // }),\n // );\n // } else if (this.updateOn == 'blur') {\n // this._subs.push(\n // w.onBlur?.subscribe((v) => {\n // w.validate();\n // }),\n // );\n // }\n // });\n // }\n\n /**\n * @ignore\n */\n private _clearSubs() {\n this._subs.forEach((c) => c?.unsubscribe());\n this._subs = [];\n }\n\n /**\n * @ignore\n */\n private get fields(): AXValuableComponent[] {\n return Array.from(this.getHostElement().querySelectorAll('[ax-form-item=\"true\"]'))\n .map((c) => (c as any).__axContext__)\n .filter((c) => c != null);\n }\n\n async validate(...names: string[]): Promise<AXValidationSummary> {\n const results = await Promise.all(\n this.fields\n .filter((c) => names == null || names.length == 0 || names.includes(c.name))\n .map((field) => field.validate()),\n );\n // Merge all validation summaries into one\n const mergedSummary: AXValidationSummary = {\n result: results.every((res) => res.result),\n rules: results.flatMap((res) => res.rules),\n };\n this._emitOnValidateEvent(mergedSummary);\n return mergedSummary;\n }\n\n /**\n * @ignore\n */\n private _emitOnValidateEvent(e: AXValidationSummary) {\n this.onValidate.emit({\n component: this,\n result: e,\n htmlElement: this.getHostElement(),\n });\n }\n\n /**\n * Resets all form fields without clearing errors.\n */\n reset() {\n this.fields.forEach((c) => c.reset(false));\n this.fields.forEach((c) => c.resetErrors());\n }\n\n /**\n * Resets validation errors for all form fields.\n */\n resetErrors() {\n this.fields.forEach((c) => c.resetErrors());\n }\n\n /**\n * @ignore\n */\n ngOnDestroy(): void {\n this._clearSubs();\n }\n}\n","import { AXValuableComponent, MXBaseComponent } from '@acorex/components/common';\nimport { AXLabelComponent } from '@acorex/components/label';\nimport { AXSelectBoxComponent } from '@acorex/components/select-box';\nimport { AXUnsubscriber } from '@acorex/core/utils';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n HostBinding,\n ViewContainerRef,\n ViewEncapsulation,\n WritableSignal,\n afterNextRender,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { AXFormComponent, AXLabelMode } from './form.component';\n\n/**\n * A container component for form fields that provides styling and structure.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-form-field',\n template: `<ng-content></ng-content>`,\n styleUrls: ['./form-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [AXUnsubscriber],\n})\nexport class AXFormFieldComponent extends MXBaseComponent {\n /**\n * Specifies the mode of the label in the form field.\n * @defaultValue 'static'\n */\n labelMode = input<AXLabelMode>('static');\n\n /**\n * @ignore\n */\n protected _labelMode: WritableSignal<AXLabelMode> = signal(this.labelMode());\n\n private unsubscriber = inject(AXUnsubscriber);\n\n @ContentChild(AXValuableComponent)\n private input: AXValuableComponent;\n\n /**\n * @ignore\n */\n @ContentChild(AXLabelComponent)\n private label: AXLabelComponent;\n\n form = inject(AXFormComponent, { optional: true });\n\n host = inject(ViewContainerRef);\n\n /**\n * @ignore\n */\n prefix: HTMLElement;\n\n /**\n * @ignore\n */\n constructor() {\n super();\n\n afterNextRender(() => {\n this.calcIndentSize();\n this.setRequired();\n this.setLabelMode();\n this.listeningEvent();\n });\n\n effect(\n () => {\n this.setLabelMode();\n },\n { allowSignalWrites: true },\n );\n }\n\n /**\n * Calculates and sets the indentation size for the label based on the width of the prefix element.\n * @ignore\n */\n calcIndentSize() {\n const prefix = (this.input as any)?.getHostElement()?.querySelector('ax-prefix') as HTMLElement;\n if (prefix) {\n this.label.getHostElement().style.insetInlineStart = prefix?.clientWidth + 'px';\n }\n }\n\n /**\n * Sets the required attribute for the input field based on validation rules.\n * Automatically updates if validation rules change.\n * @ignore\n */\n setRequired() {\n this.autoSetRequired();\n this.input?.validationRulesChange.pipe(this.unsubscriber.takeUntilDestroy).subscribe(() => {\n this.autoSetRequired();\n });\n }\n /**\n * Sets the label mode based on the form's label mode configuration.\n * @ignore\n */\n setLabelMode() {\n this._labelMode.set(this.form?.labelMode());\n }\n\n /**\n * Subscribes to focus and blur events on the input element.\n * Adds or removes the 'ax-state-focused' class to/from the host element based on the focus state.\n * @ignone\n */\n listeningEvent() {\n const focusEvent = this.input?.['onFocus'] as Subject<any>;\n focusEvent?.subscribe((e) => {\n // this.handleFloating('focus');\n this.host.element.nativeElement.classList.add('ax-state-focused');\n });\n //\n const blurEvent = this.input?.['onBlur'] as Subject<any>;\n blurEvent?.subscribe((e) => {\n // this.handleFloating('blur');\n this.host.element.nativeElement.classList.remove('ax-state-focused');\n });\n }\n // protected handleFloating(mode: 'focus' | 'blur') {\n // const _host = this.host.element.nativeElement as HTMLElement;\n // const placeholder = this.input;\n\n // switch (mode) {\n // case 'focus':\n // _host.classList.add('ax-state-floating');\n // this.label.getHostElement().style.insetInlineStart = 'inherit';\n\n // break;\n // case 'blur':\n // _host.classList.remove('ax-state-floating');\n\n // break;\n // }\n // }\n\n /**\n * @ignore\n */\n private autoSetRequired() {\n if (this.label && this.input) {\n if (this.label.required == null || this.label['autoSetRequired']) {\n this.label.required = this.input.isRequired;\n this.label['autoSetRequired'] = true;\n }\n }\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n get __hostClass(): string[] {\n let hasValue;\n if (this.input) {\n if (this.input instanceof AXSelectBoxComponent && this.input.multiple) {\n hasValue = (this.input as any).value?.length;\n } else {\n hasValue = this.input.value;\n }\n }\n return [`ax-state-${this._labelMode()}-label`, `${hasValue && 'ax-state-has-value'}`];\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface AXFormConfig {}\n\nexport const AX_FORM_CONFIG = new InjectionToken<AXFormConfig>('AX_FORM_CONFIG', {\n providedIn: 'root',\n factory: () => {\n return AXFormDefaultConfig;\n },\n});\n\nexport const AXFormDefaultConfig: AXFormConfig = {};\n\nexport type PartialFormConfig = Partial<AXFormConfig>;\n\nexport function formConfig(config: PartialFormConfig = {}): AXFormConfig {\n const result = {\n ...AXFormDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { AXValuableComponent } from '@acorex/components/common';\nimport { AXValidationRuleOptions } from '@acorex/core/validation';\nimport { Directive, Input, OnDestroy, OnInit } from '@angular/core';\n\n@Directive({\n selector: 'ax-validation-rule',\n})\nexport class AXValidationRuleDirective implements OnInit, OnDestroy {\n @Input() rule: string;\n @Input() options: Omit<AXValidationRuleOptions, 'message'>;\n @Input() message: string;\n\n constructor(private host: AXValuableComponent) {}\n\n ngOnInit() {\n this.host.addValidationRule({ rule: this.rule, options: this.ruleOptions });\n }\n\n ngOnDestroy() {\n this.host.removeValidationRule({\n rule: this.rule,\n options: this.ruleOptions,\n });\n }\n\n private get ruleOptions(): AXValidationRuleOptions {\n return Object.assign({ message: this.message, name: this.host.name }, this.options);\n }\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { AXToastService } from '@acorex/components/toast';\nimport { translateSync } from '@acorex/core/translation';\nimport { ChangeDetectionStrategy, Component, Inject, Input, OnDestroy, Optional, ViewEncapsulation } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXFormComponent, AXFormValidationEvent } from './form.component';\n\nexport type AXValidationSummaryDisplayMode = 'toast' | 'alert';\n\n/**\n * Displays validation summaries in the form of an alert.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-validation-summary',\n template: `\n @if (displayMode === 'alert' && _content) {\n <ax-alert color=\"danger\" [timeOut]=\"_timeOut\" #a (onClosed)=\"_handleOnDismissed()\">\n <ax-icon></ax-icon>\n <ax-title>{{ title | translate | async }}</ax-title>\n <ax-content>\n <div [innerHTML]=\"_content\"></div>\n </ax-content>\n <ax-footer>\n <ax-suffix>\n <ax-button text=\"Dismiss\" (onClick)=\"a.close()\"></ax-button>\n </ax-suffix>\n </ax-footer>\n </ax-alert>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXValidationSummaryComponent extends MXBaseComponent implements OnDestroy {\n /**\n * @ignore\n */\n protected _content?: string = null;\n\n /**\n * @ignore\n */\n private _title = 'validation.messages.title';\n\n /**\n * The title of the validation summary alert.\n */\n @Input()\n public get title(): string {\n return this._title;\n }\n\n /**\n * Sets the title of the validation summary alert.\n *\n * @param v The title to be set.\n */\n public set title(v: string) {\n this._title = v;\n }\n\n /**\n * Specifies the display mode for the validation summary.\n *\n * @defaultValue 'toast'\n */\n @Input()\n displayMode: AXValidationSummaryDisplayMode = 'toast';\n\n /**\n * Specifies the time in milliseconds before the validation summary automatically hides.\n */\n @Input()\n timeOut?: number;\n\n /**\n * Determines whether the validation summary should automatically hide after a specified time.\n * @defaultValue false\n */\n @Input()\n autoHide = false;\n\n /**\n * @ignore\n */\n protected _timeOut: number;\n\n /**\n * @ignore\n */\n private sub: Subscription;\n\n /**\n * @ignore\n */\n constructor(\n private _tosatService: AXToastService,\n @Optional()\n @Inject(AXFormComponent)\n private host: AXFormComponent,\n ) {\n super();\n //\n this.sub = host.onValidate.subscribe((e: AXFormValidationEvent) => {\n if (e.result.result) {\n this._content = null;\n } else {\n const failedRules = e.result.rules.filter((c) => !c.result && c.message);\n\n this._content = `<ul>${failedRules.map((c) => this.formatRule({ title: c['title'] as string, message: c.message })).join('')}</ul>`;\n this._timeOut = this.autoHide ? this.timeOut ?? Math.max(failedRules.length * 1000, 2000) : 0;\n\n if (this.displayMode == 'toast') {\n this._tosatService.show({\n color: 'danger',\n closeButton: true,\n timeOut: this._timeOut,\n timeOutProgress: true,\n content: this._content,\n title: translateSync(this.title),\n location: 'bottom-center',\n });\n }\n }\n this.cdr.markForCheck();\n });\n }\n\n /**\n * @ignore\n */\n private formatRule(rule: { title?: string; message: string }): string {\n return rule.title ? `<li><b>${rule.title}:</b> ${rule.message}</li>` : `<li>${rule.message}</li>`;\n }\n\n /**\n * @ignore\n */\n protected _handleOnDismissed() {\n this._content = null;\n }\n\n /**\n * @ignore\n */\n ngOnDestroy() {\n this.sub?.unsubscribe();\n }\n}\n","import { AXAlertModule } from '@acorex/components/alert';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXFormFieldComponent } from './form-field.component';\nimport { AXFormComponent } from './form.component';\nimport { AXValidationRuleDirective } from './validation-rule.directive';\nimport { AXValidationSummaryComponent } from './validation-summary.component';\n\n@NgModule({\n declarations: [AXFormFieldComponent, AXFormComponent, AXValidationRuleDirective, AXValidationSummaryComponent],\n imports: [CommonModule, AXDecoratorModule, AXAlertModule, AXButtonModule, AXValidationModule, AXTranslationModule],\n exports: [AXFormFieldComponent, AXFormComponent, AXValidationRuleDirective, AXValidationSummaryComponent],\n providers: [],\n})\nexport class AXFormModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBA;;;AAGG;AACG,MAAO,qBAAsB,SAAQ,OAAO,CAAA;AAEjD;AAUD;;;;AAIG;AAaG,MAAO,eAAgB,SAAQ,eAAe,CAAA;AAWlD,IAAA,WAAW;AAmCX;;AAEG;AACH,IAAA,IACW,QAAQ,GAAA;QACjB,OAAO,IAAI,CAAC,SAAS;;AAGvB;;;AAGG;IACH,IAAW,QAAQ,CAAC,CAAiB,EAAA;QACnC,IAAI,CAAC,SAAS,CAAC;AACb,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,KAAK,EAAE,CAAC;YACR,aAAa,EAAE,MAAK;;aAEnB;AACF,SAAA,CAAC;;AAQJ;;AAEG;IACO,MAAM,aAAa,CAAC,CAAc,EAAA;QAC1C,CAAC,CAAC,cAAc,EAAE;AAClB,QAAA,MAAM,IAAI,CAAC,QAAQ,EAAE;;AAGvB;;AAEG;IACO,YAAY,GAAA;QACpB,IAAI,CAAC,KA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,CAJb,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;;2FAItG,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;AAC9G,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,CAAC;oBAClH,OAAO,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;AACzG,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACjBD;;AAEG;;;;"}
@@ -1,11 +1,13 @@
1
1
  import { MXInputBaseValueComponent, MXLookComponent, AXComponent, AXFocusableComponent, AXClearableComponent, AXValuableComponent } from '@acorex/components/common';
2
2
  import * as i0 from '@angular/core';
3
- import { forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, Input, NgModule } from '@angular/core';
3
+ import { forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, Input, signal, inject, afterNextRender, NgModule } from '@angular/core';
4
4
  import * as i1 from '@angular/forms';
5
5
  import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
6
6
  import { classes } from 'polytype';
7
7
  import { AXButtonModule } from '@acorex/components/button';
8
8
  import { AXDecoratorModule } from '@acorex/components/decorators';
9
+ import * as i1$1 from '@acorex/components/progress-bar';
10
+ import { AXProgressBarModule } from '@acorex/components/progress-bar';
9
11
  import { CommonModule } from '@angular/common';
10
12
 
11
13
  /**
@@ -21,8 +23,8 @@ class AXPasswordBoxComponent extends classes((MXInputBaseValueComponent), MXLook
21
23
  /** @ignore */
22
24
  this._icon = 'ax-icon-visibility';
23
25
  /**
24
- * Sets the autocomplete behavior for the input field.
25
- */
26
+ * Sets the autocomplete behavior for the input field.
27
+ */
26
28
  this.autoComplete = 'one-time-code';
27
29
  /**
28
30
  * A flag for showing or hiding password button.
@@ -34,8 +36,8 @@ class AXPasswordBoxComponent extends classes((MXInputBaseValueComponent), MXLook
34
36
  this.commitValue(value, true);
35
37
  }
36
38
  /**
37
- * Toggles the input type between 'password' and 'text' to show or hide the password.
38
- */
39
+ * Toggles the input type between 'password' and 'text' to show or hide the password.
40
+ */
39
41
  toggleType() {
40
42
  if (this._type === 'password') {
41
43
  this._type = 'text';
@@ -57,7 +59,7 @@ class AXPasswordBoxComponent extends classes((MXInputBaseValueComponent), MXLook
57
59
  useExisting: forwardRef(() => AXPasswordBoxComponent),
58
60
  multi: true,
59
61
  },
60
- ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-editor-container ax-look-{{look}} {{classNames}}\" [class.ax-state-disabled]=\"disabled\">\n <ng-content select=\"ax-prefix\">\n </ng-content>\n <input #input class=\"ax-input\" [name]=\"name\" [type]=\"_type\" [id]=\"id\" [attr.placeholder]=\"placeholder\"\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [ngModel]=\"value\" [attr.autocomplete]=\"autoComplete\"\n (ngModelChange)=\"_handleModelChange($event)\" (keydown)=\"emitOnKeydownEvent($event)\"\n (keyup)=\"emitOnKeyupEvent($event)\" (keypress)=\"emitOnKeypressEvent($event)\" (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\">\n @if(value && !disabled && !readonly){\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n @if(showToggleButton){\n <button type=\"button\" class=\"ax-general-button ax-button-icon\" (click)=\"toggleType()\" [tabIndex]=\"-1\">\n <span class=\"ax-icon {{_icon}}\"></span>\n </button>\n }\n <ng-content select=\"ax-suffix\">\n </ng-content>\n <ng-content select=\"ax-validation-rule\">\n </ng-content>\n</div>\n<div class=\"ax-error-container\"></div>", dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
62
+ ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-editor-container ax-look-{{ look }} {{ classNames }}\" [class.ax-state-disabled]=\"disabled\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input\n #input\n class=\"ax-input\"\n [name]=\"name\"\n [type]=\"_type\"\n [id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabindex]=\"tabIndex\"\n [ngModel]=\"value\"\n [attr.autocomplete]=\"autoComplete\"\n (ngModelChange)=\"_handleModelChange($event)\"\n (keydown)=\"emitOnKeydownEvent($event)\"\n (keyup)=\"emitOnKeyupEvent($event)\"\n (keypress)=\"emitOnKeypressEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n />\n @if (value && !disabled && !readonly) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n @if (showToggleButton) {\n <button type=\"button\" class=\"ax-general-button ax-button-icon\" (click)=\"toggleType()\" [tabIndex]=\"-1\">\n <span class=\"ax-icon {{ _icon }}\"></span>\n </button>\n }\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-content select=\"ax-validation-rule\"> </ng-content>\n</div>\n<div class=\"ax-error-container\"></div>\n\n<div class=\"ax-strength-validation-container\">\n <ng-content select=\"ax-password-strength-validation\"></ng-content>\n</div>\n", styles: [".ax-strength-validation-container{margin-top:.5rem}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
61
63
  }
62
64
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPasswordBoxComponent, decorators: [{
63
65
  type: Component,
@@ -82,7 +84,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
82
84
  useExisting: forwardRef(() => AXPasswordBoxComponent),
83
85
  multi: true,
84
86
  },
85
- ], template: "<div class=\"ax-editor-container ax-look-{{look}} {{classNames}}\" [class.ax-state-disabled]=\"disabled\">\n <ng-content select=\"ax-prefix\">\n </ng-content>\n <input #input class=\"ax-input\" [name]=\"name\" [type]=\"_type\" [id]=\"id\" [attr.placeholder]=\"placeholder\"\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [ngModel]=\"value\" [attr.autocomplete]=\"autoComplete\"\n (ngModelChange)=\"_handleModelChange($event)\" (keydown)=\"emitOnKeydownEvent($event)\"\n (keyup)=\"emitOnKeyupEvent($event)\" (keypress)=\"emitOnKeypressEvent($event)\" (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\">\n @if(value && !disabled && !readonly){\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n @if(showToggleButton){\n <button type=\"button\" class=\"ax-general-button ax-button-icon\" (click)=\"toggleType()\" [tabIndex]=\"-1\">\n <span class=\"ax-icon {{_icon}}\"></span>\n </button>\n }\n <ng-content select=\"ax-suffix\">\n </ng-content>\n <ng-content select=\"ax-validation-rule\">\n </ng-content>\n</div>\n<div class=\"ax-error-container\"></div>" }]
87
+ ], template: "<div class=\"ax-editor-container ax-look-{{ look }} {{ classNames }}\" [class.ax-state-disabled]=\"disabled\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input\n #input\n class=\"ax-input\"\n [name]=\"name\"\n [type]=\"_type\"\n [id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabindex]=\"tabIndex\"\n [ngModel]=\"value\"\n [attr.autocomplete]=\"autoComplete\"\n (ngModelChange)=\"_handleModelChange($event)\"\n (keydown)=\"emitOnKeydownEvent($event)\"\n (keyup)=\"emitOnKeyupEvent($event)\"\n (keypress)=\"emitOnKeypressEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n />\n @if (value && !disabled && !readonly) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n @if (showToggleButton) {\n <button type=\"button\" class=\"ax-general-button ax-button-icon\" (click)=\"toggleType()\" [tabIndex]=\"-1\">\n <span class=\"ax-icon {{ _icon }}\"></span>\n </button>\n }\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-content select=\"ax-validation-rule\"> </ng-content>\n</div>\n<div class=\"ax-error-container\"></div>\n\n<div class=\"ax-strength-validation-container\">\n <ng-content select=\"ax-password-strength-validation\"></ng-content>\n</div>\n", styles: [".ax-strength-validation-container{margin-top:.5rem}\n"] }]
86
88
  }], propDecorators: { input: [{
87
89
  type: ViewChild,
88
90
  args: ['input']
@@ -95,11 +97,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
95
97
  args: ['class']
96
98
  }] } });
97
99
 
98
- const COMPONENT = [AXPasswordBoxComponent];
99
- const MODULES = [CommonModule, FormsModule, AXButtonModule, AXDecoratorModule];
100
+ class AXPasswordStrengthValidationComponent {
101
+ constructor() {
102
+ this.passwordStrength = signal(0);
103
+ this.strengthLabel = signal('week');
104
+ this.strengthLabelColor = signal('danger');
105
+ this.parent = inject(AXPasswordBoxComponent);
106
+ this.#onComponentInit = afterNextRender(() => {
107
+ this.parent.onValueChanged.subscribe((v) => {
108
+ if (v.value) {
109
+ this.checkPasswordStrength(v.value);
110
+ }
111
+ else {
112
+ this.passwordStrength.set(0);
113
+ }
114
+ });
115
+ });
116
+ }
117
+ #onComponentInit;
118
+ checkPasswordStrength(password) {
119
+ let strength = 0;
120
+ const criteria = [/.{8,}/, /[A-Z]/, /[a-z]/, /\d/, /[!@#$%^&*(),.?":{}|<>]/];
121
+ criteria.forEach((regex) => {
122
+ if (regex.test(password))
123
+ strength++;
124
+ });
125
+ this.strengthLabel.set(strength <= 2 ? 'Week' : strength == 3 ? 'So-so' : strength == 4 ? 'Good' : 'Great');
126
+ this.strengthLabelColor.set(strength <= 2 ? 'danger' : strength <= 3 ? 'warning' : 'success');
127
+ this.passwordStrength.set((strength * 100) / criteria.length);
128
+ }
129
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPasswordStrengthValidationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
130
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPasswordStrengthValidationComponent, selector: "ax-password-strength-validation", ngImport: i0, template: "<ax-progress-bar\n [color]=\"strengthLabelColor()\"\n [progress]=\"passwordStrength()\"\n [height]=\"4\"\n></ax-progress-bar>\n<small\n class=\"ax-whitespace-nowrap ax-px-3 ax-text-center\"\n [class.ax-text-danger]=\"strengthLabelColor() === 'danger'\"\n [class.ax-text-warning]=\"strengthLabelColor() === 'warning'\"\n [class.ax-text-success]=\"strengthLabelColor() === 'success'\"\n >{{ strengthLabel() }}\n</small>\n", dependencies: [{ kind: "component", type: i1$1.AXProgressBarComponent, selector: "ax-progress-bar", inputs: ["color", "mode", "progress", "height"], outputs: ["ValueChange", "sizeChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
131
+ }
132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPasswordStrengthValidationComponent, decorators: [{
133
+ type: Component,
134
+ args: [{ selector: 'ax-password-strength-validation', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ax-progress-bar\n [color]=\"strengthLabelColor()\"\n [progress]=\"passwordStrength()\"\n [height]=\"4\"\n></ax-progress-bar>\n<small\n class=\"ax-whitespace-nowrap ax-px-3 ax-text-center\"\n [class.ax-text-danger]=\"strengthLabelColor() === 'danger'\"\n [class.ax-text-warning]=\"strengthLabelColor() === 'warning'\"\n [class.ax-text-success]=\"strengthLabelColor() === 'success'\"\n >{{ strengthLabel() }}\n</small>\n" }]
135
+ }] });
136
+
137
+ const COMPONENT = [AXPasswordBoxComponent, AXPasswordStrengthValidationComponent];
138
+ const MODULES = [CommonModule, FormsModule, AXButtonModule, AXDecoratorModule, AXProgressBarModule];
100
139
  class AXPasswordBoxModule {
101
140
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPasswordBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
102
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AXPasswordBoxModule, declarations: [AXPasswordBoxComponent], imports: [CommonModule, FormsModule, AXButtonModule, AXDecoratorModule], exports: [AXPasswordBoxComponent] }); }
141
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AXPasswordBoxModule, declarations: [AXPasswordBoxComponent, AXPasswordStrengthValidationComponent], imports: [CommonModule, FormsModule, AXButtonModule, AXDecoratorModule, AXProgressBarModule], exports: [AXPasswordBoxComponent, AXPasswordStrengthValidationComponent] }); }
103
142
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPasswordBoxModule, imports: [MODULES] }); }
104
143
  }
105
144
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPasswordBoxModule, decorators: [{
@@ -116,5 +155,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
116
155
  * Generated bundle index. Do not edit.
117
156
  */
118
157
 
119
- export { AXPasswordBoxComponent, AXPasswordBoxModule };
158
+ export { AXPasswordBoxComponent, AXPasswordBoxModule, AXPasswordStrengthValidationComponent };
120
159
  //# sourceMappingURL=acorex-components-password-box.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-password-box.mjs","sources":["../../../../libs/components/password-box/src/lib/password-box.component.ts","../../../../libs/components/password-box/src/lib/password-box.component.html","../../../../libs/components/password-box/src/lib/password-box.module.ts","../../../../libs/components/password-box/src/acorex-components-password-box.ts"],"sourcesContent":["import {\n AXClearableComponent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport { ChangeDetectionStrategy, Component, ElementRef, Input, ViewChild, ViewEncapsulation, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\n\n/**\n * The Textbox is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-password-box',\n templateUrl: 'password-box.component.html',\n inputs: ['readonly', 'disabled', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id', 'look'],\n outputs: [\n 'valueChange',\n 'stateChange',\n 'onValueChanged',\n 'onBlur',\n 'onFocus',\n 'readonlyChange',\n 'disabledChange',\n 'onKeyDown',\n 'onKeyUp',\n 'onKeyPress',\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n\n providers: [\n { provide: AXComponent, useExisting: AXPasswordBoxComponent },\n { provide: AXFocusableComponent, useExisting: AXPasswordBoxComponent },\n { provide: AXClearableComponent, useExisting: AXPasswordBoxComponent },\n { provide: AXValuableComponent, useExisting: AXPasswordBoxComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXPasswordBoxComponent),\n multi: true,\n },\n ],\n})\nexport class AXPasswordBoxComponent extends classes(MXInputBaseValueComponent<string>, MXLookComponent) {\n\n /** @ignore */\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n /** @ignore */\n protected _type: 'password' | 'text' = 'password';\n\n /** @ignore */\n protected _icon: 'ax-icon-visibility' | 'ax-icon-visibility-off' = 'ax-icon-visibility';\n\n /**\n * Sets the autocomplete behavior for the input field.\n */\n @Input()\n autoComplete: 'current-password' | 'new-password' | 'one-time-code' | 'off' = 'one-time-code';\n\n /**\n * A flag for showing or hiding password button.\n */\n @Input()\n showToggleButton = true;\n\n /**\n * Defines custom CSS classes to apply to the component.\n */\n @Input('class')\n classNames: string;\n\n /** @ignore */\n _handleModelChange(value: string) {\n this.commitValue(value, true);\n }\n\n /**\n * Toggles the input type between 'password' and 'text' to show or hide the password.\n */\n toggleType() {\n if (this._type === 'password') {\n this._type = 'text';\n this._icon = 'ax-icon-visibility-off';\n } else {\n this._type = 'password';\n this._icon = 'ax-icon-visibility';\n }\n }\n\n // @HostBinding('class')\n // get __hostClass(): string[] {\n // return ['ax-editor-container', `ax-look-${this.look}`, `${this.disabled ? 'ax-state-disabled' : ''}`];\n // }\n}\n","<div class=\"ax-editor-container ax-look-{{look}} {{classNames}}\" [class.ax-state-disabled]=\"disabled\">\n <ng-content select=\"ax-prefix\">\n </ng-content>\n <input #input class=\"ax-input\" [name]=\"name\" [type]=\"_type\" [id]=\"id\" [attr.placeholder]=\"placeholder\"\n [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\" [disabled]=\"disabled\"\n [readonly]=\"readonly\" [tabindex]=\"tabIndex\" [ngModel]=\"value\" [attr.autocomplete]=\"autoComplete\"\n (ngModelChange)=\"_handleModelChange($event)\" (keydown)=\"emitOnKeydownEvent($event)\"\n (keyup)=\"emitOnKeyupEvent($event)\" (keypress)=\"emitOnKeypressEvent($event)\" (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\">\n @if(value && !disabled && !readonly){\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n @if(showToggleButton){\n <button type=\"button\" class=\"ax-general-button ax-button-icon\" (click)=\"toggleType()\" [tabIndex]=\"-1\">\n <span class=\"ax-icon {{_icon}}\"></span>\n </button>\n }\n <ng-content select=\"ax-suffix\">\n </ng-content>\n <ng-content select=\"ax-validation-rule\">\n </ng-content>\n</div>\n<div class=\"ax-error-container\"></div>","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXPasswordBoxComponent } from './password-box.component';\n\nconst COMPONENT = [AXPasswordBoxComponent];\nconst MODULES = [CommonModule, FormsModule, AXButtonModule, AXDecoratorModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nex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;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-password-box.mjs","sources":["../../../../libs/components/password-box/src/lib/password-box.component.ts","../../../../libs/components/password-box/src/lib/password-box.component.html","../../../../libs/components/password-box/src/lib/password-strength-validation/password-strength-validation.component.ts","../../../../libs/components/password-box/src/lib/password-strength-validation/password-strength-validation.component.html","../../../../libs/components/password-box/src/lib/password-box.module.ts","../../../../libs/components/password-box/src/acorex-components-password-box.ts"],"sourcesContent":["import {\n AXClearableComponent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\n\n/**\n * The Textbox is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-password-box',\n templateUrl: 'password-box.component.html',\n inputs: ['readonly', 'disabled', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id', 'look'],\n styles: `\n .ax-strength-validation-container {\n margin-top: 0.5rem;\n }\n `,\n outputs: [\n 'valueChange',\n 'stateChange',\n 'onValueChanged',\n 'onBlur',\n 'onFocus',\n 'readonlyChange',\n 'disabledChange',\n 'onKeyDown',\n 'onKeyUp',\n 'onKeyPress',\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n\n providers: [\n { provide: AXComponent, useExisting: AXPasswordBoxComponent },\n { provide: AXFocusableComponent, useExisting: AXPasswordBoxComponent },\n { provide: AXClearableComponent, useExisting: AXPasswordBoxComponent },\n { provide: AXValuableComponent, useExisting: AXPasswordBoxComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXPasswordBoxComponent),\n multi: true,\n },\n ],\n})\nexport class AXPasswordBoxComponent extends classes(MXInputBaseValueComponent<string>, MXLookComponent) {\n /** @ignore */\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n /** @ignore */\n protected _type: 'password' | 'text' = 'password';\n\n /** @ignore */\n protected _icon: 'ax-icon-visibility' | 'ax-icon-visibility-off' = 'ax-icon-visibility';\n\n /**\n * Sets the autocomplete behavior for the input field.\n */\n @Input()\n autoComplete: 'current-password' | 'new-password' | 'one-time-code' | 'off' = 'one-time-code';\n\n /**\n * A flag for showing or hiding password button.\n */\n @Input()\n showToggleButton = true;\n\n /**\n * Defines custom CSS classes to apply to the component.\n */\n @Input('class')\n classNames: string;\n\n /** @ignore */\n _handleModelChange(value: string) {\n this.commitValue(value, true);\n }\n\n /**\n * Toggles the input type between 'password' and 'text' to show or hide the password.\n */\n toggleType() {\n if (this._type === 'password') {\n this._type = 'text';\n this._icon = 'ax-icon-visibility-off';\n } else {\n this._type = 'password';\n this._icon = 'ax-icon-visibility';\n }\n }\n\n // @HostBinding('class')\n // get __hostClass(): string[] {\n // return ['ax-editor-container', `ax-look-${this.look}`, `${this.disabled ? 'ax-state-disabled' : ''}`];\n // }\n}\n","<div class=\"ax-editor-container ax-look-{{ look }} {{ classNames }}\" [class.ax-state-disabled]=\"disabled\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input\n #input\n class=\"ax-input\"\n [name]=\"name\"\n [type]=\"_type\"\n [id]=\"id\"\n [attr.placeholder]=\"placeholder\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabindex]=\"tabIndex\"\n [ngModel]=\"value\"\n [attr.autocomplete]=\"autoComplete\"\n (ngModelChange)=\"_handleModelChange($event)\"\n (keydown)=\"emitOnKeydownEvent($event)\"\n (keyup)=\"emitOnKeyupEvent($event)\"\n (keypress)=\"emitOnKeypressEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n />\n @if (value && !disabled && !readonly) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n @if (showToggleButton) {\n <button type=\"button\" class=\"ax-general-button ax-button-icon\" (click)=\"toggleType()\" [tabIndex]=\"-1\">\n <span class=\"ax-icon {{ _icon }}\"></span>\n </button>\n }\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-content select=\"ax-validation-rule\"> </ng-content>\n</div>\n<div class=\"ax-error-container\"></div>\n\n<div class=\"ax-strength-validation-container\">\n <ng-content select=\"ax-password-strength-validation\"></ng-content>\n</div>\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n inject,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXPasswordBoxComponent } from '../password-box.component';\n\n@Component({\n selector: 'ax-password-strength-validation',\n templateUrl: './password-strength-validation.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPasswordStrengthValidationComponent {\n protected passwordStrength = signal(0);\n protected strengthLabel = signal('week');\n protected strengthLabelColor = signal('danger');\n protected parent = inject(AXPasswordBoxComponent);\n\n #onComponentInit = afterNextRender(() => {\n this.parent.onValueChanged.subscribe((v) => {\n if (v.value) {\n this.checkPasswordStrength(v.value);\n } else {\n this.passwordStrength.set(0);\n }\n });\n });\n\n protected checkPasswordStrength(password: string) {\n let strength = 0;\n const criteria = [/.{8,}/, /[A-Z]/, /[a-z]/, /\\d/, /[!@#$%^&*(),.?\":{}|<>]/];\n criteria.forEach((regex) => {\n if (regex.test(password)) strength++;\n });\n this.strengthLabel.set(\n strength <= 2 ? 'Week' : strength == 3 ? 'So-so' : strength == 4 ? 'Good' : 'Great',\n );\n this.strengthLabelColor.set(strength <= 2 ? 'danger' : strength <= 3 ? 'warning' : 'success');\n this.passwordStrength.set((strength * 100) / criteria.length);\n }\n}\n","<ax-progress-bar\n [color]=\"strengthLabelColor()\"\n [progress]=\"passwordStrength()\"\n [height]=\"4\"\n></ax-progress-bar>\n<small\n class=\"ax-whitespace-nowrap ax-px-3 ax-text-center\"\n [class.ax-text-danger]=\"strengthLabelColor() === 'danger'\"\n [class.ax-text-warning]=\"strengthLabelColor() === 'warning'\"\n [class.ax-text-success]=\"strengthLabelColor() === 'success'\"\n >{{ strengthLabel() }}\n</small>\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXProgressBarModule } from '@acorex/components/progress-bar';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXPasswordBoxComponent } from './password-box.component';\nimport { AXPasswordStrengthValidationComponent } from './password-strength-validation/password-strength-validation.component';\n\nconst COMPONENT = [AXPasswordBoxComponent, AXPasswordStrengthValidationComponent];\nconst MODULES = [CommonModule, FormsModule, AXButtonModule, AXDecoratorModule, AXProgressBarModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXPasswordBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAoBA;;;;AAIG;AAqCG,MAAO,sBAAuB,SAAQ,OAAO,EAAC,yBAAiC,GAAE,eAAe,CAAC,CAAA;AApCvG,IAAA,WAAA,GAAA;;;QAyCY,IAAK,CAAA,KAAA,GAAwB,UAAU;;QAGvC,IAAK,CAAA,KAAA,GAAoD,oBAAoB;AAEvF;;AAEG;QAEH,IAAY,CAAA,YAAA,GAAkE,eAAe;AAE7F;;AAEG;QAEH,IAAgB,CAAA,gBAAA,GAAG,IAAI;AA8BxB;;AArBC,IAAA,kBAAkB,CAAC,KAAa,EAAA;AAC9B,QAAA,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC;;AAG/B;;AAEG;IACH,UAAU,GAAA;AACR,QAAA,IAAI,IAAI,CAAC,KAAK,KAAK,UAAU,EAAE;AAC7B,YAAA,IAAI,CAAC,KAAK,GAAG,MAA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