@acorex/components 18.14.1-next.3 → 18.14.1-next.4
Sign up to get free protection for your applications and to get access to all the features.
- package/check-box/lib/check-box.component.d.ts +4 -2
- package/common/lib/components/selection-base.component.class.d.ts +1 -0
- package/esm2022/check-box/lib/check-box.component.mjs +23 -27
- package/esm2022/common/lib/classes/components.class.mjs +1 -1
- package/esm2022/common/lib/components/selection-base.component.class.mjs +5 -1
- package/esm2022/form/lib/form.component.mjs +5 -2
- package/esm2022/selection-list/lib/selection-list.component.mjs +2 -2
- package/fesm2022/acorex-components-check-box.mjs +23 -27
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +4 -0
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +4 -1
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +1 -1
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/package.json +1 -1
@@ -77,7 +77,9 @@ class AXFormComponent extends MXBaseComponent {
|
|
77
77
|
this.content = contentChildren(AXFormFieldComponent, { descendants: true });
|
78
78
|
this.#applyLooks = effect(() => {
|
79
79
|
this.content().forEach((item) => {
|
80
|
-
item.input
|
80
|
+
if (item.input) {
|
81
|
+
item.input.look = this.look();
|
82
|
+
}
|
81
83
|
});
|
82
84
|
});
|
83
85
|
/**
|
@@ -172,6 +174,7 @@ class AXFormComponent extends MXBaseComponent {
|
|
172
174
|
*/
|
173
175
|
reset() {
|
174
176
|
this.fields.forEach((c) => c.reset(false));
|
177
|
+
this.fields.forEach((c) => c.resetErrors());
|
175
178
|
}
|
176
179
|
/**
|
177
180
|
* Resets validation errors for all form fields.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-form.mjs","sources":["../../../../libs/components/form/src/lib/form.component.ts","../../../../libs/components/form/src/lib/form-field.component.ts","../../../../libs/components/form/src/lib/form.config.ts","../../../../libs/components/form/src/lib/validation-rule.directive.ts","../../../../libs/components/form/src/lib/validation-summary.component.ts","../../../../libs/components/form/src/lib/form.module.ts","../../../../libs/components/form/src/acorex-components-form.ts"],"sourcesContent":["import { AXEvent, AXStyleLookType, AXValuableComponent, MXBaseComponent } from '@acorex/components/common';\nimport { AXValidationSummary } from '@acorex/core/validation';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n InputSignal,\n OnDestroy,\n Output,\n ViewEncapsulation,\n contentChildren,\n effect,\n input,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXFormFieldComponent } from './form-field.component';\n\n/**\n * Contains native event\n * @category Events\n */\nexport class AXFormValidationEvent extends AXEvent {\n result: AXValidationSummary;\n}\n\n/**\n * Contains native event\n * @category Events\n */\nexport type AXFormUpdateOn = 'change' | 'blur' | 'submit';\nexport type AXFormMessageStyle = 'bottom' | 'float';\nexport type AXLabelMode = 'static' | 'floating' | 'over';\n\n/**\n * The AXForm is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-form',\n template: `<form\n (submit)=\"_handleSubmit($event)\"\n (reset)=\"_handleReset()\"\n class=\"ax-{{ messageStyle() }}-error\"\n >\n <ng-content></ng-content>\n </form>`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXFormComponent extends MXBaseComponent implements OnDestroy {\n /**\n * Specifies the mode of the label in the form field.\n * @defaultValue 'static'\n */\n labelMode = input<AXLabelMode>('static');\n\n look = input<AXStyleLookType>('solid');\n\n content = contentChildren(AXFormFieldComponent, { descendants: true });\n\n #applyLooks = effect(() => {\n this.content().forEach((item: any) => {\n item.input.look = this.look();\n });\n });\n\n /**\n * Determines the style of the message in the form field.\n * @defaultValue 'bottom'\n */\n messageStyle: InputSignal<AXFormMessageStyle> = input<AXFormMessageStyle>('bottom');\n\n /**\n * Emitted when the form is validated.\n *\n * @event\n */\n @Output()\n onValidate: EventEmitter<AXFormValidationEvent> = new EventEmitter<AXFormValidationEvent>();\n\n /**\n * Emitted when the form's update mode changes.\n *\n * @event\n */\n @Output()\n updateOnChange: EventEmitter<AXFormUpdateOn> = new EventEmitter<AXFormUpdateOn>();\n\n /**\n * @ignore\n */\n private _updateOn: AXFormUpdateOn = 'blur';\n\n /**\n * Determines when the form should be updated.\n */\n @Input()\n public get updateOn(): AXFormUpdateOn {\n return this._updateOn;\n }\n\n /**\n * Sets the criteria for when the form should be updated.\n * @param v The criteria to set (e.g., 'change', 'blur').\n */\n public set updateOn(v: AXFormUpdateOn) {\n this.setOption({\n name: 'updateOn',\n value: v,\n afterCallback: () => {\n //this._bindEvents();\n },\n });\n }\n\n /**\n * @ignore\n */\n private _subs: Subscription[] = [];\n\n /**\n * @ignore\n */\n protected async _handleSubmit(e: SubmitEvent) {\n e.preventDefault();\n await this.validate();\n }\n\n /**\n * @ignore\n */\n protected _handleReset() {\n this.reset();\n }\n\n /**\n * @ignore\n */\n constructor() {\n super();\n }\n\n //TODO: check update on\n\n // ngAfterViewInit(): void {\n // //this._bindEvents();\n // }\n\n // private _bindEvents() {\n // this._clearSubs();\n // const widgets = this._getComponenets();\n // //\n // widgets.forEach((w) => {\n // if (this.updateOn == 'change') {\n // this._subs.push(\n // w.onValueChanged?.subscribe((v: AXValueChangedEvent) => {\n // if (v.isUserInteraction) w.validate();\n // }),\n // );\n // } else if (this.updateOn == 'blur') {\n // this._subs.push(\n // w.onBlur?.subscribe((v) => {\n // w.validate();\n // }),\n // );\n // }\n // });\n // }\n\n /**\n * @ignore\n */\n private _clearSubs() {\n this._subs.forEach((c) => c?.unsubscribe());\n this._subs = [];\n }\n\n /**\n * @ignore\n */\n private get fields(): AXValuableComponent[] {\n return Array.from(this.getHostElement().querySelectorAll('[ax-form-item=\"true\"]'))\n .map((c) => (c as any).__axContext__)\n .filter((c) => c != null);\n }\n\n async validate(...names: string[]): Promise<AXValidationSummary> {\n const results = await Promise.all(\n this.fields\n .filter((c) => names == null || names.length == 0 || names.includes(c.name))\n .map((field) => field.validate()),\n );\n // Merge all validation summaries into one\n const mergedSummary: AXValidationSummary = {\n result: results.every((res) => res.result),\n rules: results.flatMap((res) => res.rules),\n };\n this._emitOnValidateEvent(mergedSummary);\n return mergedSummary;\n }\n\n /**\n * @ignore\n */\n private _emitOnValidateEvent(e: AXValidationSummary) {\n this.onValidate.emit({\n component: this,\n result: e,\n htmlElement: this.getHostElement(),\n });\n }\n\n /**\n * Resets all form fields without clearing errors.\n */\n reset() {\n this.fields.forEach((c) => c.reset(false));\n }\n\n /**\n * Resets validation errors for all form fields.\n */\n resetErrors() {\n this.fields.forEach((c) => c.resetErrors());\n }\n\n /**\n * @ignore\n */\n ngOnDestroy(): void {\n this._clearSubs();\n }\n}\n","import { AXValuableComponent, MXBaseComponent } from '@acorex/components/common';\nimport { AXLabelComponent } from '@acorex/components/label';\nimport { AXSelectBoxComponent } from '@acorex/components/select-box';\nimport { AXUnsubscriber } from '@acorex/core/utils';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n HostBinding,\n ViewContainerRef,\n ViewEncapsulation,\n WritableSignal,\n afterNextRender,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { AXFormComponent, AXLabelMode } from './form.component';\n\n/**\n * A container component for form fields that provides styling and structure.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-form-field',\n template: `<ng-content></ng-content>`,\n styleUrls: ['./form-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [AXUnsubscriber],\n})\nexport class AXFormFieldComponent extends MXBaseComponent {\n /**\n * Specifies the mode of the label in the form field.\n * @defaultValue 'static'\n */\n labelMode = input<AXLabelMode>('static');\n\n /**\n * @ignore\n */\n protected _labelMode: WritableSignal<AXLabelMode> = signal(this.labelMode());\n\n private unsubscriber = inject(AXUnsubscriber);\n\n @ContentChild(AXValuableComponent)\n private input: AXValuableComponent;\n\n /**\n * @ignore\n */\n @ContentChild(AXLabelComponent)\n private label: AXLabelComponent;\n\n form = inject(AXFormComponent, { optional: true });\n\n host = inject(ViewContainerRef);\n\n /**\n * @ignore\n */\n prefix: HTMLElement;\n\n /**\n * @ignore\n */\n constructor() {\n super();\n\n afterNextRender(() => {\n this.calcIndentSize();\n this.setRequired();\n this.setLabelMode();\n this.listeningEvent();\n });\n\n effect(\n () => {\n this.setLabelMode();\n },\n { allowSignalWrites: true },\n );\n }\n\n /**\n * Calculates and sets the indentation size for the label based on the width of the prefix element.\n * @ignore\n */\n calcIndentSize() {\n const prefix = (this.input as any)?.getHostElement()?.querySelector('ax-prefix') as HTMLElement;\n if (prefix) {\n this.label.getHostElement().style.insetInlineStart = prefix?.clientWidth + 'px';\n }\n }\n\n /**\n * Sets the required attribute for the input field based on validation rules.\n * Automatically updates if validation rules change.\n * @ignore\n */\n setRequired() {\n this.autoSetRequired();\n this.input?.validationRulesChange.pipe(this.unsubscriber.takeUntilDestroy).subscribe(() => {\n this.autoSetRequired();\n });\n }\n /**\n * Sets the label mode based on the form's label mode configuration.\n * @ignore\n */\n setLabelMode() {\n this._labelMode.set(this.form?.labelMode());\n }\n\n /**\n * Subscribes to focus and blur events on the input element.\n * Adds or removes the 'ax-state-focused' class to/from the host element based on the focus state.\n * @ignone\n */\n listeningEvent() {\n const focusEvent = this.input?.['onFocus'] as Subject<any>;\n focusEvent?.subscribe((e) => {\n // this.handleFloating('focus');\n this.host.element.nativeElement.classList.add('ax-state-focused');\n });\n //\n const blurEvent = this.input?.['onBlur'] as Subject<any>;\n blurEvent?.subscribe((e) => {\n // this.handleFloating('blur');\n this.host.element.nativeElement.classList.remove('ax-state-focused');\n });\n }\n // protected handleFloating(mode: 'focus' | 'blur') {\n // const _host = this.host.element.nativeElement as HTMLElement;\n // const placeholder = this.input;\n\n // switch (mode) {\n // case 'focus':\n // _host.classList.add('ax-state-floating');\n // this.label.getHostElement().style.insetInlineStart = 'inherit';\n\n // break;\n // case 'blur':\n // _host.classList.remove('ax-state-floating');\n\n // break;\n // }\n // }\n\n /**\n * @ignore\n */\n private autoSetRequired() {\n if (this.label && this.input) {\n if (this.label.required == null || this.label['autoSetRequired']) {\n this.label.required = this.input.isRequired;\n this.label['autoSetRequired'] = true;\n }\n }\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n get __hostClass(): string[] {\n let hasValue;\n if (this.input) {\n if (this.input instanceof AXSelectBoxComponent && this.input.multiple) {\n hasValue = (this.input as any).value?.length;\n } else {\n hasValue = this.input.value;\n }\n }\n return [`ax-state-${this._labelMode()}-label`, `${hasValue && 'ax-state-has-value'}`];\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface AXFormConfig {}\n\nexport const AX_FORM_CONFIG = new InjectionToken<AXFormConfig>('AX_FORM_CONFIG', {\n providedIn: 'root',\n factory: () => {\n return AXFormDefaultConfig;\n },\n});\n\nexport const AXFormDefaultConfig: AXFormConfig = {};\n\nexport type PartialFormConfig = Partial<AXFormConfig>;\n\nexport function formConfig(config: PartialFormConfig = {}): AXFormConfig {\n const result = {\n ...AXFormDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { AXValuableComponent } from '@acorex/components/common';\nimport { AXValidationRuleOptions } from '@acorex/core/validation';\nimport { Directive, Input, OnDestroy, OnInit } from '@angular/core';\n\n@Directive({\n selector: 'ax-validation-rule',\n})\nexport class AXValidationRuleDirective implements OnInit, OnDestroy {\n @Input() rule: string;\n @Input() options: Omit<AXValidationRuleOptions, 'message'>;\n @Input() message: string;\n\n constructor(private host: AXValuableComponent) {}\n\n ngOnInit() {\n this.host.addValidationRule({ rule: this.rule, options: this.ruleOptions });\n }\n\n ngOnDestroy() {\n this.host.removeValidationRule({\n rule: this.rule,\n options: this.ruleOptions,\n });\n }\n\n private get ruleOptions(): AXValidationRuleOptions {\n return Object.assign({ message: this.message, name: this.host.name }, this.options);\n }\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { AXToastService } from '@acorex/components/toast';\nimport { translateSync } from '@acorex/core/translation';\nimport { ChangeDetectionStrategy, Component, Inject, Input, OnDestroy, Optional, ViewEncapsulation } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXFormComponent, AXFormValidationEvent } from './form.component';\n\nexport type AXValidationSummaryDisplayMode = 'toast' | 'alert';\n\n/**\n * Displays validation summaries in the form of an alert.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-validation-summary',\n template: `\n @if (displayMode === 'alert' && _content) {\n <ax-alert color=\"danger\" [timeOut]=\"_timeOut\" #a (onClosed)=\"_handleOnDismissed()\">\n <ax-icon></ax-icon>\n <ax-title>{{ title | translate | async }}</ax-title>\n <ax-content>\n <div [innerHTML]=\"_content\"></div>\n </ax-content>\n <ax-footer>\n <ax-suffix>\n <ax-button text=\"Dismiss\" (onClick)=\"a.close()\"></ax-button>\n </ax-suffix>\n </ax-footer>\n </ax-alert>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXValidationSummaryComponent extends MXBaseComponent implements OnDestroy {\n /**\n * @ignore\n */\n protected _content?: string = null;\n\n /**\n * @ignore\n */\n private _title = 'validation.messages.title';\n\n /**\n * The title of the validation summary alert.\n */\n @Input()\n public get title(): string {\n return this._title;\n }\n\n /**\n * Sets the title of the validation summary alert.\n *\n * @param v The title to be set.\n */\n public set title(v: string) {\n this._title = v;\n }\n\n /**\n * Specifies the display mode for the validation summary.\n *\n * @defaultValue 'toast'\n */\n @Input()\n displayMode: AXValidationSummaryDisplayMode = 'toast';\n\n /**\n * Specifies the time in milliseconds before the validation summary automatically hides.\n */\n @Input()\n timeOut?: number;\n\n /**\n * Determines whether the validation summary should automatically hide after a specified time.\n * @defaultValue false\n */\n @Input()\n autoHide = false;\n\n /**\n * @ignore\n */\n protected _timeOut: number;\n\n /**\n * @ignore\n */\n private sub: Subscription;\n\n /**\n * @ignore\n */\n constructor(\n private _tosatService: AXToastService,\n @Optional()\n @Inject(AXFormComponent)\n private host: AXFormComponent,\n ) {\n super();\n //\n this.sub = host.onValidate.subscribe((e: AXFormValidationEvent) => {\n if (e.result.result) {\n this._content = null;\n } else {\n const failedRules = e.result.rules.filter((c) => !c.result && c.message);\n\n this._content = `<ul>${failedRules.map((c) => this.formatRule({ title: c['title'] as string, message: c.message })).join('')}</ul>`;\n this._timeOut = this.autoHide ? this.timeOut ?? Math.max(failedRules.length * 1000, 2000) : 0;\n\n if (this.displayMode == 'toast') {\n this._tosatService.show({\n color: 'danger',\n closeButton: true,\n timeOut: this._timeOut,\n timeOutProgress: true,\n content: this._content,\n title: translateSync(this.title),\n location: 'bottom-center',\n });\n }\n }\n this.cdr.markForCheck();\n });\n }\n\n /**\n * @ignore\n */\n private formatRule(rule: { title?: string; message: string }): string {\n return rule.title ? `<li><b>${rule.title}:</b> ${rule.message}</li>` : `<li>${rule.message}</li>`;\n }\n\n /**\n * @ignore\n */\n protected _handleOnDismissed() {\n this._content = null;\n }\n\n /**\n * @ignore\n */\n ngOnDestroy() {\n this.sub?.unsubscribe();\n }\n}\n","import { AXAlertModule } from '@acorex/components/alert';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXFormFieldComponent } from './form-field.component';\nimport { AXFormComponent } from './form.component';\nimport { AXValidationRuleDirective } from './validation-rule.directive';\nimport { AXValidationSummaryComponent } from './validation-summary.component';\n\n@NgModule({\n declarations: [AXFormFieldComponent, AXFormComponent, AXValidationRuleDirective, AXValidationSummaryComponent],\n imports: [CommonModule, AXDecoratorModule, AXAlertModule, AXButtonModule, AXValidationModule, AXTranslationModule],\n exports: [AXFormFieldComponent, AXFormComponent, AXValidationRuleDirective, AXValidationSummaryComponent],\n providers: [],\n})\nexport class AXFormModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;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sBADP;;;MC/DU,YAAY,CAAA;8GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAZ,YAAY,EAAA,YAAA,EAAA,CALR,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAA,EAAA,OAAA,EAAA,CACnG,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,CAAA,EAAA,OAAA,EAAA,CACvG,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAA,EAAA,CAAA,CAAA;+GAG7F,YAAY,EAAA,OAAA,EAAA,CAJb,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;;2FAItG,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;AAC9G,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,CAAC;oBAClH,OAAO,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;AACzG,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACjBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-form.mjs","sources":["../../../../libs/components/form/src/lib/form.component.ts","../../../../libs/components/form/src/lib/form-field.component.ts","../../../../libs/components/form/src/lib/form.config.ts","../../../../libs/components/form/src/lib/validation-rule.directive.ts","../../../../libs/components/form/src/lib/validation-summary.component.ts","../../../../libs/components/form/src/lib/form.module.ts","../../../../libs/components/form/src/acorex-components-form.ts"],"sourcesContent":["import { AXEvent, AXStyleLookType, AXValuableComponent, MXBaseComponent } from '@acorex/components/common';\nimport { AXValidationSummary } from '@acorex/core/validation';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n InputSignal,\n OnDestroy,\n Output,\n ViewEncapsulation,\n contentChildren,\n effect,\n input,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXFormFieldComponent } from './form-field.component';\n\n/**\n * Contains native event\n * @category Events\n */\nexport class AXFormValidationEvent extends AXEvent {\n result: AXValidationSummary;\n}\n\n/**\n * Contains native event\n * @category Events\n */\nexport type AXFormUpdateOn = 'change' | 'blur' | 'submit';\nexport type AXFormMessageStyle = 'bottom' | 'float';\nexport type AXLabelMode = 'static' | 'floating' | 'over';\n\n/**\n * The AXForm is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-form',\n template: `<form\n (submit)=\"_handleSubmit($event)\"\n (reset)=\"_handleReset()\"\n class=\"ax-{{ messageStyle() }}-error\"\n >\n <ng-content></ng-content>\n </form>`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXFormComponent extends MXBaseComponent implements OnDestroy {\n /**\n * Specifies the mode of the label in the form field.\n * @defaultValue 'static'\n */\n labelMode = input<AXLabelMode>('static');\n\n look = input<AXStyleLookType>('solid');\n\n content = contentChildren(AXFormFieldComponent, { descendants: true });\n\n #applyLooks = effect(() => {\n this.content().forEach((item: any) => {\n if (item.input) {\n item.input.look = this.look();\n }\n });\n });\n\n /**\n * Determines the style of the message in the form field.\n * @defaultValue 'bottom'\n */\n messageStyle: InputSignal<AXFormMessageStyle> = input<AXFormMessageStyle>('bottom');\n\n /**\n * Emitted when the form is validated.\n *\n * @event\n */\n @Output()\n onValidate: EventEmitter<AXFormValidationEvent> = new EventEmitter<AXFormValidationEvent>();\n\n /**\n * Emitted when the form's update mode changes.\n *\n * @event\n */\n @Output()\n updateOnChange: EventEmitter<AXFormUpdateOn> = new EventEmitter<AXFormUpdateOn>();\n\n /**\n * @ignore\n */\n private _updateOn: AXFormUpdateOn = 'blur';\n\n /**\n * Determines when the form should be updated.\n */\n @Input()\n public get updateOn(): AXFormUpdateOn {\n return this._updateOn;\n }\n\n /**\n * Sets the criteria for when the form should be updated.\n * @param v The criteria to set (e.g., 'change', 'blur').\n */\n public set updateOn(v: AXFormUpdateOn) {\n this.setOption({\n name: 'updateOn',\n value: v,\n afterCallback: () => {\n //this._bindEvents();\n },\n });\n }\n\n /**\n * @ignore\n */\n private _subs: Subscription[] = [];\n\n /**\n * @ignore\n */\n protected async _handleSubmit(e: SubmitEvent) {\n e.preventDefault();\n await this.validate();\n }\n\n /**\n * @ignore\n */\n protected _handleReset() {\n this.reset();\n }\n\n /**\n * @ignore\n */\n constructor() {\n super();\n }\n\n //TODO: check update on\n\n // ngAfterViewInit(): void {\n // //this._bindEvents();\n // }\n\n // private _bindEvents() {\n // this._clearSubs();\n // const widgets = this._getComponenets();\n // //\n // widgets.forEach((w) => {\n // if (this.updateOn == 'change') {\n // this._subs.push(\n // w.onValueChanged?.subscribe((v: AXValueChangedEvent) => {\n // if (v.isUserInteraction) w.validate();\n // }),\n // );\n // } else if (this.updateOn == 'blur') {\n // this._subs.push(\n // w.onBlur?.subscribe((v) => {\n // w.validate();\n // }),\n // );\n // }\n // });\n // }\n\n /**\n * @ignore\n */\n private _clearSubs() {\n this._subs.forEach((c) => c?.unsubscribe());\n this._subs = [];\n }\n\n /**\n * @ignore\n */\n private get fields(): AXValuableComponent[] {\n return Array.from(this.getHostElement().querySelectorAll('[ax-form-item=\"true\"]'))\n .map((c) => (c as any).__axContext__)\n .filter((c) => c != null);\n }\n\n async validate(...names: string[]): Promise<AXValidationSummary> {\n const results = await Promise.all(\n this.fields\n .filter((c) => names == null || names.length == 0 || names.includes(c.name))\n .map((field) => field.validate()),\n );\n // Merge all validation summaries into one\n const mergedSummary: AXValidationSummary = {\n result: results.every((res) => res.result),\n rules: results.flatMap((res) => res.rules),\n };\n this._emitOnValidateEvent(mergedSummary);\n return mergedSummary;\n }\n\n /**\n * @ignore\n */\n private _emitOnValidateEvent(e: AXValidationSummary) {\n this.onValidate.emit({\n component: this,\n result: e,\n htmlElement: this.getHostElement(),\n });\n }\n\n /**\n * Resets all form fields without clearing errors.\n */\n reset() {\n this.fields.forEach((c) => c.reset(false));\n this.fields.forEach((c) => c.resetErrors());\n }\n\n /**\n * Resets validation errors for all form fields.\n */\n resetErrors() {\n this.fields.forEach((c) => c.resetErrors());\n }\n\n /**\n * @ignore\n */\n ngOnDestroy(): void {\n this._clearSubs();\n }\n}\n","import { AXValuableComponent, MXBaseComponent } from '@acorex/components/common';\nimport { AXLabelComponent } from '@acorex/components/label';\nimport { AXSelectBoxComponent } from '@acorex/components/select-box';\nimport { AXUnsubscriber } from '@acorex/core/utils';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n HostBinding,\n ViewContainerRef,\n ViewEncapsulation,\n WritableSignal,\n afterNextRender,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { AXFormComponent, AXLabelMode } from './form.component';\n\n/**\n * A container component for form fields that provides styling and structure.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-form-field',\n template: `<ng-content></ng-content>`,\n styleUrls: ['./form-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [AXUnsubscriber],\n})\nexport class AXFormFieldComponent extends MXBaseComponent {\n /**\n * Specifies the mode of the label in the form field.\n * @defaultValue 'static'\n */\n labelMode = input<AXLabelMode>('static');\n\n /**\n * @ignore\n */\n protected _labelMode: WritableSignal<AXLabelMode> = signal(this.labelMode());\n\n private unsubscriber = inject(AXUnsubscriber);\n\n @ContentChild(AXValuableComponent)\n private input: AXValuableComponent;\n\n /**\n * @ignore\n */\n @ContentChild(AXLabelComponent)\n private label: AXLabelComponent;\n\n form = inject(AXFormComponent, { optional: true });\n\n host = inject(ViewContainerRef);\n\n /**\n * @ignore\n */\n prefix: HTMLElement;\n\n /**\n * @ignore\n */\n constructor() {\n super();\n\n afterNextRender(() => {\n this.calcIndentSize();\n this.setRequired();\n this.setLabelMode();\n this.listeningEvent();\n });\n\n effect(\n () => {\n this.setLabelMode();\n },\n { allowSignalWrites: true },\n );\n }\n\n /**\n * Calculates and sets the indentation size for the label based on the width of the prefix element.\n * @ignore\n */\n calcIndentSize() {\n const prefix = (this.input as any)?.getHostElement()?.querySelector('ax-prefix') as HTMLElement;\n if (prefix) {\n this.label.getHostElement().style.insetInlineStart = prefix?.clientWidth + 'px';\n }\n }\n\n /**\n * Sets the required attribute for the input field based on validation rules.\n * Automatically updates if validation rules change.\n * @ignore\n */\n setRequired() {\n this.autoSetRequired();\n this.input?.validationRulesChange.pipe(this.unsubscriber.takeUntilDestroy).subscribe(() => {\n this.autoSetRequired();\n });\n }\n /**\n * Sets the label mode based on the form's label mode configuration.\n * @ignore\n */\n setLabelMode() {\n this._labelMode.set(this.form?.labelMode());\n }\n\n /**\n * Subscribes to focus and blur events on the input element.\n * Adds or removes the 'ax-state-focused' class to/from the host element based on the focus state.\n * @ignone\n */\n listeningEvent() {\n const focusEvent = this.input?.['onFocus'] as Subject<any>;\n focusEvent?.subscribe((e) => {\n // this.handleFloating('focus');\n this.host.element.nativeElement.classList.add('ax-state-focused');\n });\n //\n const blurEvent = this.input?.['onBlur'] as Subject<any>;\n blurEvent?.subscribe((e) => {\n // this.handleFloating('blur');\n this.host.element.nativeElement.classList.remove('ax-state-focused');\n });\n }\n // protected handleFloating(mode: 'focus' | 'blur') {\n // const _host = this.host.element.nativeElement as HTMLElement;\n // const placeholder = this.input;\n\n // switch (mode) {\n // case 'focus':\n // _host.classList.add('ax-state-floating');\n // this.label.getHostElement().style.insetInlineStart = 'inherit';\n\n // break;\n // case 'blur':\n // _host.classList.remove('ax-state-floating');\n\n // break;\n // }\n // }\n\n /**\n * @ignore\n */\n private autoSetRequired() {\n if (this.label && this.input) {\n if (this.label.required == null || this.label['autoSetRequired']) {\n this.label.required = this.input.isRequired;\n this.label['autoSetRequired'] = true;\n }\n }\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n get __hostClass(): string[] {\n let hasValue;\n if (this.input) {\n if (this.input instanceof AXSelectBoxComponent && this.input.multiple) {\n hasValue = (this.input as any).value?.length;\n } else {\n hasValue = this.input.value;\n }\n }\n return [`ax-state-${this._labelMode()}-label`, `${hasValue && 'ax-state-has-value'}`];\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface AXFormConfig {}\n\nexport const AX_FORM_CONFIG = new InjectionToken<AXFormConfig>('AX_FORM_CONFIG', {\n providedIn: 'root',\n factory: () => {\n return AXFormDefaultConfig;\n },\n});\n\nexport const AXFormDefaultConfig: AXFormConfig = {};\n\nexport type PartialFormConfig = Partial<AXFormConfig>;\n\nexport function formConfig(config: PartialFormConfig = {}): AXFormConfig {\n const result = {\n ...AXFormDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { AXValuableComponent } from '@acorex/components/common';\nimport { AXValidationRuleOptions } from '@acorex/core/validation';\nimport { Directive, Input, OnDestroy, OnInit } from '@angular/core';\n\n@Directive({\n selector: 'ax-validation-rule',\n})\nexport class AXValidationRuleDirective implements OnInit, OnDestroy {\n @Input() rule: string;\n @Input() options: Omit<AXValidationRuleOptions, 'message'>;\n @Input() message: string;\n\n constructor(private host: AXValuableComponent) {}\n\n ngOnInit() {\n this.host.addValidationRule({ rule: this.rule, options: this.ruleOptions });\n }\n\n ngOnDestroy() {\n this.host.removeValidationRule({\n rule: this.rule,\n options: this.ruleOptions,\n });\n }\n\n private get ruleOptions(): AXValidationRuleOptions {\n return Object.assign({ message: this.message, name: this.host.name }, this.options);\n }\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { AXToastService } from '@acorex/components/toast';\nimport { translateSync } from '@acorex/core/translation';\nimport { ChangeDetectionStrategy, Component, Inject, Input, OnDestroy, Optional, ViewEncapsulation } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXFormComponent, AXFormValidationEvent } from './form.component';\n\nexport type AXValidationSummaryDisplayMode = 'toast' | 'alert';\n\n/**\n * Displays validation summaries in the form of an alert.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-validation-summary',\n template: `\n @if (displayMode === 'alert' && _content) {\n <ax-alert color=\"danger\" [timeOut]=\"_timeOut\" #a (onClosed)=\"_handleOnDismissed()\">\n <ax-icon></ax-icon>\n <ax-title>{{ title | translate | async }}</ax-title>\n <ax-content>\n <div [innerHTML]=\"_content\"></div>\n </ax-content>\n <ax-footer>\n <ax-suffix>\n <ax-button text=\"Dismiss\" (onClick)=\"a.close()\"></ax-button>\n </ax-suffix>\n </ax-footer>\n </ax-alert>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXValidationSummaryComponent extends MXBaseComponent implements OnDestroy {\n /**\n * @ignore\n */\n protected _content?: string = null;\n\n /**\n * @ignore\n */\n private _title = 'validation.messages.title';\n\n /**\n * The title of the validation summary alert.\n */\n @Input()\n public get title(): string {\n return this._title;\n }\n\n /**\n * Sets the title of the validation summary alert.\n *\n * @param v The title to be set.\n */\n public set title(v: string) {\n this._title = v;\n }\n\n /**\n * Specifies the display mode for the validation summary.\n *\n * @defaultValue 'toast'\n */\n @Input()\n displayMode: AXValidationSummaryDisplayMode = 'toast';\n\n /**\n * Specifies the time in milliseconds before the validation summary automatically hides.\n */\n @Input()\n timeOut?: number;\n\n /**\n * Determines whether the validation summary should automatically hide after a specified time.\n * @defaultValue false\n */\n @Input()\n autoHide = false;\n\n /**\n * @ignore\n */\n protected _timeOut: number;\n\n /**\n * @ignore\n */\n private sub: Subscription;\n\n /**\n * @ignore\n */\n constructor(\n private _tosatService: AXToastService,\n @Optional()\n @Inject(AXFormComponent)\n private host: AXFormComponent,\n ) {\n super();\n //\n this.sub = host.onValidate.subscribe((e: AXFormValidationEvent) => {\n if (e.result.result) {\n this._content = null;\n } else {\n const failedRules = e.result.rules.filter((c) => !c.result && c.message);\n\n this._content = `<ul>${failedRules.map((c) => this.formatRule({ title: c['title'] as string, message: c.message })).join('')}</ul>`;\n this._timeOut = this.autoHide ? this.timeOut ?? Math.max(failedRules.length * 1000, 2000) : 0;\n\n if (this.displayMode == 'toast') {\n this._tosatService.show({\n color: 'danger',\n closeButton: true,\n timeOut: this._timeOut,\n timeOutProgress: true,\n content: this._content,\n title: translateSync(this.title),\n location: 'bottom-center',\n });\n }\n }\n this.cdr.markForCheck();\n });\n }\n\n /**\n * @ignore\n */\n private formatRule(rule: { title?: string; message: string }): string {\n return rule.title ? `<li><b>${rule.title}:</b> ${rule.message}</li>` : `<li>${rule.message}</li>`;\n }\n\n /**\n * @ignore\n */\n protected _handleOnDismissed() {\n this._content = null;\n }\n\n /**\n * @ignore\n */\n ngOnDestroy() {\n this.sub?.unsubscribe();\n }\n}\n","import { AXAlertModule } from '@acorex/components/alert';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXFormFieldComponent } from './form-field.component';\nimport { AXFormComponent } from './form.component';\nimport { AXValidationRuleDirective } from './validation-rule.directive';\nimport { AXValidationSummaryComponent } from './validation-summary.component';\n\n@NgModule({\n declarations: [AXFormFieldComponent, AXFormComponent, AXValidationRuleDirective, AXValidationSummaryComponent],\n imports: [CommonModule, AXDecoratorModule, AXAlertModule, AXButtonModule, AXValidationModule, AXTranslationModule],\n exports: [AXFormFieldComponent, AXFormComponent, AXValidationRuleDirective, AXValidationSummaryComponent],\n providers: [],\n})\nexport class AXFormModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBA;;;AAGG;A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,CAAA;sBADf;gBAoBD,WAAW,EAAA,CAAA;sBADV;gBAOD,OAAO,EAAA,CAAA;sBADN;gBAQD,QAAQ,EAAA,CAAA;sBADP;;;MC/DU,YAAY,CAAA;8GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAZ,YAAY,EAAA,YAAA,EAAA,CALR,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAA,EAAA,OAAA,EAAA,CACnG,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,CAAA,EAAA,OAAA,EAAA,CACvG,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAA,EAAA,CAAA,CAAA;+GAG7F,YAAY,EAAA,OAAA,EAAA,CAJb,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;;2FAItG,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;AAC9G,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,CAAC;oBAClH,OAAO,EAAE,CAAC,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;AACzG,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACjBD;;AAEG;;;;"}
|
@@ -1 +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 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;;QA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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.softClearSelectionCache();\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"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