@acorex/components 18.10.14 → 18.10.16
Sign up to get free protection for your applications and to get access to all the features.
- package/button-group/lib/button-group.component.d.ts +5 -5
- package/esm2022/button-group/lib/button-group.component.mjs +10 -8
- package/esm2022/image-editor/lib/image-editor-toolbar/image-editor-toolbar.component.mjs +4 -4
- package/esm2022/image-editor/lib/image-editor-tools/image-editor-color-picker/image-editor-color-picker.component.mjs +3 -3
- package/esm2022/image-editor/lib/image-editor-tools/image-editor-pen-mode-changer/image-editor-pen-mode-changer.component.mjs +3 -3
- package/esm2022/image-editor/lib/image-editor-view/image-editor-view.component.mjs +15 -3
- package/esm2022/image-editor/lib/image-editor.service.mjs +4 -3
- package/esm2022/paint/lib/paint/paint-view/paint-view.component.mjs +8 -3
- package/esm2022/popover/lib/popover.component.mjs +55 -34
- package/esm2022/popup/lib/popup.component.mjs +2 -2
- package/esm2022/select-box/lib/select-box.component.mjs +3 -3
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.mjs +9 -3
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-toolbar/wysiwyg-toolbar.component.mjs +3 -3
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-alignment/wysiwyg-alignment.component.mjs +3 -1
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-font-style/wysiwyg-font-style.component.mjs +3 -1
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-list/wysiwyg-list.component.mjs +3 -1
- package/fesm2022/acorex-components-button-group.mjs +9 -7
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +24 -11
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-paint.mjs +7 -2
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +54 -33
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +2 -2
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +2 -2
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +16 -4
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/image-editor/lib/image-editor-toolbar/image-editor-toolbar.component.d.ts +1 -1
- package/image-editor/lib/image-editor.service.d.ts +3 -2
- package/package.json +37 -37
- package/popover/lib/popover.component.d.ts +36 -34
- package/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.d.ts +1 -2
@@ -312,7 +312,7 @@ class AXSelectBoxComponent extends classes(MXDropdownBoxBaseComponent, MXSelecti
|
|
312
312
|
useClass: MXSelectionBridgeService,
|
313
313
|
},
|
314
314
|
AXUnsubscriber,
|
315
|
-
], queries: [{ propertyName: "searchBox", first: true, predicate: AXSearchBoxComponent, descendants: true, static: true }], viewQueries: [{ propertyName: "panel", first: true, predicate: ["panel"], descendants: true }, { propertyName: "list", first: true, predicate: AXListComponent, descendants: true }, { propertyName: "dropdown", first: true, predicate: AXDropdownBoxComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ax-dropdown-box\n [disabled]=\"disabled\"\n (onOpened)=\"_handleOnOpenedEvent($event)\"\n (onClosed)=\"_handleOnClosedEvent($event)\"\n [look]=\"look\"\n [class.ax-auto-height]=\"autoHeight\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n>\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\" (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 } @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\" (click)=\"toggle()\">\n <!-- @if (isLoading() && !isOpen) {\n <ax-loading type=\"spinner\"></ax-loading>\n } @else { -->\n <span\n class=\"ax-icon ax-icon-chevron-left ax-arrow-button\"\n [ngClass]=\"{\n '-rotation-90': !isOpen,\n 'rotation-90': isOpen,\n }\"\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 [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\n [dataSource]=\"_listDataSource\"\n [multiple]=\"multiple\"\n [style.height]=\"dropdownSizes.height\"\n [valueField]=\"valueField\"\n [textField]=\"textField\"\n [textTemplate]=\"textTemplate\"\n [emptyTemplate]=\"emptyTemplate ?? empty\"\n [itemTemplate]=\"itemTemplate\"\n [loadingTemplate]=\"loadingTemplate\"\n [ngModel]=\"value\"\n (onValueChanged)=\"_handleValueChanged($event)\"\n [selectionMode]=\"'item'\"\n (onItemClick)=\"_handleOnItemClick($event)\"\n >\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>\n", styles: ["ax-select-box{display:block;width:100%;border-radius:var(--ax-rounded-border-default)}ax-select-box ax-dropdown-box{border-radius:inherit!important}ax-select-box ax-dropdown-box.ax-auto-height{height:auto!important}ax-select-box .ax-editor-container.ax-look-fill .ax-select-box-selection.ax-multiple .ax-selected-token{background-color:rgba(var(--ax-color-surface))}ax-select-box .ax-selected-token{display:flex;align-items:center;border-radius:var(--ax-rounded-border-default);padding:.25rem .5rem;color:rgb(var(--ax-color-text-default))}ax-select-box .ax-selected-token .ax-icon-close{margin-inline-start:.5rem;cursor:pointer;width:1rem;height:1rem}ax-select-box .ax-select-box-selection{display:flex;flex:1 1 0%;cursor:pointer;-webkit-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:.25rem;padding:.25rem;outline:2px solid transparent;outline-offset:2px;height:100%}ax-select-box .ax-select-box-selection>span{white-space:nowrap;padding-inline-end:.75rem;padding-inline-start:1rem}ax-select-box .ax-select-box-selection .ax-selectbox-input{width:0px;opacity:0}ax-select-box .ax-select-box-selection.ax-multiple .ax-selected-token{background-color:rgba(var(--ax-color-on-surface))}ax-select-box .ax-placeholder{padding-inline-end:.75rem;padding-inline-start:1rem}ax-select-box .ax-general-button .ax-arrow-button{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-select-box .ax-general-button .ax-arrow-button.-rotation-90{transform:rotate(-90deg)}ax-select-box .ax-general-button .ax-arrow-button.rotation-90{transform:rotate(90deg)}.ax-select-box-panel{height:fit-content}.ax-select-box-panel>ax-header.ax-solid{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default))}.ax-select-box-panel>ax-header.ax-solid ax-title{font-size:1rem;line-height:1.5rem;font-weight:500}.ax-select-box-panel .ax-search-container{padding:.5rem}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "component", type: i5.AXDropdownBoxComponent, selector: "ax-dropdown-box", inputs: ["disabled", "look"], outputs: ["disabledChange", "onBlur", "onFocus", "onClick", "onOpened", "onClosed"] }, { kind: "component", type: i6.AXListComponent, selector: "ax-list", inputs: ["id", "name", "disabled", "readonly", "valueField", "textField", "textTemplate", "disabledField", "multiple", "selectionMode", "dataSource", "itemHeight", "itemTemplate", "emptyTemplate", "loadingTemplate", "checkbox"], outputs: ["onValueChanged", "disabledChange", "readOnlyChange", "onBlur", "onFocus", "onItemClick", "onScrolledIndexChanged"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
315
|
+
], queries: [{ propertyName: "searchBox", first: true, predicate: AXSearchBoxComponent, descendants: true, static: true }], viewQueries: [{ propertyName: "panel", first: true, predicate: ["panel"], descendants: true }, { propertyName: "list", first: true, predicate: AXListComponent, descendants: true }, { propertyName: "dropdown", first: true, predicate: AXDropdownBoxComponent, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ax-dropdown-box\r\n [disabled]=\"disabled\"\r\n (onOpened)=\"_handleOnOpenedEvent($event)\"\r\n (onClosed)=\"_handleOnClosedEvent($event)\"\r\n [look]=\"look\"\r\n [class.ax-auto-height]=\"autoHeight\"\r\n (focus)=\"emitOnFocusEvent($event)\"\r\n (blur)=\"emitOnBlurEvent($event)\"\r\n>\r\n <ng-container input>\r\n <ng-content select=\"ax-prefix\"> </ng-content>\r\n <div class=\"ax-select-box-selection ax-content\" [class.ax-multiple]=\"multiple\" [tabindex]=\"tabIndex\" (click)=\"toggle()\">\r\n @if (selectedItems.length === 0) {\r\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\r\n {{ placeholder }}\r\n </div>\r\n }\r\n @for (item of selectedItems; track $index) {\r\n @if (selectedTemplate) {\r\n <ng-template *ngTemplateOutlet=\"selectedTemplate; context: { $implicit: { data: item } }\"></ng-template>\r\n } @else {\r\n <div class=\"ax-selected-token\">\r\n {{ getDisplayText(item) }}\r\n @if (!disabled && !readonly && multiple) {\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n @if (selectedItems?.length && !disabled && !readonly) {\r\n <ng-content select=\"ax-clear-button\"></ng-content>\r\n }\r\n <button type=\"button\" [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-general-button ax-button-icon\" (click)=\"toggle()\">\r\n <!-- @if (isLoading() && !isOpen) {\r\n <ax-loading type=\"spinner\"></ax-loading>\r\n } @else { -->\r\n <span\r\n class=\"ax-icon ax-icon-chevron-left ax-arrow-button\"\r\n [ngClass]=\"{\r\n '-rotation-90': !isOpen,\r\n 'rotation-90': isOpen,\r\n }\"\r\n ></span>\r\n <!-- } -->\r\n </button>\r\n <ng-content select=\"ax-suffix\"> </ng-content>\r\n <ng-template #search>\r\n <ng-content select=\"ax-search-box\"> </ng-content>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container panel>\r\n <div #panel class=\"ax-select-box-panel\" [style.min-width]=\"dropdownSizes.width\">\r\n @if (dropdown.isActionsheetStyle) {\r\n <ax-header class=\"ax-solid\">\r\n <ax-title>{{ caption || placeholder || 'selectbox.popover.title' | translate | async }}</ax-title>\r\n <ax-close-button [icon]=\"multiple ? 'ax-icon ax-icon-check !ax-text-primary-500' : 'ax-icon ax-icon-close'\"></ax-close-button>\r\n </ax-header>\r\n }\r\n @if (searchBox) {\r\n <div class=\"ax-search-container\">\r\n <ng-template [ngTemplateOutlet]=\"search\"></ng-template>\r\n </div>\r\n }\r\n @if (renderList) {\r\n <ax-list\r\n [dataSource]=\"_listDataSource\"\r\n [multiple]=\"multiple\"\r\n [style.height]=\"dropdownSizes.height\"\r\n [valueField]=\"valueField\"\r\n [textField]=\"textField\"\r\n [textTemplate]=\"textTemplate\"\r\n [emptyTemplate]=\"emptyTemplate ?? empty\"\r\n [itemTemplate]=\"itemTemplate\"\r\n [loadingTemplate]=\"loadingTemplate\"\r\n [ngModel]=\"value\"\r\n (onValueChanged)=\"_handleValueChanged($event)\"\r\n [selectionMode]=\"'item'\"\r\n (onItemClick)=\"_handleOnItemClick($event)\"\r\n >\r\n <ng-template #empty> {{ 'no-result-found' | translate | async }} </ng-template>\r\n </ax-list>\r\n }\r\n\r\n @if (isLoading()) {\r\n @if (loadingTemplate) {\r\n <ng-template *ngTemplateOutlet=\"loadingTemplate\"></ng-template>\r\n } @else {\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading></ax-loading>\r\n </div>\r\n }\r\n }\r\n\r\n <ng-content select=\"ax-footer\"> </ng-content>\r\n </div>\r\n </ng-container>\r\n</ax-dropdown-box>\r\n<ng-content select=\"ax-validation-rule\"> </ng-content>\r\n", styles: ["ax-select-box{display:block;width:100%;border-radius:var(--ax-rounded-border-default)}ax-select-box ax-dropdown-box{border-radius:inherit!important}ax-select-box ax-dropdown-box.ax-auto-height{height:auto!important}ax-select-box .ax-editor-container.ax-look-fill .ax-select-box-selection.ax-multiple .ax-selected-token{background-color:rgba(var(--ax-color-surface))}ax-select-box .ax-selected-token{display:flex;align-items:center;border-radius:var(--ax-rounded-border-default);padding:.25rem .5rem;color:rgb(var(--ax-color-text-default))}ax-select-box .ax-selected-token .ax-icon-close{margin-inline-start:.5rem;cursor:pointer;width:1rem;height:1rem}ax-select-box .ax-select-box-selection{display:flex;flex:1 1 0%;cursor:pointer;-webkit-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:.25rem;padding:.25rem;outline:2px solid transparent;outline-offset:2px;height:100%}ax-select-box .ax-select-box-selection>span{white-space:nowrap;padding-inline-end:.75rem;padding-inline-start:1rem}ax-select-box .ax-select-box-selection .ax-selectbox-input{width:0px;opacity:0}ax-select-box .ax-select-box-selection.ax-multiple .ax-selected-token{background-color:rgba(var(--ax-color-on-surface))}ax-select-box .ax-placeholder{padding-inline-end:.75rem;padding-inline-start:1rem}ax-select-box .ax-general-button .ax-arrow-button{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-select-box .ax-general-button .ax-arrow-button.-rotation-90{transform:rotate(-90deg)}ax-select-box .ax-general-button .ax-arrow-button.rotation-90{transform:rotate(90deg)}.ax-select-box-panel{height:fit-content}.ax-select-box-panel>ax-header.ax-solid{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default))}.ax-select-box-panel>ax-header.ax-solid ax-title{font-size:1rem;line-height:1.5rem;font-weight:500}.ax-select-box-panel .ax-search-container{padding:.5rem}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "component", type: i5.AXDropdownBoxComponent, selector: "ax-dropdown-box", inputs: ["disabled", "look"], outputs: ["disabledChange", "onBlur", "onFocus", "onClick", "onOpened", "onClosed"] }, { kind: "component", type: i6.AXListComponent, selector: "ax-list", inputs: ["id", "name", "disabled", "readonly", "valueField", "textField", "textTemplate", "disabledField", "multiple", "selectionMode", "dataSource", "itemHeight", "itemTemplate", "emptyTemplate", "loadingTemplate", "checkbox"], outputs: ["onValueChanged", "disabledChange", "readOnlyChange", "onBlur", "onFocus", "onItemClick", "onScrolledIndexChanged"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
316
316
|
}
|
317
317
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXSelectBoxComponent, decorators: [{
|
318
318
|
type: Component,
|
@@ -360,7 +360,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
360
360
|
useClass: MXSelectionBridgeService,
|
361
361
|
},
|
362
362
|
AXUnsubscriber,
|
363
|
-
], host: { ngSkipHydration: 'true' }, template: "<ax-dropdown-box\n [disabled]=\"disabled\"\n (onOpened)=\"_handleOnOpenedEvent($event)\"\n (onClosed)=\"_handleOnClosedEvent($event)\"\n [look]=\"look\"\n [class.ax-auto-height]=\"autoHeight\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n>\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\" (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 } @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\" (click)=\"toggle()\">\n <!-- @if (isLoading() && !isOpen) {\n <ax-loading type=\"spinner\"></ax-loading>\n } @else { -->\n <span\n class=\"ax-icon ax-icon-chevron-left ax-arrow-button\"\n [ngClass]=\"{\n '-rotation-90': !isOpen,\n 'rotation-90': isOpen,\n }\"\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 [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\n [dataSource]=\"_listDataSource\"\n [multiple]=\"multiple\"\n [style.height]=\"dropdownSizes.height\"\n [valueField]=\"valueField\"\n [textField]=\"textField\"\n [textTemplate]=\"textTemplate\"\n [emptyTemplate]=\"emptyTemplate ?? empty\"\n [itemTemplate]=\"itemTemplate\"\n [loadingTemplate]=\"loadingTemplate\"\n [ngModel]=\"value\"\n (onValueChanged)=\"_handleValueChanged($event)\"\n [selectionMode]=\"'item'\"\n (onItemClick)=\"_handleOnItemClick($event)\"\n >\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>\n", styles: ["ax-select-box{display:block;width:100%;border-radius:var(--ax-rounded-border-default)}ax-select-box ax-dropdown-box{border-radius:inherit!important}ax-select-box ax-dropdown-box.ax-auto-height{height:auto!important}ax-select-box .ax-editor-container.ax-look-fill .ax-select-box-selection.ax-multiple .ax-selected-token{background-color:rgba(var(--ax-color-surface))}ax-select-box .ax-selected-token{display:flex;align-items:center;border-radius:var(--ax-rounded-border-default);padding:.25rem .5rem;color:rgb(var(--ax-color-text-default))}ax-select-box .ax-selected-token .ax-icon-close{margin-inline-start:.5rem;cursor:pointer;width:1rem;height:1rem}ax-select-box .ax-select-box-selection{display:flex;flex:1 1 0%;cursor:pointer;-webkit-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:.25rem;padding:.25rem;outline:2px solid transparent;outline-offset:2px;height:100%}ax-select-box .ax-select-box-selection>span{white-space:nowrap;padding-inline-end:.75rem;padding-inline-start:1rem}ax-select-box .ax-select-box-selection .ax-selectbox-input{width:0px;opacity:0}ax-select-box .ax-select-box-selection.ax-multiple .ax-selected-token{background-color:rgba(var(--ax-color-on-surface))}ax-select-box .ax-placeholder{padding-inline-end:.75rem;padding-inline-start:1rem}ax-select-box .ax-general-button .ax-arrow-button{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-select-box .ax-general-button .ax-arrow-button.-rotation-90{transform:rotate(-90deg)}ax-select-box .ax-general-button .ax-arrow-button.rotation-90{transform:rotate(90deg)}.ax-select-box-panel{height:fit-content}.ax-select-box-panel>ax-header.ax-solid{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default))}.ax-select-box-panel>ax-header.ax-solid ax-title{font-size:1rem;line-height:1.5rem;font-weight:500}.ax-select-box-panel .ax-search-container{padding:.5rem}\n"] }]
|
363
|
+
], host: { ngSkipHydration: 'true' }, template: "<ax-dropdown-box\r\n [disabled]=\"disabled\"\r\n (onOpened)=\"_handleOnOpenedEvent($event)\"\r\n (onClosed)=\"_handleOnClosedEvent($event)\"\r\n [look]=\"look\"\r\n [class.ax-auto-height]=\"autoHeight\"\r\n (focus)=\"emitOnFocusEvent($event)\"\r\n (blur)=\"emitOnBlurEvent($event)\"\r\n>\r\n <ng-container input>\r\n <ng-content select=\"ax-prefix\"> </ng-content>\r\n <div class=\"ax-select-box-selection ax-content\" [class.ax-multiple]=\"multiple\" [tabindex]=\"tabIndex\" (click)=\"toggle()\">\r\n @if (selectedItems.length === 0) {\r\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\r\n {{ placeholder }}\r\n </div>\r\n }\r\n @for (item of selectedItems; track $index) {\r\n @if (selectedTemplate) {\r\n <ng-template *ngTemplateOutlet=\"selectedTemplate; context: { $implicit: { data: item } }\"></ng-template>\r\n } @else {\r\n <div class=\"ax-selected-token\">\r\n {{ getDisplayText(item) }}\r\n @if (!disabled && !readonly && multiple) {\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n @if (selectedItems?.length && !disabled && !readonly) {\r\n <ng-content select=\"ax-clear-button\"></ng-content>\r\n }\r\n <button type=\"button\" [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-general-button ax-button-icon\" (click)=\"toggle()\">\r\n <!-- @if (isLoading() && !isOpen) {\r\n <ax-loading type=\"spinner\"></ax-loading>\r\n } @else { -->\r\n <span\r\n class=\"ax-icon ax-icon-chevron-left ax-arrow-button\"\r\n [ngClass]=\"{\r\n '-rotation-90': !isOpen,\r\n 'rotation-90': isOpen,\r\n }\"\r\n ></span>\r\n <!-- } -->\r\n </button>\r\n <ng-content select=\"ax-suffix\"> </ng-content>\r\n <ng-template #search>\r\n <ng-content select=\"ax-search-box\"> </ng-content>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container panel>\r\n <div #panel class=\"ax-select-box-panel\" [style.min-width]=\"dropdownSizes.width\">\r\n @if (dropdown.isActionsheetStyle) {\r\n <ax-header class=\"ax-solid\">\r\n <ax-title>{{ caption || placeholder || 'selectbox.popover.title' | translate | async }}</ax-title>\r\n <ax-close-button [icon]=\"multiple ? 'ax-icon ax-icon-check !ax-text-primary-500' : 'ax-icon ax-icon-close'\"></ax-close-button>\r\n </ax-header>\r\n }\r\n @if (searchBox) {\r\n <div class=\"ax-search-container\">\r\n <ng-template [ngTemplateOutlet]=\"search\"></ng-template>\r\n </div>\r\n }\r\n @if (renderList) {\r\n <ax-list\r\n [dataSource]=\"_listDataSource\"\r\n [multiple]=\"multiple\"\r\n [style.height]=\"dropdownSizes.height\"\r\n [valueField]=\"valueField\"\r\n [textField]=\"textField\"\r\n [textTemplate]=\"textTemplate\"\r\n [emptyTemplate]=\"emptyTemplate ?? empty\"\r\n [itemTemplate]=\"itemTemplate\"\r\n [loadingTemplate]=\"loadingTemplate\"\r\n [ngModel]=\"value\"\r\n (onValueChanged)=\"_handleValueChanged($event)\"\r\n [selectionMode]=\"'item'\"\r\n (onItemClick)=\"_handleOnItemClick($event)\"\r\n >\r\n <ng-template #empty> {{ 'no-result-found' | translate | async }} </ng-template>\r\n </ax-list>\r\n }\r\n\r\n @if (isLoading()) {\r\n @if (loadingTemplate) {\r\n <ng-template *ngTemplateOutlet=\"loadingTemplate\"></ng-template>\r\n } @else {\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading></ax-loading>\r\n </div>\r\n }\r\n }\r\n\r\n <ng-content select=\"ax-footer\"> </ng-content>\r\n </div>\r\n </ng-container>\r\n</ax-dropdown-box>\r\n<ng-content select=\"ax-validation-rule\"> </ng-content>\r\n", styles: ["ax-select-box{display:block;width:100%;border-radius:var(--ax-rounded-border-default)}ax-select-box ax-dropdown-box{border-radius:inherit!important}ax-select-box ax-dropdown-box.ax-auto-height{height:auto!important}ax-select-box .ax-editor-container.ax-look-fill .ax-select-box-selection.ax-multiple .ax-selected-token{background-color:rgba(var(--ax-color-surface))}ax-select-box .ax-selected-token{display:flex;align-items:center;border-radius:var(--ax-rounded-border-default);padding:.25rem .5rem;color:rgb(var(--ax-color-text-default))}ax-select-box .ax-selected-token .ax-icon-close{margin-inline-start:.5rem;cursor:pointer;width:1rem;height:1rem}ax-select-box .ax-select-box-selection{display:flex;flex:1 1 0%;cursor:pointer;-webkit-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:.25rem;padding:.25rem;outline:2px solid transparent;outline-offset:2px;height:100%}ax-select-box .ax-select-box-selection>span{white-space:nowrap;padding-inline-end:.75rem;padding-inline-start:1rem}ax-select-box .ax-select-box-selection .ax-selectbox-input{width:0px;opacity:0}ax-select-box .ax-select-box-selection.ax-multiple .ax-selected-token{background-color:rgba(var(--ax-color-on-surface))}ax-select-box .ax-placeholder{padding-inline-end:.75rem;padding-inline-start:1rem}ax-select-box .ax-general-button .ax-arrow-button{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}ax-select-box .ax-general-button .ax-arrow-button.-rotation-90{transform:rotate(-90deg)}ax-select-box .ax-general-button .ax-arrow-button.rotation-90{transform:rotate(90deg)}.ax-select-box-panel{height:fit-content}.ax-select-box-panel>ax-header.ax-solid{border-bottom-width:1px;border-color:rgba(var(--ax-color-border-default))}.ax-select-box-panel>ax-header.ax-solid ax-title{font-size:1rem;line-height:1.5rem;font-weight:500}.ax-select-box-panel .ax-search-container{padding:.5rem}\n"] }]
|
364
364
|
}], propDecorators: { dataSource: [{
|
365
365
|
type: Input
|
366
366
|
}], placeholder: [{
|
@@ -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 * @category\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 'textTemplate',\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 /** @ignore */\n private hotKeyService: AXHotkeysService = inject(AXHotkeysService);\n\n /** @ignore */\n protected isLoading: WritableSignal<boolean> = signal(false);\n\n /** @ignore */\n protected renderList = false;\n\n /** @ignore */\n protected dropdownSizes: { width: string; height: string } = {\n width: '100%',\n height: 'auto',\n };\n\n /** @ignore */\n protected _listDataSource: AXDataSource<any> = convertArrayToDataSource([], {\n key: this.valueField,\n pageSize: 10,\n });\n\n /** @ignore */\n private _dataSource: AXDataSource<any> | any[];\n\n /**\n * Gets the data source for the component, which can be either an `AXDataSource` or an array of items.\n * @returns {AXDataSource<any> | any[]}\n */\n public get dataSource(): AXDataSource<any> | any[] {\n return this._dataSource;\n }\n\n /**\n * Sets the data source, either as an `AXDataSource` or an array.\n * @param {AXDataSource<any> | any[]} v\n */\n @Input()\n\n /**\n * Sets the data source, either as `AXDataSource` or an array. Converts arrays to `AXDataSource` and subscribes to data and loading changes.\n * @param {AXDataSource<any> | any[]} v\n */\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 /**\n * The placeholder text displayed when the component is empty.\n * @param {string} placeholder\n */\n @Input()\n placeholder: string;\n\n /**\n * The caption text to be displayed in the component.\n * @param {string} caption\n */\n @Input()\n caption: string;\n\n /**\n * The template used to customize the rendering of items.\n * @param {TemplateRef<any>} itemTemplate\n */\n @Input()\n itemTemplate: TemplateRef<any>;\n\n /**\n * The template used to customize the rendering of selected items.\n * @param {TemplateRef<any>} selectedTemplate\n */\n @Input()\n selectedTemplate: TemplateRef<any>;\n\n /**\n * The template used to display when there are no items.\n * @param {TemplateRef<any>} emptyTemplate\n */\n @Input()\n emptyTemplate: TemplateRef<any>;\n\n /**\n * The template used to display while loading.\n * @param {TemplateRef<any>} loadingTemplate\n */\n @Input()\n loadingTemplate: TemplateRef<any>;\n\n /**\n * The width of the dropdown in pixels.\n * @defaultValue 260\n */\n @Input()\n dropdownWidth = 260;\n\n /** @ignore */\n @ViewChild('panel') panel!: ElementRef<HTMLDivElement>;\n\n /** @ignore */\n @ViewChild(AXListComponent)\n list: AXListComponent;\n\n /** @ignore */\n @ContentChild(AXSearchBoxComponent, { static: true })\n searchBox: AXSearchBoxComponent;\n\n /** @ignore */\n @ViewChild(AXDropdownBoxComponent, { static: true })\n protected dropdown: AXDropdownBoxComponent;\n\n /** @ignore */\n protected autoHeight = false;\n\n /**\n * Service for managing selection data, injected via `AX_SELECTION_DATA_TOKEN`.\n */\n public selectionService = inject(AX_SELECTION_DATA_TOKEN);\n\n searchEvent: Observable<any>;\n\n /** @ignore */\n private _unsubscriber = inject(AXUnsubscriber);\n\n /** @ignore */\n protected override ngOnInit(): void {\n super.ngOnInit();\n //\n this.registerValidation();\n }\n\n /** @ignore */\n ngAfterViewInit() {\n this.setDropdownSize();\n }\n\n /** @ignore */\n override ngOnDestroy(): void {\n this.searchBox?.onKeyDown.unsubscribe();\n }\n\n /**\n * Retrieves an item by its key.\n * @param {any} key\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 /** @ignore */\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 /** @ignore */\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 /** @ignore */\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 /** @ignore */\n protected _handleBadgeRemove(e: MouseEvent, item) {\n this.unselectItems(item);\n e.stopPropagation();\n }\n\n /** @ignore */\n protected _handleValueChanged(e: AXValueChangedEvent) {\n if (e.isUserInteraction) {\n this.commitValue(e.component.selectedItems, true);\n }\n }\n\n /** @ignore */\n protected _handleOnItemClick(e: AXItemClickEvent) {\n if (!this.multiple) {\n this.close();\n }\n }\n\n /**\n * Handles changes to the internal value. Closes the component if not in multiple mode, and adjusts height after a short delay.\n */\n override internalValueChanged(): void {\n if (!this.multiple) this.close();\n setTimeout(() => {\n this.detectAutoHeight();\n }, 100);\n }\n\n /** @ignore */\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 /** @ignore */\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 /** @ignore */\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 /** @ignore */\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 /**\n * Filters the data source based on the provided search term.\n * @param {string} term\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 /**\n * Refreshes the component by resetting state, clearing selection cache, refreshing the list, and closing the component.\n */\n refresh() {\n this.reset(false);\n this.clearSelectionCache();\n this.list?.refresh();\n this.close();\n }\n}\n","<ax-dropdown-box\n [disabled]=\"disabled\"\n (onOpened)=\"_handleOnOpenedEvent($event)\"\n (onClosed)=\"_handleOnClosedEvent($event)\"\n [look]=\"look\"\n [class.ax-auto-height]=\"autoHeight\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n>\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\" (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 } @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\" (click)=\"toggle()\">\n <!-- @if (isLoading() && !isOpen) {\n <ax-loading type=\"spinner\"></ax-loading>\n } @else { -->\n <span\n class=\"ax-icon ax-icon-chevron-left ax-arrow-button\"\n [ngClass]=\"{\n '-rotation-90': !isOpen,\n 'rotation-90': isOpen,\n }\"\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 [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\n [dataSource]=\"_listDataSource\"\n [multiple]=\"multiple\"\n [style.height]=\"dropdownSizes.height\"\n [valueField]=\"valueField\"\n [textField]=\"textField\"\n [textTemplate]=\"textTemplate\"\n [emptyTemplate]=\"emptyTemplate ?? empty\"\n [itemTemplate]=\"itemTemplate\"\n [loadingTemplate]=\"loadingTemplate\"\n [ngModel]=\"value\"\n (onValueChanged)=\"_handleValueChanged($event)\"\n [selectionMode]=\"'item'\"\n (onItemClick)=\"_handleOnItemClick($event)\"\n >\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>\n","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;;;AAGG;AAwDG,MAAO,oBACX,SAAQ,OAAO,CAAC,0BAA0B,EAAE,yBAAyB,EAAE,eAAe,CAAC,CAAA;AAxDzF,IAAA,WAAA,GAAA;;;AA4DU,QAAA,IAAA,CAAA,aAAa,GAAqB,MAAM,CAAC,gBAAgB,CAAC,CAAC;;AAGzD,QAAA,IAAA,CAAA,SAAS,GAA4B,MAAM,CAAC,KAAK,CAAC,CAAC;;QAGnD,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;;AAGnB,QAAA,IAAA,CAAA,aAAa,GAAsC;AAC3D,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,MAAM,EAAE,MAAM;SACf,CAAC;;AAGQ,QAAA,IAAA,CAAA,eAAe,GAAsB,wBAAwB,CAAC,EAAE,EAAE;YAC1E,GAAG,EAAE,IAAI,CAAC,UAAU;AACpB,YAAA,QAAQ,EAAE,EAAE;AACb,SAAA,CAAC,CAAC;AAqFH;;;AAGG;QAEH,IAAa,CAAA,aAAA,GAAG,GAAG,CAAC;;QA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,cAAc;YACd,WAAW;YACX,gBAAgB;YAChB,aAAa;YACb,iBAAiB;YACjB,mBAAmB;YACnB,eAAe;YACf,eAAe;YACf,UAAU;YACV,eAAe;YACf,gBAAgB;YAChB,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAMH,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBApB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,WAAW;wBACX,gBAAgB;wBAChB,aAAa;wBACb,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 {\r\n AXClearableComponent,\r\n AXClosbaleComponent,\r\n AXComponent,\r\n AXDataSource,\r\n AXEvent,\r\n AXFocusableComponent,\r\n AXHotkeysService,\r\n AXItemClickEvent,\r\n AXSearchableComponent,\r\n AXValuableComponent,\r\n AXValueChangedEvent,\r\n AX_SELECTION_DATA_TOKEN,\r\n MXLookComponent,\r\n MXSelectionBridgeService,\r\n MXSelectionValueComponent,\r\n convertArrayToDataSource,\r\n} from '@acorex/components/common';\r\nimport { AXDropdownBoxComponent, MXDropdownBoxBaseComponent } from '@acorex/components/dropdown';\r\nimport { AXListComponent } from '@acorex/components/list';\r\nimport { AXSearchBoxComponent } from '@acorex/components/search-box';\r\nimport { AXUnsubscriber } from '@acorex/core/utils';\r\nimport {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n Component,\r\n ContentChild,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n OnDestroy,\r\n TemplateRef,\r\n ViewChild,\r\n ViewEncapsulation,\r\n WritableSignal,\r\n forwardRef,\r\n inject,\r\n signal,\r\n} from '@angular/core';\r\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\r\nimport { findLastIndex, last, nth } from 'lodash-es';\r\nimport { classes } from 'polytype';\r\nimport { Observable } from 'rxjs';\r\n\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n * @category\r\n */\r\n@Component({\r\n selector: 'ax-select-box',\r\n templateUrl: './select-box.component.html',\r\n styleUrls: ['./select-box.component.scss'],\r\n inputs: [\r\n 'disabled',\r\n 'readonly',\r\n 'tabIndex',\r\n 'placeholder',\r\n 'minValue',\r\n 'maxValue',\r\n 'value',\r\n 'state',\r\n 'name',\r\n 'id',\r\n 'type',\r\n 'look',\r\n 'multiple',\r\n 'valueField',\r\n 'textField',\r\n 'textTemplate',\r\n ],\r\n outputs: [\r\n 'valueChange',\r\n 'stateChange',\r\n 'onValueChanged',\r\n 'onBlur',\r\n 'onFocus',\r\n 'readonlyChange',\r\n 'disabledChange',\r\n 'onOpened',\r\n 'onClosed',\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [\r\n { provide: AXComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXFocusableComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXValuableComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXClearableComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXClosbaleComponent, useExisting: AXSelectBoxComponent },\r\n { provide: AXSearchableComponent, useExisting: AXSelectBoxComponent },\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => AXSelectBoxComponent),\r\n multi: true,\r\n },\r\n {\r\n provide: AX_SELECTION_DATA_TOKEN,\r\n useClass: MXSelectionBridgeService,\r\n },\r\n AXUnsubscriber,\r\n ],\r\n host: { ngSkipHydration: 'true' },\r\n})\r\nexport class AXSelectBoxComponent\r\n extends classes(MXDropdownBoxBaseComponent, MXSelectionValueComponent, MXLookComponent)\r\n implements AfterViewInit, OnDestroy\r\n{\r\n /** @ignore */\r\n private hotKeyService: AXHotkeysService = inject(AXHotkeysService);\r\n\r\n /** @ignore */\r\n protected isLoading: WritableSignal<boolean> = signal(false);\r\n\r\n /** @ignore */\r\n protected renderList = false;\r\n\r\n /** @ignore */\r\n protected dropdownSizes: { width: string; height: string } = {\r\n width: '100%',\r\n height: 'auto',\r\n };\r\n\r\n /** @ignore */\r\n protected _listDataSource: AXDataSource<any> = convertArrayToDataSource([], {\r\n key: this.valueField,\r\n pageSize: 10,\r\n });\r\n\r\n /** @ignore */\r\n private _dataSource: AXDataSource<any> | any[];\r\n\r\n /**\r\n * Gets the data source for the component, which can be either an `AXDataSource` or an array of items.\r\n * @returns {AXDataSource<any> | any[]}\r\n */\r\n public get dataSource(): AXDataSource<any> | any[] {\r\n return this._dataSource;\r\n }\r\n\r\n /**\r\n * Sets the data source, either as an `AXDataSource` or an array.\r\n * @param {AXDataSource<any> | any[]} v\r\n */\r\n @Input()\r\n\r\n /**\r\n * Sets the data source, either as `AXDataSource` or an array. Converts arrays to `AXDataSource` and subscribes to data and loading changes.\r\n * @param {AXDataSource<any> | any[]} v\r\n */\r\n public set dataSource(v: AXDataSource<any> | any[]) {\r\n this._dataSource = v;\r\n if (Array.isArray(v)) {\r\n this._listDataSource = convertArrayToDataSource(v, {\r\n key: this.valueField,\r\n pageSize: 10,\r\n });\r\n } else {\r\n this._listDataSource = this.dataSource as AXDataSource<any>;\r\n }\r\n //\r\n //\r\n this._listDataSource.onChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe((data) => {\r\n this.setDropdownSize(data.totalCount);\r\n });\r\n this._listDataSource.onLoadingChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe((loading) => {\r\n this.isLoading.set(loading);\r\n });\r\n }\r\n\r\n /**\r\n * The placeholder text displayed when the component is empty.\r\n * @param {string} placeholder\r\n */\r\n @Input()\r\n placeholder: string;\r\n\r\n /**\r\n * The caption text to be displayed in the component.\r\n * @param {string} caption\r\n */\r\n @Input()\r\n caption: string;\r\n\r\n /**\r\n * The template used to customize the rendering of items.\r\n * @param {TemplateRef<any>} itemTemplate\r\n */\r\n @Input()\r\n itemTemplate: TemplateRef<any>;\r\n\r\n /**\r\n * The template used to customize the rendering of selected items.\r\n * @param {TemplateRef<any>} selectedTemplate\r\n */\r\n @Input()\r\n selectedTemplate: TemplateRef<any>;\r\n\r\n /**\r\n * The template used to display when there are no items.\r\n * @param {TemplateRef<any>} emptyTemplate\r\n */\r\n @Input()\r\n emptyTemplate: TemplateRef<any>;\r\n\r\n /**\r\n * The template used to display while loading.\r\n * @param {TemplateRef<any>} loadingTemplate\r\n */\r\n @Input()\r\n loadingTemplate: TemplateRef<any>;\r\n\r\n /**\r\n * The width of the dropdown in pixels.\r\n * @defaultValue 260\r\n */\r\n @Input()\r\n dropdownWidth = 260;\r\n\r\n /** @ignore */\r\n @ViewChild('panel') panel!: ElementRef<HTMLDivElement>;\r\n\r\n /** @ignore */\r\n @ViewChild(AXListComponent)\r\n list: AXListComponent;\r\n\r\n /** @ignore */\r\n @ContentChild(AXSearchBoxComponent, { static: true })\r\n searchBox: AXSearchBoxComponent;\r\n\r\n /** @ignore */\r\n @ViewChild(AXDropdownBoxComponent, { static: true })\r\n protected dropdown: AXDropdownBoxComponent;\r\n\r\n /** @ignore */\r\n protected autoHeight = false;\r\n\r\n /**\r\n * Service for managing selection data, injected via `AX_SELECTION_DATA_TOKEN`.\r\n */\r\n public selectionService = inject(AX_SELECTION_DATA_TOKEN);\r\n\r\n searchEvent: Observable<any>;\r\n\r\n /** @ignore */\r\n private _unsubscriber = inject(AXUnsubscriber);\r\n\r\n /** @ignore */\r\n protected override ngOnInit(): void {\r\n super.ngOnInit();\r\n //\r\n this.registerValidation();\r\n }\r\n\r\n /** @ignore */\r\n ngAfterViewInit() {\r\n this.setDropdownSize();\r\n }\r\n\r\n /** @ignore */\r\n override ngOnDestroy(): void {\r\n this.searchBox?.onKeyDown.unsubscribe();\r\n }\r\n\r\n /**\r\n * Retrieves an item by its key.\r\n * @param {any} key\r\n */\r\n getItemByKey(key: any): Promise<any> | any {\r\n const startTime = Date.now();\r\n\r\n const check = async () => {\r\n while (Date.now() - startTime < 2000) {\r\n if (typeof this._listDataSource.find === 'function') {\r\n return this._listDataSource.find(key);\r\n } else {\r\n await new Promise((resolve) => setTimeout(resolve, 50));\r\n }\r\n }\r\n console.log('Timeout reached without finding the \"getItemByKey\" method');\r\n };\r\n return check();\r\n }\r\n\r\n /** @ignore */\r\n protected _handleOnOpenedEvent(e: AXEvent) {\r\n this.renderList = true;\r\n this.list?.render();\r\n this._handleFocus();\r\n //\r\n this.onOpened.emit({\r\n component: this,\r\n isUserInteraction: e.isUserInteraction,\r\n });\r\n }\r\n\r\n /** @ignore */\r\n protected _handleOnClosedEvent(e: AXEvent) {\r\n //this.input.focus();\r\n this.onClosed.emit({\r\n component: this,\r\n isUserInteraction: e.isUserInteraction,\r\n });\r\n this._unsubscriber.unsubscribe();\r\n }\r\n\r\n /** @ignore */\r\n protected _handleFocus() {\r\n setTimeout(() => {\r\n if (this.searchBox) {\r\n this.searchBox.focus();\r\n //TODO: unsubscribe\r\n this.hotKeyService\r\n .addShortcut({ keys: 'Control.f', element: this.panel.nativeElement })\r\n .pipe(this._unsubscriber.takeUntilDestroy)\r\n .subscribe(() => {\r\n this.searchBox.focus();\r\n });\r\n this.searchBox.onKeyDown.pipe(this._unsubscriber.takeUntilDestroy).subscribe((e) => {\r\n if (e.nativeEvent.code === 'ArrowDown' || e.nativeEvent.key === 'ArrowDown') {\r\n this.list?.focus();\r\n e.nativeEvent.preventDefault();\r\n }\r\n });\r\n } else {\r\n this.list?.focus();\r\n }\r\n });\r\n }\r\n\r\n /** @ignore */\r\n protected _handleBadgeRemove(e: MouseEvent, item) {\r\n this.unselectItems(item);\r\n e.stopPropagation();\r\n }\r\n\r\n /** @ignore */\r\n protected _handleValueChanged(e: AXValueChangedEvent) {\r\n if (e.isUserInteraction) {\r\n this.commitValue(e.component.selectedItems, true);\r\n }\r\n }\r\n\r\n /** @ignore */\r\n protected _handleOnItemClick(e: AXItemClickEvent) {\r\n if (!this.multiple) {\r\n this.close();\r\n }\r\n }\r\n\r\n /**\r\n * Handles changes to the internal value. Closes the component if not in multiple mode, and adjusts height after a short delay.\r\n */\r\n override internalValueChanged(): void {\r\n if (!this.multiple) this.close();\r\n setTimeout(() => {\r\n this.detectAutoHeight();\r\n }, 100);\r\n }\r\n\r\n /** @ignore */\r\n private detectAutoHeight() {\r\n const containerWidth: number = this.getHostElement().querySelector<HTMLDivElement>('.ax-select-box-selection').clientWidth;\r\n const itemsWidth: number = Array.from(this.getHostElement().querySelectorAll<HTMLDivElement>('.ax-selected-token')).reduce(\r\n (a, i) => a + i.clientWidth,\r\n 0,\r\n );\r\n this.autoHeight = containerWidth - itemsWidth <= 8;\r\n this.dropdown.updatePosition();\r\n this.cdr.markForCheck();\r\n }\r\n\r\n /** @ignore */\r\n private setDropdownSize(count = 0) {\r\n if (this.dropdown.isActionsheetStyle) {\r\n this.dropdownSizes = {\r\n width: '100%',\r\n height: ['auto', '0px'].includes(this.dropdownSizes.height) ? `${Math.min(15, count) * 40}px` : this.dropdownSizes.height,\r\n };\r\n } else {\r\n //TODO: calc min-with from formula or config\r\n const hostWidth = Math.max(this.getHostElement().offsetWidth, this.dropdownWidth);\r\n this.dropdownSizes = {\r\n width: `${hostWidth}px`,\r\n height: count == 0 ? 'auto' : `${Math.min(5, count) * 40}px`,\r\n };\r\n }\r\n setTimeout(() => {\r\n this.dropdown.updatePosition();\r\n });\r\n }\r\n\r\n /** @ignore */\r\n @HostListener('keydown', ['$event'])\r\n _handleKeydown(e: KeyboardEvent) {\r\n if (e.code === 'ArrowDown' || e.code === 'ArrowUp') {\r\n this.selectItemByNav(e.code === 'ArrowDown' ? 1 : -1);\r\n e.preventDefault();\r\n } else if (e.code === 'Backspace') {\r\n this.unselectItems(this.selectedItems.pop());\r\n e.preventDefault();\r\n }\r\n // if ((e.code === 'Space' || e.code === 'Enter') && this.hasItems) {\r\n // if (this.readonly || this.disabled) {\r\n // e.preventDefault();\r\n // e.stopPropagation();\r\n // return;\r\n // }\r\n // const id = document.activeElement?.closest('li')?.dataset?.id;\r\n // this.toggleSelect(id);\r\n // e.preventDefault();\r\n // e.stopPropagation()\r\n // }\r\n }\r\n\r\n /** @ignore */\r\n private selectItemByNav(sign: 1 | -1) {\r\n if (Array.isArray(this.dataSource) && !this.multiple) {\r\n const items = this.normalizeItemsList(this.dataSource);\r\n const _last: any = last(this.selectedItems);\r\n let i = -1;\r\n if (_last) {\r\n i = findLastIndex(items, [this.valueField, _last[this.valueField]]);\r\n }\r\n i += sign;\r\n if (i < 0 || i >= items.length) return;\r\n const next = nth<any>(items, i);\r\n if (next) {\r\n this.selectItems(next);\r\n }\r\n } else {\r\n this.open();\r\n }\r\n }\r\n\r\n /**\r\n * Filters the data source based on the provided search term.\r\n * @param {string} term\r\n */\r\n search(term: string) {\r\n if (term) {\r\n this._listDataSource.filter({\r\n field: this.textField,\r\n value: term,\r\n operator: { type: 'contains' },\r\n });\r\n } else {\r\n this._listDataSource.clearFilter();\r\n }\r\n this._listDataSource.refresh();\r\n }\r\n\r\n /**\r\n * Refreshes the component by resetting state, clearing selection cache, refreshing the list, and closing the component.\r\n */\r\n refresh() {\r\n this.reset(false);\r\n this.clearSelectionCache();\r\n this.list?.refresh();\r\n this.close();\r\n }\r\n}\r\n","<ax-dropdown-box\r\n [disabled]=\"disabled\"\r\n (onOpened)=\"_handleOnOpenedEvent($event)\"\r\n (onClosed)=\"_handleOnClosedEvent($event)\"\r\n [look]=\"look\"\r\n [class.ax-auto-height]=\"autoHeight\"\r\n (focus)=\"emitOnFocusEvent($event)\"\r\n (blur)=\"emitOnBlurEvent($event)\"\r\n>\r\n <ng-container input>\r\n <ng-content select=\"ax-prefix\"> </ng-content>\r\n <div class=\"ax-select-box-selection ax-content\" [class.ax-multiple]=\"multiple\" [tabindex]=\"tabIndex\" (click)=\"toggle()\">\r\n @if (selectedItems.length === 0) {\r\n <div class=\"ax-placeholder\" role=\"textbox\" area-readonly=\"true\">\r\n {{ placeholder }}\r\n </div>\r\n }\r\n @for (item of selectedItems; track $index) {\r\n @if (selectedTemplate) {\r\n <ng-template *ngTemplateOutlet=\"selectedTemplate; context: { $implicit: { data: item } }\"></ng-template>\r\n } @else {\r\n <div class=\"ax-selected-token\">\r\n {{ getDisplayText(item) }}\r\n @if (!disabled && !readonly && multiple) {\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleBadgeRemove($event, item)\"> </span>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n @if (selectedItems?.length && !disabled && !readonly) {\r\n <ng-content select=\"ax-clear-button\"></ng-content>\r\n }\r\n <button type=\"button\" [disabled]=\"disabled\" [tabIndex]=\"-1\" class=\"ax-general-button ax-button-icon\" (click)=\"toggle()\">\r\n <!-- @if (isLoading() && !isOpen) {\r\n <ax-loading type=\"spinner\"></ax-loading>\r\n } @else { -->\r\n <span\r\n class=\"ax-icon ax-icon-chevron-left ax-arrow-button\"\r\n [ngClass]=\"{\r\n '-rotation-90': !isOpen,\r\n 'rotation-90': isOpen,\r\n }\"\r\n ></span>\r\n <!-- } -->\r\n </button>\r\n <ng-content select=\"ax-suffix\"> </ng-content>\r\n <ng-template #search>\r\n <ng-content select=\"ax-search-box\"> </ng-content>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container panel>\r\n <div #panel class=\"ax-select-box-panel\" [style.min-width]=\"dropdownSizes.width\">\r\n @if (dropdown.isActionsheetStyle) {\r\n <ax-header class=\"ax-solid\">\r\n <ax-title>{{ caption || placeholder || 'selectbox.popover.title' | translate | async }}</ax-title>\r\n <ax-close-button [icon]=\"multiple ? 'ax-icon ax-icon-check !ax-text-primary-500' : 'ax-icon ax-icon-close'\"></ax-close-button>\r\n </ax-header>\r\n }\r\n @if (searchBox) {\r\n <div class=\"ax-search-container\">\r\n <ng-template [ngTemplateOutlet]=\"search\"></ng-template>\r\n </div>\r\n }\r\n @if (renderList) {\r\n <ax-list\r\n [dataSource]=\"_listDataSource\"\r\n [multiple]=\"multiple\"\r\n [style.height]=\"dropdownSizes.height\"\r\n [valueField]=\"valueField\"\r\n [textField]=\"textField\"\r\n [textTemplate]=\"textTemplate\"\r\n [emptyTemplate]=\"emptyTemplate ?? empty\"\r\n [itemTemplate]=\"itemTemplate\"\r\n [loadingTemplate]=\"loadingTemplate\"\r\n [ngModel]=\"value\"\r\n (onValueChanged)=\"_handleValueChanged($event)\"\r\n [selectionMode]=\"'item'\"\r\n (onItemClick)=\"_handleOnItemClick($event)\"\r\n >\r\n <ng-template #empty> {{ 'no-result-found' | translate | async }} </ng-template>\r\n </ax-list>\r\n }\r\n\r\n @if (isLoading()) {\r\n @if (loadingTemplate) {\r\n <ng-template *ngTemplateOutlet=\"loadingTemplate\"></ng-template>\r\n } @else {\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading></ax-loading>\r\n </div>\r\n }\r\n }\r\n\r\n <ng-content select=\"ax-footer\"> </ng-content>\r\n </div>\r\n </ng-container>\r\n</ax-dropdown-box>\r\n<ng-content select=\"ax-validation-rule\"> </ng-content>\r\n","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;;;AAGG;AAwDG,MAAO,oBACX,SAAQ,OAAO,CAAC,0BAA0B,EAAE,yBAAyB,EAAE,eAAe,CAAC,CAAA;AAxDzF,IAAA,WAAA,GAAA;;;AA4DU,QAAA,IAAA,CAAA,aAAa,GAAqB,MAAM,CAAC,gBAAgB,CAAC,CAAC;;AAGzD,QAAA,IAAA,CAAA,SAAS,GAA4B,MAAM,CAAC,KAAK,CAAC,CAAC;;QAGnD,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;;AAGnB,QAAA,IAAA,CAAA,aAAa,GAAsC;AAC3D,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,MAAM,EAAE,MAAM;SACf,CAAC;;AAGQ,QAAA,IAAA,CAAA,eAAe,GAAsB,wBAAwB,CAAC,EAAE,EAAE;YAC1E,GAAG,EAAE,IAAI,CAAC,UAAU;AACpB,YAAA,QAAQ,EAAE,EAAE;AACb,SAAA,CAAC,CAAC;AAqFH;;;AAGG;QAEH,IAAa,CAAA,aAAA,GAAG,GAAG,CAAC;;QAkBV,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;AAE7B;;AAEG;AACI,QAAA,IA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mB;YACnB,eAAe;YACf,eAAe;YACf,UAAU;YACV,eAAe;YACf,gBAAgB;YAChB,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAMH,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBApB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,WAAW;wBACX,gBAAgB;wBAChB,aAAa;wBACb,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;;;;"}
|
@@ -44,7 +44,6 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
|
|
44
44
|
super();
|
45
45
|
/** @ignore */
|
46
46
|
this.zone = inject(NgZone);
|
47
|
-
/** @ignore */
|
48
47
|
this.wysiwyg = signal(null);
|
49
48
|
/** @ignore */
|
50
49
|
this.view = signal(null);
|
@@ -59,7 +58,6 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
|
|
59
58
|
this.view.set(this.getHostElement().querySelector('ax-wysiwyg-view'));
|
60
59
|
this.zone.runOutsideAngular(() => {
|
61
60
|
this.wysiwyg.set(new AXWysiwyg(this.view(), {
|
62
|
-
placeholder: this.placeHolder() || 'Write Your Message ...',
|
63
61
|
readOnly: true,
|
64
62
|
}));
|
65
63
|
this.wysiwyg().wysiwygObj.on('text-change', this.changeHandler.bind(this));
|
@@ -69,6 +67,14 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
|
|
69
67
|
this.wysiwyg().wysiwygObj.enable();
|
70
68
|
}, 1000);
|
71
69
|
});
|
70
|
+
effect(() => {
|
71
|
+
if (this.placeHolder() && this.wysiwyg()) {
|
72
|
+
this.wysiwyg().wysiwygObj.root.setAttribute('data-placeholder', this.placeHolder());
|
73
|
+
}
|
74
|
+
else {
|
75
|
+
this.wysiwyg().wysiwygObj.root.setAttribute('data-placeholder', 'Write Your Message ...');
|
76
|
+
}
|
77
|
+
});
|
72
78
|
effect(() => {
|
73
79
|
if (this.value) {
|
74
80
|
this.wysiwyg().wysiwygObj.root.innerHTML = this.value;
|
@@ -134,11 +140,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
134
140
|
*/
|
135
141
|
class AXWysiwygToolbarComponent {
|
136
142
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
137
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXWysiwygToolbarComponent, selector: "ax-wysiwyg-toolbar", ngImport: i0, template: "<div class=\"ax-wysiwyg-
|
143
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXWysiwygToolbarComponent, selector: "ax-wysiwyg-toolbar", ngImport: i0, template: "<div class=\"ax-wysiwyg-tool-container ax-sm\">\r\n <ng-content select=\"ax-prefix\"></ng-content>\r\n <ng-content></ng-content>\r\n <ng-content select=\"ax-suffix\"></ng-content>\r\n</div>\r\n", styles: ["ax-wysiwyg-toolbar .ax-icon{font-weight:900;font-size:1rem}ax-wysiwyg-toolbar .ax-wysiwyg-tool-container{padding-block:.5rem;overflow:hidden;display:flex;flex-wrap:wrap;justify-content:center}ax-wysiwyg-toolbar .ax-wysiwyg-tool-container ax-button{margin-inline:.1rem}ax-wysiwyg-toolbar .ax-wysiwyg-tool-container ax-select-box{margin-inline:.5rem}ax-wysiwyg-toolbar ax-select-box{width:auto!important}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
138
144
|
}
|
139
145
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygToolbarComponent, decorators: [{
|
140
146
|
type: Component,
|
141
|
-
args: [{ selector: 'ax-wysiwyg-toolbar', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-wysiwyg-
|
147
|
+
args: [{ selector: 'ax-wysiwyg-toolbar', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-wysiwyg-tool-container ax-sm\">\r\n <ng-content select=\"ax-prefix\"></ng-content>\r\n <ng-content></ng-content>\r\n <ng-content select=\"ax-suffix\"></ng-content>\r\n</div>\r\n", styles: ["ax-wysiwyg-toolbar .ax-icon{font-weight:900;font-size:1rem}ax-wysiwyg-toolbar .ax-wysiwyg-tool-container{padding-block:.5rem;overflow:hidden;display:flex;flex-wrap:wrap;justify-content:center}ax-wysiwyg-toolbar .ax-wysiwyg-tool-container ax-button{margin-inline:.1rem}ax-wysiwyg-toolbar .ax-wysiwyg-tool-container ax-select-box{margin-inline:.5rem}ax-wysiwyg-toolbar ax-select-box{width:auto!important}\n"] }]
|
142
148
|
}] });
|
143
149
|
|
144
150
|
/**
|
@@ -163,6 +169,8 @@ class AXWysiwygAlignmentComponent {
|
|
163
169
|
offsetY: 0,
|
164
170
|
};
|
165
171
|
effect(() => {
|
172
|
+
if (!this.wysiwyg())
|
173
|
+
return;
|
166
174
|
switch (this.service.currentSelectedElemAlign()) {
|
167
175
|
case 'ql-align-center':
|
168
176
|
this.alignState.set('center');
|
@@ -291,6 +299,8 @@ class AXWysiwygFontStyleComponent {
|
|
291
299
|
/** @ignore */
|
292
300
|
this.service = inject(AXWysiwygService);
|
293
301
|
effect(() => {
|
302
|
+
if (!this.wysiwyg())
|
303
|
+
return;
|
294
304
|
this.service.currentSelectedElemArray().forEach((item) => {
|
295
305
|
switch (item) {
|
296
306
|
case 'U':
|
@@ -477,6 +487,8 @@ class AXWysiwygListComponent {
|
|
477
487
|
/** @ignore */
|
478
488
|
this.listState = signal('');
|
479
489
|
effect(() => {
|
490
|
+
if (!this.wysiwyg())
|
491
|
+
return;
|
480
492
|
switch (this.service.currentSelectedElemList()) {
|
481
493
|
case 'ordered':
|
482
494
|
this.wysiwyg().list('ordered');
|