@acorex/components 18.2.0 → 18.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/color-palette/lib/color-palette.module.d.ts +2 -2
- package/common/lib/components/selection-base.component.class.d.ts +1 -0
- package/conversation/index.d.ts +4 -0
- package/conversation/lib/conversation-container/conversation-container.component.d.ts +5 -0
- package/conversation/lib/conversation-input/conversation-input.component.d.ts +7 -1
- package/conversation/lib/conversation-message/conversation-message.component.d.ts +5 -2
- package/conversation/lib/conversation-messages/conversation-message-audio/conversation-message-audio.component.d.ts +29 -0
- package/conversation/lib/conversation-messages/conversation-message-file/conversation-message-file.component.d.ts +1 -0
- package/conversation/lib/conversation-messages/conversation-message-image/conversation-message-image.component.d.ts +9 -0
- package/conversation/lib/conversation-messages/conversation-message-video/conversation-message-video.component.d.ts +9 -0
- package/conversation/lib/conversation-view/conversation-view.component.d.ts +5 -4
- package/conversation/lib/conversation.module.d.ts +18 -17
- package/conversation/lib/conversation.types.d.ts +2 -1
- package/conversation/lib/services/conversation.service.d.ts +54 -0
- package/data-table/lib/data-table/data-table.component.d.ts +1 -1
- package/data-table/lib/infinite-scroll-data-table/infinite-scroll-data-table.component.d.ts +1 -1
- package/esm2022/audio-wave/lib/audio-wave.component.mjs +2 -2
- package/esm2022/badge/lib/badge.component.mjs +2 -2
- package/esm2022/color-palette/lib/color-palette-picker.component.mjs +4 -4
- package/esm2022/color-palette/lib/color-palette.component.mjs +2 -2
- package/esm2022/color-palette/lib/color-palette.module.mjs +4 -4
- package/esm2022/common/lib/components/selection-base.component.class.mjs +14 -2
- package/esm2022/conversation/index.mjs +5 -1
- package/esm2022/conversation/lib/conversation-container/conversation-container.component.mjs +11 -0
- package/esm2022/conversation/lib/conversation-input/conversation-input.component.mjs +18 -5
- package/esm2022/conversation/lib/conversation-message/conversation-message.component.mjs +19 -16
- package/esm2022/conversation/lib/conversation-messages/conversation-message-audio/conversation-message-audio.component.mjs +122 -0
- package/esm2022/conversation/lib/conversation-messages/conversation-message-file/conversation-message-file.component.mjs +5 -3
- package/esm2022/conversation/lib/conversation-messages/conversation-message-image/conversation-message-image.component.mjs +21 -0
- package/esm2022/conversation/lib/conversation-messages/conversation-message-video/conversation-message-video.component.mjs +21 -0
- package/esm2022/conversation/lib/conversation-messages/conversation-message-voice/conversation-message-voice.component.mjs +3 -3
- package/esm2022/conversation/lib/conversation-view/conversation-view.component.mjs +10 -11
- package/esm2022/conversation/lib/conversation.module.mjs +25 -5
- package/esm2022/conversation/lib/conversation.types.mjs +1 -1
- package/esm2022/conversation/lib/services/conversation.service.mjs +135 -2
- package/esm2022/data-table/lib/data-table/data-table.component.mjs +5 -5
- package/esm2022/data-table/lib/infinite-scroll-data-table/infinite-scroll-data-table.component.mjs +3 -3
- package/esm2022/form/lib/form-field.component.mjs +2 -2
- package/esm2022/select-box/lib/select-box.component.mjs +14 -2
- package/esm2022/slider/acorex-components-slider.mjs +5 -0
- package/esm2022/slider/index.mjs +3 -0
- package/esm2022/slider/lib/slider.component.mjs +117 -0
- package/esm2022/slider/lib/slider.module.mjs +23 -0
- package/fesm2022/acorex-components-audio-wave.mjs +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +2 -2
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +8 -8
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +13 -1
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +364 -49
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +6 -6
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +1 -1
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +13 -1
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-slider.mjs +142 -0
- package/fesm2022/acorex-components-slider.mjs.map +1 -0
- package/package.json +7 -7
- package/slider/README.md +3 -0
- package/slider/index.d.ts +2 -0
- package/{range-slider/lib/range-slider.component.d.ts → slider/lib/slider.component.d.ts} +4 -4
- package/slider/lib/slider.module.d.ts +10 -0
- package/esm2022/range-slider/acorex-components-range-slider.mjs +0 -5
- package/esm2022/range-slider/index.mjs +0 -3
- package/esm2022/range-slider/lib/range-slider.component.mjs +0 -117
- package/esm2022/range-slider/lib/range-slider.module.mjs +0 -23
- package/fesm2022/acorex-components-range-slider.mjs +0 -142
- package/fesm2022/acorex-components-range-slider.mjs.map +0 -1
- package/range-slider/README.md +0 -3
- package/range-slider/index.d.ts +0 -2
- package/range-slider/lib/range-slider.module.d.ts +0 -10
@@ -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, 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 input,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\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 (submit)=\"_handleSubmit($event)\" (reset)=\"_handleReset()\" class=\"ax-{{ messageStyle() }}-error\">\n <ng-content></ng-content>\n </form>`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXFormComponent extends MXBaseComponent implements OnDestroy {\n labelMode = input<AXLabelMode>('static');\n\n messageStyle: InputSignal<AXFormMessageStyle> = input<AXFormMessageStyle>('bottom');\n\n @Output()\n onValidate: EventEmitter<AXFormValidationEvent> = new EventEmitter<AXFormValidationEvent>();\n\n @Output()\n updateOnChange: EventEmitter<AXFormUpdateOn> = new EventEmitter<AXFormUpdateOn>();\n\n private _updateOn: AXFormUpdateOn = 'blur';\n @Input()\n public get updateOn(): AXFormUpdateOn {\n return this._updateOn;\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 private _subs: Subscription[] = [];\n\n protected async _handleSubmit(e: SubmitEvent) {\n e.preventDefault();\n await this.validate();\n }\n\n protected _handleReset() {\n this.reset();\n }\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 private _clearSubs() {\n this._subs.forEach((c) => c?.unsubscribe());\n this._subs = [];\n }\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.filter((c) => names == null || names.length == 0 || names.includes(c.name)).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 private _emitOnValidateEvent(e: AXValidationSummary) {\n this.onValidate.emit({\n component: this,\n result: e,\n htmlElement: this.getHostElement(),\n });\n }\n\n reset() {\n this.fields.forEach((c) => c.reset(false));\n }\n\n resetErrors() {\n this.fields.forEach((c) => c.resetErrors());\n }\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@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 labelMode = input<AXLabelMode>('static');\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 @ContentChild(AXLabelComponent)\n private label: AXLabelComponent;\n\n form = inject(AXFormComponent, { optional: true });\n\n host = inject(ViewContainerRef);\n\n prefix: HTMLElement;\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 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 setRequired() {\n this.autoSetRequired();\n this.input?.validationRulesChange.pipe(this.unsubscriber.takeUntilDestroy).subscribe(() => {\n this.autoSetRequired();\n });\n }\n\n setLabelMode() {\n this._labelMode.set(this.form?.labelMode());\n }\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 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 @HostBinding('class')\n get __hostClass(): string[] {\n let hasValue;\n if (this.input) {\n if (this.input instanceof AXSelectBoxComponent) {\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>(\n 'AX_FORM_CONFIG',\n {\n providedIn: 'root',\n factory: () => {\n return AXFormDefaultConfig;\n },\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 { Directive, Input, OnDestroy, OnInit } from '@angular/core';\nimport { AXValuableComponent } from '@acorex/components/common';\nimport { AXValidationRuleOptions } from '@acorex/core/validation';\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(\n { message: this.message, name: this.host.name },\n this.options\n );\n }\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { AXToastService } from '@acorex/components/toast';\nimport { translateSync } from '@acorex/core/translation';\nimport {\n ChangeDetectionStrategy,\n Component,\n Inject,\n Input,\n OnDestroy,\n Optional,\n ViewEncapsulation,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXFormComponent, AXFormValidationEvent } from './form.component';\n\nexport type AXValidationSummaryDisplayMode = 'toast' | 'alert';\n\n@Component({\n selector: 'ax-validation-summary',\n template: `\n @if (displayMode === 'alert' && _content) {\n <ax-alert\n color=\"danger\"\n [timeOut]=\"_timeOut\"\n #a\n (onClosed)=\"_handleOnDismissed()\"\n >\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\n extends MXBaseComponent\n implements OnDestroy\n{\n protected _content?: string = null;\n private _title: string = 'validation.messages.title';\n\n @Input()\n public get title(): string {\n return this._title;\n }\n public set title(v: string) {\n this._title = v;\n }\n\n @Input()\n displayMode: AXValidationSummaryDisplayMode = 'toast';\n\n @Input()\n timeOut?: number;\n\n @Input()\n autoHide = false;\n\n protected _timeOut: number;\n\n private sub: Subscription;\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(\n (c) => !c.result && c.message\n );\n\n this._content = `<ul>${failedRules\n .map((c) =>\n this.formatRule({ title: c['title'] as string, message: c.message })\n )\n .join('')}</ul>`;\n this._timeOut = this.autoHide\n ? this.timeOut ?? Math.max(failedRules.length * 1000, 2000)\n : 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 private formatRule(rule: { title?: string; message: string }): string {\n return rule.title\n ? `<li><b>${rule.title}:</b> ${rule.message}</li>`\n : `<li>${rule.message}</li>`;\n }\n\n protected _handleOnDismissed() {\n this._content = null;\n }\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":";;;;;;;;;;;;;;;;;;;;AAeA;;;AAGG;AACG,MAAO,qBAAsB,SAAQ,OAAO,CAAA;AAEjD,CAAA;AAUD;;;;AAIG;AASG,MAAO,eAAgB,SAAQ,eAAe,CAAA;AAYlD,IAAA,IACW,QAAQ,GAAA;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IACD,IAAW,QAAQ,CAAC,CAAiB,EAAA;QACnC,IAAI,CAAC,SAAS,CAAC;AACb,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,KAAK,EAAE,CAAC;YACR,aAAa,EAAE,MAAK;;aAEnB;AACF,SAAA,CAAC,CAAC;KACJ;IAIS,MAAM,aAAa,CAAC,CAAc,EAAA;QAC1C,CAAC,CAAC,cAAc,EAAE,CAAC;AACnB,QAAA,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;KACvB;IAES,YAAY,GAAA;QACpB,IAAI,CAAC,KAAK,EAAE,CAAC;KACd;AAED,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;AArCV,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAc,QAAQ,CAAC,CAAC;AAEzC,QAAA,IAAA,CAAA,YAAY,GAAoC,KAAK,CAAqB,Q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../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, 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 input,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\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 (submit)=\"_handleSubmit($event)\" (reset)=\"_handleReset()\" class=\"ax-{{ messageStyle() }}-error\">\n <ng-content></ng-content>\n </form>`,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXFormComponent extends MXBaseComponent implements OnDestroy {\n labelMode = input<AXLabelMode>('static');\n\n messageStyle: InputSignal<AXFormMessageStyle> = input<AXFormMessageStyle>('bottom');\n\n @Output()\n onValidate: EventEmitter<AXFormValidationEvent> = new EventEmitter<AXFormValidationEvent>();\n\n @Output()\n updateOnChange: EventEmitter<AXFormUpdateOn> = new EventEmitter<AXFormUpdateOn>();\n\n private _updateOn: AXFormUpdateOn = 'blur';\n @Input()\n public get updateOn(): AXFormUpdateOn {\n return this._updateOn;\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 private _subs: Subscription[] = [];\n\n protected async _handleSubmit(e: SubmitEvent) {\n e.preventDefault();\n await this.validate();\n }\n\n protected _handleReset() {\n this.reset();\n }\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 private _clearSubs() {\n this._subs.forEach((c) => c?.unsubscribe());\n this._subs = [];\n }\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.filter((c) => names == null || names.length == 0 || names.includes(c.name)).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 private _emitOnValidateEvent(e: AXValidationSummary) {\n this.onValidate.emit({\n component: this,\n result: e,\n htmlElement: this.getHostElement(),\n });\n }\n\n reset() {\n this.fields.forEach((c) => c.reset(false));\n }\n\n resetErrors() {\n this.fields.forEach((c) => c.resetErrors());\n }\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@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 labelMode = input<AXLabelMode>('static');\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 @ContentChild(AXLabelComponent)\n private label: AXLabelComponent;\n\n form = inject(AXFormComponent, { optional: true });\n\n host = inject(ViewContainerRef);\n\n prefix: HTMLElement;\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 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 setRequired() {\n this.autoSetRequired();\n this.input?.validationRulesChange.pipe(this.unsubscriber.takeUntilDestroy).subscribe(() => {\n this.autoSetRequired();\n });\n }\n\n setLabelMode() {\n this._labelMode.set(this.form?.labelMode());\n }\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 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 @HostBinding('class')\n get __hostClass(): string[] {\n let hasValue;\n if (this.input) {\n if (this.input instanceof AXSelectBoxComponent) {\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>(\n 'AX_FORM_CONFIG',\n {\n providedIn: 'root',\n factory: () => {\n return AXFormDefaultConfig;\n },\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 { Directive, Input, OnDestroy, OnInit } from '@angular/core';\nimport { AXValuableComponent } from '@acorex/components/common';\nimport { AXValidationRuleOptions } from '@acorex/core/validation';\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(\n { message: this.message, name: this.host.name },\n this.options\n );\n }\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { AXToastService } from '@acorex/components/toast';\nimport { translateSync } from '@acorex/core/translation';\nimport {\n ChangeDetectionStrategy,\n Component,\n Inject,\n Input,\n OnDestroy,\n Optional,\n ViewEncapsulation,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AXFormComponent, AXFormValidationEvent } from './form.component';\n\nexport type AXValidationSummaryDisplayMode = 'toast' | 'alert';\n\n@Component({\n selector: 'ax-validation-summary',\n template: `\n @if (displayMode === 'alert' && _content) {\n <ax-alert\n color=\"danger\"\n [timeOut]=\"_timeOut\"\n #a\n (onClosed)=\"_handleOnDismissed()\"\n >\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\n extends MXBaseComponent\n implements OnDestroy\n{\n protected _content?: string = null;\n private _title: string = 'validation.messages.title';\n\n @Input()\n public get title(): string {\n return this._title;\n }\n public set title(v: string) {\n this._title = v;\n }\n\n @Input()\n displayMode: AXValidationSummaryDisplayMode = 'toast';\n\n @Input()\n timeOut?: number;\n\n @Input()\n autoHide = false;\n\n protected _timeOut: number;\n\n private sub: Subscription;\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(\n (c) => !c.result && c.message\n );\n\n this._content = `<ul>${failedRules\n .map((c) =>\n this.formatRule({ title: c['title'] as string, message: c.message })\n )\n .join('')}</ul>`;\n this._timeOut = this.autoHide\n ? this.timeOut ?? Math.max(failedRules.length * 1000, 2000)\n : 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 private formatRule(rule: { title?: string; message: string }): string {\n return rule.title\n ? `<li><b>${rule.title}:</b> ${rule.message}</li>`\n : `<li>${rule.message}</li>`;\n }\n\n protected _handleOnDismissed() {\n this._content = null;\n }\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":";;;;;;;;;;;;;;;;;;;;AAeA;;;AAGG;AACG,MAAO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,OAAA,EAAA,CACvG,oBAAoB,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,CAAA,EAAA,CAAA,CAAA,EAAA;+GAG7F,YAAY,EAAA,OAAA,EAAA,CAJb,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA;;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,CAAA;;;ACjBD;;AAEG;;;;"}
|
@@ -84,7 +84,19 @@ class AXSelectBoxComponent extends classes(MXDropdownBoxBaseComponent, MXSelecti
|
|
84
84
|
this.searchBox?.onKeyDown.unsubscribe();
|
85
85
|
}
|
86
86
|
getItemByKey(key) {
|
87
|
-
|
87
|
+
const startTime = Date.now();
|
88
|
+
const check = async () => {
|
89
|
+
while (Date.now() - startTime < 2000) {
|
90
|
+
if (typeof this._listDataSource.find === 'function') {
|
91
|
+
return this._listDataSource.find(key);
|
92
|
+
}
|
93
|
+
else {
|
94
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
95
|
+
}
|
96
|
+
}
|
97
|
+
console.log('Timeout reached without finding the "getItemByKey" method');
|
98
|
+
};
|
99
|
+
return check();
|
88
100
|
}
|
89
101
|
_handleOnOpenedEvent(e) {
|
90
102
|
this.renderList = true;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-select-box.mjs","sources":["../../../../libs/components/select-box/src/lib/select-box.component.ts","../../../../libs/components/select-box/src/lib/select-box.component.html","../../../../libs/components/select-box/src/lib/select-box.module.ts","../../../../libs/components/select-box/src/acorex-components-select-box.ts"],"sourcesContent":["import {\n AXClearableComponent,\n AXClosbaleComponent,\n AXComponent,\n AXDataSource,\n AXEvent,\n AXFocusableComponent,\n AXHotkeysService,\n AXItemClickEvent,\n AXSearchableComponent,\n AXValuableComponent,\n AXValueChangedEvent,\n AX_SELECTION_DATA_TOKEN,\n MXLookComponent,\n MXSelectionBridgeService,\n MXSelectionValueComponent,\n convertArrayToDataSource,\n} from '@acorex/components/common';\nimport { AXDropdownBoxComponent, MXDropdownBoxBaseComponent } from '@acorex/components/dropdown';\nimport { AXListComponent } from '@acorex/components/list';\nimport { AXSearchBoxComponent } from '@acorex/components/search-box';\nimport { AXUnsubscriber } from '@acorex/core/utils';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n HostListener,\n Input,\n OnDestroy,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n WritableSignal,\n forwardRef,\n inject,\n signal,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { findLastIndex, last, nth } from 'lodash-es';\nimport { classes } from 'polytype';\nimport { Observable } from 'rxjs';\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-select-box',\n templateUrl: './select-box.component.html',\n styleUrls: ['./select-box.component.scss'],\n inputs: [\n 'disabled',\n 'readonly',\n 'tabIndex',\n 'placeholder',\n 'minValue',\n 'maxValue',\n 'value',\n 'state',\n 'name',\n 'id',\n 'type',\n 'look',\n 'multiple',\n 'valueField',\n 'textField',\n ],\n outputs: [\n 'valueChange',\n 'stateChange',\n 'onValueChanged',\n 'onBlur',\n 'onFocus',\n 'readonlyChange',\n 'disabledChange',\n 'onOpened',\n 'onClosed',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXSelectBoxComponent },\n { provide: AXFocusableComponent, useExisting: AXSelectBoxComponent },\n { provide: AXValuableComponent, useExisting: AXSelectBoxComponent },\n { provide: AXClearableComponent, useExisting: AXSelectBoxComponent },\n { provide: AXClosbaleComponent, useExisting: AXSelectBoxComponent },\n { provide: AXSearchableComponent, useExisting: AXSelectBoxComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXSelectBoxComponent),\n multi: true,\n },\n {\n provide: AX_SELECTION_DATA_TOKEN,\n useClass: MXSelectionBridgeService,\n },\n AXUnsubscriber,\n ],\n host: { ngSkipHydration: 'true' },\n})\nexport class AXSelectBoxComponent\n extends classes(MXDropdownBoxBaseComponent, MXSelectionValueComponent, MXLookComponent)\n implements AfterViewInit, OnDestroy\n{\n private hotKeyService: AXHotkeysService = inject(AXHotkeysService);\n protected isLoading: WritableSignal<boolean> = signal(false);\n protected renderList = false;\n\n protected dropdownSizes: { width: string; height: string } = {\n width: '100%',\n height: 'auto',\n };\n\n protected _listDataSource: AXDataSource<any> = convertArrayToDataSource([], {\n key: this.valueField,\n pageSize: 10,\n });\n\n private _dataSource: AXDataSource<any> | any[];\n public get dataSource(): AXDataSource<any> | any[] {\n return this._dataSource;\n }\n @Input()\n public set dataSource(v: AXDataSource<any> | any[]) {\n this._dataSource = v;\n if (Array.isArray(v)) {\n this._listDataSource = convertArrayToDataSource(v, {\n key: this.valueField,\n pageSize: 10,\n });\n } else {\n this._listDataSource = this.dataSource as AXDataSource<any>;\n }\n //\n //\n this._listDataSource.onChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe((data) => {\n this.setDropdownSize(data.totalCount);\n });\n this._listDataSource.onLoadingChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe((loading) => {\n this.isLoading.set(loading);\n });\n }\n\n @Input()\n placeholder: string;\n\n @Input()\n caption: string;\n\n @Input()\n itemTemplate: TemplateRef<any>;\n\n @Input()\n selectedTemplate: TemplateRef<any>;\n\n @Input()\n emptyTemplate: TemplateRef<any>;\n\n @Input()\n loadingTemplate: TemplateRef<any>;\n\n @Input()\n dropdownWidth = 260;\n\n @ViewChild('panel') panel!: ElementRef<HTMLDivElement>;\n\n @ViewChild(AXListComponent)\n list: AXListComponent;\n\n @ContentChild(AXSearchBoxComponent, { static: true })\n searchBox: AXSearchBoxComponent;\n\n @ViewChild(AXDropdownBoxComponent, { static: true })\n protected dropdown: AXDropdownBoxComponent;\n\n protected autoHeight = false;\n\n public selectionService = inject(AX_SELECTION_DATA_TOKEN);\n\n searchEvent: Observable<any>;\n\n private _unsubscriber = inject(AXUnsubscriber);\n\n protected override ngOnInit(): void {\n super.ngOnInit();\n //\n this.registerValidation();\n }\n\n ngAfterViewInit() {\n this.setDropdownSize();\n }\n\n override ngOnDestroy(): void {\n this.searchBox?.onKeyDown.unsubscribe();\n }\n\n getItemByKey(key: any): Promise<any> | any {\n return this._listDataSource.find(key);\n }\n\n protected _handleOnOpenedEvent(e: AXEvent) {\n this.renderList = true;\n this.list?.render();\n this._handleFocus();\n //\n this.onOpened.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n }\n\n protected _handleOnClosedEvent(e: AXEvent) {\n //this.input.focus();\n this.onClosed.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n this._unsubscriber.unsubscribe();\n }\n\n protected _handleFocus() {\n setTimeout(() => {\n if (this.searchBox) {\n this.searchBox.focus();\n //TODO: unsubscribe\n this.hotKeyService\n .addShortcut({ keys: 'Control.f', element: this.panel.nativeElement })\n .pipe(this._unsubscriber.takeUntilDestroy)\n .subscribe(() => {\n this.searchBox.focus();\n });\n this.searchBox.onKeyDown.pipe(this._unsubscriber.takeUntilDestroy).subscribe((e) => {\n if (e.nativeEvent.code === 'ArrowDown' || e.nativeEvent.key === 'ArrowDown') {\n this.list?.focus();\n e.nativeEvent.preventDefault();\n }\n });\n } else {\n this.list?.focus();\n }\n });\n }\n\n protected _handleBadgeRemove(e: MouseEvent, item) {\n this.unselectItems(item);\n e.stopPropagation();\n }\n\n protected _handleValueChanged(e: AXValueChangedEvent) {\n if (e.isUserInteraction) {\n this.commitValue(e.component.selectedItems, true);\n }\n }\n\n protected _handleOnItemClick(e: AXItemClickEvent) {\n if (!this.multiple) {\n this.close();\n }\n }\n\n override internalValueChanged(): void {\n if (!this.multiple) this.close();\n setTimeout(() => {\n this.detectAutoHeight();\n }, 100);\n }\n\n private detectAutoHeight() {\n const containerWidth: number = this.getHostElement().querySelector<HTMLDivElement>('.ax-select-box-selection').clientWidth;\n const itemsWidth: number = Array.from(this.getHostElement().querySelectorAll<HTMLDivElement>('.ax-selected-token')).reduce(\n (a, i) => a + i.clientWidth,\n 0,\n );\n this.autoHeight = containerWidth - itemsWidth <= 8;\n this.dropdown.updatePosition();\n this.cdr.markForCheck();\n }\n\n private setDropdownSize(count = 0) {\n if (this.dropdown.isActionsheetStyle) {\n this.dropdownSizes = {\n width: '100%',\n height: ['auto', '0px'].includes(this.dropdownSizes.height) ? `${Math.min(15, count) * 40}px` : this.dropdownSizes.height,\n };\n } else {\n //TODO: calc min-with from formula or config\n const hostWidth = Math.max(this.getHostElement().offsetWidth, this.dropdownWidth);\n this.dropdownSizes = {\n width: `${hostWidth}px`,\n height: count == 0 ? 'auto' : `${Math.min(5, count) * 40}px`,\n };\n }\n setTimeout(() => {\n this.dropdown.updatePosition();\n });\n }\n\n @HostListener('keydown', ['$event'])\n _handleKeydown(e: KeyboardEvent) {\n if (e.code === 'ArrowDown' || e.code === 'ArrowUp') {\n this.selectItemByNav(e.code === 'ArrowDown' ? 1 : -1);\n e.preventDefault();\n } else if (e.code === 'Backspace') {\n this.unselectItems(this.selectedItems.pop());\n e.preventDefault();\n }\n // if ((e.code === 'Space' || e.code === 'Enter') && this.hasItems) {\n // if (this.readonly || this.disabled) {\n // e.preventDefault();\n // e.stopPropagation();\n // return;\n // }\n // const id = document.activeElement?.closest('li')?.dataset?.id;\n // this.toggleSelect(id);\n // e.preventDefault();\n // e.stopPropagation()\n // }\n }\n\n private selectItemByNav(sign: 1 | -1) {\n if (Array.isArray(this.dataSource) && !this.multiple) {\n const items = this.normalizeItemsList(this.dataSource);\n const _last: any = last(this.selectedItems);\n let i = -1;\n if (_last) {\n i = findLastIndex(items, [this.valueField, _last[this.valueField]]);\n }\n i += sign;\n if (i < 0 || i >= items.length) return;\n const next = nth<any>(items, i);\n if (next) {\n this.selectItems(next);\n }\n } else {\n this.open();\n }\n }\n\n search(term: string) {\n if (term) {\n this._listDataSource.filter({\n field: this.textField,\n value: term,\n operator: { type: 'contains' },\n });\n } else {\n this._listDataSource.clearFilter();\n }\n this._listDataSource.refresh();\n }\n\n refresh() {\n this.reset(false);\n this.clearSelectionCache();\n this.list?.refresh();\n this.close();\n }\n}\n","<ax-dropdown-box [disabled]=\"disabled\" (onOpened)=\"_handleOnOpenedEvent($event)\"\n (onClosed)=\"_handleOnClosedEvent($event)\" [look]=\"look\" [class.ax-auto-height]=\"autoHeight\"\n (focus)=\"emitOnFocusEvent($event)\" (blur)=\"emitOnBlurEvent($event)\">\n <ng-container input>\n <ng-content select=\"ax-prefix\"> </ng-content>\n <div class=\"ax-select-box-selection ax-content\" [class.ax-multiple]=\"multiple\" [tabindex]=\"tabIndex\"\n (click)=\"toggle()\">\n @if (selectedItems.length === 0) {\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\n {{ placeholder }}\n </div>\n }\n @for (item of selectedItems; track $index) {\n @if(selectedTemplate) {\n <ng-template *ngTemplateOutlet=\"selectedTemplate; context: { $implicit: { data:item } }\"></ng-template>\n }\n @else{\n <div class=\"ax-selected-token\">\n {{ getDisplayText(item) }}\n @if (!disabled && !readonly && multiple) {\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\n }\n </div>\n }\n }\n </div>\n @if (selectedItems?.length && !disabled && !readonly) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n <button type=\"button\" [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-general-button ax-button-icon\"\n (click)=\"toggle()\">\n <!-- @if (isLoading() && !isOpen) {\n <ax-loading type=\"spinner\"></ax-loading>\n } @else { -->\n <span class=\"ax-icon ax-icon-chevron-left ax-arrow-button\" [ngClass]=\"{\n '-rotation-90': !isOpen,\n 'rotation-90': isOpen\n }\"></span>\n <!-- } -->\n </button>\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-template #search>\n <ng-content select=\"ax-search-box\"> </ng-content>\n </ng-template>\n </ng-container>\n <ng-container panel>\n <div #panel class=\"ax-select-box-panel\" [style.min-width]=\"dropdownSizes.width\">\n @if (dropdown.isActionsheetStyle) {\n <ax-header class=\"ax-solid\">\n <ax-title>{{ caption || placeholder || 'selectbox.popover.title' | translate | async }}</ax-title>\n <ax-close-button\n [icon]=\"multiple ? 'ax-icon ax-icon-check !ax-text-primary-500' : 'ax-icon ax-icon-close'\"></ax-close-button>\n </ax-header>\n }\n @if (searchBox) {\n <div class=\"ax-search-container\">\n <ng-template [ngTemplateOutlet]=\"search\"></ng-template>\n </div>\n }\n @if (renderList) {\n <ax-list [dataSource]=\"_listDataSource\" [multiple]=\"multiple\" [style.height]=\"dropdownSizes.height\"\n [valueField]=\"valueField\" [textField]=\"textField\" [emptyTemplate]=\"emptyTemplate ?? empty\"\n [itemTemplate]=\"itemTemplate\" [loadingTemplate]=\"loadingTemplate\" [ngModel]=\"value\"\n (onValueChanged)=\"_handleValueChanged($event)\" [selectionMode]=\"'item'\"\n (onItemClick)=\"_handleOnItemClick($event)\">\n <ng-template #empty> {{ 'no-result-found' | translate | async}} </ng-template>\n </ax-list>\n }\n\n @if (isLoading()) {\n @if (loadingTemplate) {\n <ng-template *ngTemplateOutlet=\"loadingTemplate\"></ng-template>\n } @else {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\n <ax-loading></ax-loading>\n </div>\n }\n }\n\n <ng-content select=\"ax-footer\"> </ng-content>\n </div>\n </ng-container>\n</ax-dropdown-box>\n<ng-content select=\"ax-validation-rule\"> </ng-content>","import { AXBadgeModule } from '@acorex/components/badge';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXPopoverModule } from '@acorex/components/popover';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { AXCommonModule } from '@acorex/components/common';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXListModule } from '@acorex/components/list';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXSelectBoxComponent } from './select-box.component';\n\n@NgModule({\n imports: [\n CommonModule,\n AXCommonModule,\n FormsModule,\n AXCheckBoxModule,\n AXBadgeModule,\n AXDecoratorModule,\n AXTranslationModule,\n AXPopoverModule,\n AXLoadingModule,\n A11yModule,\n AXTextBoxModule,\n AXDropdownModule,\n AXListModule,\n ],\n exports: [AXSelectBoxComponent],\n declarations: [AXSelectBoxComponent],\n providers: [],\n})\nexport class AXSelectBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA;;;;AAIG;AAuDG,MAAO,oBACX,SAAQ,OAAO,CAAC,0BAA0B,EAAE,yBAAyB,EAAE,eAAe,CAAC,CAAA;AAvDzF,IAAA,WAAA,GAAA;;AA0DU,QAAA,IAAA,CAAA,aAAa,GAAqB,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACzD,QAAA,IAAA,CAAA,SAAS,GAA4B,MAAM,CAAC,KAAK,CAAC,CAAC;QACnD,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;AAEnB,QAAA,IAAA,CAAA,aAAa,GAAsC;A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,iBAAiB;wBACjB,mBAAmB;wBACnB,eAAe;wBACf,eAAe;wBACf,UAAU;wBACV,eAAe;wBACf,gBAAgB;wBAChB,YAAY;AACb,qBAAA;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACpCD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-select-box.mjs","sources":["../../../../libs/components/select-box/src/lib/select-box.component.ts","../../../../libs/components/select-box/src/lib/select-box.component.html","../../../../libs/components/select-box/src/lib/select-box.module.ts","../../../../libs/components/select-box/src/acorex-components-select-box.ts"],"sourcesContent":["import {\n AXClearableComponent,\n AXClosbaleComponent,\n AXComponent,\n AXDataSource,\n AXEvent,\n AXFocusableComponent,\n AXHotkeysService,\n AXItemClickEvent,\n AXSearchableComponent,\n AXValuableComponent,\n AXValueChangedEvent,\n AX_SELECTION_DATA_TOKEN,\n MXLookComponent,\n MXSelectionBridgeService,\n MXSelectionValueComponent,\n convertArrayToDataSource,\n} from '@acorex/components/common';\nimport { AXDropdownBoxComponent, MXDropdownBoxBaseComponent } from '@acorex/components/dropdown';\nimport { AXListComponent } from '@acorex/components/list';\nimport { AXSearchBoxComponent } from '@acorex/components/search-box';\nimport { AXUnsubscriber } from '@acorex/core/utils';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n HostListener,\n Input,\n OnDestroy,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n WritableSignal,\n forwardRef,\n inject,\n signal,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { findLastIndex, last, nth } from 'lodash-es';\nimport { classes } from 'polytype';\nimport { Observable } from 'rxjs';\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-select-box',\n templateUrl: './select-box.component.html',\n styleUrls: ['./select-box.component.scss'],\n inputs: [\n 'disabled',\n 'readonly',\n 'tabIndex',\n 'placeholder',\n 'minValue',\n 'maxValue',\n 'value',\n 'state',\n 'name',\n 'id',\n 'type',\n 'look',\n 'multiple',\n 'valueField',\n 'textField',\n ],\n outputs: [\n 'valueChange',\n 'stateChange',\n 'onValueChanged',\n 'onBlur',\n 'onFocus',\n 'readonlyChange',\n 'disabledChange',\n 'onOpened',\n 'onClosed',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXSelectBoxComponent },\n { provide: AXFocusableComponent, useExisting: AXSelectBoxComponent },\n { provide: AXValuableComponent, useExisting: AXSelectBoxComponent },\n { provide: AXClearableComponent, useExisting: AXSelectBoxComponent },\n { provide: AXClosbaleComponent, useExisting: AXSelectBoxComponent },\n { provide: AXSearchableComponent, useExisting: AXSelectBoxComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXSelectBoxComponent),\n multi: true,\n },\n {\n provide: AX_SELECTION_DATA_TOKEN,\n useClass: MXSelectionBridgeService,\n },\n AXUnsubscriber,\n ],\n host: { ngSkipHydration: 'true' },\n})\nexport class AXSelectBoxComponent\n extends classes(MXDropdownBoxBaseComponent, MXSelectionValueComponent, MXLookComponent)\n implements AfterViewInit, OnDestroy\n{\n private hotKeyService: AXHotkeysService = inject(AXHotkeysService);\n protected isLoading: WritableSignal<boolean> = signal(false);\n protected renderList = false;\n\n protected dropdownSizes: { width: string; height: string } = {\n width: '100%',\n height: 'auto',\n };\n\n protected _listDataSource: AXDataSource<any> = convertArrayToDataSource([], {\n key: this.valueField,\n pageSize: 10,\n });\n\n private _dataSource: AXDataSource<any> | any[];\n public get dataSource(): AXDataSource<any> | any[] {\n return this._dataSource;\n }\n @Input()\n public set dataSource(v: AXDataSource<any> | any[]) {\n this._dataSource = v;\n if (Array.isArray(v)) {\n this._listDataSource = convertArrayToDataSource(v, {\n key: this.valueField,\n pageSize: 10,\n });\n } else {\n this._listDataSource = this.dataSource as AXDataSource<any>;\n }\n //\n //\n this._listDataSource.onChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe((data) => {\n this.setDropdownSize(data.totalCount);\n });\n this._listDataSource.onLoadingChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe((loading) => {\n this.isLoading.set(loading);\n });\n }\n\n @Input()\n placeholder: string;\n\n @Input()\n caption: string;\n\n @Input()\n itemTemplate: TemplateRef<any>;\n\n @Input()\n selectedTemplate: TemplateRef<any>;\n\n @Input()\n emptyTemplate: TemplateRef<any>;\n\n @Input()\n loadingTemplate: TemplateRef<any>;\n\n @Input()\n dropdownWidth = 260;\n\n @ViewChild('panel') panel!: ElementRef<HTMLDivElement>;\n\n @ViewChild(AXListComponent)\n list: AXListComponent;\n\n @ContentChild(AXSearchBoxComponent, { static: true })\n searchBox: AXSearchBoxComponent;\n\n @ViewChild(AXDropdownBoxComponent, { static: true })\n protected dropdown: AXDropdownBoxComponent;\n\n protected autoHeight = false;\n\n public selectionService = inject(AX_SELECTION_DATA_TOKEN);\n\n searchEvent: Observable<any>;\n\n private _unsubscriber = inject(AXUnsubscriber);\n\n protected override ngOnInit(): void {\n super.ngOnInit();\n //\n this.registerValidation();\n }\n\n ngAfterViewInit() {\n this.setDropdownSize();\n }\n\n override ngOnDestroy(): void {\n this.searchBox?.onKeyDown.unsubscribe();\n }\n\n getItemByKey(key: any): Promise<any> | any {\n const startTime = Date.now();\n\n const check = async () => {\n while (Date.now() - startTime < 2000) {\n if (typeof this._listDataSource.find === 'function') {\n return this._listDataSource.find(key);\n } else {\n await new Promise((resolve) => setTimeout(resolve, 50));\n }\n }\n console.log('Timeout reached without finding the \"getItemByKey\" method');\n };\n return check();\n }\n\n protected _handleOnOpenedEvent(e: AXEvent) {\n this.renderList = true;\n this.list?.render();\n this._handleFocus();\n //\n this.onOpened.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n }\n\n protected _handleOnClosedEvent(e: AXEvent) {\n //this.input.focus();\n this.onClosed.emit({\n component: this,\n isUserInteraction: e.isUserInteraction,\n });\n this._unsubscriber.unsubscribe();\n }\n\n protected _handleFocus() {\n setTimeout(() => {\n if (this.searchBox) {\n this.searchBox.focus();\n //TODO: unsubscribe\n this.hotKeyService\n .addShortcut({ keys: 'Control.f', element: this.panel.nativeElement })\n .pipe(this._unsubscriber.takeUntilDestroy)\n .subscribe(() => {\n this.searchBox.focus();\n });\n this.searchBox.onKeyDown.pipe(this._unsubscriber.takeUntilDestroy).subscribe((e) => {\n if (e.nativeEvent.code === 'ArrowDown' || e.nativeEvent.key === 'ArrowDown') {\n this.list?.focus();\n e.nativeEvent.preventDefault();\n }\n });\n } else {\n this.list?.focus();\n }\n });\n }\n\n protected _handleBadgeRemove(e: MouseEvent, item) {\n this.unselectItems(item);\n e.stopPropagation();\n }\n\n protected _handleValueChanged(e: AXValueChangedEvent) {\n if (e.isUserInteraction) {\n this.commitValue(e.component.selectedItems, true);\n }\n }\n\n protected _handleOnItemClick(e: AXItemClickEvent) {\n if (!this.multiple) {\n this.close();\n }\n }\n\n override internalValueChanged(): void {\n if (!this.multiple) this.close();\n setTimeout(() => {\n this.detectAutoHeight();\n }, 100);\n }\n\n private detectAutoHeight() {\n const containerWidth: number = this.getHostElement().querySelector<HTMLDivElement>('.ax-select-box-selection').clientWidth;\n const itemsWidth: number = Array.from(this.getHostElement().querySelectorAll<HTMLDivElement>('.ax-selected-token')).reduce(\n (a, i) => a + i.clientWidth,\n 0,\n );\n this.autoHeight = containerWidth - itemsWidth <= 8;\n this.dropdown.updatePosition();\n this.cdr.markForCheck();\n }\n\n private setDropdownSize(count = 0) {\n if (this.dropdown.isActionsheetStyle) {\n this.dropdownSizes = {\n width: '100%',\n height: ['auto', '0px'].includes(this.dropdownSizes.height) ? `${Math.min(15, count) * 40}px` : this.dropdownSizes.height,\n };\n } else {\n //TODO: calc min-with from formula or config\n const hostWidth = Math.max(this.getHostElement().offsetWidth, this.dropdownWidth);\n this.dropdownSizes = {\n width: `${hostWidth}px`,\n height: count == 0 ? 'auto' : `${Math.min(5, count) * 40}px`,\n };\n }\n setTimeout(() => {\n this.dropdown.updatePosition();\n });\n }\n\n @HostListener('keydown', ['$event'])\n _handleKeydown(e: KeyboardEvent) {\n if (e.code === 'ArrowDown' || e.code === 'ArrowUp') {\n this.selectItemByNav(e.code === 'ArrowDown' ? 1 : -1);\n e.preventDefault();\n } else if (e.code === 'Backspace') {\n this.unselectItems(this.selectedItems.pop());\n e.preventDefault();\n }\n // if ((e.code === 'Space' || e.code === 'Enter') && this.hasItems) {\n // if (this.readonly || this.disabled) {\n // e.preventDefault();\n // e.stopPropagation();\n // return;\n // }\n // const id = document.activeElement?.closest('li')?.dataset?.id;\n // this.toggleSelect(id);\n // e.preventDefault();\n // e.stopPropagation()\n // }\n }\n\n private selectItemByNav(sign: 1 | -1) {\n if (Array.isArray(this.dataSource) && !this.multiple) {\n const items = this.normalizeItemsList(this.dataSource);\n const _last: any = last(this.selectedItems);\n let i = -1;\n if (_last) {\n i = findLastIndex(items, [this.valueField, _last[this.valueField]]);\n }\n i += sign;\n if (i < 0 || i >= items.length) return;\n const next = nth<any>(items, i);\n if (next) {\n this.selectItems(next);\n }\n } else {\n this.open();\n }\n }\n\n search(term: string) {\n if (term) {\n this._listDataSource.filter({\n field: this.textField,\n value: term,\n operator: { type: 'contains' },\n });\n } else {\n this._listDataSource.clearFilter();\n }\n this._listDataSource.refresh();\n }\n\n refresh() {\n this.reset(false);\n this.clearSelectionCache();\n this.list?.refresh();\n this.close();\n }\n}\n","<ax-dropdown-box [disabled]=\"disabled\" (onOpened)=\"_handleOnOpenedEvent($event)\"\n (onClosed)=\"_handleOnClosedEvent($event)\" [look]=\"look\" [class.ax-auto-height]=\"autoHeight\"\n (focus)=\"emitOnFocusEvent($event)\" (blur)=\"emitOnBlurEvent($event)\">\n <ng-container input>\n <ng-content select=\"ax-prefix\"> </ng-content>\n <div class=\"ax-select-box-selection ax-content\" [class.ax-multiple]=\"multiple\" [tabindex]=\"tabIndex\"\n (click)=\"toggle()\">\n @if (selectedItems.length === 0) {\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\n {{ placeholder }}\n </div>\n }\n @for (item of selectedItems; track $index) {\n @if(selectedTemplate) {\n <ng-template *ngTemplateOutlet=\"selectedTemplate; context: { $implicit: { data:item } }\"></ng-template>\n }\n @else{\n <div class=\"ax-selected-token\">\n {{ getDisplayText(item) }}\n @if (!disabled && !readonly && multiple) {\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\n }\n </div>\n }\n }\n </div>\n @if (selectedItems?.length && !disabled && !readonly) {\n <ng-content select=\"ax-clear-button\"></ng-content>\n }\n <button type=\"button\" [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-general-button ax-button-icon\"\n (click)=\"toggle()\">\n <!-- @if (isLoading() && !isOpen) {\n <ax-loading type=\"spinner\"></ax-loading>\n } @else { -->\n <span class=\"ax-icon ax-icon-chevron-left ax-arrow-button\" [ngClass]=\"{\n '-rotation-90': !isOpen,\n 'rotation-90': isOpen\n }\"></span>\n <!-- } -->\n </button>\n <ng-content select=\"ax-suffix\"> </ng-content>\n <ng-template #search>\n <ng-content select=\"ax-search-box\"> </ng-content>\n </ng-template>\n </ng-container>\n <ng-container panel>\n <div #panel class=\"ax-select-box-panel\" [style.min-width]=\"dropdownSizes.width\">\n @if (dropdown.isActionsheetStyle) {\n <ax-header class=\"ax-solid\">\n <ax-title>{{ caption || placeholder || 'selectbox.popover.title' | translate | async }}</ax-title>\n <ax-close-button\n [icon]=\"multiple ? 'ax-icon ax-icon-check !ax-text-primary-500' : 'ax-icon ax-icon-close'\"></ax-close-button>\n </ax-header>\n }\n @if (searchBox) {\n <div class=\"ax-search-container\">\n <ng-template [ngTemplateOutlet]=\"search\"></ng-template>\n </div>\n }\n @if (renderList) {\n <ax-list [dataSource]=\"_listDataSource\" [multiple]=\"multiple\" [style.height]=\"dropdownSizes.height\"\n [valueField]=\"valueField\" [textField]=\"textField\" [emptyTemplate]=\"emptyTemplate ?? empty\"\n [itemTemplate]=\"itemTemplate\" [loadingTemplate]=\"loadingTemplate\" [ngModel]=\"value\"\n (onValueChanged)=\"_handleValueChanged($event)\" [selectionMode]=\"'item'\"\n (onItemClick)=\"_handleOnItemClick($event)\">\n <ng-template #empty> {{ 'no-result-found' | translate | async}} </ng-template>\n </ax-list>\n }\n\n @if (isLoading()) {\n @if (loadingTemplate) {\n <ng-template *ngTemplateOutlet=\"loadingTemplate\"></ng-template>\n } @else {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\n <ax-loading></ax-loading>\n </div>\n }\n }\n\n <ng-content select=\"ax-footer\"> </ng-content>\n </div>\n </ng-container>\n</ax-dropdown-box>\n<ng-content select=\"ax-validation-rule\"> </ng-content>","import { AXBadgeModule } from '@acorex/components/badge';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXPopoverModule } from '@acorex/components/popover';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { AXCommonModule } from '@acorex/components/common';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXListModule } from '@acorex/components/list';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXSelectBoxComponent } from './select-box.component';\n\n@NgModule({\n imports: [\n CommonModule,\n AXCommonModule,\n FormsModule,\n AXCheckBoxModule,\n AXBadgeModule,\n AXDecoratorModule,\n AXTranslationModule,\n AXPopoverModule,\n AXLoadingModule,\n A11yModule,\n AXTextBoxModule,\n AXDropdownModule,\n AXListModule,\n ],\n exports: [AXSelectBoxComponent],\n declarations: [AXSelectBoxComponent],\n providers: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+
import * as i0 from '@angular/core';
|
2
|
+
import { forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, NgModule } from '@angular/core';
|
3
|
+
import { MXValueComponent, MXColorComponent, AXValuableComponent, AXCommonModule } from '@acorex/components/common';
|
4
|
+
import * as i1 from '@angular/forms';
|
5
|
+
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
6
|
+
import { classes } from 'polytype';
|
7
|
+
import { CommonModule } from '@angular/common';
|
8
|
+
|
9
|
+
class AXSliderComponent extends classes((MXValueComponent), MXColorComponent) {
|
10
|
+
constructor(_zone) {
|
11
|
+
super();
|
12
|
+
this._zone = _zone;
|
13
|
+
this._minValue = 0;
|
14
|
+
this._maxValue = 100;
|
15
|
+
this._step = 1;
|
16
|
+
//TODO: vertical dont work properly
|
17
|
+
this.direction = 'horizontal';
|
18
|
+
}
|
19
|
+
/**
|
20
|
+
* Specifies the smallest value that is valid
|
21
|
+
*/
|
22
|
+
get minValue() {
|
23
|
+
return this._minValue ?? 0;
|
24
|
+
}
|
25
|
+
set minValue(v) {
|
26
|
+
this.setOption({
|
27
|
+
name: 'minValue',
|
28
|
+
value: v != null ? Number(v) : 0,
|
29
|
+
});
|
30
|
+
}
|
31
|
+
/**
|
32
|
+
* Specifies the greatest value that is valid
|
33
|
+
*/
|
34
|
+
get maxValue() {
|
35
|
+
return this._maxValue ?? 100;
|
36
|
+
}
|
37
|
+
set maxValue(v) {
|
38
|
+
this.setOption({
|
39
|
+
name: 'maxValue',
|
40
|
+
value: v != null ? Number(v) : 100,
|
41
|
+
});
|
42
|
+
}
|
43
|
+
/**
|
44
|
+
* Specifies the greatest value that is valid
|
45
|
+
*/
|
46
|
+
get step() {
|
47
|
+
return this._step ?? 100;
|
48
|
+
}
|
49
|
+
set step(v) {
|
50
|
+
this.setOption({
|
51
|
+
name: 'step',
|
52
|
+
value: v != null ? Number(v) : 1,
|
53
|
+
});
|
54
|
+
}
|
55
|
+
internalOptionChanged(e) {
|
56
|
+
this._calcVars();
|
57
|
+
}
|
58
|
+
internalValueChanged(value) {
|
59
|
+
this._calcVars();
|
60
|
+
}
|
61
|
+
_handleModelChange(value) {
|
62
|
+
this.commitValue(value, true);
|
63
|
+
}
|
64
|
+
_calcVars() {
|
65
|
+
this._zone.runOutsideAngular(() => {
|
66
|
+
const per = (((this.value ?? 0) - this.minValue) /
|
67
|
+
(this.maxValue - this.minValue)) *
|
68
|
+
100 -
|
69
|
+
0.1;
|
70
|
+
this.getHostElement().style.setProperty('--ax-current-value', `${per}%`);
|
71
|
+
});
|
72
|
+
}
|
73
|
+
get __hostClass() {
|
74
|
+
return `ax-${this.color}-solid ax-${this.direction}`;
|
75
|
+
}
|
76
|
+
get __hostClassDisabled() {
|
77
|
+
return this.disabled;
|
78
|
+
}
|
79
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXSliderComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
80
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.2", type: AXSliderComponent, selector: "ax-slider", inputs: { readonly: "readonly", disabled: "disabled", value: "value", name: "name", color: "color", minValue: "minValue", maxValue: "maxValue", step: "step", direction: "direction" }, outputs: { valueChange: "valueChange", onValueChanged: "onValueChanged", readonlyChange: "readonlyChange", disabledChange: "disabledChange" }, host: { properties: { "class": "this.__hostClass", "class.ax-state-disabled": "this.__hostClassDisabled" } }, providers: [
|
81
|
+
{ provide: AXValuableComponent, useExisting: AXSliderComponent },
|
82
|
+
{
|
83
|
+
provide: NG_VALUE_ACCESSOR,
|
84
|
+
useExisting: forwardRef(() => AXSliderComponent),
|
85
|
+
multi: true,
|
86
|
+
},
|
87
|
+
], usesInheritance: true, ngImport: i0, template: "<input type=\"range\" [min]=\"minValue\" [max]=\"maxValue\" [ngModel]=\"value\" (ngModelChange)=\"_handleModelChange($event)\"\n (blur)=\"emitOnBlurEvent($event)\" (focus)=\"emitOnFocusEvent($event)\" [step]=\"step\" [disabled]=\"disabled || readonly\"\n [readonly]=\"readonly\">", styles: ["ax-slider{--ax-current-value: 0%}ax-slider input{height:.5rem;width:100%;appearance:none;border-radius:9999px;background-color:rgba(var(--ax-color-on-surface));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-slider input::-webkit-slider-thumb{height:1.5rem;width:1.5rem;cursor:pointer;appearance:none;border-radius:9999px;border-width:1px;border-style:solid;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-white));--ax-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--ax-shadow-colored: 0 10px 15px -3px var(--ax-shadow-color), 0 4px 6px -4px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-shadow)}ax-slider input::-moz-range-thumb{height:1.5rem;width:1.5rem;cursor:pointer;appearance:none;border-radius:9999px;border-width:1px;border-style:solid;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-white));--ax-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--ax-shadow-colored: 0 10px 15px -3px var(--ax-shadow-color), 0 4px 6px -4px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-shadow)}ax-slider.ax-vertical input[type=range]{transform:rotate(270deg);-moz-transform:rotate(270deg);appearance:slider-vertical;-webkit-appearance:slider-vertical;writing-mode:bt-lr}ax-slider.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-slider.ax-primary-solid input{background:linear-gradient(to right,rgba(var(--ax-color-primary-500)) 0%,rgba(var(--ax-color-primary-500)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}ax-slider.ax-secondary-solid input{background:linear-gradient(to right,rgba(var(--ax-color-secondary-500)) 0%,rgba(var(--ax-color-secondary-500)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}ax-slider.ax-success-solid input{background:linear-gradient(to right,rgba(var(--ax-color-success-500)) 0%,rgba(var(--ax-color-success-500)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}ax-slider.ax-warning-solid input{background:linear-gradient(to right,rgba(var(--ax-color-warning-500)) 0%,rgba(var(--ax-color-warning-500)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}ax-slider.ax-danger-solid input{background:linear-gradient(to right,rgba(var(--ax-color-danger-500)) 0%,rgba(var(--ax-color-danger-500)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}ax-slider.ax-info-solid input{background:linear-gradient(to right,rgba(var(--ax-color-info-500)) 0%,rgba(var(--ax-color-info-500)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}ax-slider.ax-ghost-solid input{background:linear-gradient(to right,rgba(var(--ax-color-ghost-fore)) 0%,rgba(var(--ax-color-ghost-fore)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}.ax-dark ax-slider.ax-primary-solid input{background:linear-gradient(to right,rgba(var(--ax-color-primary-500),70%) 0%,rgba(var(--ax-color-primary-500),70%) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}.ax-dark ax-slider.ax-secondary-solid input{background:linear-gradient(to right,rgba(var(--ax-color-secondary-500),70%) 0%,rgba(var(--ax-color-secondary-500),70%) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}.ax-dark ax-slider.ax-success-solid input{background:linear-gradient(to right,rgba(var(--ax-color-success-500),70%) 0%,rgba(var(--ax-color-success-500),70%) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}.ax-dark ax-slider.ax-warning-solid input{background:linear-gradient(to right,rgba(var(--ax-color-warning-500),70%) 0%,rgba(var(--ax-color-warning-500),70%) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}.ax-dark ax-slider.ax-danger-solid input{background:linear-gradient(to right,rgba(var(--ax-color-danger-500),70%) 0%,rgba(var(--ax-color-danger-500),70%) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}.ax-dark ax-slider.ax-info-solid input{background:linear-gradient(to right,rgba(var(--ax-color-info-500),70%) 0%,rgba(var(--ax-color-info-500),70%) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}\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.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { 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 }); }
|
88
|
+
}
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXSliderComponent, decorators: [{
|
90
|
+
type: Component,
|
91
|
+
args: [{ selector: 'ax-slider', changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['readonly', 'disabled', 'value', 'name', 'color'], outputs: [
|
92
|
+
'valueChange',
|
93
|
+
'onValueChanged',
|
94
|
+
'readonlyChange',
|
95
|
+
'disabledChange',
|
96
|
+
], encapsulation: ViewEncapsulation.None, providers: [
|
97
|
+
{ provide: AXValuableComponent, useExisting: AXSliderComponent },
|
98
|
+
{
|
99
|
+
provide: NG_VALUE_ACCESSOR,
|
100
|
+
useExisting: forwardRef(() => AXSliderComponent),
|
101
|
+
multi: true,
|
102
|
+
},
|
103
|
+
], template: "<input type=\"range\" [min]=\"minValue\" [max]=\"maxValue\" [ngModel]=\"value\" (ngModelChange)=\"_handleModelChange($event)\"\n (blur)=\"emitOnBlurEvent($event)\" (focus)=\"emitOnFocusEvent($event)\" [step]=\"step\" [disabled]=\"disabled || readonly\"\n [readonly]=\"readonly\">", styles: ["ax-slider{--ax-current-value: 0%}ax-slider input{height:.5rem;width:100%;appearance:none;border-radius:9999px;background-color:rgba(var(--ax-color-on-surface));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-slider input::-webkit-slider-thumb{height:1.5rem;width:1.5rem;cursor:pointer;appearance:none;border-radius:9999px;border-width:1px;border-style:solid;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-white));--ax-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--ax-shadow-colored: 0 10px 15px -3px var(--ax-shadow-color), 0 4px 6px -4px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-shadow)}ax-slider input::-moz-range-thumb{height:1.5rem;width:1.5rem;cursor:pointer;appearance:none;border-radius:9999px;border-width:1px;border-style:solid;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-white));--ax-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--ax-shadow-colored: 0 10px 15px -3px var(--ax-shadow-color), 0 4px 6px -4px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--ax-shadow)}ax-slider.ax-vertical input[type=range]{transform:rotate(270deg);-moz-transform:rotate(270deg);appearance:slider-vertical;-webkit-appearance:slider-vertical;writing-mode:bt-lr}ax-slider.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-slider.ax-primary-solid input{background:linear-gradient(to right,rgba(var(--ax-color-primary-500)) 0%,rgba(var(--ax-color-primary-500)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}ax-slider.ax-secondary-solid input{background:linear-gradient(to right,rgba(var(--ax-color-secondary-500)) 0%,rgba(var(--ax-color-secondary-500)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}ax-slider.ax-success-solid input{background:linear-gradient(to right,rgba(var(--ax-color-success-500)) 0%,rgba(var(--ax-color-success-500)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}ax-slider.ax-warning-solid input{background:linear-gradient(to right,rgba(var(--ax-color-warning-500)) 0%,rgba(var(--ax-color-warning-500)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}ax-slider.ax-danger-solid input{background:linear-gradient(to right,rgba(var(--ax-color-danger-500)) 0%,rgba(var(--ax-color-danger-500)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}ax-slider.ax-info-solid input{background:linear-gradient(to right,rgba(var(--ax-color-info-500)) 0%,rgba(var(--ax-color-info-500)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}ax-slider.ax-ghost-solid input{background:linear-gradient(to right,rgba(var(--ax-color-ghost-fore)) 0%,rgba(var(--ax-color-ghost-fore)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}.ax-dark ax-slider.ax-primary-solid input{background:linear-gradient(to right,rgba(var(--ax-color-primary-500),70%) 0%,rgba(var(--ax-color-primary-500),70%) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}.ax-dark ax-slider.ax-secondary-solid input{background:linear-gradient(to right,rgba(var(--ax-color-secondary-500),70%) 0%,rgba(var(--ax-color-secondary-500),70%) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}.ax-dark ax-slider.ax-success-solid input{background:linear-gradient(to right,rgba(var(--ax-color-success-500),70%) 0%,rgba(var(--ax-color-success-500),70%) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}.ax-dark ax-slider.ax-warning-solid input{background:linear-gradient(to right,rgba(var(--ax-color-warning-500),70%) 0%,rgba(var(--ax-color-warning-500),70%) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}.ax-dark ax-slider.ax-danger-solid input{background:linear-gradient(to right,rgba(var(--ax-color-danger-500),70%) 0%,rgba(var(--ax-color-danger-500),70%) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}.ax-dark ax-slider.ax-info-solid input{background:linear-gradient(to right,rgba(var(--ax-color-info-500),70%) 0%,rgba(var(--ax-color-info-500),70%) var(--ax-current-value),rgba(var(--ax-color-on-surface)) var(--ax-current-value),rgba(var(--ax-color-on-surface)) 100%)}\n"] }]
|
104
|
+
}], ctorParameters: () => [{ type: i0.NgZone }], propDecorators: { minValue: [{
|
105
|
+
type: Input
|
106
|
+
}], maxValue: [{
|
107
|
+
type: Input
|
108
|
+
}], step: [{
|
109
|
+
type: Input
|
110
|
+
}], direction: [{
|
111
|
+
type: Input
|
112
|
+
}], __hostClass: [{
|
113
|
+
type: HostBinding,
|
114
|
+
args: ['class']
|
115
|
+
}], __hostClassDisabled: [{
|
116
|
+
type: HostBinding,
|
117
|
+
args: ['class.ax-state-disabled']
|
118
|
+
}] } });
|
119
|
+
|
120
|
+
const COMPONENT = [AXSliderComponent];
|
121
|
+
const MODULES = [CommonModule, AXCommonModule, FormsModule];
|
122
|
+
class AXSliderModule {
|
123
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
124
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.2", ngImport: i0, type: AXSliderModule, declarations: [AXSliderComponent], imports: [CommonModule, AXCommonModule, FormsModule], exports: [AXSliderComponent] }); }
|
125
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXSliderModule, imports: [MODULES] }); }
|
126
|
+
}
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXSliderModule, decorators: [{
|
128
|
+
type: NgModule,
|
129
|
+
args: [{
|
130
|
+
declarations: [...COMPONENT],
|
131
|
+
imports: [...MODULES],
|
132
|
+
exports: [...COMPONENT],
|
133
|
+
providers: [],
|
134
|
+
}]
|
135
|
+
}] });
|
136
|
+
|
137
|
+
/**
|
138
|
+
* Generated bundle index. Do not edit.
|
139
|
+
*/
|
140
|
+
|
141
|
+
export { AXSliderComponent, AXSliderModule };
|
142
|
+
//# sourceMappingURL=acorex-components-slider.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-components-slider.mjs","sources":["../../../../libs/components/slider/src/lib/slider.component.ts","../../../../libs/components/slider/src/lib/slider.component.html","../../../../libs/components/slider/src/lib/slider.module.ts","../../../../libs/components/slider/src/acorex-components-slider.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n NgZone,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\n\nimport {\n AXDirection,\n AXValuableComponent,\n MXColorComponent,\n MXComponentOptionChanged,\n MXValueComponent,\n} from '@acorex/components/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { classes } from 'polytype';\n\n@Component({\n selector: 'ax-slider',\n templateUrl: './slider.component.html',\n styleUrls: ['./slider.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n inputs: ['readonly', 'disabled', 'value', 'name', 'color'],\n outputs: [\n 'valueChange',\n 'onValueChanged',\n 'readonlyChange',\n 'disabledChange',\n ],\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXValuableComponent, useExisting: AXSliderComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXSliderComponent),\n multi: true,\n },\n ],\n})\nexport class AXSliderComponent extends classes(\n MXValueComponent<number>,\n MXColorComponent\n) {\n constructor(private _zone: NgZone) {\n super();\n }\n\n private _minValue = 0;\n /**\n * Specifies the smallest value that is valid\n */\n @Input()\n public get minValue(): number {\n return this._minValue ?? 0;\n }\n public set minValue(v: number) {\n this.setOption({\n name: 'minValue',\n value: v != null ? Number(v) : 0,\n });\n }\n\n private _maxValue = 100;\n /**\n * Specifies the greatest value that is valid\n */\n @Input()\n public get maxValue(): number {\n return this._maxValue ?? 100;\n }\n public set maxValue(v: number) {\n this.setOption({\n name: 'maxValue',\n value: v != null ? Number(v) : 100,\n });\n }\n\n private _step = 1;\n /**\n * Specifies the greatest value that is valid\n */\n @Input()\n public get step(): number {\n return this._step ?? 100;\n }\n public set step(v: number) {\n this.setOption({\n name: 'step',\n value: v != null ? Number(v) : 1,\n });\n }\n\n //TODO: vertical dont work properly\n @Input()\n direction: AXDirection = 'horizontal';\n\n override internalOptionChanged(e: MXComponentOptionChanged) {\n this._calcVars();\n }\n\n override internalValueChanged(value: number): void {\n this._calcVars();\n }\n\n protected _handleModelChange(value: number) {\n this.commitValue(value, true);\n }\n\n private _calcVars() {\n this._zone.runOutsideAngular(() => {\n const per =\n (((this.value ?? 0) - this.minValue) /\n (this.maxValue - this.minValue)) *\n 100 -\n 0.1;\n this.getHostElement().style.setProperty('--ax-current-value', `${per}%`);\n });\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this.color}-solid ax-${this.direction}`;\n }\n\n @HostBinding('class.ax-state-disabled')\n private get __hostClassDisabled(): boolean {\n return this.disabled;\n }\n}\n","<input type=\"range\" [min]=\"minValue\" [max]=\"maxValue\" [ngModel]=\"value\" (ngModelChange)=\"_handleModelChange($event)\"\n (blur)=\"emitOnBlurEvent($event)\" (focus)=\"emitOnFocusEvent($event)\" [step]=\"step\" [disabled]=\"disabled || readonly\"\n [readonly]=\"readonly\">","import { AXCommonModule } from '@acorex/components/common';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXSliderComponent } from './slider.component';\n\nconst COMPONENT = [AXSliderComponent];\nconst MODULES = [CommonModule, AXCommonModule, FormsModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA0CM,MAAO,iBAAkB,SAAQ,OAAO,EAC5C,g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yBAAyB,CAAA;;;AEzHxC,MAAM,SAAS,GAAG,CAAC,iBAAiB,CAAC,CAAC;AACtC,MAAM,OAAO,GAAG,CAAC,YAAY,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;MAQ/C,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAd,cAAc,EAAA,YAAA,EAAA,CATR,iBAAiB,CACnB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,cAAc,EAAE,WAAW,CAAA,EAAA,OAAA,EAAA,CADvC,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;AASvB,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,cAAc,YAJZ,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,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,CAAA;;;ACdD;;AAEG;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@acorex/components",
|
3
|
-
"version": "18.
|
3
|
+
"version": "18.3.0",
|
4
4
|
"peerDependencies": {
|
5
5
|
"@angular/common": ">=18.0.0",
|
6
6
|
"@angular/core": ">=18.0.0",
|
@@ -313,12 +313,6 @@
|
|
313
313
|
"esm": "./esm2022/radio/acorex-components-radio.mjs",
|
314
314
|
"default": "./fesm2022/acorex-components-radio.mjs"
|
315
315
|
},
|
316
|
-
"./range-slider": {
|
317
|
-
"types": "./range-slider/index.d.ts",
|
318
|
-
"esm2022": "./esm2022/range-slider/acorex-components-range-slider.mjs",
|
319
|
-
"esm": "./esm2022/range-slider/acorex-components-range-slider.mjs",
|
320
|
-
"default": "./fesm2022/acorex-components-range-slider.mjs"
|
321
|
-
},
|
322
316
|
"./result": {
|
323
317
|
"types": "./result/index.d.ts",
|
324
318
|
"esm2022": "./esm2022/result/acorex-components-result.mjs",
|
@@ -373,6 +367,12 @@
|
|
373
367
|
"esm": "./esm2022/skeleton/acorex-components-skeleton.mjs",
|
374
368
|
"default": "./fesm2022/acorex-components-skeleton.mjs"
|
375
369
|
},
|
370
|
+
"./slider": {
|
371
|
+
"types": "./slider/index.d.ts",
|
372
|
+
"esm2022": "./esm2022/slider/acorex-components-slider.mjs",
|
373
|
+
"esm": "./esm2022/slider/acorex-components-slider.mjs",
|
374
|
+
"default": "./fesm2022/acorex-components-slider.mjs"
|
375
|
+
},
|
376
376
|
"./step-wizard": {
|
377
377
|
"types": "./step-wizard/index.d.ts",
|
378
378
|
"esm2022": "./esm2022/step-wizard/acorex-components-step-wizard.mjs",
|
package/slider/README.md
ADDED
@@ -1,12 +1,12 @@
|
|
1
1
|
import { NgZone } from '@angular/core';
|
2
2
|
import { AXDirection, MXColorComponent, MXComponentOptionChanged, MXValueComponent } from '@acorex/components/common';
|
3
3
|
import * as i0 from "@angular/core";
|
4
|
-
declare const
|
4
|
+
declare const AXSliderComponent_base: import("polytype").Polytype.ClusteredConstructor<[{
|
5
5
|
new (): MXValueComponent<number>;
|
6
6
|
ɵfac: unknown;
|
7
7
|
ɵprov: import("@angular/core").ɵɵInjectableDeclaration<MXValueComponent<any>>;
|
8
8
|
}, typeof MXColorComponent]>;
|
9
|
-
export declare class
|
9
|
+
export declare class AXSliderComponent extends AXSliderComponent_base {
|
10
10
|
private _zone;
|
11
11
|
constructor(_zone: NgZone);
|
12
12
|
private _minValue;
|
@@ -34,7 +34,7 @@ export declare class AXRangeSliderComponent extends AXRangeSliderComponent_base
|
|
34
34
|
private _calcVars;
|
35
35
|
private get __hostClass();
|
36
36
|
private get __hostClassDisabled();
|
37
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
38
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXSliderComponent, never>;
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXSliderComponent, "ax-slider", never, { "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "name": { "alias": "name"; "required": false; }; "color": { "alias": "color"; "required": false; }; "minValue": { "alias": "minValue"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; "step": { "alias": "step"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; }, { "valueChange": "valueChange"; "onValueChanged": "onValueChanged"; "readonlyChange": "readonlyChange"; "disabledChange": "disabledChange"; }, never, never, false, never>;
|
39
39
|
}
|
40
40
|
export {};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./slider.component";
|
3
|
+
import * as i2 from "@angular/common";
|
4
|
+
import * as i3 from "@acorex/components/common";
|
5
|
+
import * as i4 from "@angular/forms";
|
6
|
+
export declare class AXSliderModule {
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXSliderModule, never>;
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXSliderModule, [typeof i1.AXSliderComponent], [typeof i2.CommonModule, typeof i3.AXCommonModule, typeof i4.FormsModule], [typeof i1.AXSliderComponent]>;
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXSliderModule>;
|
10
|
+
}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Generated bundle index. Do not edit.
|
3
|
-
*/
|
4
|
-
export * from './index';
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNvcmV4LWNvbXBvbmVudHMtcmFuZ2Utc2xpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3JhbmdlLXNsaWRlci9zcmMvYWNvcmV4LWNvbXBvbmVudHMtcmFuZ2Utc2xpZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|
@@ -1,3 +0,0 @@
|
|
1
|
-
export * from './lib/range-slider.component';
|
2
|
-
export * from './lib/range-slider.module';
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvcmFuZ2Utc2xpZGVyL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDhCQUE4QixDQUFDO0FBQzdDLGNBQWMsMkJBQTJCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9yYW5nZS1zbGlkZXIuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3JhbmdlLXNsaWRlci5tb2R1bGUnO1xuIl19
|