@acorex/components 18.14.0 → 18.14.1-next.1
Sign up to get free protection for your applications and to get access to all the features.
- package/calendar/lib/calendar.component.d.ts +16 -5
- package/calendar/lib/calendar.module.d.ts +2 -1
- package/check-box/lib/check-box.component.d.ts +13 -5
- package/cron-job/README.md +3 -0
- package/cron-job/index.d.ts +8 -0
- package/cron-job/lib/cron-job-container/cron-job-container.component.d.ts +31 -0
- package/cron-job/lib/cron-job.module.d.ts +25 -0
- package/cron-job/lib/cron-job.service.d.ts +22 -0
- package/cron-job/lib/day/day.component.d.ts +22 -0
- package/cron-job/lib/day/day.model.d.ts +61 -0
- package/cron-job/lib/day/day.service.d.ts +17 -0
- package/cron-job/lib/hours/hours.component.d.ts +14 -0
- package/cron-job/lib/hours/hours.model.d.ts +5 -0
- package/cron-job/lib/hours/hours.service.d.ts +13 -0
- package/cron-job/lib/minutes/minutes.component.d.ts +14 -0
- package/cron-job/lib/minutes/minutes.model.d.ts +5 -0
- package/cron-job/lib/minutes/minutes.service.d.ts +13 -0
- package/cron-job/lib/month/month.component.d.ts +16 -0
- package/cron-job/lib/month/month.model.d.ts +5 -0
- package/cron-job/lib/month/month.service.d.ts +14 -0
- package/cron-job/lib/seconds/seconds.component.d.ts +14 -0
- package/cron-job/lib/seconds/seconds.model.d.ts +5 -0
- package/cron-job/lib/seconds/seconds.service.d.ts +13 -0
- package/cron-job/lib/types/iexpression.d.ts +3 -0
- package/cron-job/lib/types/shared.model.d.ts +37 -0
- package/cron-job/lib/year/year.component.d.ts +15 -0
- package/cron-job/lib/year/year.model.d.ts +16 -0
- package/cron-job/lib/year/year.service.d.ts +12 -0
- package/datetime-input/lib/datetime-input.component.d.ts +9 -0
- package/datetime-picker/lib/datetime-picker.component.d.ts +1 -0
- package/esm2022/alert/lib/alert.component.mjs +10 -14
- package/esm2022/avatar/lib/avatar.component.mjs +2 -2
- package/esm2022/calendar/lib/calendar.component.mjs +186 -158
- package/esm2022/calendar/lib/calendar.module.mjs +5 -4
- package/esm2022/check-box/lib/check-box.component.mjs +39 -22
- package/esm2022/common/lib/components/selection-base.component.class.mjs +2 -1
- package/esm2022/cron-job/acorex-components-cron-job.mjs +5 -0
- package/esm2022/cron-job/index.mjs +9 -0
- package/esm2022/cron-job/lib/cron-job-container/cron-job-container.component.mjs +90 -0
- package/esm2022/cron-job/lib/cron-job.module.mjs +80 -0
- package/esm2022/cron-job/lib/cron-job.service.mjs +60 -0
- package/esm2022/cron-job/lib/day/day.component.mjs +61 -0
- package/esm2022/cron-job/lib/day/day.model.mjs +88 -0
- package/esm2022/cron-job/lib/day/day.service.mjs +196 -0
- package/esm2022/cron-job/lib/hours/hours.component.mjs +38 -0
- package/esm2022/cron-job/lib/hours/hours.model.mjs +8 -0
- package/esm2022/cron-job/lib/hours/hours.service.mjs +82 -0
- package/esm2022/cron-job/lib/minutes/minutes.component.mjs +38 -0
- package/esm2022/cron-job/lib/minutes/minutes.model.mjs +8 -0
- package/esm2022/cron-job/lib/minutes/minutes.service.mjs +82 -0
- package/esm2022/cron-job/lib/month/month.component.mjs +47 -0
- package/esm2022/cron-job/lib/month/month.model.mjs +8 -0
- package/esm2022/cron-job/lib/month/month.service.mjs +96 -0
- package/esm2022/cron-job/lib/seconds/seconds.component.mjs +38 -0
- package/esm2022/cron-job/lib/seconds/seconds.model.mjs +8 -0
- package/esm2022/cron-job/lib/seconds/seconds.service.mjs +82 -0
- package/esm2022/cron-job/lib/types/iexpression.mjs +2 -0
- package/esm2022/cron-job/lib/types/shared.model.mjs +49 -0
- package/esm2022/cron-job/lib/year/year.component.mjs +45 -0
- package/esm2022/cron-job/lib/year/year.model.mjs +28 -0
- package/esm2022/cron-job/lib/year/year.service.mjs +82 -0
- package/esm2022/datetime-input/lib/datetime-input.component.mjs +38 -10
- package/esm2022/datetime-picker/lib/datetime-picker.component.mjs +17 -4
- package/esm2022/list/lib/list.component.mjs +3 -3
- package/esm2022/loading/lib/loading.component.mjs +7 -3
- package/esm2022/loading/lib/loading.service.mjs +3 -3
- package/esm2022/radio/lib/radio.component.mjs +3 -3
- package/esm2022/selection-list/lib/selection-list.component.mjs +18 -28
- package/esm2022/text-box/lib/text-box.component.mjs +11 -8
- package/esm2022/time-line/lib/time-line-item.component.mjs +3 -3
- package/esm2022/time-line/lib/time-line.component.mjs +18 -4
- package/fesm2022/acorex-components-action-sheet.mjs +1 -1
- package/fesm2022/acorex-components-alert.mjs +10 -14
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +1 -1
- package/fesm2022/acorex-components-avatar.mjs +3 -3
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +1 -1
- package/fesm2022/acorex-components-button-group.mjs +1 -1
- package/fesm2022/acorex-components-button.mjs +1 -1
- package/fesm2022/acorex-components-calendar.mjs +188 -160
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +39 -22
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +1 -1
- package/fesm2022/acorex-components-collapse.mjs +1 -1
- package/fesm2022/acorex-components-color-box.mjs +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +1 -1
- package/fesm2022/acorex-components-comment.mjs +1 -1
- package/fesm2022/acorex-components-common.mjs +2 -1
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +1 -1
- package/fesm2022/acorex-components-cron-job.mjs +1191 -0
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -0
- package/fesm2022/acorex-components-data-pager.mjs +1 -1
- package/fesm2022/acorex-components-data-table.mjs +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +36 -8
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +16 -3
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +1 -1
- package/fesm2022/acorex-components-dialog.mjs +1 -1
- package/fesm2022/acorex-components-drawer.mjs +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +1 -1
- package/fesm2022/acorex-components-form.mjs +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +1 -1
- package/fesm2022/acorex-components-image.mjs +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +1 -1
- package/fesm2022/acorex-components-label.mjs +1 -1
- package/fesm2022/acorex-components-list.mjs +3 -3
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +1 -1
- package/fesm2022/acorex-components-loading.mjs +9 -5
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +1 -1
- package/fesm2022/acorex-components-menu.mjs +1 -1
- package/fesm2022/acorex-components-nav.mjs +1 -1
- package/fesm2022/acorex-components-navbar.mjs +1 -1
- package/fesm2022/acorex-components-notification.mjs +1 -1
- package/fesm2022/acorex-components-number-box.mjs +1 -1
- package/fesm2022/acorex-components-otp.mjs +1 -1
- package/fesm2022/acorex-components-page.mjs +1 -1
- package/fesm2022/acorex-components-paint.mjs +1 -1
- package/fesm2022/acorex-components-password-box.mjs +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +1 -1
- package/fesm2022/acorex-components-picker.mjs +1 -1
- package/fesm2022/acorex-components-popover.mjs +1 -1
- package/fesm2022/acorex-components-popup.mjs +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +1 -1
- package/fesm2022/acorex-components-qrcode.mjs +1 -1
- package/fesm2022/acorex-components-radio.mjs +3 -3
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +1 -1
- package/fesm2022/acorex-components-result.mjs +1 -1
- package/fesm2022/acorex-components-routing-progress.mjs +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +1 -1
- package/fesm2022/acorex-components-search-box.mjs +1 -1
- package/fesm2022/acorex-components-select-box.mjs +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +18 -28
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +1 -1
- package/fesm2022/acorex-components-slider.mjs +1 -1
- package/fesm2022/acorex-components-step-wizard.mjs +1 -1
- package/fesm2022/acorex-components-switch.mjs +1 -1
- package/fesm2022/acorex-components-tabs.mjs +1 -1
- package/fesm2022/acorex-components-tag.mjs +1 -1
- package/fesm2022/acorex-components-text-area.mjs +1 -1
- package/fesm2022/acorex-components-text-box.mjs +10 -7
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-time-line.mjs +19 -5
- package/fesm2022/acorex-components-time-line.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +1 -1
- package/fesm2022/acorex-components-uploader.mjs +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +1 -1
- package/package.json +7 -1
- package/selection-list/lib/selection-list.component.d.ts +4 -12
- package/text-box/lib/text-box.component.d.ts +2 -2
- package/time-line/lib/time-line.component.d.ts +2 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-radio.mjs","sources":["../../../../libs/components/radio/src/lib/radio.component.ts","../../../../libs/components/radio/src/lib/radio.component.html","../../../../libs/components/radio/src/lib/radio.module.ts","../../../../libs/components/radio/src/acorex-components-radio.ts"],"sourcesContent":["import { MXValueComponent } from '@acorex/components/common';\nimport { AXLabelComponent } from '@acorex/components/label';\nimport {\n AfterViewChecked,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n HostListener,\n QueryList,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category\n */\n@Component({\n selector: 'ax-radio',\n templateUrl: './radio.component.html',\n styleUrls: ['./radio.component.scss'],\n inputs: ['disabled', 'tabIndex', 'readonly', 'value', 'name', 'id', 'checked'],\n outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXRadioComponent),\n multi: true,\n },\n ],\n})\nexport class AXRadioComponent extends MXValueComponent<boolean | null> implements AfterViewChecked {\n\n /** @ignore */\n @ContentChildren(AXLabelComponent)\n\n /** @ignore */\n private _labels: QueryList<AXLabelComponent>;\n\n /** @ignore */\n ngAfterViewChecked() {\n this._labels?.forEach((c) => {\n c.for = this;\n });\n }\n\n /** @ignore */\n @HostListener('click', ['$event'])\n\n /** @ignore */\n private _handleClick(e: UIEvent) {\n e.stopPropagation();\n if (this.readonly || this.disabled) {\n e.preventDefault();\n return false;\n }\n return true;\n }\n\n /** @ignore */\n protected _handleModelChange(value: boolean | null) {\n this.commitValue(value, true);\n }\n}\n","
|
1
|
+
{"version":3,"file":"acorex-components-radio.mjs","sources":["../../../../libs/components/radio/src/lib/radio.component.ts","../../../../libs/components/radio/src/lib/radio.component.html","../../../../libs/components/radio/src/lib/radio.module.ts","../../../../libs/components/radio/src/acorex-components-radio.ts"],"sourcesContent":["import { MXValueComponent } from '@acorex/components/common';\nimport { AXLabelComponent } from '@acorex/components/label';\nimport {\n AfterViewChecked,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n HostListener,\n QueryList,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category\n */\n@Component({\n selector: 'ax-radio',\n templateUrl: './radio.component.html',\n styleUrls: ['./radio.component.scss'],\n inputs: ['disabled', 'tabIndex', 'readonly', 'value', 'name', 'id', 'checked'],\n outputs: ['onBlur', 'onFocus', 'valueChange', 'onValueChanged'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXRadioComponent),\n multi: true,\n },\n ],\n})\nexport class AXRadioComponent extends MXValueComponent<boolean | null> implements AfterViewChecked {\n\n /** @ignore */\n @ContentChildren(AXLabelComponent)\n\n /** @ignore */\n private _labels: QueryList<AXLabelComponent>;\n\n /** @ignore */\n ngAfterViewChecked() {\n this._labels?.forEach((c) => {\n c.for = this;\n });\n }\n\n /** @ignore */\n @HostListener('click', ['$event'])\n\n /** @ignore */\n private _handleClick(e: UIEvent) {\n e.stopPropagation();\n if (this.readonly || this.disabled) {\n e.preventDefault();\n return false;\n }\n return true;\n }\n\n /** @ignore */\n protected _handleModelChange(value: boolean | null) {\n this.commitValue(value, true);\n }\n}\n","<div class=\"ax-radio-label\" [class.ax-state-readonly]=\"readonly\" [class.ax-state-disabled]=\"disabled\">\n <div class=\"ax-radio-start-side\">\n <input\n [id]=\"id\"\n class=\"ax-radio\"\n type=\"radio\"\n [ngModel]=\"value\"\n [checked]=\"value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabindex]=\"tabIndex\"\n (ngModelChange)=\"_handleModelChange($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n />\n </div>\n <div class=\"ax-radio-end-side\">\n <ng-content select=\"ax-label\"></ng-content>\n <ng-content select=\"ax-form-hint\"></ng-content>\n <span class=\"ax-error-container\"></span>\n </div>\n</div>\n<ng-content select=\"ax-validation-rule\"></ng-content>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXRadioComponent } from './radio.component';\n\nconst COMPONENT = [AXRadioComponent];\nconst MODULES = [CommonModule, FormsModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAcA;;;;AAIG;AAiBG,MAAO,gBAAiB,SAAQ,gBAAgC,CAAA;;IASpE,kBAAkB,GAAA;QAChB,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,KAAI;AAC1B,YAAA,CAAC,CAAC,GAAG,GAAG,IAAI;AACd,SAAC,CAAC;;;AAOI,IAAA,YAAY,CAAC,CAAU,EAAA;QAC7B,CAAC,CAAC,eAAe,EAAE;QACnB,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,EAAE;YAClC,CAAC,CAAC,cAAc,EAAE;AAClB,YAAA,OAAO,KAAK;;AAEd,QAAA,OAAO,IAAI;;;AAIH,IAAA,kBAAkB,CAAC,KAAqB,EAAA;AAChD,QAAA,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC;;8GA9BpB,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,EARhB,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,UAAA,EAAA,KAAA,EAAA,OAAA,EAAA,IAAA,EAAA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AA,OAAA,EAAA,CAClB,YAAY,EAAE,WAAW,aADvB,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAStB,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,aAAa,YAJX,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACbD;;AAEG;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXValueComponent, AXValuableComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { inject, NgZone, input, model, computed, effect, forwardRef,
|
3
|
+
import { inject, NgZone, input, model, computed, effect, forwardRef, HostBinding, HostListener, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
4
4
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
5
5
|
import { classes } from 'polytype';
|
6
6
|
import * as i1 from '@angular/common';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXValueComponent, AXValuableComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { input, computed, signal, viewChild, inject, Renderer2, effect, forwardRef,
|
3
|
+
import { input, computed, signal, viewChild, inject, Renderer2, effect, forwardRef, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
4
4
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
5
5
|
import { CommonModule } from '@angular/common';
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXBaseComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import {
|
3
|
+
import { HostBinding, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
|
6
6
|
/**
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXBaseComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import {
|
3
|
+
import { ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
4
4
|
import * as i1 from '@angular/router';
|
5
5
|
import { NavigationError, NavigationCancel, NavigationEnd, NavigationStart } from '@angular/router';
|
6
6
|
import { interval, delay } from 'rxjs';
|
@@ -2,7 +2,7 @@ import { MXBaseComponent } from '@acorex/components/common';
|
|
2
2
|
import { AXDateTimeRange, AXCalendarService, AXDateTimeModule } from '@acorex/core/date-time';
|
3
3
|
import { AXPlatform } from '@acorex/core/platform';
|
4
4
|
import * as i0 from '@angular/core';
|
5
|
-
import { inject,
|
5
|
+
import { inject, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
6
6
|
import * as i1 from '@angular/common';
|
7
7
|
import { CommonModule } from '@angular/common';
|
8
8
|
import * as i2 from '@acorex/components/button';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as i2 from '@acorex/components/common';
|
2
2
|
import { MXInputBaseValueComponent, MXLookComponent, AXSearchableComponent, AXComponent, AXFocusableComponent, AXClearableComponent, AXValuableComponent, AXNgModelDelayedValueChangedDirective } from '@acorex/components/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { forwardRef,
|
4
|
+
import { forwardRef, HostBinding, Input, Optional, Inject, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
5
5
|
import * as i1 from '@angular/forms';
|
6
6
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
7
7
|
import { classes } from 'polytype';
|
@@ -6,7 +6,7 @@ import { AXListComponent, AXListModule } from '@acorex/components/list';
|
|
6
6
|
import { AXSearchBoxComponent } from '@acorex/components/search-box';
|
7
7
|
import { AXUnsubscriber } from '@acorex/core/utils';
|
8
8
|
import * as i0 from '@angular/core';
|
9
|
-
import { inject, signal, forwardRef,
|
9
|
+
import { inject, signal, forwardRef, HostListener, ViewChild, ContentChild, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
10
10
|
import * as i2 from '@angular/forms';
|
11
11
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
12
12
|
import { last, findLastIndex, nth } from 'lodash-es';
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { MXSelectionValueComponent, AXComponent, AXFocusableComponent, AXValuableComponent,
|
1
|
+
import { MXSelectionValueComponent, AXComponent, AXFocusableComponent, AXValuableComponent, MXSelectionBridgeService, AX_SELECTION_DATA_TOKEN } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { forwardRef,
|
3
|
+
import { input, forwardRef, HostBinding, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
4
4
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
5
5
|
import * as i1 from '@angular/common';
|
6
6
|
import { CommonModule } from '@angular/common';
|
@@ -18,8 +18,17 @@ import { AXRadioModule } from '@acorex/components/radio';
|
|
18
18
|
class AXSelectionListComponent extends MXSelectionValueComponent {
|
19
19
|
constructor() {
|
20
20
|
super(...arguments);
|
21
|
-
/**
|
22
|
-
|
21
|
+
/**
|
22
|
+
* sets the direction of the component.
|
23
|
+
* @param {AXDirection} value
|
24
|
+
*/
|
25
|
+
this.direction = input('horizontal');
|
26
|
+
/**
|
27
|
+
* The custom template used for rendering content.
|
28
|
+
*
|
29
|
+
* @param {TemplateRef<unknown>} customTemplate
|
30
|
+
*/
|
31
|
+
this.customTemplate = input();
|
23
32
|
/** @ignore */
|
24
33
|
this._showControl = true;
|
25
34
|
/** @ignore */
|
@@ -33,21 +42,6 @@ class AXSelectionListComponent extends MXSelectionValueComponent {
|
|
33
42
|
*/
|
34
43
|
this.look = 'solid';
|
35
44
|
}
|
36
|
-
/**
|
37
|
-
* Gets or sets the direction of the component.
|
38
|
-
* @param {AXDirection} value
|
39
|
-
*/
|
40
|
-
get direction() {
|
41
|
-
return this._direction;
|
42
|
-
}
|
43
|
-
/**
|
44
|
-
* Sets the direction of the component.
|
45
|
-
*
|
46
|
-
* @param {AXDirection} v
|
47
|
-
*/
|
48
|
-
set direction(v) {
|
49
|
-
this._direction = v;
|
50
|
-
}
|
51
45
|
/**
|
52
46
|
* @param {void}
|
53
47
|
* Gets the current state of the control visibility.
|
@@ -78,6 +72,7 @@ class AXSelectionListComponent extends MXSelectionValueComponent {
|
|
78
72
|
* @param {any[]} v
|
79
73
|
*/
|
80
74
|
set items(v) {
|
75
|
+
this.clearSelectionCache();
|
81
76
|
this.setOption({
|
82
77
|
name: 'items',
|
83
78
|
value: v,
|
@@ -127,7 +122,7 @@ class AXSelectionListComponent extends MXSelectionValueComponent {
|
|
127
122
|
];
|
128
123
|
}
|
129
124
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXSelectionListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
130
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXSelectionListComponent, selector: "ax-selection-list", inputs: { id: "id", name: "name", disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", size: "size", value: "value", valueField: "valueField", textField: "textField",
|
125
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXSelectionListComponent, selector: "ax-selection-list", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: false, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: false, isRequired: false, transformFunction: null }, disabledField: { classPropertyName: "disabledField", publicName: "disabledField", isSignal: false, isRequired: false, transformFunction: null }, readonlyField: { classPropertyName: "readonlyField", publicName: "readonlyField", isSignal: false, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, customTemplate: { classPropertyName: "customTemplate", publicName: "customTemplate", isSignal: true, isRequired: false, transformFunction: null }, showControl: { classPropertyName: "showControl", publicName: "showControl", isSignal: false, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: false, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
|
131
126
|
{ provide: AXComponent, useExisting: AXSelectionListComponent },
|
132
127
|
{ provide: AXFocusableComponent, useExisting: AXSelectionListComponent },
|
133
128
|
{ provide: AXValuableComponent, useExisting: AXSelectionListComponent },
|
@@ -140,7 +135,7 @@ class AXSelectionListComponent extends MXSelectionValueComponent {
|
|
140
135
|
provide: AX_SELECTION_DATA_TOKEN,
|
141
136
|
useClass: MXSelectionBridgeService,
|
142
137
|
},
|
143
|
-
], usesInheritance: true, ngImport: i0, template: "<ul class=\"ax-{{ direction }}\">\n @for (item of items; let i = $index; track i) {\n <li [class.ax-state-selected]=\"isItemSelected(item)\" [class.ax-state-disabled]=\"item.disabled\">\n <label [class.ax-hide-control]=\"!showControl\">\n @if (multiple) {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-checkbox\"\n type=\"checkbox\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n } @else {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-radio\"\n type=\"radio\"\n [attr.name]=\"id\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n }\n\n @if (customTemplate) {\n <div>\n <ng-container *ngTemplateOutlet=\"customTemplate; context: { $implicit: { data: item } }\">\n </ng-container>\n </div>\n } @else {\n <div>\n {{ getDisplayText(item) }}\n @if (item[hintField]) {\n <p class=\"ax-hint-text\">\n {{ item[hintField] }}\n </p>\n }\n </div>\n }\n </label>\n </li>\n }\n</ul>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-dark ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,.ax-dark ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{background-color:rgba(var(--ax-color-primary-900),.25)}ax-selection-list.ax-look-divided ul.ax-vertical li:last-child label,ax-selection-list.ax-look-divided ul.ax-horizontal li:last-child label{border-style:none}ax-selection-list.ax-look-divided ul.ax-vertical>li label{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default));padding-bottom:.875rem}ax-selection-list.ax-look-divided ul.ax-horizontal>li label{border-inline-end-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul{gap:.75rem}ax-selection-list.ax-look-card ul.ax-vertical>li label,ax-selection-list.ax-look-card ul.ax-horizontal>li label{border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{border-color:rgba(var(--ax-color-primary-500));background-color:rgba(var(--ax-color-primary-50))}ax-selection-list.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-selection-list ul{display:flex;flex-wrap:wrap}ax-selection-list ul.ax-vertical{flex-direction:column}ax-selection-list ul.ax-horizontal{flex-direction:row}ax-selection-list ul li{cursor:pointer;-webkit-user-select:none;user-select:none}ax-selection-list ul li label{display:flex;cursor:pointer;align-items:flex-start;padding:.5rem .75rem}ax-selection-list ul li label.ax-hide-control .ax-checkbox,ax-selection-list ul li label.ax-hide-control .ax-radio{display:none}ax-selection-list ul li label.ax-hide-control>div{margin-inline-start:0px}ax-selection-list ul li label .ax-checkbox,ax-selection-list ul li label .ax-radio{margin-top:.25rem}ax-selection-list ul li label>div{margin-inline-start:.75rem;font-size:.875rem;line-height:1.25rem;font-weight:500}ax-selection-list ul li label>div .ax-hint-text{margin-top:.25rem;font-weight:400;color:rgb(var(--ax-color-text-default),.75)}ax-selection-list ul li.ax-state-disabled{opacity:.5}ax-selection-list ul li.ax-state-disabled *{cursor:not-allowed}ax-selection-list.ax-state-error{color:rgba(var(--ax-color-danger-500))}ax-selection-list.ax-state-error .ax-checkbox-checkmark,ax-selection-list.ax-state-error .ax-radio-checkmark{border-color:rgba(var(--ax-color-danger-500))}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
138
|
+
], usesInheritance: true, ngImport: i0, template: "<ul class=\"ax-{{ direction() }}\">\n @for (item of items; let i = $index; track i) {\n <li [class.ax-state-selected]=\"isItemSelected(item)\" [class.ax-state-disabled]=\"item.disabled\">\n <label [class.ax-hide-control]=\"!showControl\">\n @if (multiple) {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-checkbox\"\n type=\"checkbox\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n } @else {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-radio\"\n type=\"radio\"\n [attr.name]=\"id\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n }\n\n @if (customTemplate()) {\n <div>\n <ng-container *ngTemplateOutlet=\"customTemplate(); context: { $implicit: { data: item } }\">\n </ng-container>\n </div>\n } @else {\n <div>\n {{ getDisplayText(item) }}\n @if (item[hintField]) {\n <p class=\"ax-hint-text\">\n {{ item[hintField] }}\n </p>\n }\n </div>\n }\n </label>\n </li>\n }\n</ul>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-dark ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,.ax-dark ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{background-color:rgba(var(--ax-color-primary-900),.25)}ax-selection-list.ax-look-divided ul.ax-vertical li:last-child label,ax-selection-list.ax-look-divided ul.ax-horizontal li:last-child label{border-style:none}ax-selection-list.ax-look-divided ul.ax-vertical>li label{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default));padding-bottom:.875rem}ax-selection-list.ax-look-divided ul.ax-horizontal>li label{border-inline-end-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul{gap:.75rem}ax-selection-list.ax-look-card ul.ax-vertical>li label,ax-selection-list.ax-look-card ul.ax-horizontal>li label{border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{border-color:rgba(var(--ax-color-primary-500));background-color:rgba(var(--ax-color-primary-50))}ax-selection-list.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-selection-list ul{display:flex;flex-wrap:wrap}ax-selection-list ul.ax-vertical{flex-direction:column}ax-selection-list ul.ax-horizontal{flex-direction:row}ax-selection-list ul li{cursor:pointer;-webkit-user-select:none;user-select:none}ax-selection-list ul li label{display:flex;cursor:pointer;align-items:flex-start;padding:.5rem .75rem}ax-selection-list ul li label.ax-hide-control .ax-checkbox,ax-selection-list ul li label.ax-hide-control .ax-radio{display:none}ax-selection-list ul li label.ax-hide-control>div{margin-inline-start:0px}ax-selection-list ul li label .ax-checkbox,ax-selection-list ul li label .ax-radio{margin-top:.25rem}ax-selection-list ul li label>div{margin-inline-start:.75rem;font-size:.875rem;line-height:1.25rem;font-weight:500}ax-selection-list ul li label>div .ax-hint-text{margin-top:.25rem;font-weight:400;color:rgb(var(--ax-color-text-default),.75)}ax-selection-list ul li.ax-state-disabled{opacity:.5}ax-selection-list ul li.ax-state-disabled *{cursor:not-allowed}ax-selection-list.ax-state-error{color:rgba(var(--ax-color-danger-500))}ax-selection-list.ax-state-error .ax-checkbox-checkmark,ax-selection-list.ax-state-error .ax-radio-checkmark{border-color:rgba(var(--ax-color-danger-500))}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
144
139
|
}
|
145
140
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXSelectionListComponent, decorators: [{
|
146
141
|
type: Component,
|
@@ -154,7 +149,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
154
149
|
'value',
|
155
150
|
'valueField',
|
156
151
|
'textField',
|
157
|
-
'hintField',
|
158
152
|
'disabledField',
|
159
153
|
'readonlyField',
|
160
154
|
'multiple',
|
@@ -171,12 +165,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
171
165
|
provide: AX_SELECTION_DATA_TOKEN,
|
172
166
|
useClass: MXSelectionBridgeService,
|
173
167
|
},
|
174
|
-
], template: "<ul class=\"ax-{{ direction }}\">\n @for (item of items; let i = $index; track i) {\n <li [class.ax-state-selected]=\"isItemSelected(item)\" [class.ax-state-disabled]=\"item.disabled\">\n <label [class.ax-hide-control]=\"!showControl\">\n @if (multiple) {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-checkbox\"\n type=\"checkbox\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n } @else {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-radio\"\n type=\"radio\"\n [attr.name]=\"id\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n }\n\n @if (customTemplate) {\n <div>\n <ng-container *ngTemplateOutlet=\"customTemplate; context: { $implicit: { data: item } }\">\n </ng-container>\n </div>\n } @else {\n <div>\n {{ getDisplayText(item) }}\n @if (item[hintField]) {\n <p class=\"ax-hint-text\">\n {{ item[hintField] }}\n </p>\n }\n </div>\n }\n </label>\n </li>\n }\n</ul>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-dark ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,.ax-dark ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{background-color:rgba(var(--ax-color-primary-900),.25)}ax-selection-list.ax-look-divided ul.ax-vertical li:last-child label,ax-selection-list.ax-look-divided ul.ax-horizontal li:last-child label{border-style:none}ax-selection-list.ax-look-divided ul.ax-vertical>li label{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default));padding-bottom:.875rem}ax-selection-list.ax-look-divided ul.ax-horizontal>li label{border-inline-end-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul{gap:.75rem}ax-selection-list.ax-look-card ul.ax-vertical>li label,ax-selection-list.ax-look-card ul.ax-horizontal>li label{border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{border-color:rgba(var(--ax-color-primary-500));background-color:rgba(var(--ax-color-primary-50))}ax-selection-list.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-selection-list ul{display:flex;flex-wrap:wrap}ax-selection-list ul.ax-vertical{flex-direction:column}ax-selection-list ul.ax-horizontal{flex-direction:row}ax-selection-list ul li{cursor:pointer;-webkit-user-select:none;user-select:none}ax-selection-list ul li label{display:flex;cursor:pointer;align-items:flex-start;padding:.5rem .75rem}ax-selection-list ul li label.ax-hide-control .ax-checkbox,ax-selection-list ul li label.ax-hide-control .ax-radio{display:none}ax-selection-list ul li label.ax-hide-control>div{margin-inline-start:0px}ax-selection-list ul li label .ax-checkbox,ax-selection-list ul li label .ax-radio{margin-top:.25rem}ax-selection-list ul li label>div{margin-inline-start:.75rem;font-size:.875rem;line-height:1.25rem;font-weight:500}ax-selection-list ul li label>div .ax-hint-text{margin-top:.25rem;font-weight:400;color:rgb(var(--ax-color-text-default),.75)}ax-selection-list ul li.ax-state-disabled{opacity:.5}ax-selection-list ul li.ax-state-disabled *{cursor:not-allowed}ax-selection-list.ax-state-error{color:rgba(var(--ax-color-danger-500))}ax-selection-list.ax-state-error .ax-checkbox-checkmark,ax-selection-list.ax-state-error .ax-radio-checkmark{border-color:rgba(var(--ax-color-danger-500))}\n"] }]
|
175
|
-
}], propDecorators: {
|
176
|
-
type: Input
|
177
|
-
}], customTemplate: [{
|
178
|
-
type: Input
|
179
|
-
}], showControl: [{
|
168
|
+
], template: "<ul class=\"ax-{{ direction() }}\">\n @for (item of items; let i = $index; track i) {\n <li [class.ax-state-selected]=\"isItemSelected(item)\" [class.ax-state-disabled]=\"item.disabled\">\n <label [class.ax-hide-control]=\"!showControl\">\n @if (multiple) {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-checkbox\"\n type=\"checkbox\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n } @else {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-radio\"\n type=\"radio\"\n [attr.name]=\"id\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n }\n\n @if (customTemplate()) {\n <div>\n <ng-container *ngTemplateOutlet=\"customTemplate(); context: { $implicit: { data: item } }\">\n </ng-container>\n </div>\n } @else {\n <div>\n {{ getDisplayText(item) }}\n @if (item[hintField]) {\n <p class=\"ax-hint-text\">\n {{ item[hintField] }}\n </p>\n }\n </div>\n }\n </label>\n </li>\n }\n</ul>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n", styles: [".ax-dark ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,.ax-dark ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{background-color:rgba(var(--ax-color-primary-900),.25)}ax-selection-list.ax-look-divided ul.ax-vertical li:last-child label,ax-selection-list.ax-look-divided ul.ax-horizontal li:last-child label{border-style:none}ax-selection-list.ax-look-divided ul.ax-vertical>li label{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default));padding-bottom:.875rem}ax-selection-list.ax-look-divided ul.ax-horizontal>li label{border-inline-end-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul{gap:.75rem}ax-selection-list.ax-look-card ul.ax-vertical>li label,ax-selection-list.ax-look-card ul.ax-horizontal>li label{border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default))}ax-selection-list.ax-look-card ul.ax-vertical>li.ax-state-selected label,ax-selection-list.ax-look-card ul.ax-horizontal>li.ax-state-selected label{border-color:rgba(var(--ax-color-primary-500));background-color:rgba(var(--ax-color-primary-50))}ax-selection-list.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-selection-list ul{display:flex;flex-wrap:wrap}ax-selection-list ul.ax-vertical{flex-direction:column}ax-selection-list ul.ax-horizontal{flex-direction:row}ax-selection-list ul li{cursor:pointer;-webkit-user-select:none;user-select:none}ax-selection-list ul li label{display:flex;cursor:pointer;align-items:flex-start;padding:.5rem .75rem}ax-selection-list ul li label.ax-hide-control .ax-checkbox,ax-selection-list ul li label.ax-hide-control .ax-radio{display:none}ax-selection-list ul li label.ax-hide-control>div{margin-inline-start:0px}ax-selection-list ul li label .ax-checkbox,ax-selection-list ul li label .ax-radio{margin-top:.25rem}ax-selection-list ul li label>div{margin-inline-start:.75rem;font-size:.875rem;line-height:1.25rem;font-weight:500}ax-selection-list ul li label>div .ax-hint-text{margin-top:.25rem;font-weight:400;color:rgb(var(--ax-color-text-default),.75)}ax-selection-list ul li.ax-state-disabled{opacity:.5}ax-selection-list ul li.ax-state-disabled *{cursor:not-allowed}ax-selection-list.ax-state-error{color:rgba(var(--ax-color-danger-500))}ax-selection-list.ax-state-error .ax-checkbox-checkmark,ax-selection-list.ax-state-error .ax-radio-checkmark{border-color:rgba(var(--ax-color-danger-500))}\n"] }]
|
169
|
+
}], propDecorators: { showControl: [{
|
180
170
|
type: Input
|
181
171
|
}], items: [{
|
182
172
|
type: Input
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-selection-list.mjs","sources":["../../../../libs/components/selection-list/src/lib/selection-list.component.ts","../../../../libs/components/selection-list/src/lib/selection-list.component.html","../../../../libs/components/selection-list/src/lib/selection-list.module.ts","../../../../libs/components/selection-list/src/acorex-components-selection-list.ts"],"sourcesContent":["import {\n AXComponent,\n AXDirection,\n AXFocusableComponent,\n AXValuableComponent,\n AX_SELECTION_DATA_TOKEN,\n MXSelectionBridgeService,\n MXSelectionValueComponent,\n} from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n TemplateRef,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport type AXSelectionListLook = 'solid' | 'divided' | 'card';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-selection-list',\n templateUrl: './selection-list.component.html',\n styleUrls: ['./selection-list.component.scss'],\n inputs: [\n 'id',\n 'name',\n 'disabled',\n 'readonly',\n 'tabIndex',\n 'size',\n 'value',\n 'valueField',\n 'textField',\n 'hintField',\n 'disabledField',\n 'readonlyField',\n 'multiple',\n ],\n outputs: ['onValueChanged', 'onBlur', 'onFocus'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: AXComponent, useExisting: AXSelectionListComponent },\n { provide: AXFocusableComponent, useExisting: AXSelectionListComponent },\n { provide: AXValuableComponent, useExisting: AXSelectionListComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXSelectionListComponent),\n multi: true,\n },\n {\n provide: AX_SELECTION_DATA_TOKEN,\n useClass: MXSelectionBridgeService,\n },\n ],\n})\n\n//TODO: on parent click (card style) -> checkbox or radio change value\nexport class AXSelectionListComponent extends MXSelectionValueComponent {\n /** @ignore */\n private _direction: AXDirection = 'horizontal';\n\n /**\n * Gets or sets the direction of the component.\n * @param {AXDirection} value\n */\n @Input()\n public get direction(): AXDirection {\n return this._direction;\n }\n\n /**\n * Sets the direction of the component.\n *\n * @param {AXDirection} v\n */\n public set direction(v: AXDirection) {\n this._direction = v;\n }\n\n /**\n * The custom template used for rendering content.\n *\n * @param {TemplateRef<unknown>} customTemplate\n */\n @Input()\n customTemplate: TemplateRef<unknown>;\n\n /** @ignore */\n private _showControl = true;\n\n /**\n * @param {void}\n * Gets the current state of the control visibility.\n */\n @Input()\n public get showControl(): boolean {\n return this._showControl;\n }\n\n /**\n * @param {boolean} v\n * Sets the visibility state of the control.\n */\n public set showControl(v: boolean) {\n this.setOption({\n name: 'showControl',\n value: v,\n });\n }\n\n /** @ignore */\n private _items: any[] = [];\n\n /**\n * Gets the list of items.\n * @param {void}\n */\n @Input()\n\n /**\n * Gets the list of items.\n */\n public get items(): any[] {\n return this._items;\n }\n\n /**\n * Sets the list of items.\n *\n * @param {any[]} v\n */\n public set items(v: any[]) {\n this.setOption({\n name: 'items',\n value: v,\n });\n }\n\n /** @ignore */\n private _hintField = 'hint';\n\n /**\n * Gets the field used for displaying hints.\n */\n public get hintField(): string {\n return this._hintField;\n }\n\n /**\n * Sets the field used for displaying hints.\n *\n * @param {string} v\n */\n public set hintField(v: string) {\n this.setOption({\n name: 'hintField',\n value: v,\n });\n }\n\n /**\n * Retrieves an item from the list by its key.\n *\n * @param {unknown} key - The key to search for.\n */\n getItemByKey(key: unknown): unknown {\n return this.items.find((c) => c == this.value || c[this.valueField] == key);\n }\n\n /**\n * Defines the visual appearance of the selection list.\n *\n * @defaultValue 'solid'\n */\n @Input() look: AXSelectionListLook = 'solid';\n\n /** @ignore */\n protected _handleOnItemValueChange(item: any, e: Event) {\n if (this.readonly || this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n } else {\n (e.target as any).checked ? this.selectItems(item) : this.unselectItems(item);\n }\n }\n\n /** @ignore */\n @HostBinding('class')\n private get __hostClass(): string[] {\n return [\n `ax-look-${this.look}`,\n `${this.disabled ? 'ax-state-disabled' : ''}`,\n `${this.readonly ? 'ax-state-readonly' : ''}`,\n ];\n }\n}\n","<ul class=\"ax-{{ direction }}\">\n @for (item of items; let i = $index; track i) {\n <li [class.ax-state-selected]=\"isItemSelected(item)\" [class.ax-state-disabled]=\"item.disabled\">\n <label [class.ax-hide-control]=\"!showControl\">\n @if (multiple) {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-checkbox\"\n type=\"checkbox\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n } @else {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-radio\"\n type=\"radio\"\n [attr.name]=\"id\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n }\n\n @if (customTemplate) {\n <div>\n <ng-container *ngTemplateOutlet=\"customTemplate; context: { $implicit: { data: item } }\">\n </ng-container>\n </div>\n } @else {\n <div>\n {{ getDisplayText(item) }}\n @if (item[hintField]) {\n <p class=\"ax-hint-text\">\n {{ item[hintField] }}\n </p>\n }\n </div>\n }\n </label>\n </li>\n }\n</ul>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXSelectionListComponent } from './selection-list.component';\n\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXRadioModule } from '@acorex/components/radio';\n\n@NgModule({\n declarations: [AXSelectionListComponent],\n imports: [CommonModule, FormsModule, AXCheckBoxModule, AXRadioModule, AXLabelModule, AXFormModule],\n exports: [AXSelectionListComponent],\n providers: [],\n})\nexport class AXSelectionListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAsBA;;;;AAIG;AAuCH;AACM,MAAO,wBAAyB,SAAQ,yBAAyB,CAAA;AAvC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AA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAArB,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,qBAAqB,EALjB,YAAA,EAAA,CAAA,wBAAwB,CAC7B,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,aACvF,wBAAwB,CAAA,EAAA,CAAA,CAAA;+GAGvB,qBAAqB,EAAA,OAAA,EAAA,CAJtB,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAItF,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,wBAAwB,CAAC;AACxC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,CAAC;oBAClG,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACnC,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACfD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-selection-list.mjs","sources":["../../../../libs/components/selection-list/src/lib/selection-list.component.ts","../../../../libs/components/selection-list/src/lib/selection-list.component.html","../../../../libs/components/selection-list/src/lib/selection-list.module.ts","../../../../libs/components/selection-list/src/acorex-components-selection-list.ts"],"sourcesContent":["import {\n AXComponent,\n AXDirection,\n AXFocusableComponent,\n AXValuableComponent,\n AX_SELECTION_DATA_TOKEN,\n MXSelectionBridgeService,\n MXSelectionValueComponent,\n} from '@acorex/components/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n TemplateRef,\n ViewEncapsulation,\n forwardRef,\n input,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport type AXSelectionListLook = 'solid' | 'divided' | 'card';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-selection-list',\n templateUrl: './selection-list.component.html',\n styleUrls: ['./selection-list.component.scss'],\n inputs: [\n 'id',\n 'name',\n 'disabled',\n 'readonly',\n 'tabIndex',\n 'size',\n 'value',\n 'valueField',\n 'textField',\n 'disabledField',\n 'readonlyField',\n 'multiple',\n ],\n outputs: ['onValueChanged', 'onBlur', 'onFocus'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: AXComponent, useExisting: AXSelectionListComponent },\n { provide: AXFocusableComponent, useExisting: AXSelectionListComponent },\n { provide: AXValuableComponent, useExisting: AXSelectionListComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXSelectionListComponent),\n multi: true,\n },\n {\n provide: AX_SELECTION_DATA_TOKEN,\n useClass: MXSelectionBridgeService,\n },\n ],\n})\n\n//TODO: on parent click (card style) -> checkbox or radio change value\nexport class AXSelectionListComponent extends MXSelectionValueComponent {\n /**\n * sets the direction of the component.\n * @param {AXDirection} value\n */\n direction = input<AXDirection>('horizontal');\n\n /**\n * The custom template used for rendering content.\n *\n * @param {TemplateRef<unknown>} customTemplate\n */\n customTemplate = input<TemplateRef<unknown>>();\n\n /** @ignore */\n private _showControl = true;\n\n /**\n * @param {void}\n * Gets the current state of the control visibility.\n */\n @Input()\n public get showControl(): boolean {\n return this._showControl;\n }\n\n /**\n * @param {boolean} v\n * Sets the visibility state of the control.\n */\n public set showControl(v: boolean) {\n this.setOption({\n name: 'showControl',\n value: v,\n });\n }\n\n /** @ignore */\n private _items: any[] = [];\n\n /**\n * Gets the list of items.\n * @param {void}\n */\n @Input()\n public get items(): any[] {\n return this._items;\n }\n\n /**\n * Sets the list of items.\n *\n * @param {any[]} v\n */\n public set items(v: any[]) {\n this.clearSelectionCache();\n this.setOption({\n name: 'items',\n value: v,\n });\n }\n\n /** @ignore */\n private _hintField = 'hint';\n\n /**\n * Gets the field used for displaying hints.\n */\n public get hintField(): string {\n return this._hintField;\n }\n\n /**\n * Sets the field used for displaying hints.\n *\n * @param {string} v\n */\n public set hintField(v: string) {\n this.setOption({\n name: 'hintField',\n value: v,\n });\n }\n\n /**\n * Retrieves an item from the list by its key.\n *\n * @param {unknown} key - The key to search for.\n */\n getItemByKey(key: unknown): unknown {\n return this.items.find((c) => c == this.value || c[this.valueField] == key);\n }\n\n /**\n * Defines the visual appearance of the selection list.\n *\n * @defaultValue 'solid'\n */\n @Input() look: AXSelectionListLook = 'solid';\n\n /** @ignore */\n protected _handleOnItemValueChange(item: any, e: Event) {\n if (this.readonly || this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n } else {\n (e.target as any).checked ? this.selectItems(item) : this.unselectItems(item);\n }\n }\n\n /** @ignore */\n @HostBinding('class')\n private get __hostClass(): string[] {\n return [\n `ax-look-${this.look}`,\n `${this.disabled ? 'ax-state-disabled' : ''}`,\n `${this.readonly ? 'ax-state-readonly' : ''}`,\n ];\n }\n}\n","<ul class=\"ax-{{ direction() }}\">\n @for (item of items; let i = $index; track i) {\n <li [class.ax-state-selected]=\"isItemSelected(item)\" [class.ax-state-disabled]=\"item.disabled\">\n <label [class.ax-hide-control]=\"!showControl\">\n @if (multiple) {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-checkbox\"\n type=\"checkbox\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n } @else {\n <input\n [id]=\"id + '-' + i\"\n class=\"ax-radio\"\n type=\"radio\"\n [attr.name]=\"id\"\n (change)=\"_handleOnItemValueChange(item, $event)\"\n [checked]=\"isItemSelected(item)\"\n [disabled]=\"disabled || item[disabledField] || readonly\"\n />\n }\n\n @if (customTemplate()) {\n <div>\n <ng-container *ngTemplateOutlet=\"customTemplate(); context: { $implicit: { data: item } }\">\n </ng-container>\n </div>\n } @else {\n <div>\n {{ getDisplayText(item) }}\n @if (item[hintField]) {\n <p class=\"ax-hint-text\">\n {{ item[hintField] }}\n </p>\n }\n </div>\n }\n </label>\n </li>\n }\n</ul>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXSelectionListComponent } from './selection-list.component';\n\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXRadioModule } from '@acorex/components/radio';\n\n@NgModule({\n declarations: [AXSelectionListComponent],\n imports: [CommonModule, FormsModule, AXCheckBoxModule, AXRadioModule, AXLabelModule, AXFormModule],\n exports: [AXSelectionListComponent],\n providers: [],\n})\nexport class AXSelectionListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAuBA;;;;AAIG;AAsCH;AACM,MAAO,wBAAyB,SAAQ,yBAAyB,CAAA;AAtCvE,IAAA,WAAA,GAAA;;AAuCE;;;AAGG;AACH,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAc,YAAY,CAAC;AAE5C;;;;AAIG;QACH,IAAc,CAAA,cAAA,GAAG,KAAK,EAAwB;;QAGtC,IAAY,CAAA,YAAA,GAAG,IAAI;;QAuBnB,IAAM,CAAA,MAAA,GAAU,EAAE;;QAyBlB,IAAU,CAAA,UAAA,GAAG,MAAM;AA8B3B;;;;AAIG;QACM,IAAI,CAAA,IAAA,GAAwB,OAAO;AAqB7C;AAtGC;;;AAGG;AACH,IAAA,IACW,WAAW,GAAA;QACpB,OAAO,IAAI,CAAC,YAAY;;AAG1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
2
|
import { AXClickEvent, MXInteractiveComponent, MXColorComponent, NXComponent, AXCommonModule, AXRippleDirective } from '@acorex/components/common';
|
3
3
|
import { trigger, state, style, AUTO_STYLE, transition, animate } from '@angular/animations';
|
4
4
|
import * as i0 from '@angular/core';
|
5
|
-
import { model, output, signal, afterNextRender,
|
5
|
+
import { model, output, signal, afterNextRender, HostBinding, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
6
6
|
import { classes } from 'polytype';
|
7
7
|
import * as i2 from '@acorex/components/loading';
|
8
8
|
import { AXLoadingModule } from '@acorex/components/loading';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXBaseComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import {
|
3
|
+
import { HostBinding, Input, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
|
6
6
|
/**
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXValueComponent, MXColorComponent, AXValuableComponent, AXCommonModule } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { output, forwardRef,
|
3
|
+
import { output, forwardRef, HostBinding, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
4
4
|
import * as i1 from '@angular/forms';
|
5
5
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
6
6
|
import { classes } from 'polytype';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXBaseComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { signal, computed,
|
3
|
+
import { signal, computed, HostBinding, Input, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive, model, effect, contentChildren, NgModule } from '@angular/core';
|
4
4
|
import * as i1 from '@angular/common';
|
5
5
|
import { CommonModule } from '@angular/common';
|
6
6
|
import * as i2 from '@acorex/components/decorators';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXBaseComponent, MXValueComponent, MXColorComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { Component, forwardRef,
|
3
|
+
import { Component, forwardRef, HostBinding, Input, ChangeDetectionStrategy, ViewEncapsulation, NgModule } from '@angular/core';
|
4
4
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
5
5
|
import { classes } from 'polytype';
|
6
6
|
import { CommonModule } from '@angular/common';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Directive, EventEmitter,
|
2
|
+
import { Directive, EventEmitter, HostListener, Input, Output, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, HostBinding, ContentChildren, NgModule } from '@angular/core';
|
3
3
|
import { MXInteractiveComponent, AXEvent, MXBaseComponent } from '@acorex/components/common';
|
4
4
|
import * as i1 from '@angular/common';
|
5
5
|
import { CommonModule } from '@angular/common';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXColorLookComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import {
|
3
|
+
import { HostBinding, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
|
6
6
|
/**
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { MXInputBaseValueComponent, MXLookComponent, AXComponent, AXFocusableComponent, AXClearableComponent, AXValuableComponent } from '@acorex/components/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { forwardRef,
|
3
|
+
import { forwardRef, Input, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
4
4
|
import * as i1 from '@angular/forms';
|
5
5
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
6
6
|
import { classes } from 'polytype';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { EventEmitter,
|
2
|
+
import { EventEmitter, Input, Output, Directive, input, forwardRef, ContentChild, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
3
3
|
import { MXInputBaseValueComponent, MXLookComponent, AXComponent, AXFocusableComponent, AXClearableComponent, AXValuableComponent, AXCommonModule } from '@acorex/components/common';
|
4
4
|
import * as i1 from '@angular/forms';
|
5
5
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
@@ -49,6 +49,12 @@ class AXTextBoxComponent extends classes((MXInputBaseValueComponent), MXLookComp
|
|
49
49
|
this._updateOn = 'change';
|
50
50
|
/** @ignore */
|
51
51
|
this._maskOptions = { mask: null };
|
52
|
+
/**
|
53
|
+
* This will apply 'my-custom-class' and 'another-class' to the component's root element.
|
54
|
+
*/
|
55
|
+
// @Input('class')
|
56
|
+
// classNames: string;
|
57
|
+
this.classNames = input('', { alias: 'class' });
|
52
58
|
}
|
53
59
|
/**
|
54
60
|
* This public getter provides access to the `_maskOptions` property, which holds the configuration options for the mask feature.
|
@@ -108,7 +114,7 @@ class AXTextBoxComponent extends classes((MXInputBaseValueComponent), MXLookComp
|
|
108
114
|
this.commitValue(value, true);
|
109
115
|
}
|
110
116
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXTextBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
111
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXTextBoxComponent, selector: "ax-text-box", inputs: { disabled: "disabled", tabIndex: "tabIndex", readonly: "readonly", value: "value", state: "state", name: "name", id: "id", placeholder: "placeholder", maxLength: "maxLength", allowNull: "allowNull", type: "type", autoComplete: "autoComplete", look: "look", maskOptions:
|
117
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXTextBoxComponent, selector: "ax-text-box", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: false, isRequired: false, transformFunction: null }, allowNull: { classPropertyName: "allowNull", publicName: "allowNull", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, autoComplete: { classPropertyName: "autoComplete", publicName: "autoComplete", isSignal: false, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, maskOptions: { classPropertyName: "maskOptions", publicName: "mask-options", isSignal: false, isRequired: false, transformFunction: null }, classNames: { classPropertyName: "classNames", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onBlur: "onBlur", onFocus: "onFocus", valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", readonlyChange: "readonlyChange", disabledChange: "disabledChange", onKeyDown: "onKeyDown", onKeyUp: "onKeyUp", onKeyPress: "onKeyPress" }, providers: [
|
112
118
|
{ provide: AXComponent, useExisting: AXTextBoxComponent },
|
113
119
|
{ provide: AXFocusableComponent, useExisting: AXTextBoxComponent },
|
114
120
|
{ provide: AXClearableComponent, useExisting: AXTextBoxComponent },
|
@@ -118,7 +124,7 @@ class AXTextBoxComponent extends classes((MXInputBaseValueComponent), MXLookComp
|
|
118
124
|
useExisting: forwardRef(() => AXTextBoxComponent),
|
119
125
|
multi: true,
|
120
126
|
},
|
121
|
-
], queries: [{ propertyName: "_maskOptionsContent", first: true, predicate: AXMaskOptionsDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-editor-container ax-look-{{ look }} {{ classNames }}\" [class.ax-state-disabled]=\"disabled\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input\n #input\n class=\"ax-input\"\n [id]=\"id\"\n [name]=\"name\"\n [attr.autocomplete]=\"autoComplete\"\n [attr.type]=\"type\"\n [attr.placeholder]=\"placeholder\"\n [attr.maxlength]=\"maxLength\"\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 [ngModelOptions]=\"{ updateOn: _updateOn }\"\n (keydown)=\"emitOnKeydownEvent($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 <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", styles: ["ax-text-box{width:100%}ax-text-box input::-webkit-outer-spin-button,ax-text-box input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}ax-text-box input[type=number]{-moz-appearance:textfield}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
127
|
+
], queries: [{ propertyName: "_maskOptionsContent", first: true, predicate: AXMaskOptionsDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-editor-container ax-look-{{ look }} {{ classNames() }}\" [class.ax-state-disabled]=\"disabled\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input\n #input\n class=\"ax-input\"\n [id]=\"id\"\n [name]=\"name\"\n [attr.autocomplete]=\"autoComplete\"\n [attr.type]=\"type\"\n [attr.placeholder]=\"placeholder\"\n [attr.maxlength]=\"maxLength\"\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 [ngModelOptions]=\"{ updateOn: _updateOn }\"\n (keydown)=\"emitOnKeydownEvent($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 <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", styles: ["ax-text-box{width:100%}ax-text-box input::-webkit-outer-spin-button,ax-text-box input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}ax-text-box input[type=number]{-moz-appearance:textfield}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
122
128
|
}
|
123
129
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXTextBoxComponent, decorators: [{
|
124
130
|
type: Component,
|
@@ -157,7 +163,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
157
163
|
useExisting: forwardRef(() => AXTextBoxComponent),
|
158
164
|
multi: true,
|
159
165
|
},
|
160
|
-
], template: "<div class=\"ax-editor-container ax-look-{{ look }} {{ classNames }}\" [class.ax-state-disabled]=\"disabled\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input\n #input\n class=\"ax-input\"\n [id]=\"id\"\n [name]=\"name\"\n [attr.autocomplete]=\"autoComplete\"\n [attr.type]=\"type\"\n [attr.placeholder]=\"placeholder\"\n [attr.maxlength]=\"maxLength\"\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 [ngModelOptions]=\"{ updateOn: _updateOn }\"\n (keydown)=\"emitOnKeydownEvent($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 <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", styles: ["ax-text-box{width:100%}ax-text-box input::-webkit-outer-spin-button,ax-text-box input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}ax-text-box input[type=number]{-moz-appearance:textfield}\n"] }]
|
166
|
+
], template: "<div class=\"ax-editor-container ax-look-{{ look }} {{ classNames() }}\" [class.ax-state-disabled]=\"disabled\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input\n #input\n class=\"ax-input\"\n [id]=\"id\"\n [name]=\"name\"\n [attr.autocomplete]=\"autoComplete\"\n [attr.type]=\"type\"\n [attr.placeholder]=\"placeholder\"\n [attr.maxlength]=\"maxLength\"\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 [ngModelOptions]=\"{ updateOn: _updateOn }\"\n (keydown)=\"emitOnKeydownEvent($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 <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", styles: ["ax-text-box{width:100%}ax-text-box input::-webkit-outer-spin-button,ax-text-box input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}ax-text-box input[type=number]{-moz-appearance:textfield}\n"] }]
|
161
167
|
}], propDecorators: { input: [{
|
162
168
|
type: ViewChild,
|
163
169
|
args: ['input', { static: true }]
|
@@ -170,9 +176,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
170
176
|
type: Input
|
171
177
|
}], autoComplete: [{
|
172
178
|
type: Input
|
173
|
-
}], classNames: [{
|
174
|
-
type: Input,
|
175
|
-
args: ['class']
|
176
179
|
}], _maskOptionsContent: [{
|
177
180
|
type: ContentChild,
|
178
181
|
args: [AXMaskOptionsDirective, { static: true }]
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-text-box.mjs","sources":["../../../../libs/components/text-box/src/lib/mask-options.directive.ts","../../../../libs/components/text-box/src/lib/text-box.component.ts","../../../../libs/components/text-box/src/lib/text-box.component.html","../../../../libs/components/text-box/src/lib/text-box.module.ts","../../../../libs/components/text-box/src/acorex-components-text-box.ts"],"sourcesContent":["import { Directive, EventEmitter, Input, Output } from '@angular/core';\nimport { MaskedOptions } from 'imask';\n\nexport type AXMaskOptions = MaskedOptions | any;\n\nexport interface AXMaskOptionsInterface {\n mask: MaskedOptions | string | RegExp;\n updateValue?: (masked: string, unmasked: string) => void;\n}\n\n@Directive({\n selector: 'ax-mask-options',\n})\nexport class AXMaskOptionsDirective implements AXMaskOptionsInterface {\n private _mask: MaskedOptions | string | RegExp;\n\n @Output()\n public onMaskChange = new EventEmitter<MaskedOptions | string | RegExp>();\n\n @Input()\n public get mask(): MaskedOptions | string | RegExp {\n return this._mask;\n }\n\n public set mask(v: MaskedOptions | string | RegExp) {\n this._mask = v;\n this.onMaskChange.emit(v);\n }\n\n @Input()\n updateValue?: (masked: string, unmasked: string) => void;\n}\n","/* eslint-disable @angular-eslint/no-inputs-metadata-property */\nimport {\n AXClearableComponent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n Input,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport IMask, { InputMask } from 'imask';\nimport { classes } from 'polytype';\nimport { AXMaskOptions, AXMaskOptionsDirective } from './mask-options.directive';\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-text-box',\n templateUrl: 'text-box.component.html',\n styleUrls: ['text-box.component.scss'],\n inputs: [\n 'disabled',\n 'tabIndex',\n 'readonly',\n 'value',\n 'state',\n 'name',\n 'id',\n 'placeholder',\n 'maxLength',\n 'allowNull',\n 'type',\n 'autoComplete',\n 'look',\n ],\n outputs: [\n 'onBlur',\n 'onFocus',\n 'valueChange',\n 'stateChange',\n 'onValueChanged',\n 'readonlyChange',\n 'disabledChange',\n 'onKeyDown',\n 'onKeyUp',\n 'onKeyPress',\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: AXComponent, useExisting: AXTextBoxComponent },\n { provide: AXFocusableComponent, useExisting: AXTextBoxComponent },\n { provide: AXClearableComponent, useExisting: AXTextBoxComponent },\n { provide: AXValuableComponent, useExisting: AXTextBoxComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXTextBoxComponent),\n multi: true,\n },\n ],\n})\nexport class AXTextBoxComponent\n extends classes(MXInputBaseValueComponent<string>, MXLookComponent)\n implements AfterContentInit\n{\n /** @ignore */\n protected _updateOn: 'change' | 'blur' | 'submit' = 'change';\n\n /** @ignore */\n @ViewChild('input', { static: true })\n private input: ElementRef<HTMLInputElement>;\n\n /** @ignore */\n private _maskObj: InputMask<any>;\n\n /** @ignore */\n private _maskOptions: AXMaskOptions = { mask: null };\n\n /**\n * This public getter provides access to the `_maskOptions` property, which holds the configuration options for the mask feature.\n */\n @Input('mask-options')\n public get maskOptions(): AXMaskOptions {\n return this._maskOptions;\n }\n\n /**\n * @param value {AXMaskOptions} - The new mask configuration options to be set.\n */\n public set maskOptions(value: AXMaskOptions) {\n this._maskOptions = value;\n this.setMask();\n }\n\n /**\n * This property defines the maximum number of characters that the input field can accept. It can be dynamically bound from a parent component template to enforce input length constraints.\n */\n @Input()\n maxLength: number;\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 @Input()\n type: string;\n\n /**\n * This property determines whether the input field should have autocomplete enabled and what type of autocomplete suggestions should be provided\n */\n @Input()\n autoComplete: string;\n\n /**\n * This will apply 'my-custom-class' and 'another-class' to the component's root element.\n */\n @Input('class')\n classNames: string;\n\n /** @ignore */\n @ContentChild(AXMaskOptionsDirective, { static: true })\n protected _maskOptionsContent: AXMaskOptionsDirective;\n\n /** @ignore */\n ngAfterContentInit() {\n if (this._maskOptionsContent?.mask) {\n if (\n typeof this._maskOptionsContent.mask == 'string' ||\n this._maskOptionsContent.mask instanceof RegExp\n ) {\n Object.assign(this.maskOptions, {\n mask: this._maskOptionsContent.mask,\n unmask: false,\n });\n }\n if (typeof this._maskOptionsContent.mask == 'object') {\n Object.assign(this.maskOptions, this._maskOptionsContent.mask);\n }\n }\n //\n this.setMask();\n }\n\n /** @ignore */\n private setMask() {\n if (this._maskObj) this._maskObj.destroy();\n //\n if (this.maskOptions?.mask) {\n this._maskObj = IMask(this.input.nativeElement, this.maskOptions);\n this._updateOn = 'submit';\n this._maskObj.on('accept', this._onComplete.bind(this));\n this._maskObj.on('complete', this._onComplete.bind(this));\n if (this.value) {\n this._maskObj.value = `${this.value}`;\n this._maskObj.updateValue();\n }\n }\n }\n\n /** @ignore */\n private _onComplete(e: InputEvent) {\n this.commitValue(this._maskObj.value, e?.isTrusted ?? false);\n if (typeof this._maskOptionsContent?.updateValue === 'function') {\n this._maskOptionsContent?.updateValue(this._maskObj.value, this._maskObj.unmaskedValue);\n }\n }\n\n /** @ignore */\n protected _handleModelChange(value: string | null) {\n this.commitValue(value, true);\n }\n}\n","<div class=\"ax-editor-container ax-look-{{ look }} {{ classNames }}\" [class.ax-state-disabled]=\"disabled\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input\n #input\n class=\"ax-input\"\n [id]=\"id\"\n [name]=\"name\"\n [attr.autocomplete]=\"autoComplete\"\n [attr.type]=\"type\"\n [attr.placeholder]=\"placeholder\"\n [attr.maxlength]=\"maxLength\"\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 [ngModelOptions]=\"{ updateOn: _updateOn }\"\n (keydown)=\"emitOnKeydownEvent($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 <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 { AXCommonModule } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXMaskOptionsDirective } from './mask-options.directive';\nimport { AXTextBoxComponent } from './text-box.component';\n\n@NgModule({\n imports: [CommonModule, AXCommonModule, FormsModule, AXButtonModule, AXDecoratorModule],\n exports: [AXTextBoxComponent, AXMaskOptionsDirective],\n declarations: [AXTextBoxComponent, AXMaskOptionsDirective],\n providers: [],\n})\nexport class AXTextBoxModule {}\n","/**\n * Generated bundle index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YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,CAAC;AACvF,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;AACrD,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;AAC1D,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACdD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-text-box.mjs","sources":["../../../../libs/components/text-box/src/lib/mask-options.directive.ts","../../../../libs/components/text-box/src/lib/text-box.component.ts","../../../../libs/components/text-box/src/lib/text-box.component.html","../../../../libs/components/text-box/src/lib/text-box.module.ts","../../../../libs/components/text-box/src/acorex-components-text-box.ts"],"sourcesContent":["import { Directive, EventEmitter, Input, Output } from '@angular/core';\nimport { MaskedOptions } from 'imask';\n\nexport type AXMaskOptions = MaskedOptions | any;\n\nexport interface AXMaskOptionsInterface {\n mask: MaskedOptions | string | RegExp;\n updateValue?: (masked: string, unmasked: string) => void;\n}\n\n@Directive({\n selector: 'ax-mask-options',\n})\nexport class AXMaskOptionsDirective implements AXMaskOptionsInterface {\n private _mask: MaskedOptions | string | RegExp;\n\n @Output()\n public onMaskChange = new EventEmitter<MaskedOptions | string | RegExp>();\n\n @Input()\n public get mask(): MaskedOptions | string | RegExp {\n return this._mask;\n }\n\n public set mask(v: MaskedOptions | string | RegExp) {\n this._mask = v;\n this.onMaskChange.emit(v);\n }\n\n @Input()\n updateValue?: (masked: string, unmasked: string) => void;\n}\n","/* eslint-disable @angular-eslint/no-inputs-metadata-property */\nimport {\n AXClearableComponent,\n AXComponent,\n AXFocusableComponent,\n AXValuableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n Input,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n input,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport IMask, { InputMask } from 'imask';\nimport { classes } from 'polytype';\nimport { AXMaskOptions, AXMaskOptionsDirective } from './mask-options.directive';\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-text-box',\n templateUrl: 'text-box.component.html',\n styleUrls: ['text-box.component.scss'],\n inputs: [\n 'disabled',\n 'tabIndex',\n 'readonly',\n 'value',\n 'state',\n 'name',\n 'id',\n 'placeholder',\n 'maxLength',\n 'allowNull',\n 'type',\n 'autoComplete',\n 'look',\n ],\n outputs: [\n 'onBlur',\n 'onFocus',\n 'valueChange',\n 'stateChange',\n 'onValueChanged',\n 'readonlyChange',\n 'disabledChange',\n 'onKeyDown',\n 'onKeyUp',\n 'onKeyPress',\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: AXComponent, useExisting: AXTextBoxComponent },\n { provide: AXFocusableComponent, useExisting: AXTextBoxComponent },\n { provide: AXClearableComponent, useExisting: AXTextBoxComponent },\n { provide: AXValuableComponent, useExisting: AXTextBoxComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXTextBoxComponent),\n multi: true,\n },\n ],\n})\nexport class AXTextBoxComponent\n extends classes(MXInputBaseValueComponent<string>, MXLookComponent)\n implements AfterContentInit\n{\n /** @ignore */\n protected _updateOn: 'change' | 'blur' | 'submit' = 'change';\n\n /** @ignore */\n @ViewChild('input', { static: true })\n private input: ElementRef<HTMLInputElement>;\n\n /** @ignore */\n private _maskObj: InputMask<any>;\n\n /** @ignore */\n private _maskOptions: AXMaskOptions = { mask: null };\n\n /**\n * This public getter provides access to the `_maskOptions` property, which holds the configuration options for the mask feature.\n */\n @Input('mask-options')\n public get maskOptions(): AXMaskOptions {\n return this._maskOptions;\n }\n\n /**\n * @param value {AXMaskOptions} - The new mask configuration options to be set.\n */\n public set maskOptions(value: AXMaskOptions) {\n this._maskOptions = value;\n this.setMask();\n }\n\n /**\n * This property defines the maximum number of characters that the input field can accept. It can be dynamically bound from a parent component template to enforce input length constraints.\n */\n @Input()\n maxLength: number;\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 @Input()\n type: string;\n\n /**\n * This property determines whether the input field should have autocomplete enabled and what type of autocomplete suggestions should be provided\n */\n @Input()\n autoComplete: string;\n\n /**\n * This will apply 'my-custom-class' and 'another-class' to the component's root element.\n */\n // @Input('class')\n // classNames: string;\n classNames = input('', { alias: 'class' });\n\n /** @ignore */\n @ContentChild(AXMaskOptionsDirective, { static: true })\n protected _maskOptionsContent: AXMaskOptionsDirective;\n\n /** @ignore */\n ngAfterContentInit() {\n if (this._maskOptionsContent?.mask) {\n if (\n typeof this._maskOptionsContent.mask == 'string' ||\n this._maskOptionsContent.mask instanceof RegExp\n ) {\n Object.assign(this.maskOptions, {\n mask: this._maskOptionsContent.mask,\n unmask: false,\n });\n }\n if (typeof this._maskOptionsContent.mask == 'object') {\n Object.assign(this.maskOptions, this._maskOptionsContent.mask);\n }\n }\n //\n this.setMask();\n }\n\n /** @ignore */\n private setMask() {\n if (this._maskObj) this._maskObj.destroy();\n //\n if (this.maskOptions?.mask) {\n this._maskObj = IMask(this.input.nativeElement, this.maskOptions);\n this._updateOn = 'submit';\n this._maskObj.on('accept', this._onComplete.bind(this));\n this._maskObj.on('complete', this._onComplete.bind(this));\n if (this.value) {\n this._maskObj.value = `${this.value}`;\n this._maskObj.updateValue();\n }\n }\n }\n\n /** @ignore */\n private _onComplete(e: InputEvent) {\n this.commitValue(this._maskObj.value, e?.isTrusted ?? false);\n if (typeof this._maskOptionsContent?.updateValue === 'function') {\n this._maskOptionsContent?.updateValue(this._maskObj.value, this._maskObj.unmaskedValue);\n }\n }\n\n /** @ignore */\n protected _handleModelChange(value: string | null) {\n this.commitValue(value, true);\n }\n}\n","<div class=\"ax-editor-container ax-look-{{ look }} {{ classNames() }}\" [class.ax-state-disabled]=\"disabled\">\n <ng-content select=\"ax-prefix\"> </ng-content>\n <input\n #input\n class=\"ax-input\"\n [id]=\"id\"\n [name]=\"name\"\n [attr.autocomplete]=\"autoComplete\"\n [attr.type]=\"type\"\n [attr.placeholder]=\"placeholder\"\n [attr.maxlength]=\"maxLength\"\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 [ngModelOptions]=\"{ updateOn: _updateOn }\"\n (keydown)=\"emitOnKeydownEvent($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 <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 { AXCommonModule } from '@acorex/components/common';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXMaskOptionsDirective } from './mask-options.directive';\nimport { AXTextBoxComponent } from './text-box.component';\n\n@NgModule({\n imports: [CommonModule, AXCommonModule, FormsModule, AXButtonModule, AXDecoratorModule],\n exports: [AXTextBoxComponent, AXMaskOptionsDirective],\n declarations: [AXTextBoxComponent, AXMaskOptionsDirective],\n providers: [],\n})\nexport class AXTextBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAaa,sB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