@acorex/components 19.11.0 → 19.11.2-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/common/index.d.ts +1 -0
  2. package/common/lib/interfaces/component.interface.d.ts +4 -0
  3. package/fesm2022/acorex-components-color-palette.mjs +1 -1
  4. package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
  5. package/fesm2022/acorex-components-conversation.mjs +2 -2
  6. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  7. package/fesm2022/acorex-components-data-pager.mjs +1 -1
  8. package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
  9. package/fesm2022/acorex-components-datetime-box.mjs +26 -1
  10. package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
  11. package/fesm2022/acorex-components-datetime-input.mjs +11 -2
  12. package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
  13. package/fesm2022/acorex-components-datetime-picker.mjs +8 -3
  14. package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
  15. package/fesm2022/acorex-components-file-explorer.mjs +1 -1
  16. package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
  17. package/fesm2022/acorex-components-grid-layout-builder.mjs +43 -26
  18. package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
  19. package/fesm2022/acorex-components-image-editor.mjs +9 -8
  20. package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
  21. package/fesm2022/acorex-components-menu.mjs +4 -4
  22. package/fesm2022/acorex-components-menu.mjs.map +1 -1
  23. package/fesm2022/acorex-components-number-box.mjs +20 -5
  24. package/fesm2022/acorex-components-number-box.mjs.map +1 -1
  25. package/fesm2022/acorex-components-password-box.mjs +2 -2
  26. package/fesm2022/acorex-components-password-box.mjs.map +1 -1
  27. package/fesm2022/acorex-components-query-builder.mjs +1 -1
  28. package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
  29. package/fesm2022/acorex-components-range-slider.mjs +20 -2
  30. package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
  31. package/fesm2022/acorex-components-side-menu.mjs +2 -2
  32. package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
  33. package/fesm2022/acorex-components-step-wizard.mjs +2 -2
  34. package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
  35. package/fesm2022/acorex-components-tag-box.mjs +2 -2
  36. package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
  37. package/fesm2022/acorex-components-text-box.mjs +2 -2
  38. package/fesm2022/acorex-components-text-box.mjs.map +1 -1
  39. package/fesm2022/acorex-components-tree-view.mjs +35 -38
  40. package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
  41. package/grid-layout-builder/lib/grid-layout-container.component.d.ts +2 -8
  42. package/grid-layout-builder/lib/types.d.ts +10 -2
  43. package/grid-layout-builder/lib/utility.d.ts +2 -0
  44. package/number-box/lib/number-box.component.d.ts +5 -1
  45. package/package.json +1 -1
  46. package/range-slider/lib/range-slider.component.d.ts +6 -0
  47. package/side-menu/lib/side-menu-item/side-menu-item.component.d.ts +1 -1
  48. package/tree-view/lib/tree-view-item.component.d.ts +1 -5
  49. package/tree-view/lib/tree-view.component.d.ts +7 -2
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-number-box.mjs","sources":["../../../../libs/components/number-box/src/lib/number-box.component.ts","../../../../libs/components/number-box/src/lib/number-box.component.html","../../../../libs/components/number-box/src/lib/number-box.module.ts","../../../../libs/components/number-box/src/acorex-components-number-box.ts"],"sourcesContent":["import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, HostListener, Input, ViewChild, ViewEncapsulation, forwardRef } from '@angular/core';\nimport { IMaskDirective } from 'angular-imask';\nimport { MaskedNumber, createMask } from 'imask';\n\nimport {\n AXClearableComponent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { isEmpty, toNumber } from 'lodash-es';\nimport { classes } from 'polytype';\n\n/**\n * The NumberBox is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-number-box',\n templateUrl: './number-box.component.html',\n styleUrls: ['./number-box.component.scss'],\n inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id', 'look'],\n outputs: ['valueChange', 'stateChange', 'onValueChanged', 'onBlur', 'onFocus', 'readonlyChange', 'disabledChange', 'onKeyDown', 'onKeyUp', 'onKeyPress'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXNumberBoxComponent },\n { provide: AXFocusableComponent, useExisting: AXNumberBoxComponent },\n { provide: AXClearableComponent, useExisting: AXNumberBoxComponent },\n { provide: AXValuableComponent, useExisting: AXNumberBoxComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXNumberBoxComponent),\n multi: true,\n },\n ],\n imports: [FormsModule, IMaskDirective],\n})\nexport class AXNumberBoxComponent extends classes(MXInputBaseValueComponent<number>, MXLookComponent) implements AfterViewInit {\n /** @ignore */\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n /** @ignore */\n private _thousandsSeparator: string;\n /**\n * boolean value that specifies the number box change step by scrolling.\n */\n @Input()\n changeOnScroll = false;\n\n /**\n * A character value that specifies the separator character.\n */\n @Input()\n\n /**\n * Gets the thousands separator used in the formatting.\n * @param {string} value\n */\n public get thousandsSeparator(): string {\n return this._thousandsSeparator;\n }\n\n /**\n * Sets the thousands separator for formatting.\n * @param {string} v\n */\n public set thousandsSeparator(v: string) {\n this.setOption({\n name: 'thousandsSeparator',\n value: v ?? '',\n });\n }\n\n /** @ignore */\n private _padDecimalZeros = false;\n /**\n * A character value that specifies the separator character.\n */\n @Input()\n\n /**\n * Gets whether decimal zeros are padded.\n * @param {boolean} value\n */\n public get padDecimalZeros(): boolean {\n return this._padDecimalZeros;\n }\n\n /**\n * Sets whether decimal zeros should be padded.\n * @param {boolean} v\n */\n public set padDecimalZeros(v: boolean) {\n this.setOption({\n name: 'padDecimalZeros',\n value: v,\n });\n }\n\n /**\n * Specifies the value that is used to increment or decrement the **Integer** part of number\n */\n @Input()\n\n /**\n * Defines the increment step value.\n */\n step = 1;\n\n /** @ignore */\n private _decimals = 0;\n /**\n * Specifies the number of decimals that the user can enter\n */\n @Input()\n\n /**\n * Gets the number of decimal places to be used.\n */\n public get decimals(): number {\n return this._decimals;\n }\n\n /**\n * Sets the decimal places; defaults to 0 if not provided.\n */\n public set decimals(v: number) {\n this.setOption({\n name: 'decimals',\n value: v ?? 0,\n });\n }\n\n /**\n * Specifies the value that is used to increment or decrement the **Deciaml** part of number\n */\n @Input()\n\n /**\n * Defines the step size for decimal values.\n * @defaultvalue 'auto'\n */\n decimalStep: number | 'auto' = 'auto';\n\n /**\n * Specifies whether the Up and Down spin buttons will be rendered or not\n */\n @Input()\n\n /**\n * Indicates whether spin buttons are displayed.\n * @defaultvalue true\n */\n showSpinButtons = true;\n\n /** @ignore */\n private _minValue: number = Number.MIN_SAFE_INTEGER;\n /**\n * Specifies the smallest value that is valid\n */\n @Input()\n\n /**\n * Gets the number of decimal places used.\n * @param {number} value\n */\n public get minValue(): number {\n return this._minValue;\n }\n\n /**\n * Sets the number of decimal places to be used.\n * @param {number} v\n * @defaultvalue 0\n */\n public set minValue(v: number) {\n this.setOption({\n name: 'minValue',\n value: v != null ? Number(v) : Number.MIN_SAFE_INTEGER,\n });\n }\n\n /** @ignore */\n private _maxValue: number = Number.MAX_SAFE_INTEGER;\n\n /**\n * Specifies the greatest value that is valid\n */\n @Input()\n\n /**\n * Returns the maximum allowable value.\n */\n public get maxValue(): number {\n return this._maxValue;\n }\n\n /**\n * Sets the maximum allowable value, defaulting to `Number.MAX_SAFE_INTEGER` if null.\n * @param v\n */\n public set maxValue(v: number) {\n this.setOption({\n name: 'maxValue',\n value: v != null ? Number(v) : Number.MAX_SAFE_INTEGER,\n });\n }\n\n /**\n * CSS classes to apply to the component.\n * @param classNames\n */\n @Input('class')\n\n /**\n * CSS classes to apply to the component.\n */\n classNames: string;\n\n /**\n * @ignore\n */\n _maskObj: MaskedNumber;\n\n /** @ignore */\n @ViewChild(IMaskDirective)\n\n /** @ignore */\n private _maskDirective: IMaskDirective<MaskedNumber>;\n\n /** @ignore */\n private _onWheelFlag = false;\n constructor() {\n super();\n this.onFocus.subscribe(() => {\n this._onWheelFlag = true;\n this.input.nativeElement.select();\n });\n this.onBlur.subscribe(() => {\n this._onWheelFlag = false;\n });\n }\n\n /** @ignore */\n ngAfterViewInit(): void {\n this._updateMask();\n }\n\n /**\n * Handles internal option changes and updates the mask accordingly.\n */\n override internalOptionChanged(): void {\n this._updateMask();\n }\n\n /**\n * Resets the input element to its default state and calls the parent class reset method.\n */\n override reset(): void {\n this.input.nativeElement.value = null;\n super.reset(true);\n }\n\n /**\n * Ensures the value is within the min-max range, returning the default if null.\n * @param value\n */\n override internalSetValue(value: any): number {\n // || (value == 0 && !this._maskObj.value)\n if (value == null) {\n return this.defaultValue;\n }\n const v = toNumber(value);\n if (v < this.minValue) return this.minValue;\n if (v > this.maxValue) return this.maxValue;\n return v;\n }\n\n /** @ignore */\n private _updateMask() {\n if (!this._maskObj) {\n this._maskObj = createMask({\n mask: Number,\n min: this.minValue,\n max: this.maxValue,\n thousandsSeparator: this.thousandsSeparator || '',\n scale: this.decimals,\n radix: '.',\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\n });\n\n this._maskObj.format = (v: number, m) => {\n return !isNaN(v)\n ? v.toLocaleString('en-US', {\n useGrouping: false,\n maximumFractionDigits: 20,\n })\n : '';\n };\n } else {\n this._maskObj.updateOptions({\n min: this.minValue,\n max: this.maxValue,\n thousandsSeparator: this.thousandsSeparator || '',\n scale: this.decimals,\n radix: '.',\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\n });\n }\n this._maskDirective?.maskRef?.updateValue();\n this._maskDirective?.maskRef?.updateControl();\n }\n\n /** @ignore */\n _handleModelChange(value: number) {\n if (value == 0 && isEmpty(this.input?.nativeElement?.value)) {\n value = null;\n }\n\n this.commitValue(value, true);\n }\n\n /** @ignore */\n _handleOnKeydownEvent(e: KeyboardEvent) {\n if (this.disabled || this.readonly) return;\n const ignore = () => {\n e.preventDefault();\n e.stopPropagation();\n };\n const input = e.target as HTMLInputElement;\n const valStr = input.value;\n const decimalPointIndex = valStr.indexOf('.');\n const _cursorPos = input.selectionStart!;\n\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n if (decimalPointIndex > 0 && _cursorPos > decimalPointIndex && this.decimals > 0) {\n e.key === 'ArrowDown' ? this.decimalStepDown(true) : this.decimalStepUp(true);\n } else {\n e.key === 'ArrowDown' ? this.stepDown(true) : this.stepUp(true);\n }\n ignore();\n setTimeout(() => {\n input.setSelectionRange(_cursorPos, _cursorPos);\n }, 5);\n }\n super.emitOnKeydownEvent(e);\n }\n\n /** @ignore */\n protected _handleUpDownClick(v: -1 | 1, e: Event) {\n const isUserInteraction = e.isTrusted;\n if (this.disabled || this.readonly) return;\n v == 1 ? this.stepUp(isUserInteraction) : this.stepDown(isUserInteraction);\n }\n\n /**\n * Increases the value by the step amount, ensuring it's at least the minimum value.\n */\n stepUp(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(this.value + toNumber(this.step), u);\n }\n\n /**\n * Decreases the value by the step amount, ensuring it's at least the minimum value.\n */\n stepDown(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(this.value - toNumber(this.step), u);\n }\n\n /**\n * Increases the value by the decimal step amount, using 'auto' or a custom step value.\n */\n decimalStepUp(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(this.value + toNumber(this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep), u);\n }\n\n /**\n * Decreases the value by the decimal step amount, using 'auto' or a custom step value.\n */\n decimalStepDown(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(this.value - toNumber(this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep), u);\n }\n\n @HostListener('wheel', ['$event'])\n onWheel(event: WheelEvent) {\n if (this.changeOnScroll && this._onWheelFlag) {\n event.preventDefault();\n if (!this.disabled && !this.readonly) {\n if (event.deltaY > 0) {\n this.commitValue(this.value - this.step);\n } else {\n this.commitValue(this.value + this.step);\n }\n }\n }\n }\n}\n","<div class=\"ax-editor-container {{ classNames }} ax-{{ look }}\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input\n #input\n class=\"ax-input\"\n type=\"text\"\n [id]=\"id\"\n [name]=\"name\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocomplete]=\"'off'\"\n [imask]=\"_maskObj\"\n [unmask]=\"'typed'\"\n [attr.min]=\"minValue\"\n [attr.max]=\"maxValue\"\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 (ngModelChange)=\"_handleModelChange($event)\"\n (keydown)=\"_handleOnKeydownEvent($event)\"\n (keyup)=\"emitOnKeyupEvent($event)\"\n (keypress)=\"emitOnKeypressEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n />\n @if (input.value && !disabled && !readonly) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n @if (showSpinButtons) {\n <div class=\"ax-number-box-control\">\n <button\n type=\"button\"\n class=\"ax-editor-button\"\n [class.ax-state-disabled]=\"disabled\"\n (click)=\"_handleUpDownClick(1, $event)\"\n tabindex=\"-1\"\n [disabled]=\"disabled\"\n >\n <span class=\"ax-icon ax-icon-chevron-up ax-arrow-button\"></span>\n </button>\n <button\n type=\"button\"\n class=\"ax-editor-button\"\n [class.ax-state-disabled]=\"disabled\"\n (click)=\"_handleUpDownClick(-1, $event)\"\n tabindex=\"-1\"\n [disabled]=\"disabled\"\n >\n <span class=\"ax-icon ax-icon-chevron-down ax-arrow-button\"></span>\n </button>\n </div>\n }\n\n <ng-content select=\"ax-suffix\"> </ng-content>\n</div>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<div class=\"ax-error-container\"></div>\n","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 { IMaskModule } from 'angular-imask';\nimport { AXNumberBoxComponent } from './number-box.component';\n\nconst COMPONENT = [AXNumberBoxComponent];\nconst MODULES = [CommonModule, FormsModule, AXButtonModule, AXDecoratorModule, IMaskModule];\n\n@NgModule({\n imports: [...MODULES, ...COMPONENT],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXNumberBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAgBA;;;;AAIG;AAsBG,MAAO,oBAAqB,SAAQ,OAAO,EAAC,yBAAiC,GAAE,eAAe,CAAC,CAAA;AAYnG;;AAEG;AACH,IAAA,IAMW,kBAAkB,GAAA;QAC3B,OAAO,IAAI,CAAC,mBAAmB;;AAGjC;;;AAGG;IACH,IAAW,kBAAkB,CAAC,CAAS,EAAA;QACrC,IAAI,CAAC,SAAS,CAAC;AACb,YAAA,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE,CAAC,IAAI,EAAE;AACf,SAAA,CAAC;;AAKJ;;AAEG;AACH,IAAA,IAMW,eAAe,GAAA;QACxB,OAAO,IAAI,CAAC,gBAAgB;;AAG9B;;;AAGG;IACH,IAAW,eAAe,CAAC,CAAU,EAAA;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E,CAAC,QAAQ,CAAC;;;AExYnC,MAAM,SAAS,GAAG,CAAC,oBAAoB,CAAC;AACxC,MAAM,OAAO,GAAG,CAAC,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,WAAW,CAAC;MAO9E,iBAAiB,CAAA;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAPb,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,WAAW,EADvE,oBAAoB,aAApB,oBAAoB,CAAA,EAAA,CAAA,CAAA;+GAQ1B,iBAAiB,EAAA,OAAA,EAAA,CAJf,OAAO,EAAK,SAAS,CAAA,EAAA,CAAA,CAAA;;2FAIvB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,GAAG,SAAS,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACfD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-number-box.mjs","sources":["../../../../libs/components/number-box/src/lib/number-box.component.ts","../../../../libs/components/number-box/src/lib/number-box.component.html","../../../../libs/components/number-box/src/lib/number-box.module.ts","../../../../libs/components/number-box/src/acorex-components-number-box.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostListener,\n Input,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n input,\n} from '@angular/core';\nimport { IMaskDirective } from 'angular-imask';\nimport { MaskedNumber, createMask } from 'imask';\n\nimport {\n AXClearableComponent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { isEmpty, toNumber } from 'lodash-es';\nimport { classes } from 'polytype';\n\n/**\n * The NumberBox is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-number-box',\n templateUrl: './number-box.component.html',\n styleUrls: ['./number-box.component.scss'],\n inputs: ['disabled', 'readonly', '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 changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXNumberBoxComponent },\n { provide: AXFocusableComponent, useExisting: AXNumberBoxComponent },\n { provide: AXClearableComponent, useExisting: AXNumberBoxComponent },\n { provide: AXValuableComponent, useExisting: AXNumberBoxComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXNumberBoxComponent),\n multi: true,\n },\n ],\n imports: [FormsModule, IMaskDirective],\n})\nexport class AXNumberBoxComponent\n extends classes(MXInputBaseValueComponent<number>, MXLookComponent)\n implements AfterViewInit\n{\n /** @ignore */\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n /** @ignore */\n private _thousandsSeparator: string;\n\n /**\n * This property determines the type of the input element (e.g., 'text', 'password', 'email', etc.). It can be dynamically bound from a parent component template to change the input field type based on different conditions or requirements.\n */\n type = input('tel');\n\n /**\n * boolean value that specifies the number box change step by scrolling.\n */\n @Input()\n changeOnScroll = false;\n\n /**\n * A character value that specifies the separator character.\n */\n @Input()\n\n /**\n * Gets the thousands separator used in the formatting.\n * @param {string} value\n */\n public get thousandsSeparator(): string {\n return this._thousandsSeparator;\n }\n\n /**\n * Sets the thousands separator for formatting.\n * @param {string} v\n */\n public set thousandsSeparator(v: string) {\n this.setOption({\n name: 'thousandsSeparator',\n value: v ?? '',\n });\n }\n\n /** @ignore */\n private _padDecimalZeros = false;\n /**\n * A character value that specifies the separator character.\n */\n @Input()\n\n /**\n * Gets whether decimal zeros are padded.\n * @param {boolean} value\n */\n public get padDecimalZeros(): boolean {\n return this._padDecimalZeros;\n }\n\n /**\n * Sets whether decimal zeros should be padded.\n * @param {boolean} v\n */\n public set padDecimalZeros(v: boolean) {\n this.setOption({\n name: 'padDecimalZeros',\n value: v,\n });\n }\n\n /**\n * Specifies the value that is used to increment or decrement the **Integer** part of number\n */\n @Input()\n\n /**\n * Defines the increment step value.\n */\n step = 1;\n\n /** @ignore */\n private _decimals = 0;\n /**\n * Specifies the number of decimals that the user can enter\n */\n @Input()\n\n /**\n * Gets the number of decimal places to be used.\n */\n public get decimals(): number {\n return this._decimals;\n }\n\n /**\n * Sets the decimal places; defaults to 0 if not provided.\n */\n public set decimals(v: number) {\n this.setOption({\n name: 'decimals',\n value: v ?? 0,\n });\n }\n\n /**\n * Specifies the value that is used to increment or decrement the **Deciaml** part of number\n */\n @Input()\n\n /**\n * Defines the step size for decimal values.\n * @defaultvalue 'auto'\n */\n decimalStep: number | 'auto' = 'auto';\n\n /**\n * Specifies whether the Up and Down spin buttons will be rendered or not\n */\n @Input()\n\n /**\n * Indicates whether spin buttons are displayed.\n * @defaultvalue true\n */\n showSpinButtons = true;\n\n /** @ignore */\n private _minValue: number = Number.MIN_SAFE_INTEGER;\n /**\n * Specifies the smallest value that is valid\n */\n @Input()\n\n /**\n * Gets the number of decimal places used.\n * @param {number} value\n */\n public get minValue(): number {\n return this._minValue;\n }\n\n /**\n * Sets the number of decimal places to be used.\n * @param {number} v\n * @defaultvalue 0\n */\n public set minValue(v: number) {\n this.setOption({\n name: 'minValue',\n value: v != null ? Number(v) : Number.MIN_SAFE_INTEGER,\n });\n }\n\n /** @ignore */\n private _maxValue: number = Number.MAX_SAFE_INTEGER;\n\n /**\n * Specifies the greatest value that is valid\n */\n @Input()\n\n /**\n * Returns the maximum allowable value.\n */\n public get maxValue(): number {\n return this._maxValue;\n }\n\n /**\n * Sets the maximum allowable value, defaulting to `Number.MAX_SAFE_INTEGER` if null.\n * @param v\n */\n public set maxValue(v: number) {\n this.setOption({\n name: 'maxValue',\n value: v != null ? Number(v) : Number.MAX_SAFE_INTEGER,\n });\n }\n\n /**\n * CSS classes to apply to the component.\n * @param classNames\n */\n @Input('class')\n\n /**\n * CSS classes to apply to the component.\n */\n classNames: string;\n\n /**\n * @ignore\n */\n _maskObj: MaskedNumber;\n\n /** @ignore */\n @ViewChild(IMaskDirective)\n\n /** @ignore */\n private _maskDirective: IMaskDirective<MaskedNumber>;\n\n /** @ignore */\n private _onWheelFlag = false;\n constructor() {\n super();\n this.onFocus.subscribe(() => {\n this._onWheelFlag = true;\n this.input.nativeElement.select();\n });\n this.onBlur.subscribe(() => {\n this._onWheelFlag = false;\n });\n }\n\n /** @ignore */\n ngAfterViewInit(): void {\n this._updateMask();\n }\n\n /**\n * Handles internal option changes and updates the mask accordingly.\n */\n override internalOptionChanged(): void {\n this._updateMask();\n }\n\n /**\n * Resets the input element to its default state and calls the parent class reset method.\n */\n override reset(): void {\n this.input.nativeElement.value = null;\n super.reset(true);\n }\n\n /**\n * Ensures the value is within the min-max range, returning the default if null.\n * @param value\n */\n override internalSetValue(value: any): number {\n // || (value == 0 && !this._maskObj.value)\n if (value == null) {\n return this.defaultValue;\n }\n const v = toNumber(value);\n if (v < this.minValue) return this.minValue;\n if (v > this.maxValue) return this.maxValue;\n return v;\n }\n\n /** @ignore */\n private _updateMask() {\n if (!this._maskObj) {\n this._maskObj = createMask({\n mask: Number,\n min: this.minValue,\n max: this.maxValue,\n thousandsSeparator: this.thousandsSeparator || '',\n scale: this.decimals,\n radix: '.',\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\n });\n\n this._maskObj.format = (v: number, m) => {\n return !isNaN(v)\n ? v.toLocaleString('en-US', {\n useGrouping: false,\n maximumFractionDigits: 20,\n })\n : '';\n };\n } else {\n this._maskObj.updateOptions({\n min: this.minValue,\n max: this.maxValue,\n thousandsSeparator: this.thousandsSeparator || '',\n scale: this.decimals,\n radix: '.',\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\n });\n }\n this._maskDirective?.maskRef?.updateValue();\n this._maskDirective?.maskRef?.updateControl();\n }\n\n /** @ignore */\n _handleModelChange(value: number) {\n if (value == 0 && isEmpty(this.input?.nativeElement?.value)) {\n value = null;\n }\n\n this.commitValue(value, true);\n }\n\n /** @ignore */\n _handleOnKeydownEvent(e: KeyboardEvent) {\n if (this.disabled || this.readonly) return;\n const ignore = () => {\n e.preventDefault();\n e.stopPropagation();\n };\n const input = e.target as HTMLInputElement;\n const valStr = input.value;\n const decimalPointIndex = valStr.indexOf('.');\n const _cursorPos = input.selectionStart!;\n\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n if (decimalPointIndex > 0 && _cursorPos > decimalPointIndex && this.decimals > 0) {\n e.key === 'ArrowDown' ? this.decimalStepDown(true) : this.decimalStepUp(true);\n } else {\n e.key === 'ArrowDown' ? this.stepDown(true) : this.stepUp(true);\n }\n ignore();\n setTimeout(() => {\n input.setSelectionRange(_cursorPos, _cursorPos);\n }, 5);\n }\n super.emitOnKeydownEvent(e);\n }\n\n /** @ignore */\n protected _handleUpDownClick(v: -1 | 1, e: Event) {\n const isUserInteraction = e.isTrusted;\n if (this.disabled || this.readonly) return;\n v == 1 ? this.stepUp(isUserInteraction) : this.stepDown(isUserInteraction);\n }\n\n /**\n * Increases the value by the step amount, ensuring it's at least the minimum value.\n */\n stepUp(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(this.value + toNumber(this.step), u);\n }\n\n /**\n * Decreases the value by the step amount, ensuring it's at least the minimum value.\n */\n stepDown(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(this.value - toNumber(this.step), u);\n }\n\n /**\n * Increases the value by the decimal step amount, using 'auto' or a custom step value.\n */\n decimalStepUp(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(\n this.value + toNumber(this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep),\n u,\n );\n }\n\n /**\n * Decreases the value by the decimal step amount, using 'auto' or a custom step value.\n */\n decimalStepDown(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(\n this.value - toNumber(this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep),\n u,\n );\n }\n\n @HostListener('wheel', ['$event'])\n onWheel(event: WheelEvent) {\n if (this.changeOnScroll && this._onWheelFlag) {\n event.preventDefault();\n if (!this.disabled && !this.readonly) {\n if (event.deltaY > 0) {\n this.commitValue(this.value - this.step);\n } else {\n this.commitValue(this.value + this.step);\n }\n }\n }\n }\n}\n","<div\n class=\"ax-editor-container {{ classNames }} ax-{{ look }}\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n>\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input\n #input\n class=\"ax-input\"\n [attr.type]=\"type()\"\n [id]=\"id\"\n [name]=\"name\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocomplete]=\"'off'\"\n [imask]=\"_maskObj\"\n [unmask]=\"'typed'\"\n [attr.min]=\"minValue\"\n [attr.max]=\"maxValue\"\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 (ngModelChange)=\"_handleModelChange($event)\"\n (keydown)=\"_handleOnKeydownEvent($event)\"\n (keyup)=\"emitOnKeyupEvent($event)\"\n (keypress)=\"emitOnKeypressEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n />\n @if (input.value && !disabled && !readonly) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n @if (showSpinButtons) {\n <div class=\"ax-number-box-control\">\n <button\n type=\"button\"\n class=\"ax-editor-button\"\n [class.ax-state-disabled]=\"disabled\"\n (click)=\"_handleUpDownClick(1, $event)\"\n tabindex=\"-1\"\n [disabled]=\"disabled\"\n >\n <span class=\"ax-icon ax-icon-chevron-up ax-arrow-button\"></span>\n </button>\n <button\n type=\"button\"\n class=\"ax-editor-button\"\n [class.ax-state-disabled]=\"disabled\"\n (click)=\"_handleUpDownClick(-1, $event)\"\n tabindex=\"-1\"\n [disabled]=\"disabled\"\n >\n <span class=\"ax-icon ax-icon-chevron-down ax-arrow-button\"></span>\n </button>\n </div>\n }\n\n <ng-content select=\"ax-suffix\"> </ng-content>\n</div>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<div class=\"ax-error-container\"></div>\n","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 { IMaskModule } from 'angular-imask';\nimport { AXNumberBoxComponent } from './number-box.component';\n\nconst COMPONENT = [AXNumberBoxComponent];\nconst MODULES = [CommonModule, FormsModule, AXButtonModule, AXDecoratorModule, IMaskModule];\n\n@NgModule({\n imports: [...MODULES, ...COMPONENT],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXNumberBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AA2BA;;;;AAIG;AAiCG,MAAO,oBACX,SAAQ,OAAO,EAAC,yBAAiC,GAAE,eAAe,CAAC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,CAAC,GAAG,OAAO,EAAE,GAAG,SAAS,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACfD;;AAEG;;;;"}
@@ -60,7 +60,7 @@ class AXPasswordBoxComponent extends classes((MXInputBaseValueComponent), MXLook
60
60
  useExisting: forwardRef(() => AXPasswordBoxComponent),
61
61
  multi: true,
62
62
  },
63
- ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-editor-container {{ classNames }} ax-{{ look }}\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n\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\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</div>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<div class=\"ax-error-container\"></div>\n<ng-content select=\"ax-password-strength-validation\" [showHint]=\"showStrength()\"></ng-content>\n", styles: ["ax-password-box{display:flex;flex-direction:column;gap:.2rem}ax-password-box .ax-state-disabled{opacity:.55;cursor:not-allowed}ax-password-box .ax-state-readonly{opacity:.75}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { 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 }); }
63
+ ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-editor-container {{ classNames }} ax-{{ look }}\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n\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\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</div>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<div class=\"ax-error-container\"></div>\n<ng-content select=\"ax-password-strength-validation\" [showHint]=\"showStrength()\"></ng-content>\n", styles: ["ax-password-box{display:flex;flex-direction:column;gap:.2rem}ax-password-box .ax-state-disabled{opacity:.55;cursor:not-allowed}ax-password-box .ax-state-readonly{opacity:.75}ax-password-box .ax-general-button{--ax-comp-general-button-padding-left: 0;--ax-comp-general-button-padding-right: 0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { 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 }); }
64
64
  }
65
65
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AXPasswordBoxComponent, decorators: [{
66
66
  type: Component,
@@ -74,7 +74,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
74
74
  useExisting: forwardRef(() => AXPasswordBoxComponent),
75
75
  multi: true,
76
76
  },
77
- ], imports: [FormsModule], template: "<div class=\"ax-editor-container {{ classNames }} ax-{{ look }}\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n\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\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</div>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<div class=\"ax-error-container\"></div>\n<ng-content select=\"ax-password-strength-validation\" [showHint]=\"showStrength()\"></ng-content>\n", styles: ["ax-password-box{display:flex;flex-direction:column;gap:.2rem}ax-password-box .ax-state-disabled{opacity:.55;cursor:not-allowed}ax-password-box .ax-state-readonly{opacity:.75}\n"] }]
77
+ ], imports: [FormsModule], template: "<div class=\"ax-editor-container {{ classNames }} ax-{{ look }}\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n\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\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</div>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<div class=\"ax-error-container\"></div>\n<ng-content select=\"ax-password-strength-validation\" [showHint]=\"showStrength()\"></ng-content>\n", styles: ["ax-password-box{display:flex;flex-direction:column;gap:.2rem}ax-password-box .ax-state-disabled{opacity:.55;cursor:not-allowed}ax-password-box .ax-state-readonly{opacity:.75}ax-password-box .ax-general-button{--ax-comp-general-button-padding-left: 0;--ax-comp-general-button-padding-right: 0}\n"] }]
78
78
  }], propDecorators: { input: [{
79
79
  type: ViewChild,
80
80
  args: ['input']
@@ -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-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 { ChangeDetectionStrategy, Component, ElementRef, Input, ViewChild, ViewEncapsulation, forwardRef } from '@angular/core';\nimport { FormsModule, 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 styleUrl: './password-box.component.scss',\n outputs: ['valueChange', 'stateChange', 'onValueChanged', 'onBlur', 'onFocus', 'readonlyChange', 'disabledChange', 'onKeyDown', 'onKeyUp', 'onKeyPress'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\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 imports: [FormsModule],\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","<div class=\"ax-editor-container {{ classNames }} ax-{{ look }}\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n\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\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</div>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<div class=\"ax-error-container\"></div>\n<ng-content select=\"ax-password-strength-validation\" [showHint]=\"showStrength()\"></ng-content>\n","import { AXBadgeComponent } from '@acorex/components/badge';\nimport { AXProgressBarComponent } from '@acorex/components/progress-bar';\nimport { AXTranslatorPipe } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { afterNextRender, ChangeDetectionStrategy, Component, inject, input, signal, ViewEncapsulation } 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 styleUrl: './password-strength-validation.component.scss',\n imports: [AXProgressBarComponent, AXBadgeComponent, AsyncPipe, AXTranslatorPipe],\n})\nexport class AXPasswordStrengthValidationComponent {\n protected passwordStrength = signal(0);\n protected updatedPassword = signal('');\n protected strengthLabel = signal('fragile');\n protected strengthLabelColor = signal('danger');\n protected parent = inject(AXPasswordBoxComponent);\n\n /**\n * Hint status.\n */\n showHint = input(false);\n\n /**\n * Progress status.\n */\n showProgress = input(true);\n\n protected isLenghtgraterThan8 = signal({ regex: /.{8,}/, state: false });\n protected isUseUpperCase = signal({ regex: /[A-Z]/, state: false });\n protected isUseLowerCase = signal({ regex: /[a-z]/, state: false });\n protected isUseNumber = signal({ regex: /\\d/, state: false });\n protected isUseSpecialCharacter = signal({\n regex: /[!@#$%^&*(),.?\":{}|<>]/,\n state: false,\n });\n\n #onComponentInit = afterNextRender(() => {\n this.parent.onValueChanged.subscribe((v) => {\n if (v.value) {\n this.updatedPassword.set(v.value);\n } else {\n this.updatedPassword.set('');\n }\n this.checkPasswordStrength();\n });\n });\n\n private checkRegexHandler(inter) {\n if (inter().regex.test(this.updatedPassword())) {\n inter.update((prev) => ({ ...prev, state: true }));\n return true;\n }\n inter.update((prev) => ({ ...prev, state: false }));\n return false;\n }\n\n protected checkPasswordStrength() {\n let strength = 0;\n\n this.checkRegexHandler(this.isLenghtgraterThan8) && strength++;\n this.checkRegexHandler(this.isUseUpperCase) && strength++;\n this.checkRegexHandler(this.isUseLowerCase) && strength++;\n this.checkRegexHandler(this.isUseNumber) && strength++;\n this.checkRegexHandler(this.isUseSpecialCharacter) && strength++;\n\n const strengthLabels = ['fragile', 'fragile', 'weak', 'good', 'strong', 'unbreakable'];\n this.strengthLabel.set(strengthLabels[strength]);\n this.strengthLabelColor.set(strength <= 2 ? 'danger' : strength <= 3 ? 'warning' : 'success');\n this.passwordStrength.set((strength * 100) / 5);\n }\n}\n","@if (showProgress()) {\n <small\n class=\"ax-state-password\"\n [class.ax-text-red]=\"strengthLabelColor() === 'danger'\"\n [class.ax-text-orange]=\"strengthLabelColor() === 'warning'\"\n [class.ax-text-green]=\"strengthLabelColor() === 'success'\"\n >\n {{ strengthLabel() | translate | async }}\n </small>\n\n <ax-progress-bar\n [color]=\"strengthLabelColor()\"\n [progress]=\"passwordStrength()\"\n [height]=\"4\"\n ></ax-progress-bar>\n}\n@if (showHint()) {\n <div class=\"ax-hint-container\">\n <small class=\"ax-hint-state\">\n <ax-badge [color]=\"isLenghtgraterThan8().state ? 'success' : 'danger'\"></ax-badge>\n <span>\n {{ 'at-least-8-characters' | translate | async }}\n </span>\n </small>\n <small class=\"ax-hint-state\">\n <ax-badge [color]=\"isUseUpperCase().state ? 'success' : 'danger'\"></ax-badge>\n <span>\n {{ 'english-upper-case-letter' | translate | async }}\n </span>\n </small>\n <small class=\"ax-hint-state\">\n <ax-badge [color]=\"isUseLowerCase().state ? 'success' : 'danger'\"></ax-badge>\n <span>\n {{ 'english-lower-case-letter' | translate | async }}\n </span>\n </small>\n <small class=\"ax-hint-state\">\n <ax-badge [color]=\"isUseNumber().state ? 'success' : 'danger'\"></ax-badge\n ><span> {{ 'digits' | translate | async }} </span>\n </small>\n <small class=\"ax-hint-state\">\n <ax-badge [color]=\"isUseSpecialCharacter().state ? 'success' : 'danger'\"></ax-badge>\n <span>\n {{ 'special-character' | translate | async }}\n </span>\n </small>\n </div>\n}\n","import { AXBadgeModule } from '@acorex/components/badge';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXProgressBarModule } from '@acorex/components/progress-bar';\nimport { AXTranslationModule } from '@acorex/core/translation';\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, AXBadgeModule, AXTranslationModule];\n\n@NgModule({\n imports: [...MODULES, ...COMPONENT],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXPasswordBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAYA;;;;AAIG;AAsBG,MAAO,sBAAuB,SAAQ,OAAO,EAAC,yBAAiC,GAAE,eAAe,CAAC,CAAA;AArBvG,IAAA,WAAA,GAAA;;;QA0BY,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;AAyBxB;;AAhBC,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,MAAM;AACnB,YAAA,IAAI,CAAC,KAAK,GAAG,wBAAwB;;aAChC;AACL,YAAA,IAAI,CAAC,KAAK,GAAG,UAAU;AACvB,YAAA,IAAI,CAAC,KAAK,GAAG,oBAAoB;;;8GA1C1B,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EAbtB,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AAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAnB,mBAAmB,EAAA,OAAA,EAAA,CAPf,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,aAAa,EAAE,mBAAmB,EADnH,sBAAsB,EAAE,qCAAqC,CAAA,EAAA,OAAA,EAAA,CAA7D,sBAAsB,EAAE,qCAAqC,CAAA,EAAA,CAAA,CAAA;+GAQnE,mBAAmB,EAAA,OAAA,EAAA,CAJjB,OAAO,EAAK,SAAS,CAAA,EAAA,CAAA,CAAA;;2FAIvB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,GAAG,SAAS,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;AClBD;;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 { ChangeDetectionStrategy, Component, ElementRef, Input, ViewChild, ViewEncapsulation, forwardRef } from '@angular/core';\nimport { FormsModule, 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 styleUrl: './password-box.component.scss',\n outputs: ['valueChange', 'stateChange', 'onValueChanged', 'onBlur', 'onFocus', 'readonlyChange', 'disabledChange', 'onKeyDown', 'onKeyUp', 'onKeyPress'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\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 imports: [FormsModule],\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","<div class=\"ax-editor-container {{ classNames }} ax-{{ look }}\" [class.ax-state-disabled]=\"disabled\" [class.ax-state-readonly]=\"readonly\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n\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\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</div>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n<div class=\"ax-error-container\"></div>\n<ng-content select=\"ax-password-strength-validation\" [showHint]=\"showStrength()\"></ng-content>\n","import { AXBadgeComponent } from '@acorex/components/badge';\nimport { AXProgressBarComponent } from '@acorex/components/progress-bar';\nimport { AXTranslatorPipe } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { afterNextRender, ChangeDetectionStrategy, Component, inject, input, signal, ViewEncapsulation } 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 styleUrl: './password-strength-validation.component.scss',\n imports: [AXProgressBarComponent, AXBadgeComponent, AsyncPipe, AXTranslatorPipe],\n})\nexport class AXPasswordStrengthValidationComponent {\n protected passwordStrength = signal(0);\n protected updatedPassword = signal('');\n protected strengthLabel = signal('fragile');\n protected strengthLabelColor = signal('danger');\n protected parent = inject(AXPasswordBoxComponent);\n\n /**\n * Hint status.\n */\n showHint = input(false);\n\n /**\n * Progress status.\n */\n showProgress = input(true);\n\n protected isLenghtgraterThan8 = signal({ regex: /.{8,}/, state: false });\n protected isUseUpperCase = signal({ regex: /[A-Z]/, state: false });\n protected isUseLowerCase = signal({ regex: /[a-z]/, state: false });\n protected isUseNumber = signal({ regex: /\\d/, state: false });\n protected isUseSpecialCharacter = signal({\n regex: /[!@#$%^&*(),.?\":{}|<>]/,\n state: false,\n });\n\n #onComponentInit = afterNextRender(() => {\n this.parent.onValueChanged.subscribe((v) => {\n if (v.value) {\n this.updatedPassword.set(v.value);\n } else {\n this.updatedPassword.set('');\n }\n this.checkPasswordStrength();\n });\n });\n\n private checkRegexHandler(inter) {\n if (inter().regex.test(this.updatedPassword())) {\n inter.update((prev) => ({ ...prev, state: true }));\n return true;\n }\n inter.update((prev) => ({ ...prev, state: false }));\n return false;\n }\n\n protected checkPasswordStrength() {\n let strength = 0;\n\n this.checkRegexHandler(this.isLenghtgraterThan8) && strength++;\n this.checkRegexHandler(this.isUseUpperCase) && strength++;\n this.checkRegexHandler(this.isUseLowerCase) && strength++;\n this.checkRegexHandler(this.isUseNumber) && strength++;\n this.checkRegexHandler(this.isUseSpecialCharacter) && strength++;\n\n const strengthLabels = ['fragile', 'fragile', 'weak', 'good', 'strong', 'unbreakable'];\n this.strengthLabel.set(strengthLabels[strength]);\n this.strengthLabelColor.set(strength <= 2 ? 'danger' : strength <= 3 ? 'warning' : 'success');\n this.passwordStrength.set((strength * 100) / 5);\n }\n}\n","@if (showProgress()) {\n <small\n class=\"ax-state-password\"\n [class.ax-text-red]=\"strengthLabelColor() === 'danger'\"\n [class.ax-text-orange]=\"strengthLabelColor() === 'warning'\"\n [class.ax-text-green]=\"strengthLabelColor() === 'success'\"\n >\n {{ strengthLabel() | translate | async }}\n </small>\n\n <ax-progress-bar\n [color]=\"strengthLabelColor()\"\n [progress]=\"passwordStrength()\"\n [height]=\"4\"\n ></ax-progress-bar>\n}\n@if (showHint()) {\n <div class=\"ax-hint-container\">\n <small class=\"ax-hint-state\">\n <ax-badge [color]=\"isLenghtgraterThan8().state ? 'success' : 'danger'\"></ax-badge>\n <span>\n {{ 'at-least-8-characters' | translate | async }}\n </span>\n </small>\n <small class=\"ax-hint-state\">\n <ax-badge [color]=\"isUseUpperCase().state ? 'success' : 'danger'\"></ax-badge>\n <span>\n {{ 'english-upper-case-letter' | translate | async }}\n </span>\n </small>\n <small class=\"ax-hint-state\">\n <ax-badge [color]=\"isUseLowerCase().state ? 'success' : 'danger'\"></ax-badge>\n <span>\n {{ 'english-lower-case-letter' | translate | async }}\n </span>\n </small>\n <small class=\"ax-hint-state\">\n <ax-badge [color]=\"isUseNumber().state ? 'success' : 'danger'\"></ax-badge\n ><span> {{ 'digits' | translate | async }} </span>\n </small>\n <small class=\"ax-hint-state\">\n <ax-badge [color]=\"isUseSpecialCharacter().state ? 'success' : 'danger'\"></ax-badge>\n <span>\n {{ 'special-character' | translate | async }}\n </span>\n </small>\n </div>\n}\n","import { AXBadgeModule } from '@acorex/components/badge';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXProgressBarModule } from '@acorex/components/progress-bar';\nimport { AXTranslationModule } from '@acorex/core/translation';\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, AXBadgeModule, AXTranslationModule];\n\n@NgModule({\n imports: [...MODULES, ...COMPONENT],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXPasswordBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAYA;;;;AAIG;AAsBG,MAAO,sBAAuB,SAAQ,OAAO,EAAC,yBAAiC,GAAE,eAAe,CAAC,CAAA;AArBvG,IAAA,WAAA,GAAA;;;QA0BY,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;AAyBxB;;AAhBC,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,MAAM;AACnB,YAAA,IAAI,CAAC,KAAK,GAAG,wBAAwB;;aAChC;AACL,YAAA,IAAI,CAAC,KAAK,GAAG,UAAU;AACvB,YAAA,IAAI,CAAC,KAAK,GAAG,oBAAoB;;;8GA1C1B,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EAbtB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAA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,OAAA,EAAA,CAPf,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,aAAa,EAAE,mBAAmB,EADnH,sBAAsB,EAAE,qCAAqC,CAAA,EAAA,OAAA,EAAA,CAA7D,sBAAsB,EAAE,qCAAqC,CAAA,EAAA,CAAA,CAAA;+GAQnE,mBAAmB,EAAA,OAAA,EAAA,CAJjB,OAAO,EAAK,SAAS,CAAA,EAAA,CAAA,CAAA;;2FAIvB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,GAAG,SAAS,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;AClBD;;AAEG;;;;"}
@@ -192,7 +192,7 @@ class AXQueryBuilderComponent {
192
192
  return item.id;
193
193
  }
194
194
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AXQueryBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
195
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: AXQueryBuilderComponent, isStandalone: true, selector: "ax-query-builder", inputs: { columnData: { classPropertyName: "columnData", publicName: "columnData", isSignal: true, isRequired: true, transformFunction: null }, queryData: { classPropertyName: "queryData", publicName: "queryData", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { queryData: "queryDataChange", onValueChanged: "onValueChanged" }, viewQueries: [{ propertyName: "selectBoxRef", first: true, predicate: ["reRender"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container\n *ngFor=\"let item of queryData(); let i = index; trackBy: trackById\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\"\n [ngTemplateOutlet]=\"query\"\n>\n</ng-container>\n\n<ng-template #query let-item let-index=\"index\">\n @if (item.condition) {\n <div class=\"ax-recursive-container\">\n <div class=\"ax-add-condition-container\">\n <ax-button-group selection=\"single\" (selectedButtonChange)=\"conditionHandler($event, item)\" color=\"primary\" class=\"ax-sm\">\n <ax-button-group-item data=\"and\" [selected]=\"item.condition === 'and'\" text=\"And\"> </ax-button-group-item>\n <ax-button-group-item data=\"or\" [selected]=\"item.condition === 'or'\" text=\"Or\"> </ax-button-group-item>\n </ax-button-group>\n <ax-button (onClick)=\"addRulesHandler(item)\" class=\"ax-sm\" color=\"primary\" look=\"blank\" text=\"Add Rules\"></ax-button>\n <ax-button (onClick)=\"addGroupHandler(item)\" class=\"ax-sm\" color=\"primary\" look=\"blank\" text=\"Add Group\"></ax-button>\n @if (index !== 0) {\n <ax-button look=\"blank\" (onClick)=\"removeGroupHandler(item)\" class=\"ax-sm\" color=\"danger\">\n <ax-icon icon=\"ax-icon ax-icon-trash\"></ax-icon>\n </ax-button>\n }\n </div>\n\n <ng-container *ngFor=\"let child of item.rules; trackBy: trackById\" [ngTemplateOutletContext]=\"{ $implicit: child }\" [ngTemplateOutlet]=\"query\">\n </ng-container>\n </div>\n } @else {\n <div class=\"ax-rules-container\">\n <div class=\"ax-input-rules-container\">\n <ax-select-box\n (onValueChanged)=\"columnDataHandler($event, item)\"\n valueField=\"field\"\n textField=\"label\"\n [dataSource]=\"columnData()\"\n placeholder=\"Select Field\"\n >\n </ax-select-box>\n\n <ax-select-box\n #reRender\n [disabled]=\"!item.field\"\n name=\"selectBoxOperator\"\n (onValueChanged)=\"operatorDataHandler($event, item)\"\n [dataSource]=\"ds\"\n placeholder=\"Select Operator\"\n >\n </ax-select-box>\n\n @switch (item.type) {\n @case ('boolean') {\n <div class=\"ax-boolean-value-input-container\">\n @for (boolean of item.inputValues; track $index) {\n <label>{{ boolean }}</label>\n <input name=\"same\" [value]=\"boolean\" (input)=\"booleanValueHandler($event, item)\" type=\"radio\" />\n }\n </div>\n }\n @case ('string') {\n <ax-text-box (onValueChanged)=\"stringValueHandler($event, item)\">\n <ax-clear-button></ax-clear-button>\n </ax-text-box>\n }\n @case ('number') {\n <ax-number-box (onValueChanged)=\"numberValueHandler($event, item)\"></ax-number-box>\n }\n @case ('date') {\n <ax-datetime-box format=\"yyyy/MM/dd\" (onValueChanged)=\"dateValueHandler($event, item)\">\n <ax-clear-button></ax-clear-button>\n </ax-datetime-box>\n }\n }\n </div>\n <ax-button (onClick)=\"removeRulesHandler(item)\" look=\"blank\" class=\"ax-md\" color=\"danger\">\n <ax-icon icon=\"ax-icon ax-icon-trash\"></ax-icon>\n </ax-button>\n </div>\n }\n</ng-template>\n", styles: ["ax-query-builder{border:1px solid rgba(var(--ax-sys-color-border-lightest-surface));border-radius:var(--ax-sys-border-radius);padding:1rem;width:100%;display:block}ax-query-builder .ax-add-condition-container{display:flex;gap:.5rem;margin-block:.5rem}ax-query-builder .ax-recursive-container{border-inline-start:1px solid rgba(var(--ax-sys-color-border-lightest-surface));padding-inline-start:1rem}ax-query-builder .ax-rules-container{display:flex;align-items:center;margin-block:.5rem}ax-query-builder .ax-rules-container .ax-input-rules-container{display:flex;align-items:center;gap:.5rem;width:100%}ax-query-builder .ax-rules-container:not(:last-child){margin-bottom:.5rem}ax-query-builder .ax-boolean-value-input-container{display:flex;gap:.5rem;align-items:center}\n"], dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXButtonGroupComponent, selector: "ax-button-group", inputs: ["disabled", "color", "look", "selection"], outputs: ["onBlur", "onFocus", "lookChange", "colorChange", "disabledChange", "onClick", "selectionChange", "selectedButtonChange"] }, { kind: "component", type: AXButtonGroupItemComponent, selector: "ax-button-group-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "component", type: AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: AXNumberBoxComponent, selector: "ax-number-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "changeOnScroll", "thousandsSeparator", "padDecimalZeros", "step", "decimals", "decimalStep", "showSpinButtons", "minValue", "maxValue", "class"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: AXDateTimeBoxComponent, selector: "ax-datetime-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "depth", "id", "type", "look", "holidayDates", "allowTyping", "format"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "onOpened", "onClosed", "readonlyChange", "disabledChange", "formatChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
195
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: AXQueryBuilderComponent, isStandalone: true, selector: "ax-query-builder", inputs: { columnData: { classPropertyName: "columnData", publicName: "columnData", isSignal: true, isRequired: true, transformFunction: null }, queryData: { classPropertyName: "queryData", publicName: "queryData", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { queryData: "queryDataChange", onValueChanged: "onValueChanged" }, viewQueries: [{ propertyName: "selectBoxRef", first: true, predicate: ["reRender"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container\n *ngFor=\"let item of queryData(); let i = index; trackBy: trackById\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\"\n [ngTemplateOutlet]=\"query\"\n>\n</ng-container>\n\n<ng-template #query let-item let-index=\"index\">\n @if (item.condition) {\n <div class=\"ax-recursive-container\">\n <div class=\"ax-add-condition-container\">\n <ax-button-group selection=\"single\" (selectedButtonChange)=\"conditionHandler($event, item)\" color=\"primary\" class=\"ax-sm\">\n <ax-button-group-item data=\"and\" [selected]=\"item.condition === 'and'\" text=\"And\"> </ax-button-group-item>\n <ax-button-group-item data=\"or\" [selected]=\"item.condition === 'or'\" text=\"Or\"> </ax-button-group-item>\n </ax-button-group>\n <ax-button (onClick)=\"addRulesHandler(item)\" class=\"ax-sm\" color=\"primary\" look=\"blank\" text=\"Add Rules\"></ax-button>\n <ax-button (onClick)=\"addGroupHandler(item)\" class=\"ax-sm\" color=\"primary\" look=\"blank\" text=\"Add Group\"></ax-button>\n @if (index !== 0) {\n <ax-button look=\"blank\" (onClick)=\"removeGroupHandler(item)\" class=\"ax-sm\" color=\"danger\">\n <ax-icon icon=\"ax-icon ax-icon-trash\"></ax-icon>\n </ax-button>\n }\n </div>\n\n <ng-container *ngFor=\"let child of item.rules; trackBy: trackById\" [ngTemplateOutletContext]=\"{ $implicit: child }\" [ngTemplateOutlet]=\"query\">\n </ng-container>\n </div>\n } @else {\n <div class=\"ax-rules-container\">\n <div class=\"ax-input-rules-container\">\n <ax-select-box\n (onValueChanged)=\"columnDataHandler($event, item)\"\n valueField=\"field\"\n textField=\"label\"\n [dataSource]=\"columnData()\"\n placeholder=\"Select Field\"\n >\n </ax-select-box>\n\n <ax-select-box\n #reRender\n [disabled]=\"!item.field\"\n name=\"selectBoxOperator\"\n (onValueChanged)=\"operatorDataHandler($event, item)\"\n [dataSource]=\"ds\"\n placeholder=\"Select Operator\"\n >\n </ax-select-box>\n\n @switch (item.type) {\n @case ('boolean') {\n <div class=\"ax-boolean-value-input-container\">\n @for (boolean of item.inputValues; track $index) {\n <label>{{ boolean }}</label>\n <input name=\"same\" [value]=\"boolean\" (input)=\"booleanValueHandler($event, item)\" type=\"radio\" />\n }\n </div>\n }\n @case ('string') {\n <ax-text-box (onValueChanged)=\"stringValueHandler($event, item)\">\n <ax-clear-button></ax-clear-button>\n </ax-text-box>\n }\n @case ('number') {\n <ax-number-box (onValueChanged)=\"numberValueHandler($event, item)\"></ax-number-box>\n }\n @case ('date') {\n <ax-datetime-box format=\"yyyy/MM/dd\" (onValueChanged)=\"dateValueHandler($event, item)\">\n <ax-clear-button></ax-clear-button>\n </ax-datetime-box>\n }\n }\n </div>\n <ax-button (onClick)=\"removeRulesHandler(item)\" look=\"blank\" class=\"ax-md\" color=\"danger\">\n <ax-icon icon=\"ax-icon ax-icon-trash\"></ax-icon>\n </ax-button>\n </div>\n }\n</ng-template>\n", styles: ["ax-query-builder{border:1px solid rgba(var(--ax-sys-color-border-lightest-surface));border-radius:var(--ax-sys-border-radius);padding:1rem;width:100%;display:block}ax-query-builder .ax-add-condition-container{display:flex;gap:.5rem;margin-block:.5rem}ax-query-builder .ax-recursive-container{border-inline-start:1px solid rgba(var(--ax-sys-color-border-lightest-surface));padding-inline-start:1rem}ax-query-builder .ax-rules-container{display:flex;align-items:center;margin-block:.5rem}ax-query-builder .ax-rules-container .ax-input-rules-container{display:flex;align-items:center;gap:.5rem;width:100%}ax-query-builder .ax-rules-container:not(:last-child){margin-bottom:.5rem}ax-query-builder .ax-boolean-value-input-container{display:flex;gap:.5rem;align-items:center}\n"], dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXButtonGroupComponent, selector: "ax-button-group", inputs: ["disabled", "color", "look", "selection"], outputs: ["onBlur", "onFocus", "lookChange", "colorChange", "disabledChange", "onClick", "selectionChange", "selectedButtonChange"] }, { kind: "component", type: AXButtonGroupItemComponent, selector: "ax-button-group-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "component", type: AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: AXNumberBoxComponent, selector: "ax-number-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "type", "changeOnScroll", "thousandsSeparator", "padDecimalZeros", "step", "decimals", "decimalStep", "showSpinButtons", "minValue", "maxValue", "class"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: AXDateTimeBoxComponent, selector: "ax-datetime-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "depth", "id", "type", "look", "holidayDates", "allowTyping", "format"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "onOpened", "onClosed", "readonlyChange", "disabledChange", "formatChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
196
196
  }
197
197
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AXQueryBuilderComponent, decorators: [{
198
198
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-query-builder.mjs","sources":["../../../../libs/components/query-builder/src/lib/query-builder.component.ts","../../../../libs/components/query-builder/src/lib/query-builder.component.html","../../../../libs/components/query-builder/src/lib/query-builder.module.ts","../../../../libs/components/query-builder/src/acorex-components-query-builder.ts"],"sourcesContent":["import { AXButtonComponent } from '@acorex/components/button';\nimport { AXButtonGroupComponent, AXButtonGroupItemComponent } from '@acorex/components/button-group';\nimport { AXDataSource, AXValueChangedEvent } from '@acorex/components/common';\nimport { AXDateTimeBoxComponent } from '@acorex/components/datetime-box';\nimport { AXDecoratorClearButtonComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';\nimport { AXNumberBoxComponent } from '@acorex/components/number-box';\nimport { AXSelectBoxComponent } from '@acorex/components/select-box';\nimport { AXTextBoxComponent } from '@acorex/components/text-box';\nimport { NgFor, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, effect, input, model, output, signal, viewChild, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ax-query-builder',\n templateUrl: './query-builder.component.html',\n styleUrls: ['./query-builder.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgFor,\n NgTemplateOutlet,\n AXButtonGroupComponent,\n AXButtonGroupItemComponent,\n AXButtonComponent,\n AXDecoratorIconComponent,\n AXSelectBoxComponent,\n AXTextBoxComponent,\n AXDecoratorClearButtonComponent,\n AXNumberBoxComponent,\n AXDateTimeBoxComponent,\n ],\n})\nexport class AXQueryBuilderComponent {\n columnData = input.required<any[]>();\n queryData = model.required<any[]>();\n onValueChanged = output<any[]>();\n protected selectBoxRef = viewChild<AXSelectBoxComponent>('reRender');\n protected selectedItem = signal<any>(null);\n\n ds = new AXDataSource({\n load: async (e) => {\n return {\n items: this.operators[this.selectedItem().type].slice(e.skip, (e.skip ?? 0) + (e.take ?? 0)),\n total: this.operators[this.selectedItem().type].length,\n };\n },\n key: 'id',\n pageSize: 20,\n });\n\n protected operators = {\n string: [\n 'Starts With',\n 'Does Not Start With',\n 'Ends With',\n 'Does Not End With',\n 'Contains',\n 'Does Not Contain',\n 'Equal',\n 'Not Equal',\n 'In',\n 'Not In',\n 'Is Empty',\n 'Is Not Empty',\n 'Is Null',\n 'Is Not Null',\n ],\n boolean: ['Equal', 'Not Equal'],\n number: [\n 'Equal',\n 'Greater Than Or Equal',\n 'Greater Than',\n 'Between',\n 'Less Than',\n 'Not Between',\n 'Less Than Or Equal',\n 'Not Equal',\n 'In',\n 'Not In',\n 'Is Null',\n 'Is Not Null',\n ],\n date: ['Equal', 'Greater Than', 'Greater Than Or Equal', 'Less Than', 'Less Than Or Equal', 'Not Equal', 'Between', 'Not Between'],\n };\n\n #eff = effect(() => {\n this.onValueChanged.emit(this.queryData());\n });\n\n protected conditionHandler(e: AXButtonGroupItemComponent, i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.condition = e.data;\n return copy;\n });\n }\n\n protected columnDataHandler(e: AXValueChangedEvent<any>, i) {\n this.selectedItem.set(i);\n const selectedItem = e.component.selectedItems[0];\n\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.label = selectedItem.label;\n find.field = selectedItem.field;\n find.type = selectedItem.type;\n if (selectedItem.values) find.inputValues = selectedItem.values;\n return copy;\n });\n\n this.selectBoxRef().refresh();\n this.selectBoxRef().reset();\n }\n\n protected operatorDataHandler(e, i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.operator = e.value;\n return copy;\n });\n }\n\n private recursiveFind(array, predicate, nestedKey) {\n for (const item of array) {\n if (predicate(item)) {\n return item;\n }\n if (Array.isArray(item[nestedKey])) {\n const found = this.recursiveFind(item[nestedKey], predicate, nestedKey);\n if (found) {\n return found;\n }\n }\n }\n return null;\n }\n\n private recursiveRemove(array: any[], predicate: (item: any) => boolean, nestedKey: string): any[] {\n return array\n .filter((item) => !predicate(item))\n .map((item) => ({\n ...item,\n [nestedKey]: Array.isArray(item[nestedKey]) ? this.recursiveRemove(item[nestedKey], predicate, nestedKey) : item[nestedKey],\n }));\n }\n\n protected addRulesHandler(i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.rules.push({\n id: Math.random(),\n });\n return copy;\n });\n }\n\n protected addGroupHandler(i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.rules.push({\n id: Math.random(),\n condition: 'and',\n rules: [{ id: Math.random() }],\n });\n return copy;\n });\n }\n\n protected booleanValueHandler(e, i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.value = e.target.value;\n return copy;\n });\n }\n\n protected stringValueHandler(e, i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.value = e.value;\n return copy;\n });\n }\n\n protected numberValueHandler(e, i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.value = e.value;\n return copy;\n });\n }\n\n protected dateValueHandler(e, i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.value = e.value;\n return copy;\n });\n }\n\n protected removeGroupHandler(i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const filter = this.recursiveRemove(copy, (item) => item.id === i.id, 'rules');\n return filter;\n });\n }\n\n protected removeRulesHandler(i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const filter = this.recursiveRemove(copy, (item) => item.id === i.id, 'rules');\n return filter;\n });\n }\n\n protected trackById(_: number, item: any): number {\n return item.id;\n }\n}\n","<ng-container\n *ngFor=\"let item of queryData(); let i = index; trackBy: trackById\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\"\n [ngTemplateOutlet]=\"query\"\n>\n</ng-container>\n\n<ng-template #query let-item let-index=\"index\">\n @if (item.condition) {\n <div class=\"ax-recursive-container\">\n <div class=\"ax-add-condition-container\">\n <ax-button-group selection=\"single\" (selectedButtonChange)=\"conditionHandler($event, item)\" color=\"primary\" class=\"ax-sm\">\n <ax-button-group-item data=\"and\" [selected]=\"item.condition === 'and'\" text=\"And\"> </ax-button-group-item>\n <ax-button-group-item data=\"or\" [selected]=\"item.condition === 'or'\" text=\"Or\"> </ax-button-group-item>\n </ax-button-group>\n <ax-button (onClick)=\"addRulesHandler(item)\" class=\"ax-sm\" color=\"primary\" look=\"blank\" text=\"Add Rules\"></ax-button>\n <ax-button (onClick)=\"addGroupHandler(item)\" class=\"ax-sm\" color=\"primary\" look=\"blank\" text=\"Add Group\"></ax-button>\n @if (index !== 0) {\n <ax-button look=\"blank\" (onClick)=\"removeGroupHandler(item)\" class=\"ax-sm\" color=\"danger\">\n <ax-icon icon=\"ax-icon ax-icon-trash\"></ax-icon>\n </ax-button>\n }\n </div>\n\n <ng-container *ngFor=\"let child of item.rules; trackBy: trackById\" [ngTemplateOutletContext]=\"{ $implicit: child }\" [ngTemplateOutlet]=\"query\">\n </ng-container>\n </div>\n } @else {\n <div class=\"ax-rules-container\">\n <div class=\"ax-input-rules-container\">\n <ax-select-box\n (onValueChanged)=\"columnDataHandler($event, item)\"\n valueField=\"field\"\n textField=\"label\"\n [dataSource]=\"columnData()\"\n placeholder=\"Select Field\"\n >\n </ax-select-box>\n\n <ax-select-box\n #reRender\n [disabled]=\"!item.field\"\n name=\"selectBoxOperator\"\n (onValueChanged)=\"operatorDataHandler($event, item)\"\n [dataSource]=\"ds\"\n placeholder=\"Select Operator\"\n >\n </ax-select-box>\n\n @switch (item.type) {\n @case ('boolean') {\n <div class=\"ax-boolean-value-input-container\">\n @for (boolean of item.inputValues; track $index) {\n <label>{{ boolean }}</label>\n <input name=\"same\" [value]=\"boolean\" (input)=\"booleanValueHandler($event, item)\" type=\"radio\" />\n }\n </div>\n }\n @case ('string') {\n <ax-text-box (onValueChanged)=\"stringValueHandler($event, item)\">\n <ax-clear-button></ax-clear-button>\n </ax-text-box>\n }\n @case ('number') {\n <ax-number-box (onValueChanged)=\"numberValueHandler($event, item)\"></ax-number-box>\n }\n @case ('date') {\n <ax-datetime-box format=\"yyyy/MM/dd\" (onValueChanged)=\"dateValueHandler($event, item)\">\n <ax-clear-button></ax-clear-button>\n </ax-datetime-box>\n }\n }\n </div>\n <ax-button (onClick)=\"removeRulesHandler(item)\" look=\"blank\" class=\"ax-md\" color=\"danger\">\n <ax-icon icon=\"ax-icon ax-icon-trash\"></ax-icon>\n </ax-button>\n </div>\n }\n</ng-template>\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXButtonGroupModule } from '@acorex/components/button-group';\nimport { AXDateTimeBoxModule } from '@acorex/components/datetime-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXNumberBoxModule } from '@acorex/components/number-box';\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXQueryBuilderComponent } from './query-builder.component';\n\nconst COMPONENT = [AXQueryBuilderComponent];\n\nconst MODULES = [\n AXButtonGroupModule,\n AXDecoratorModule,\n AXSelectBoxModule,\n AXButtonModule,\n AXTextBoxModule,\n AXNumberBoxModule,\n AXDateTimeBoxModule,\n CommonModule,\n];\n\n@NgModule({\n imports: [...MODULES, ...COMPONENT],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXQueryBuilderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MA+Ba,uBAAuB,CAAA;AApBpC,IAAA,WAAA,GAAA;AAqBE,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,QAAQ,EAAS;AACpC,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAS;QACnC,IAAc,CAAA,cAAA,GAAG,MAAM,EAAS;AACtB,QAAA,IAAA,CAAA,YAAY,GAAG,SAAS,CAAuB,UAAU,CAAC;AAC1D,QAAA,IAAA,CAAA,YAAY,GAAG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O,EAAE,GAAG,SAAS,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;AC5BD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-query-builder.mjs","sources":["../../../../libs/components/query-builder/src/lib/query-builder.component.ts","../../../../libs/components/query-builder/src/lib/query-builder.component.html","../../../../libs/components/query-builder/src/lib/query-builder.module.ts","../../../../libs/components/query-builder/src/acorex-components-query-builder.ts"],"sourcesContent":["import { AXButtonComponent } from '@acorex/components/button';\nimport { AXButtonGroupComponent, AXButtonGroupItemComponent } from '@acorex/components/button-group';\nimport { AXDataSource, AXValueChangedEvent } from '@acorex/components/common';\nimport { AXDateTimeBoxComponent } from '@acorex/components/datetime-box';\nimport { AXDecoratorClearButtonComponent, AXDecoratorIconComponent } from '@acorex/components/decorators';\nimport { AXNumberBoxComponent } from '@acorex/components/number-box';\nimport { AXSelectBoxComponent } from '@acorex/components/select-box';\nimport { AXTextBoxComponent } from '@acorex/components/text-box';\nimport { NgFor, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, effect, input, model, output, signal, viewChild, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ax-query-builder',\n templateUrl: './query-builder.component.html',\n styleUrls: ['./query-builder.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgFor,\n NgTemplateOutlet,\n AXButtonGroupComponent,\n AXButtonGroupItemComponent,\n AXButtonComponent,\n AXDecoratorIconComponent,\n AXSelectBoxComponent,\n AXTextBoxComponent,\n AXDecoratorClearButtonComponent,\n AXNumberBoxComponent,\n AXDateTimeBoxComponent,\n ],\n})\nexport class AXQueryBuilderComponent {\n columnData = input.required<any[]>();\n queryData = model.required<any[]>();\n onValueChanged = output<any[]>();\n protected selectBoxRef = viewChild<AXSelectBoxComponent>('reRender');\n protected selectedItem = signal<any>(null);\n\n ds = new AXDataSource({\n load: async (e) => {\n return {\n items: this.operators[this.selectedItem().type].slice(e.skip, (e.skip ?? 0) + (e.take ?? 0)),\n total: this.operators[this.selectedItem().type].length,\n };\n },\n key: 'id',\n pageSize: 20,\n });\n\n protected operators = {\n string: [\n 'Starts With',\n 'Does Not Start With',\n 'Ends With',\n 'Does Not End With',\n 'Contains',\n 'Does Not Contain',\n 'Equal',\n 'Not Equal',\n 'In',\n 'Not In',\n 'Is Empty',\n 'Is Not Empty',\n 'Is Null',\n 'Is Not Null',\n ],\n boolean: ['Equal', 'Not Equal'],\n number: [\n 'Equal',\n 'Greater Than Or Equal',\n 'Greater Than',\n 'Between',\n 'Less Than',\n 'Not Between',\n 'Less Than Or Equal',\n 'Not Equal',\n 'In',\n 'Not In',\n 'Is Null',\n 'Is Not Null',\n ],\n date: ['Equal', 'Greater Than', 'Greater Than Or Equal', 'Less Than', 'Less Than Or Equal', 'Not Equal', 'Between', 'Not Between'],\n };\n\n #eff = effect(() => {\n this.onValueChanged.emit(this.queryData());\n });\n\n protected conditionHandler(e: AXButtonGroupItemComponent, i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.condition = e.data;\n return copy;\n });\n }\n\n protected columnDataHandler(e: AXValueChangedEvent<any>, i) {\n this.selectedItem.set(i);\n const selectedItem = e.component.selectedItems[0];\n\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.label = selectedItem.label;\n find.field = selectedItem.field;\n find.type = selectedItem.type;\n if (selectedItem.values) find.inputValues = selectedItem.values;\n return copy;\n });\n\n this.selectBoxRef().refresh();\n this.selectBoxRef().reset();\n }\n\n protected operatorDataHandler(e, i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.operator = e.value;\n return copy;\n });\n }\n\n private recursiveFind(array, predicate, nestedKey) {\n for (const item of array) {\n if (predicate(item)) {\n return item;\n }\n if (Array.isArray(item[nestedKey])) {\n const found = this.recursiveFind(item[nestedKey], predicate, nestedKey);\n if (found) {\n return found;\n }\n }\n }\n return null;\n }\n\n private recursiveRemove(array: any[], predicate: (item: any) => boolean, nestedKey: string): any[] {\n return array\n .filter((item) => !predicate(item))\n .map((item) => ({\n ...item,\n [nestedKey]: Array.isArray(item[nestedKey]) ? this.recursiveRemove(item[nestedKey], predicate, nestedKey) : item[nestedKey],\n }));\n }\n\n protected addRulesHandler(i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.rules.push({\n id: Math.random(),\n });\n return copy;\n });\n }\n\n protected addGroupHandler(i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.rules.push({\n id: Math.random(),\n condition: 'and',\n rules: [{ id: Math.random() }],\n });\n return copy;\n });\n }\n\n protected booleanValueHandler(e, i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.value = e.target.value;\n return copy;\n });\n }\n\n protected stringValueHandler(e, i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.value = e.value;\n return copy;\n });\n }\n\n protected numberValueHandler(e, i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.value = e.value;\n return copy;\n });\n }\n\n protected dateValueHandler(e, i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const find = this.recursiveFind(copy, (item) => item.id === i.id, 'rules');\n find.value = e.value;\n return copy;\n });\n }\n\n protected removeGroupHandler(i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const filter = this.recursiveRemove(copy, (item) => item.id === i.id, 'rules');\n return filter;\n });\n }\n\n protected removeRulesHandler(i) {\n this.queryData.update((prev) => {\n const copy = [...prev];\n const filter = this.recursiveRemove(copy, (item) => item.id === i.id, 'rules');\n return filter;\n });\n }\n\n protected trackById(_: number, item: any): number {\n return item.id;\n }\n}\n","<ng-container\n *ngFor=\"let item of queryData(); let i = index; trackBy: trackById\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: i }\"\n [ngTemplateOutlet]=\"query\"\n>\n</ng-container>\n\n<ng-template #query let-item let-index=\"index\">\n @if (item.condition) {\n <div class=\"ax-recursive-container\">\n <div class=\"ax-add-condition-container\">\n <ax-button-group selection=\"single\" (selectedButtonChange)=\"conditionHandler($event, item)\" color=\"primary\" class=\"ax-sm\">\n <ax-button-group-item data=\"and\" [selected]=\"item.condition === 'and'\" text=\"And\"> </ax-button-group-item>\n <ax-button-group-item data=\"or\" [selected]=\"item.condition === 'or'\" text=\"Or\"> </ax-button-group-item>\n </ax-button-group>\n <ax-button (onClick)=\"addRulesHandler(item)\" class=\"ax-sm\" color=\"primary\" look=\"blank\" text=\"Add Rules\"></ax-button>\n <ax-button (onClick)=\"addGroupHandler(item)\" class=\"ax-sm\" color=\"primary\" look=\"blank\" text=\"Add Group\"></ax-button>\n @if (index !== 0) {\n <ax-button look=\"blank\" (onClick)=\"removeGroupHandler(item)\" class=\"ax-sm\" color=\"danger\">\n <ax-icon icon=\"ax-icon ax-icon-trash\"></ax-icon>\n </ax-button>\n }\n </div>\n\n <ng-container *ngFor=\"let child of item.rules; trackBy: trackById\" [ngTemplateOutletContext]=\"{ $implicit: child }\" [ngTemplateOutlet]=\"query\">\n </ng-container>\n </div>\n } @else {\n <div class=\"ax-rules-container\">\n <div class=\"ax-input-rules-container\">\n <ax-select-box\n (onValueChanged)=\"columnDataHandler($event, item)\"\n valueField=\"field\"\n textField=\"label\"\n [dataSource]=\"columnData()\"\n placeholder=\"Select Field\"\n >\n </ax-select-box>\n\n <ax-select-box\n #reRender\n [disabled]=\"!item.field\"\n name=\"selectBoxOperator\"\n (onValueChanged)=\"operatorDataHandler($event, item)\"\n [dataSource]=\"ds\"\n placeholder=\"Select Operator\"\n >\n </ax-select-box>\n\n @switch (item.type) {\n @case ('boolean') {\n <div class=\"ax-boolean-value-input-container\">\n @for (boolean of item.inputValues; track $index) {\n <label>{{ boolean }}</label>\n <input name=\"same\" [value]=\"boolean\" (input)=\"booleanValueHandler($event, item)\" type=\"radio\" />\n }\n </div>\n }\n @case ('string') {\n <ax-text-box (onValueChanged)=\"stringValueHandler($event, item)\">\n <ax-clear-button></ax-clear-button>\n </ax-text-box>\n }\n @case ('number') {\n <ax-number-box (onValueChanged)=\"numberValueHandler($event, item)\"></ax-number-box>\n }\n @case ('date') {\n <ax-datetime-box format=\"yyyy/MM/dd\" (onValueChanged)=\"dateValueHandler($event, item)\">\n <ax-clear-button></ax-clear-button>\n </ax-datetime-box>\n }\n }\n </div>\n <ax-button (onClick)=\"removeRulesHandler(item)\" look=\"blank\" class=\"ax-md\" color=\"danger\">\n <ax-icon icon=\"ax-icon ax-icon-trash\"></ax-icon>\n </ax-button>\n </div>\n }\n</ng-template>\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXButtonGroupModule } from '@acorex/components/button-group';\nimport { AXDateTimeBoxModule } from '@acorex/components/datetime-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXNumberBoxModule } from '@acorex/components/number-box';\nimport { AXSelectBoxModule } from '@acorex/components/select-box';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXQueryBuilderComponent } from './query-builder.component';\n\nconst COMPONENT = [AXQueryBuilderComponent];\n\nconst MODULES = [\n AXButtonGroupModule,\n AXDecoratorModule,\n AXSelectBoxModule,\n AXButtonModule,\n AXTextBoxModule,\n AXNumberBoxModule,\n AXDateTimeBoxModule,\n CommonModule,\n];\n\n@NgModule({\n imports: [...MODULES, ...COMPONENT],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXQueryBuilderMod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AoB,YAf/B,mBAAmB;YACnB,iBAAiB;YACjB,iBAAiB;YACjB,cAAc;YACd,eAAe;YACf,iBAAiB;YACjB,mBAAmB;YACnB,YAAY,EAVK,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAAvB,uBAAuB,CAAA,EAAA,CAAA,CAAA;+GAkB7B,oBAAoB,EAAA,OAAA,EAAA,CAJlB,OAAO,EAAK,SAAS,CAAA,EAAA,CAAA,CAAA;;2FAIvB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,GAAG,SAAS,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;AC5BD;;AAEG;;;;"}
@@ -155,7 +155,10 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
155
155
  */
156
156
  this.calculatePos = computed(() => {
157
157
  if (this.isDual() && this.values()) {
158
- return [((this.values()[0] - this.min()) / this.range()) * 100, ((this.values()[1] - this.min()) / this.range()) * 100];
158
+ return [
159
+ ((this.values()[0] - this.min()) / this.range()) * 100,
160
+ ((this.values()[1] - this.min()) / this.range()) * 100,
161
+ ];
159
162
  }
160
163
  else {
161
164
  return ((this.values() - this.min()) / this.range()) * 100;
@@ -285,6 +288,16 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
285
288
  this.initializeValues();
286
289
  }
287
290
  }
291
+ /**
292
+ * @ignore
293
+ */
294
+ ngOnDestroy() {
295
+ super.ngOnDestroy();
296
+ window.removeEventListener('mousemove', this.moveListener);
297
+ window.removeEventListener('mouseup', this.endListener);
298
+ window.removeEventListener('touchmove', this.moveListener);
299
+ window.removeEventListener('touchend', this.endListener);
300
+ }
288
301
  /**
289
302
  * @ignore
290
303
  */
@@ -298,6 +311,7 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
298
311
  this.choosenHandler = circle;
299
312
  const moveListener = (moveEvent) => this.onMove(moveEvent, circle);
300
313
  const endListener = () => this.onEnd(moveListener, endListener);
314
+ [this.moveListener, this.endListener] = [moveListener, endListener];
301
315
  window.addEventListener('mousemove', moveListener);
302
316
  window.addEventListener('mouseup', endListener);
303
317
  window.addEventListener('touchmove', moveListener, { passive: true });
@@ -613,7 +627,11 @@ class AXRangeSliderComponent extends classes((MXValueComponent)) {
613
627
  * @ignore
614
628
  */
615
629
  get __hostClass() {
616
- return [`ax-${this.color()}-solid`, `${this.disabled ? 'ax-state-disabled' : ''}`, `${this.readonly ? 'ax-state-readonly' : ''}`];
630
+ return [
631
+ `ax-${this.color()}-solid`,
632
+ `${this.disabled ? 'ax-state-disabled' : ''}`,
633
+ `${this.readonly ? 'ax-state-readonly' : ''}`,
634
+ ];
617
635
  }
618
636
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AXRangeSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
619
637
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: AXRangeSliderComponent, isStandalone: true, selector: "ax-range-slider", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, snap: { classPropertyName: "snap", publicName: "snap", isSignal: true, isRequired: false, transformFunction: null }, tooltipMode: { classPropertyName: "tooltipMode", publicName: "tooltipMode", isSignal: true, isRequired: false, transformFunction: null }, snapMode: { classPropertyName: "snapMode", publicName: "snapMode", isSignal: true, isRequired: false, transformFunction: null }, hasStep: { classPropertyName: "hasStep", publicName: "hasStep", isSignal: true, isRequired: false, transformFunction: null }, hasSnap: { classPropertyName: "hasSnap", publicName: "hasSnap", isSignal: true, isRequired: false, transformFunction: null }, hasLable: { classPropertyName: "hasLable", publicName: "hasLable", isSignal: true, isRequired: false, transformFunction: null }, hasTooltip: { classPropertyName: "hasTooltip", publicName: "hasTooltip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { values: "valuesChange" }, host: { listeners: { "wheel": "onWheel($event)" }, properties: { "class": "this.__hostClass" } }, providers: [