@acorex/components 18.5.10 → 18.5.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-collapse.mjs","sources":["../../../../libs/components/collapse/src/lib/collapse.component.ts","../../../../libs/components/collapse/src/lib/collapse.component.html","../../../../libs/components/collapse/src/lib/collapse-group.component.ts","../../../../libs/components/collapse/src/lib/collapse.module.ts","../../../../libs/components/collapse/src/acorex-components-collapse.ts"],"sourcesContent":["import { AXClickEvent, MXInteractiveComponent, MXLookComponent, MXLookableComponent } from '@acorex/components/common';\nimport { AUTO_STYLE, animate, state, style, transition, trigger } from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Host,\n HostBinding,\n Input,\n Optional,\n Output,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { classes } from 'polytype';\n\nexport class AXCollapseClickEvent extends AXClickEvent {\n handled = false;\n}\n\n@Component({\n selector: 'ax-collapse',\n templateUrl: './collapse.component.html',\n inputs: ['disabled', 'look'],\n styleUrls: ['./collapse.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n animations: [\n trigger('collapse', [\n state('false', style({ height: AUTO_STYLE, visibility: AUTO_STYLE })),\n state('true', style({ height: '0', visibility: 'hidden' })),\n transition('false => true', animate(150 + 'ms ease-in')),\n transition('true => false', animate(150 + 'ms ease-out')),\n ]),\n ],\n})\nexport class AXCollapseComponent extends classes(MXInteractiveComponent, MXLookComponent) {\n constructor(\n @Optional()\n @Host()\n private parent?: MXLookableComponent,\n ) {\n super();\n }\n\n /**\n * Fires each time the user clicks the panel header.\n * @event\n */\n @Output()\n onClick: EventEmitter<AXCollapseClickEvent> = new EventEmitter<AXCollapseClickEvent>();\n\n @Output()\n isCollapsedChange: EventEmitter<any> = new EventEmitter<any>();\n\n private _isCollapsed = false;\n /**\n * Providing a boolean value for its collapse state\n */\n @Input()\n public get isCollapsed(): boolean {\n return this._isCollapsed;\n }\n public set isCollapsed(v: boolean) {\n this.setOption({\n name: 'isCollapsed',\n value: v,\n afterCallback: () => {\n this.cdr.detectChanges();\n },\n });\n }\n\n private _showHeader = true;\n /**\n * Providing a boolean value for show or hide header\n */\n @Input()\n public get showHeader(): boolean {\n return this._showHeader;\n }\n public set showHeader(v: boolean) {\n this.setOption({\n name: 'showHeader',\n value: v,\n afterCallback: () => {\n this.cdr.detectChanges();\n },\n });\n }\n\n @Input()\n caption = '';\n\n @Input()\n icon = '';\n\n private _isLoading = false;\n /**\n * Providing a boolean value for its collapse state\n */\n @Input()\n public get isLoading(): boolean {\n return this._isLoading;\n }\n public set isLoading(v: boolean) {\n this.setOption({\n name: 'isLoading',\n value: v,\n afterCallback: () => {\n this.cdr.detectChanges();\n },\n });\n }\n\n @Input()\n headerTemplate: TemplateRef<any>;\n\n handleHeaderClick(e: MouseEvent) {\n if (this.disabled || this.isLoading) return;\n const event = {\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n handled: false,\n };\n this.onClick.emit(event);\n if (!event.handled) {\n this.toggle();\n }\n }\n\n open() {\n this.isCollapsed = false;\n }\n\n close() {\n this.isCollapsed = true;\n }\n\n toggle() {\n this.isCollapsed = !this.isCollapsed;\n }\n\n @HostBinding('class')\n get __hostClass(): string[] {\n return [`${this.disabled ? 'ax-state-disabled' : ''}`, `ax-look-${this.parent?.look ? this.parent.look : this.look}`];\n }\n}\n","@if (showHeader) {\n<div class=\"ax-collapse-header\" [class.ax-state-collapsed]=\"isCollapsed\" (click)=\"handleHeaderClick($event)\">\n\n @if(headerTemplate){\n <div class=\"ax-collapse-custom-header-container\">\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: { caption, isCollapsed } }\"></ng-container>\n </div>\n }@else{\n <div class=\"ax-collapse-header-container\">\n <div class=\"ax-collapse-header-start\">\n <span class=\"ax-collapse-header-icon\" [class]=\"icon\"> </span>\n <span>\n {{ caption }}\n </span>\n </div>\n <div class=\"ax-collapse-header-end\">\n @if(isLoading){\n <ax-loading></ax-loading>\n }@else {\n <span class=\"ax-icon ax-icon-chevron-left ax-collapse-arrow\"\n [ngClass]=\"{ '-rotation-90': isCollapsed, 'rotation-90': !isCollapsed }\"></span>\n }\n </div>\n </div>\n }\n\n</div>\n}\n<div class=\"ax-collapse-body\" [@collapse]=\"isCollapsed\">\n <div class=\"ax-collapse-body-content\">\n <ng-content></ng-content>\n </div>\n</div>","import { MXBaseComponent, MXLookComponent, MXLookableComponent } from '@acorex/components/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n EventEmitter,\n HostBinding,\n Input,\n OnDestroy,\n Output,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport { classes } from 'polytype';\nimport { Subscription } from 'rxjs';\nimport { AXCollapseComponent } from './collapse.component';\n\n@Component({\n selector: 'ax-collapse-group',\n inputs: ['look'],\n template: `<ng-content select=\"ax-collapse\"></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: MXLookableComponent,\n useExisting: AXCollapseGroupComponent,\n },\n ],\n})\nexport class AXCollapseGroupComponent extends classes(MXBaseComponent, MXLookComponent) implements AfterViewInit, OnDestroy {\n @Output()\n accordionChange: EventEmitter<boolean> = new EventEmitter();\n private _accordion?: boolean = false;\n\n /**\n * Enables accordion behavior, allowing only one collapsible item to be expanded at a time\n */\n @Input()\n get accordion(): boolean | undefined {\n return this._accordion;\n }\n set accordion(value: boolean) {\n this.setOption({\n name: 'accordion',\n value,\n afterCallback: (oldValue, newValue) => {\n if (newValue) {\n this.applyAccordion();\n } else {\n this.removeAccordion();\n }\n },\n });\n }\n\n @Output()\n activeIndexChange: EventEmitter<number> = new EventEmitter<number>();\n private _activeIndex = 0;\n /**\n * Index of the currently active item within the group\n */\n @Input()\n get activeIndex(): number {\n return this._activeIndex;\n }\n set activeIndex(value: number) {\n this.setOption({\n name: 'activeIndex',\n value,\n beforeCallback: (oldValue, newValue) => {\n const len = this._items?.length || 0;\n if (newValue < 0) newValue = 0;\n if (len > 0 && newValue >= len) {\n newValue = len - 1;\n }\n return newValue;\n },\n afterCallback: () => {\n this.applyAccordion();\n },\n });\n }\n\n @ContentChildren(AXCollapseComponent)\n private _items: QueryList<AXCollapseComponent>;\n\n private _subs: Subscription[] = [];\n\n ngAfterViewInit(): void {\n if (this.accordion) {\n this.applyAccordion();\n }\n }\n\n private applyAccordion() {\n if (!this.look) return;\n if (this._items && this._items.length > 1) {\n const activeIndex = this._items.get(this.activeIndex) || this._items.get(0);\n this._items.forEach((c) => (c.isCollapsed = true));\n if (activeIndex) activeIndex.isCollapsed = false;\n this._items.forEach((c1: AXCollapseComponent) => {\n const list = this._items.toArray();\n\n this._subs.push(\n // TODO: add and use a new event for status changes\n c1.onClick.subscribe((e) => {\n if (!e.handled) {\n this._activeIndex = list.indexOf(c1);\n list.filter((c2) => c2 != c1).forEach((c) => (c.isCollapsed = true));\n }\n }),\n );\n });\n }\n }\n\n private removeAccordion() {\n this._subs.forEach((s) => s.unsubscribe());\n this._subs = [];\n }\n\n ngOnDestroy(): void {\n this.removeAccordion();\n }\n\n @HostBinding('class')\n private get __hostClass(): string[] {\n return ['ax-collapse-group', `ax-look-${this.look}`];\n }\n}\n","import { AXLoadingModule } from '@acorex/components/loading';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXCollapseGroupComponent } from './collapse-group.component';\nimport { AXCollapseComponent } from './collapse.component';\n\n@NgModule({\n declarations: [AXCollapseComponent, AXCollapseGroupComponent],\n imports: [CommonModule, AXLoadingModule],\n exports: [AXCollapseComponent, AXCollapseGroupComponent],\n providers: [],\n})\nexport class AXCollapseModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAgBM,MAAO,oBAAqB,SAAQ,YAAY,CAAA;AAAtD,IAAA,WAAA,GAAA;;QACE,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gBAmBN,iBAAiB,EAAA,CAAA;sBADhB,MAAM;gBAOH,WAAW,EAAA,CAAA;sBADd,KAAK;gBAuBE,MAAM,EAAA,CAAA;sBADb,eAAe;uBAAC,mBAAmB,CAAA;gBA2CxB,WAAW,EAAA,CAAA;sBADtB,WAAW;uBAAC,OAAO,CAAA;;;MCnHT,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAhB,gBAAgB,EAAA,YAAA,EAAA,CALZ,mBAAmB,EAAE,wBAAwB,CAAA,EAAA,OAAA,EAAA,CAClD,YAAY,EAAE,eAAe,CAAA,EAAA,OAAA,EAAA,CAC7B,mBAAmB,EAAE,wBAAwB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAG5C,gBAAgB,EAAA,OAAA,EAAA,CAJjB,YAAY,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAI5B,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,wBAAwB,CAAC;AAC7D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,CAAC;AACxC,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,wBAAwB,CAAC;AACxD,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-collapse.mjs","sources":["../../../../libs/components/collapse/src/lib/collapse.component.ts","../../../../libs/components/collapse/src/lib/collapse.component.html","../../../../libs/components/collapse/src/lib/collapse-group.component.ts","../../../../libs/components/collapse/src/lib/collapse.module.ts","../../../../libs/components/collapse/src/acorex-components-collapse.ts"],"sourcesContent":["import { AXClickEvent, MXInteractiveComponent, MXLookComponent, MXLookableComponent } from '@acorex/components/common';\nimport { AUTO_STYLE, animate, state, style, transition, trigger } from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Host,\n HostBinding,\n Input,\n Optional,\n Output,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { classes } from 'polytype';\n\nexport class AXCollapseClickEvent extends AXClickEvent {\n handled = false;\n}\n\n@Component({\n selector: 'ax-collapse',\n templateUrl: './collapse.component.html',\n inputs: ['disabled', 'look'],\n styleUrls: ['./collapse.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n animations: [\n trigger('collapse', [\n state('false', style({ height: AUTO_STYLE, visibility: AUTO_STYLE })),\n state('true', style({ height: '0', visibility: 'hidden' })),\n transition('false => true', animate(150 + 'ms ease-in')),\n transition('true => false', animate(150 + 'ms ease-out')),\n ]),\n ],\n})\nexport class AXCollapseComponent extends classes(MXInteractiveComponent, MXLookComponent) {\n constructor(\n @Optional()\n @Host()\n private parent?: MXLookableComponent,\n ) {\n super();\n }\n\n /**\n * Fires each time the user clicks the panel header.\n * @event\n */\n @Output()\n onClick: EventEmitter<AXCollapseClickEvent> = new EventEmitter<AXCollapseClickEvent>();\n\n @Output()\n isCollapsedChange: EventEmitter<any> = new EventEmitter<any>();\n\n private _isCollapsed = false;\n /**\n * Providing a boolean value for its collapse state\n */\n @Input()\n public get isCollapsed(): boolean {\n return this._isCollapsed;\n }\n public set isCollapsed(v: boolean) {\n this.setOption({\n name: 'isCollapsed',\n value: v,\n afterCallback: () => {\n this.cdr.detectChanges();\n },\n });\n }\n\n private _showHeader = true;\n /**\n * Providing a boolean value for show or hide header\n */\n @Input()\n public get showHeader(): boolean {\n return this._showHeader;\n }\n public set showHeader(v: boolean) {\n this.setOption({\n name: 'showHeader',\n value: v,\n afterCallback: () => {\n this.cdr.detectChanges();\n },\n });\n }\n\n @Input()\n caption = '';\n\n @Input()\n icon = '';\n\n private _isLoading = false;\n /**\n * Providing a boolean value for its collapse state\n */\n @Input()\n public get isLoading(): boolean {\n return this._isLoading;\n }\n public set isLoading(v: boolean) {\n this.setOption({\n name: 'isLoading',\n value: v,\n afterCallback: () => {\n this.cdr.detectChanges();\n },\n });\n }\n\n @Input()\n headerTemplate: TemplateRef<any>;\n\n handleHeaderClick(e: MouseEvent) {\n if (this.disabled || this.isLoading) return;\n const event = {\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n handled: false,\n };\n this.onClick.emit(event);\n if (!event.handled) {\n this.toggle();\n }\n }\n\n open() {\n this.isCollapsed = false;\n }\n\n close() {\n this.isCollapsed = true;\n }\n\n toggle() {\n this.isCollapsed = !this.isCollapsed;\n }\n\n @HostBinding('class')\n get __hostClass(): string[] {\n return [`${this.disabled ? 'ax-state-disabled' : ''}`, `ax-look-${this.parent?.look ? this.parent.look : this.look}`];\n }\n}\n","@if (showHeader) {\n<div class=\"ax-collapse-header\" [class.ax-state-collapsed]=\"isCollapsed\" (click)=\"handleHeaderClick($event)\">\n\n @if(headerTemplate){\n <div class=\"ax-collapse-custom-header-container\">\n <ng-container [ngTemplateOutlet]=\"headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: { caption, isCollapsed } }\"></ng-container>\n </div>\n }@else{\n <div class=\"ax-collapse-header-container\">\n <div class=\"ax-collapse-header-start\">\n <span class=\"ax-collapse-header-icon\" [class]=\"icon\"> </span>\n <span>\n {{ caption }}\n </span>\n </div>\n <div class=\"ax-collapse-header-end\">\n @if(isLoading){\n <ax-loading></ax-loading>\n }@else {\n <span class=\"ax-icon ax-icon-chevron-left ax-collapse-arrow\"\n [ngClass]=\"{ '-rotation-90': isCollapsed, 'rotation-90': !isCollapsed }\"></span>\n }\n </div>\n </div>\n }\n\n</div>\n}\n<div class=\"ax-collapse-body\" [@collapse]=\"isCollapsed\">\n <div class=\"ax-collapse-body-content\">\n <ng-content></ng-content>\n </div>\n</div>","import { MXBaseComponent, MXLookComponent, MXLookableComponent } from '@acorex/components/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n EventEmitter,\n HostBinding,\n Input,\n OnDestroy,\n Output,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport { classes } from 'polytype';\nimport { Subscription } from 'rxjs';\nimport { AXCollapseComponent } from './collapse.component';\n\n@Component({\n selector: 'ax-collapse-group',\n inputs: ['look'],\n template: `<ng-content select=\"ax-collapse\"></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: MXLookableComponent,\n useExisting: AXCollapseGroupComponent,\n },\n ],\n})\nexport class AXCollapseGroupComponent extends classes(MXBaseComponent, MXLookComponent) implements AfterViewInit, OnDestroy {\n @Output()\n accordionChange: EventEmitter<boolean> = new EventEmitter();\n private _accordion?: boolean = false;\n\n /**\n * Enables accordion behavior, allowing only one collapsible item to be expanded at a time\n */\n @Input()\n get accordion(): boolean | undefined {\n return this._accordion;\n }\n set accordion(value: boolean) {\n this.setOption({\n name: 'accordion',\n value,\n afterCallback: (oldValue, newValue) => {\n if (newValue) {\n this.applyAccordion();\n } else {\n this.removeAccordion();\n }\n },\n });\n }\n\n @Output()\n activeIndexChange: EventEmitter<number> = new EventEmitter<number>();\n private _activeIndex = 0;\n /**\n * Index of the currently active item within the group\n */\n @Input()\n get activeIndex(): number {\n return this._activeIndex;\n }\n set activeIndex(value: number) {\n this.setOption({\n name: 'activeIndex',\n value,\n beforeCallback: (oldValue, newValue) => {\n const len = this._items?.length || 0;\n if (newValue < 0) newValue = 0;\n if (len > 0 && newValue >= len) {\n newValue = len - 1;\n }\n return newValue;\n },\n afterCallback: () => {\n this.applyAccordion();\n },\n });\n }\n\n @ContentChildren(AXCollapseComponent)\n private _items: QueryList<AXCollapseComponent>;\n\n private _subs: Subscription[] = [];\n\n ngAfterViewInit(): void {\n if (this.accordion) {\n this.applyAccordion();\n }\n }\n\n private applyAccordion() {\n if (!this.look) return;\n if (this._items && this._items.length > 1) {\n const activeIndex = this._items.get(this.activeIndex) || this._items.get(0);\n this._items.forEach((c) => (c.isCollapsed = true));\n if (activeIndex) activeIndex.isCollapsed = false;\n this._items.forEach((c1: AXCollapseComponent) => {\n const list = this._items.toArray();\n\n this._subs.push(\n // TODO: add and use a new event for status changes\n c1.onClick.subscribe((e) => {\n if (!e.handled) {\n this._activeIndex = list.indexOf(c1);\n list.filter((c2) => c2 != c1).forEach((c) => (c.isCollapsed = true));\n }\n }),\n );\n });\n }\n }\n\n private removeAccordion() {\n this._subs.forEach((s) => s.unsubscribe());\n this._subs = [];\n }\n\n ngOnDestroy(): void {\n this.removeAccordion();\n }\n\n @HostBinding('class')\n private get __hostClass(): string[] {\n return ['ax-collapse-group', `ax-look-${this.look}`];\n }\n}\n","import { AXLoadingModule } from '@acorex/components/loading';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXCollapseGroupComponent } from './collapse-group.component';\nimport { AXCollapseComponent } from './collapse.component';\n\n@NgModule({\n declarations: [AXCollapseComponent, AXCollapseGroupComponent],\n imports: [CommonModule, AXLoadingModule],\n exports: [AXCollapseComponent, AXCollapseGroupComponent],\n providers: [],\n})\nexport class AXCollapseModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAgBM,MAAO,oBAAqB,SAAQ,YAAY,CAAA;AAAtD,IAAA,WAAA,GAAA;;QACE,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;KACjB;AAAA,CAAA;AAkBK,MAAO,mBAAoB,SAAQ,OAAO,CAAC,sBAAsB,EAAE,eAAe,CAAC,CAAA;AACvF,IAAA,WAAA,CAGU,MAA4B,EAAA;AAEpC,QAAA,KAAK,EAAE,CAAC;QAFA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAsB;AAKtC;;;AAGG;AAEH,QAAA,IAAA,CAAA,OAAO,GAAuC,IAAI,YAAY,EAAwB,CAAC;AAGvF,QAAA,IAAA,CA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AAhB,gBAAgB,EAAA,YAAA,EAAA,CALZ,mBAAmB,EAAE,wBAAwB,CAAA,EAAA,OAAA,EAAA,CAClD,YAAY,EAAE,eAAe,CAAA,EAAA,OAAA,EAAA,CAC7B,mBAAmB,EAAE,wBAAwB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAG5C,gBAAgB,EAAA,OAAA,EAAA,CAJjB,YAAY,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAI5B,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,wBAAwB,CAAC;AAC7D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,CAAC;AACxC,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,wBAAwB,CAAC;AACxD,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
@@ -1485,7 +1485,6 @@ class MXSelectionValueComponent extends MXValueComponent {
1485
1485
  Object.assign(obj, item);
1486
1486
  }
1487
1487
  else {
1488
- // debugger;
1489
1488
  const existsItem = findBykey ? this.getItemByKey(key) : null;
1490
1489
  if (existsItem && existsItem instanceof Promise) {
1491
1490
  obj[this.valueField] = key;
@@ -1494,7 +1493,7 @@ class MXSelectionValueComponent extends MXValueComponent {
1494
1493
  //
1495
1494
  existsItem
1496
1495
  .then((r) => {
1497
- if (typeof r === 'object') {
1496
+ if (typeof r === 'object' && r) {
1498
1497
  obj[this.valueField] = r[this.valueField];
1499
1498
  obj[this.textField] = r[this.textField];
1500
1499
  }