@igo2/common 19.0.3 → 20.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/action/index.d.ts +194 -3
- package/backdrop/index.d.ts +20 -3
- package/badge/index.d.ts +44 -3
- package/clickout/index.d.ts +20 -3
- package/clone/index.d.ts +18 -3
- package/collapsible/index.d.ts +43 -3
- package/color/index.d.ts +38 -3
- package/confirm-dialog/index.d.ts +39 -5
- package/context-menu/index.d.ts +50 -3
- package/custom-html/index.d.ts +30 -3
- package/dom/index.d.ts +34 -3
- package/drag-drop/index.d.ts +124 -3
- package/dynamic-component/index.d.ts +186 -3
- package/entity/index.d.ts +1532 -3
- package/environment/index.d.ts +15 -5
- package/fesm2022/igo2-common-action.mjs +28 -38
- package/fesm2022/igo2-common-action.mjs.map +1 -1
- package/fesm2022/igo2-common-backdrop.mjs +7 -7
- package/fesm2022/igo2-common-backdrop.mjs.map +1 -1
- package/fesm2022/igo2-common-badge.mjs +10 -13
- package/fesm2022/igo2-common-badge.mjs.map +1 -1
- package/fesm2022/igo2-common-clickout.mjs +10 -13
- package/fesm2022/igo2-common-clickout.mjs.map +1 -1
- package/fesm2022/igo2-common-clone.mjs +7 -7
- package/fesm2022/igo2-common-clone.mjs.map +1 -1
- package/fesm2022/igo2-common-collapsible.mjs +14 -18
- package/fesm2022/igo2-common-collapsible.mjs.map +1 -1
- package/fesm2022/igo2-common-color.mjs +9 -9
- package/fesm2022/igo2-common-color.mjs.map +1 -1
- package/fesm2022/igo2-common-confirm-dialog.mjs +19 -26
- package/fesm2022/igo2-common-confirm-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-context-menu.mjs +16 -21
- package/fesm2022/igo2-common-context-menu.mjs.map +1 -1
- package/fesm2022/igo2-common-custom-html.mjs +14 -17
- package/fesm2022/igo2-common-custom-html.mjs.map +1 -1
- package/fesm2022/igo2-common-dom.mjs +11 -14
- package/fesm2022/igo2-common-dom.mjs.map +1 -1
- package/fesm2022/igo2-common-drag-drop.mjs +15 -17
- package/fesm2022/igo2-common-drag-drop.mjs.map +1 -1
- package/fesm2022/igo2-common-dynamic-component.mjs +20 -27
- package/fesm2022/igo2-common-dynamic-component.mjs.map +1 -1
- package/fesm2022/igo2-common-entity.mjs +69 -108
- package/fesm2022/igo2-common-entity.mjs.map +1 -1
- package/fesm2022/igo2-common-flexible.mjs +13 -18
- package/fesm2022/igo2-common-flexible.mjs.map +1 -1
- package/fesm2022/igo2-common-form.mjs +77 -112
- package/fesm2022/igo2-common-form.mjs.map +1 -1
- package/fesm2022/igo2-common-home-button.mjs +7 -7
- package/fesm2022/igo2-common-home-button.mjs.map +1 -1
- package/fesm2022/igo2-common-icon.mjs +14 -21
- package/fesm2022/igo2-common-icon.mjs.map +1 -1
- package/fesm2022/igo2-common-image.mjs +53 -57
- package/fesm2022/igo2-common-image.mjs.map +1 -1
- package/fesm2022/igo2-common-interactive-tour.mjs +43 -56
- package/fesm2022/igo2-common-interactive-tour.mjs.map +1 -1
- package/fesm2022/igo2-common-json-dialog.mjs +19 -28
- package/fesm2022/igo2-common-json-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-keyvalue.mjs +7 -7
- package/fesm2022/igo2-common-keyvalue.mjs.map +1 -1
- package/fesm2022/igo2-common-list.mjs +16 -23
- package/fesm2022/igo2-common-list.mjs.map +1 -1
- package/fesm2022/igo2-common-panel.mjs +9 -9
- package/fesm2022/igo2-common-panel.mjs.map +1 -1
- package/fesm2022/igo2-common-resizable-bar.mjs +6 -6
- package/fesm2022/igo2-common-resizable-bar.mjs.map +1 -1
- package/fesm2022/igo2-common-select-value-dialog.mjs +28 -44
- package/fesm2022/igo2-common-select-value-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-sidenav.mjs +10 -16
- package/fesm2022/igo2-common-sidenav.mjs.map +1 -1
- package/fesm2022/igo2-common-spinner.mjs +15 -21
- package/fesm2022/igo2-common-spinner.mjs.map +1 -1
- package/fesm2022/igo2-common-stop-propagation.mjs +10 -10
- package/fesm2022/igo2-common-stop-propagation.mjs.map +1 -1
- package/fesm2022/igo2-common-table.mjs +9 -11
- package/fesm2022/igo2-common-table.mjs.map +1 -1
- package/fesm2022/igo2-common-tool.mjs +16 -22
- package/fesm2022/igo2-common-tool.mjs.map +1 -1
- package/fesm2022/igo2-common-widget.mjs +19 -24
- package/fesm2022/igo2-common-widget.mjs.map +1 -1
- package/fesm2022/igo2-common-workspace.mjs +20 -20
- package/fesm2022/igo2-common-workspace.mjs.map +1 -1
- package/flexible/index.d.ts +54 -3
- package/form/index.d.ts +429 -3
- package/home-button/index.d.ts +18 -3
- package/icon/index.d.ts +42 -3
- package/image/index.d.ts +35 -3
- package/index.d.ts +16 -5
- package/interactive-tour/index.d.ts +116 -5
- package/json-dialog/index.d.ts +34 -5
- package/keyvalue/index.d.ts +18 -3
- package/list/index.d.ts +102 -3
- package/package.json +10 -13
- package/panel/index.d.ts +20 -3
- package/resizable-bar/index.d.ts +37 -5
- package/select-value-dialog/index.d.ts +65 -5
- package/sidenav/index.d.ts +29 -3
- package/spinner/index.d.ts +51 -3
- package/src/style/partial/common-utils.scss +1 -1
- package/stop-propagation/index.d.ts +26 -3
- package/table/index.d.ts +105 -3
- package/tool/index.d.ts +289 -3
- package/widget/index.d.ts +105 -3
- package/workspace/index.d.ts +237 -3
- package/action/action.module.d.ts +0 -10
- package/action/actionbar/actionbar-item.component.d.ts +0 -73
- package/action/actionbar/actionbar.component.d.ts +0 -148
- package/action/actionbar/actionbar.module.d.ts +0 -10
- package/action/public_api.d.ts +0 -4
- package/action/shared/action.enums.d.ts +0 -5
- package/action/shared/action.interfaces.d.ts +0 -16
- package/action/shared/index.d.ts +0 -3
- package/action/shared/store.d.ts +0 -8
- package/action/src/action.theming.scss +0 -9
- package/action/src/actionbar/actionbar-item.theming.scss +0 -20
- package/backdrop/backdrop.component.d.ts +0 -8
- package/backdrop/backdrop.module.d.ts +0 -12
- package/backdrop/public_api.d.ts +0 -2
- package/badge/badge-icon.directive.d.ts +0 -34
- package/badge/badge-icon.module.d.ts +0 -12
- package/badge/public_api.d.ts +0 -2
- package/clickout/clickout.directive.d.ts +0 -10
- package/clickout/clickout.module.d.ts +0 -12
- package/clickout/public_api.d.ts +0 -2
- package/clone/clone.module.d.ts +0 -12
- package/clone/clone.pipe.d.ts +0 -7
- package/clone/public_api.d.ts +0 -2
- package/collapsible/collapse.directive.d.ts +0 -19
- package/collapsible/collapsible.component.d.ts +0 -13
- package/collapsible/collapsible.module.d.ts +0 -13
- package/collapsible/public_api.d.ts +0 -6
- package/color/color-picker-form-field/color-picker-form-field.component.d.ts +0 -29
- package/color/color-picker-form-field/color-picker-form-field.module.d.ts +0 -10
- package/color/color-picker-form-field/index.d.ts +0 -2
- package/color/public_api.d.ts +0 -1
- package/confirm-dialog/confirm-dialog.component.d.ts +0 -12
- package/confirm-dialog/confirm-dialog.interface.d.ts +0 -4
- package/confirm-dialog/confirm-dialog.module.d.ts +0 -12
- package/confirm-dialog/confirm-dialog.service.d.ts +0 -11
- package/confirm-dialog/public_api.d.ts +0 -4
- package/context-menu/context-menu.directive.d.ts +0 -21
- package/context-menu/context-menu.module.d.ts +0 -13
- package/context-menu/long-press.directive.d.ts +0 -19
- package/context-menu/public_api.d.ts +0 -6
- package/custom-html/custom-html.component.d.ts +0 -8
- package/custom-html/custom-html.module.d.ts +0 -13
- package/custom-html/custom-html.pipe.d.ts +0 -10
- package/custom-html/public_api.d.ts +0 -6
- package/dom/dom.interfaces.d.ts +0 -10
- package/dom/dom.module.d.ts +0 -14
- package/dom/dom.service.d.ts +0 -10
- package/dom/public_api.d.ts +0 -3
- package/drag-drop/drag-drop.directive.d.ts +0 -14
- package/drag-drop/drag-drop.module.d.ts +0 -13
- package/drag-drop/public_api.d.ts +0 -3
- package/drag-drop/tree-drag-drop/index.d.ts +0 -2
- package/drag-drop/tree-drag-drop/tree-drag-drop.directive.d.ts +0 -85
- package/drag-drop/tree-drag-drop/tree-drag-drop.interface.d.ts +0 -15
- package/dynamic-component/dynamic-component.module.d.ts +0 -10
- package/dynamic-component/dynamic-outlet/dynamic-outlet.component.d.ts +0 -66
- package/dynamic-component/dynamic-outlet/dynamic-outlet.module.d.ts +0 -10
- package/dynamic-component/public_api.d.ts +0 -4
- package/dynamic-component/shared/dynamic-component.d.ts +0 -84
- package/dynamic-component/shared/dynamic-component.interfaces.d.ts +0 -3
- package/dynamic-component/shared/dynamic-component.service.d.ts +0 -18
- package/dynamic-component/shared/index.d.ts +0 -3
- package/entity/entity-selector/entity-selector.component.d.ts +0 -93
- package/entity/entity-selector/entity-selector.module.d.ts +0 -10
- package/entity/entity-selector/index.d.ts +0 -2
- package/entity/entity-table/entity-table-row.directive.d.ts +0 -69
- package/entity/entity-table/entity-table.component.d.ts +0 -330
- package/entity/entity-table/entity-table.module.d.ts +0 -10
- package/entity/entity-table/index.d.ts +0 -2
- package/entity/entity-table-paginator/entity-table-paginator.component.d.ts +0 -50
- package/entity/entity-table-paginator/entity-table-paginator.interface.d.ts +0 -8
- package/entity/entity-table-paginator/entity-table-paginator.module.d.ts +0 -10
- package/entity/entity-table-paginator/index.d.ts +0 -3
- package/entity/entity.module.d.ts +0 -16
- package/entity/public_api.d.ts +0 -5
- package/entity/shared/entity.enums.d.ts +0 -23
- package/entity/shared/entity.interfaces.d.ts +0 -92
- package/entity/shared/entity.utils.d.ts +0 -49
- package/entity/shared/index.d.ts +0 -9
- package/entity/shared/state.d.ts +0 -108
- package/entity/shared/store.d.ts +0 -180
- package/entity/shared/strategies/filter-custom-function.d.ts +0 -51
- package/entity/shared/strategies/filter-selection.d.ts +0 -48
- package/entity/shared/strategies/index.d.ts +0 -3
- package/entity/shared/strategies/strategy.d.ts +0 -56
- package/entity/shared/transaction.d.ts +0 -171
- package/entity/shared/view.d.ts +0 -193
- package/entity/shared/watcher.d.ts +0 -72
- package/entity/src/entity-selector/entity-selector.theming.scss +0 -21
- package/entity/src/entity-table/entity-table.theming.scss +0 -21
- package/entity/src/entity.theming.scss +0 -12
- package/environment/environment.interface.d.ts +0 -13
- package/environment/public_api.d.ts +0 -1
- package/flexible/flexible.component.d.ts +0 -42
- package/flexible/flexible.module.d.ts +0 -12
- package/flexible/flexible.type.d.ts +0 -2
- package/flexible/public_api.d.ts +0 -3
- package/form/form/form.component.d.ts +0 -46
- package/form/form/form.module.d.ts +0 -10
- package/form/form/index.d.ts +0 -2
- package/form/form-dialog/form-dialog.component.d.ts +0 -19
- package/form/form-dialog/form-dialog.interface.d.ts +0 -16
- package/form/form-dialog/form-dialog.module.d.ts +0 -16
- package/form/form-dialog/form-dialog.service.d.ts +0 -11
- package/form/form-dialog/index.d.ts +0 -4
- package/form/form-field/form-field-select.component.d.ts +0 -50
- package/form/form-field/form-field-text.component.d.ts +0 -49
- package/form/form-field/form-field-textarea.component.d.ts +0 -39
- package/form/form-field/form-field.component.d.ts +0 -29
- package/form/form-field/form-field.directive.d.ts +0 -5
- package/form/form-field/form-field.module.d.ts +0 -13
- package/form/form-field/index.d.ts +0 -6
- package/form/form-group/form-group.component.d.ts +0 -44
- package/form/form-group/form-group.module.d.ts +0 -10
- package/form/form-group/index.d.ts +0 -2
- package/form/form.module.d.ts +0 -18
- package/form/public_api.d.ts +0 -6
- package/form/shared/form-field-component.d.ts +0 -1
- package/form/shared/form-field.service.d.ts +0 -16
- package/form/shared/form.interfaces.d.ts +0 -60
- package/form/shared/form.service.d.ts +0 -15
- package/form/shared/form.utils.d.ts +0 -7
- package/form/shared/index.d.ts +0 -5
- package/home-button/home-button.component.d.ts +0 -8
- package/home-button/home-button.module.d.ts +0 -10
- package/home-button/public_api.d.ts +0 -2
- package/icon/icon/icon.component.d.ts +0 -15
- package/icon/icon.provider.d.ts +0 -4
- package/icon/public_api.d.ts +0 -3
- package/icon/shared/icon.interface.d.ts +0 -4
- package/icon/shared/icon.service.d.ts +0 -12
- package/icon/shared/icons.d.ts +0 -11
- package/icon/shared/index.d.ts +0 -3
- package/image/image-error.directive.d.ts +0 -11
- package/image/image.module.d.ts +0 -13
- package/image/public_api.d.ts +0 -6
- package/image/secure-image.pipe.d.ts +0 -13
- package/interactive-tour/interactive-tour.component.d.ts +0 -33
- package/interactive-tour/interactive-tour.interface.d.ts +0 -35
- package/interactive-tour/interactive-tour.loader.d.ts +0 -18
- package/interactive-tour/interactive-tour.module.d.ts +0 -7
- package/interactive-tour/interactive-tour.service.d.ts +0 -30
- package/interactive-tour/public_api.d.ts +0 -5
- package/json-dialog/json-dialog.component.d.ts +0 -13
- package/json-dialog/json-dialog.module.d.ts +0 -12
- package/json-dialog/json-dialog.service.d.ts +0 -10
- package/json-dialog/public_api.d.ts +0 -3
- package/keyvalue/keyvalue.module.d.ts +0 -12
- package/keyvalue/keyvalue.pipe.d.ts +0 -7
- package/keyvalue/public_api.d.ts +0 -2
- package/list/list-item.directive.d.ts +0 -43
- package/list/list.component.d.ts +0 -51
- package/list/list.module.d.ts +0 -13
- package/list/public_api.d.ts +0 -6
- package/panel/panel.component.d.ts +0 -10
- package/panel/panel.module.d.ts +0 -10
- package/panel/public_api.d.ts +0 -2
- package/panel/src/panel.theming.scss +0 -20
- package/public_api.d.ts +0 -16
- package/resizable-bar/public_api.d.ts +0 -2
- package/resizable-bar/resizable-bar.component.d.ts +0 -23
- package/resizable-bar/shared/resize.directive.d.ts +0 -12
- package/select-value-dialog/public_api.d.ts +0 -5
- package/select-value-dialog/select-value-check-radio-dialog.component.d.ts +0 -25
- package/select-value-dialog/select-value-dialog.enums.d.ts +0 -4
- package/select-value-dialog/select-value-dialog.interface.d.ts +0 -16
- package/select-value-dialog/select-value-dialog.module.d.ts +0 -12
- package/select-value-dialog/select-value-dialog.service.d.ts +0 -11
- package/sidenav/public_api.d.ts +0 -2
- package/sidenav/sidenav-shim.directive.d.ts +0 -20
- package/sidenav/sidenav.module.d.ts +0 -12
- package/spinner/public_api.d.ts +0 -3
- package/spinner/spinner-activity.directive.d.ts +0 -32
- package/spinner/spinner.component.d.ts +0 -11
- package/spinner/spinner.module.d.ts +0 -14
- package/src/common.theme.scss +0 -18
- package/stop-propagation/public_api.d.ts +0 -6
- package/stop-propagation/stop-drop-propagation.directive.d.ts +0 -6
- package/stop-propagation/stop-propagation.directive.d.ts +0 -6
- package/stop-propagation/stop-propagation.module.d.ts +0 -13
- package/table/public_api.d.ts +0 -6
- package/table/table-action-color.enum.d.ts +0 -5
- package/table/table-database.d.ts +0 -10
- package/table/table-datasource.d.ts +0 -18
- package/table/table-model.interface.d.ts +0 -24
- package/table/table.component.d.ts +0 -40
- package/table/table.module.d.ts +0 -12
- package/tool/public_api.d.ts +0 -3
- package/tool/shared/index.d.ts +0 -5
- package/tool/shared/tool-component.d.ts +0 -2
- package/tool/shared/tool.interface.d.ts +0 -16
- package/tool/shared/tool.service.d.ts +0 -28
- package/tool/shared/toolbox.d.ts +0 -96
- package/tool/shared/toolbox.enums.d.ts +0 -1
- package/tool/src/tool.theming.scss +0 -5
- package/tool/src/toolbox/toolbox.theming.scss +0 -22
- package/tool/tool.module.d.ts +0 -15
- package/tool/toolbox/index.d.ts +0 -2
- package/tool/toolbox/toolbox.animation.d.ts +0 -2
- package/tool/toolbox/toolbox.component.d.ts +0 -126
- package/tool/toolbox/toolbox.module.d.ts +0 -10
- package/widget/public_api.d.ts +0 -3
- package/widget/shared/index.d.ts +0 -3
- package/widget/shared/widget.d.ts +0 -4
- package/widget/shared/widget.interfaces.d.ts +0 -12
- package/widget/shared/widget.service.d.ts +0 -10
- package/widget/widget-outlet/index.d.ts +0 -2
- package/widget/widget-outlet/widget-outlet.component.d.ts +0 -64
- package/widget/widget-outlet/widget-outlet.module.d.ts +0 -10
- package/widget/widget.module.d.ts +0 -10
- package/workspace/public_api.d.ts +0 -4
- package/workspace/shared/index.d.ts +0 -3
- package/workspace/shared/store.d.ts +0 -20
- package/workspace/shared/workspace.d.ts +0 -98
- package/workspace/shared/workspace.interfaces.d.ts +0 -9
- package/workspace/workspace-selector/index.d.ts +0 -2
- package/workspace/workspace-selector/workspace-selector.component.d.ts +0 -38
- package/workspace/workspace-selector/workspace-selector.module.d.ts +0 -10
- package/workspace/workspace-widget-outlet/index.d.ts +0 -2
- package/workspace/workspace-widget-outlet/workspace-widget-outlet.component.d.ts +0 -52
- package/workspace/workspace-widget-outlet/workspace-widget-outlet.module.d.ts +0 -10
- package/workspace/workspace.module.d.ts +0 -14
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { EventEmitter, ViewChild, Output, Input, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
4
|
-
import {
|
|
4
|
+
import { NgClass } from '@angular/common';
|
|
5
5
|
import * as i6 from '@angular/material/button';
|
|
6
6
|
import { MatButtonModule } from '@angular/material/button';
|
|
7
7
|
import * as i5 from '@angular/material/checkbox';
|
|
@@ -202,24 +202,22 @@ class TableComponent {
|
|
|
202
202
|
event.stopPropagation();
|
|
203
203
|
action.click(row);
|
|
204
204
|
}
|
|
205
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
206
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
205
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
206
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: TableComponent, isStandalone: true, selector: "igo-table", inputs: { database: "database", model: "model", hasFilterInput: "hasFilterInput" }, outputs: { select: "select" }, viewQueries: [{ propertyName: "filter", first: true, predicate: ["filter"], descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"table-box\">\n @if (hasFilterInput) {\n <div class=\"table-header\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n }\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n >\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n >\n </mat-checkbox>\n </td>\n </ng-container>\n\n @for (column of model.columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sortable) {\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n }\n @if (!column.sortable) {\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n }\n @if (!column.html) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model.cellClassFunc ? model.cellClassFunc(row, column) : {}\n \"\n >\n {{ getValue(row, column.name) }}\n </td>\n } @else {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model.cellClassFunc ? model.cellClassFunc(row, column) : {}\n \"\n [innerHTML]=\"getValue(row, column.name)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Action Column -->\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n @for (action of model.actions; track action) {\n <button\n mat-mini-fab\n [color]=\"getActionColor(action.color)\"\n (click)=\"handleClickAction($event, action, row)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [ngClass]=\"model.rowClassFunc ? model.rowClassFunc(row) : {}\"\n (click)=\"selection.toggle(row)\"\n ></tr>\n </table>\n </div>\n</div>\n", styles: [":host{width:100%;height:100%;display:block}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.table-box{height:100%;display:flex;flex-direction:column}.table-header{min-height:64px;max-width:500px;display:flex;flex:0 1 auto;align-items:baseline;padding:8px 24px 0;font-size:20px;justify-content:space-between}tr[mat-header-row],tr[mat-row]{height:60px}.mat-cell-text{overflow:hidden;word-wrap:break-word}td[mat-cell]{padding-right:15px}th.mat-mdc-header-cell{padding-right:5px}button{margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i4.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i8.TranslatePipe, name: "translate" }] });
|
|
207
207
|
}
|
|
208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TableComponent, decorators: [{
|
|
209
209
|
type: Component,
|
|
210
210
|
args: [{ selector: 'igo-table', imports: [
|
|
211
|
-
NgIf,
|
|
212
211
|
MatFormFieldModule,
|
|
213
212
|
MatInputModule,
|
|
214
213
|
MatTableModule,
|
|
215
214
|
MatSortModule,
|
|
216
215
|
MatCheckboxModule,
|
|
217
|
-
NgFor,
|
|
218
216
|
NgClass,
|
|
219
217
|
MatButtonModule,
|
|
220
218
|
MatIconModule,
|
|
221
219
|
IgoLanguageModule
|
|
222
|
-
], template: "<div class=\"table-box\">\n <div class=\"table-header\"
|
|
220
|
+
], template: "<div class=\"table-box\">\n @if (hasFilterInput) {\n <div class=\"table-header\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n }\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n >\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n >\n </mat-checkbox>\n </td>\n </ng-container>\n\n @for (column of model.columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sortable) {\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n }\n @if (!column.sortable) {\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n }\n @if (!column.html) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model.cellClassFunc ? model.cellClassFunc(row, column) : {}\n \"\n >\n {{ getValue(row, column.name) }}\n </td>\n } @else {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model.cellClassFunc ? model.cellClassFunc(row, column) : {}\n \"\n [innerHTML]=\"getValue(row, column.name)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Action Column -->\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n @for (action of model.actions; track action) {\n <button\n mat-mini-fab\n [color]=\"getActionColor(action.color)\"\n (click)=\"handleClickAction($event, action, row)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [ngClass]=\"model.rowClassFunc ? model.rowClassFunc(row) : {}\"\n (click)=\"selection.toggle(row)\"\n ></tr>\n </table>\n </div>\n</div>\n", styles: [":host{width:100%;height:100%;display:block}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.table-box{height:100%;display:flex;flex-direction:column}.table-header{min-height:64px;max-width:500px;display:flex;flex:0 1 auto;align-items:baseline;padding:8px 24px 0;font-size:20px;justify-content:space-between}tr[mat-header-row],tr[mat-row]{height:60px}.mat-cell-text{overflow:hidden;word-wrap:break-word}td[mat-cell]{padding-right:15px}th.mat-mdc-header-cell{padding-right:5px}button{margin-right:10px}\n"] }]
|
|
223
221
|
}], propDecorators: { database: [{
|
|
224
222
|
type: Input
|
|
225
223
|
}], model: [{
|
|
@@ -246,11 +244,11 @@ class IgoTableModule {
|
|
|
246
244
|
providers: []
|
|
247
245
|
};
|
|
248
246
|
}
|
|
249
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
250
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
251
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
247
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
248
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: IgoTableModule, imports: [TableComponent], exports: [TableComponent] });
|
|
249
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoTableModule, imports: [TableComponent] });
|
|
252
250
|
}
|
|
253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoTableModule, decorators: [{
|
|
254
252
|
type: NgModule,
|
|
255
253
|
args: [{
|
|
256
254
|
imports: [TableComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-common-table.mjs","sources":["../../../packages/common/table/src/table-action-color.enum.ts","../../../packages/common/table/src/table-database.ts","../../../packages/common/table/src/table-datasource.ts","../../../packages/common/table/src/table.component.ts","../../../packages/common/table/src/table.component.html","../../../packages/common/table/src/table.module.ts","../../../packages/common/table/src/igo2-common-table.ts"],"sourcesContent":["export enum TableActionColor {\n primary,\n accent,\n warn\n}\n","import { BehaviorSubject } from 'rxjs';\n\nexport class TableDatabase {\n /** Stream that emits whenever the data has been modified. */\n dataChange: BehaviorSubject<any[]> = new BehaviorSubject<any[]>([]);\n get data(): any[] {\n return this.dataChange.value;\n }\n\n constructor(data?) {\n if (data) {\n this.dataChange.next(data);\n }\n }\n\n set(data) {\n this.dataChange.next(data);\n }\n\n add(item) {\n const copiedData = this.data.slice();\n copiedData.push(item);\n this.set(copiedData);\n }\n\n remove(item) {\n const copiedData = this.data.slice();\n const index = copiedData.indexOf(item);\n copiedData.splice(index, 1);\n this.set(copiedData);\n }\n}\n","import { DataSource } from '@angular/cdk/table';\nimport { MatSort } from '@angular/material/sort';\n\nimport { ObjectUtils } from '@igo2/utils';\n\nimport { BehaviorSubject, Observable, merge } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { TableDatabase } from './table-database';\nimport { TableModel } from './table-model.interface';\n\nexport class TableDataSource extends DataSource<any> {\n get filter(): string {\n return this._filterChange.value;\n }\n set filter(filter: string) {\n this._filterChange.next(filter);\n }\n private _filterChange = new BehaviorSubject('');\n\n constructor(\n private _database: TableDatabase,\n private _model: TableModel,\n private _sort: MatSort\n ) {\n super();\n }\n\n // Connect function called by the table to retrieve one stream containing\n // the data to render.\n connect(): Observable<any[]> {\n if (!this._database) {\n return merge([]);\n }\n const displayDataChanges = [\n this._database.dataChange,\n this._filterChange,\n this._sort.sortChange\n ];\n\n return merge(...displayDataChanges).pipe(\n map(() => {\n return this.getFilteredData(this._database.data);\n }),\n map((data) => {\n return this.getSortedData(data);\n })\n );\n }\n\n disconnect() {\n // empty\n }\n\n getFilteredData(data): any[] {\n if (!this.filter) {\n return data;\n }\n return data.slice().filter((item: any) => {\n const searchStr: string = this._model.columns\n .filter((c) => c.filterable)\n .map((c) => ObjectUtils.resolve(item, c.name))\n .join(' ')\n .toLowerCase();\n\n return searchStr.indexOf(this.filter.toLowerCase()) !== -1;\n });\n }\n\n getSortedData(data): any[] {\n if (!this._sort.active || this._sort.direction === '') {\n return data;\n }\n\n return data.sort((a, b) => {\n const propertyA: number | string = ObjectUtils.resolve(\n a,\n this._sort.active\n );\n const propertyB: number | string = ObjectUtils.resolve(\n b,\n this._sort.active\n );\n\n return ObjectUtils.naturalCompare(\n propertyB,\n propertyA,\n this._sort.direction\n );\n });\n }\n}\n","import { SelectionModel } from '@angular/cdk/collections';\nimport { NgClass, NgFor, NgIf } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSort, MatSortModule } from '@angular/material/sort';\nimport { MatTableModule } from '@angular/material/table';\n\nimport { IgoLanguageModule } from '@igo2/core/language';\nimport { ObjectUtils } from '@igo2/utils';\n\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\nimport { TableActionColor } from './table-action-color.enum';\nimport { TableDatabase } from './table-database';\nimport { TableDataSource } from './table-datasource';\nimport { TableModel } from './table-model.interface';\n\n@Component({\n selector: 'igo-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n imports: [\n NgIf,\n MatFormFieldModule,\n MatInputModule,\n MatTableModule,\n MatSortModule,\n MatCheckboxModule,\n NgFor,\n NgClass,\n MatButtonModule,\n MatIconModule,\n IgoLanguageModule\n ]\n})\nexport class TableComponent implements OnChanges, OnInit, AfterViewInit {\n @Input()\n get database(): TableDatabase {\n return this._database;\n }\n set database(value: TableDatabase) {\n this._database = value;\n }\n private _database: TableDatabase;\n\n @Input()\n get model(): TableModel {\n return this._model;\n }\n set model(value: TableModel) {\n this._model = value;\n }\n private _model: TableModel;\n\n @Input()\n get hasFilterInput(): boolean {\n return this._hasFIlterInput;\n }\n set hasFilterInput(value: boolean) {\n this._hasFIlterInput = value;\n }\n private _hasFIlterInput = true;\n\n public displayedColumns;\n public dataSource: TableDataSource | null;\n public selection = new SelectionModel<any>(true, []);\n\n @Output()\n select = new EventEmitter<{\n added: any[];\n removed: any[];\n source: SelectionModel<any>;\n }>();\n\n @ViewChild('filter') filter: ElementRef;\n @ViewChild(MatSort, { static: true }) sort: MatSort;\n\n ngOnInit() {\n this.dataSource = new TableDataSource(this.database, this.model, this.sort);\n\n if (this.model) {\n this.displayedColumns = this.model.columns\n .filter((c) => c.displayed !== false)\n .map((c) => c.name);\n\n if (this.model.selectionCheckbox) {\n this.displayedColumns.unshift('selectionCheckbox');\n }\n if (this.model.actions && this.model.actions.length) {\n this.displayedColumns.push('action');\n }\n }\n\n this.selection.changed.subscribe((e) => this.select.emit(e));\n }\n\n ngAfterViewInit() {\n if (this.filter) {\n fromEvent(this.filter.nativeElement, 'keyup')\n .pipe(debounceTime(150), distinctUntilChanged())\n .subscribe(() => {\n if (!this.dataSource) {\n return;\n }\n this.dataSource.filter = this.filter.nativeElement.value;\n });\n }\n }\n\n ngOnChanges(change) {\n if (change.database) {\n this.dataSource = new TableDataSource(\n this.database,\n this.model,\n this.sort\n );\n this.selection.clear();\n }\n }\n\n getActionColor(colorId: number): string {\n return TableActionColor[colorId];\n }\n\n getValue(row, key) {\n return ObjectUtils.resolve(row, key);\n }\n\n /** Whether the number of selected elements matches the total number of rows. */\n isAllSelected() {\n const numSelected = this.selection.selected.length;\n const numRows = this.database.data.length;\n return numSelected === numRows;\n }\n\n /** Selects all rows if they are not all selected; otherwise clear selection. */\n masterToggle() {\n this.isAllSelected()\n ? this.selection.clear()\n : this.database.data.forEach((row) => this.selection.select(row));\n }\n\n handleClickAction(event, action, row) {\n event.stopPropagation();\n action.click(row);\n }\n}\n","<div class=\"table-box\">\n <div class=\"table-header\" *ngIf=\"hasFilterInput\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n >\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n >\n </mat-checkbox>\n </td>\n </ng-container>\n\n <ng-container\n [matColumnDef]=\"column.name\"\n *ngFor=\"let column of model.columns\"\n >\n <ng-container *ngIf=\"column.sortable\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n </ng-container>\n\n <ng-container *ngIf=\"!column.sortable\">\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n </ng-container>\n\n <ng-container *ngIf=\"!column.html; else cellHTML\">\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model.cellClassFunc ? model.cellClassFunc(row, column) : {}\n \"\n >\n {{ getValue(row, column.name) }}\n </td>\n </ng-container>\n\n <ng-template #cellHTML>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model.cellClassFunc ? model.cellClassFunc(row, column) : {}\n \"\n [innerHTML]=\"getValue(row, column.name)\"\n ></td>\n </ng-template>\n </ng-container>\n\n <!-- Action Column -->\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n <button\n *ngFor=\"let action of model.actions\"\n mat-mini-fab\n [color]=\"getActionColor(action.color)\"\n (click)=\"handleClickAction($event, action, row)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [ngClass]=\"model.rowClassFunc ? model.rowClassFunc(row) : {}\"\n (click)=\"selection.toggle(row)\"\n ></tr>\n </table>\n </div>\n</div>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { TableComponent } from './table.component';\n\n/**\n * @deprecated import the TableComponent directly\n */\n@NgModule({\n imports: [TableComponent],\n exports: [TableComponent]\n})\nexport class IgoTableModule {\n static forRoot(): ModuleWithProviders<IgoTableModule> {\n return {\n ngModule: IgoTableModule,\n providers: []\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AAC1B,IAAA,gBAAA,CAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO;AACP,IAAA,gBAAA,CAAA,gBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM;AACN,IAAA,gBAAA,CAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI;AACN,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,GAI3B,EAAA,CAAA,CAAA;;MCFY,aAAa,CAAA;;AAExB,IAAA,UAAU,GAA2B,IAAI,eAAe,CAAQ,EAAE,CAAC;AACnE,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK;;AAG9B,IAAA,WAAA,CAAY,IAAK,EAAA;QACf,IAAI,IAAI,EAAE;AACR,YAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;;;AAI9B,IAAA,GAAG,CAAC,IAAI,EAAA;AACN,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;;AAG5B,IAAA,GAAG,CAAC,IAAI,EAAA;QACN,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACpC,QAAA,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;AACrB,QAAA,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC;;AAGtB,IAAA,MAAM,CAAC,IAAI,EAAA;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;QACpC,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,C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AA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,cAAc;AACzB,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"igo2-common-table.mjs","sources":["../../../packages/common/table/src/table-action-color.enum.ts","../../../packages/common/table/src/table-database.ts","../../../packages/common/table/src/table-datasource.ts","../../../packages/common/table/src/table.component.ts","../../../packages/common/table/src/table.component.html","../../../packages/common/table/src/table.module.ts","../../../packages/common/table/src/igo2-common-table.ts"],"sourcesContent":["export enum TableActionColor {\n primary,\n accent,\n warn\n}\n","import { BehaviorSubject } from 'rxjs';\n\nexport class TableDatabase {\n /** Stream that emits whenever the data has been modified. */\n dataChange: BehaviorSubject<any[]> = new BehaviorSubject<any[]>([]);\n get data(): any[] {\n return this.dataChange.value;\n }\n\n constructor(data?) {\n if (data) {\n this.dataChange.next(data);\n }\n }\n\n set(data) {\n this.dataChange.next(data);\n }\n\n add(item) {\n const copiedData = this.data.slice();\n copiedData.push(item);\n this.set(copiedData);\n }\n\n remove(item) {\n const copiedData = this.data.slice();\n const index = copiedData.indexOf(item);\n copiedData.splice(index, 1);\n this.set(copiedData);\n }\n}\n","import { DataSource } from '@angular/cdk/table';\nimport { MatSort } from '@angular/material/sort';\n\nimport { ObjectUtils } from '@igo2/utils';\n\nimport { BehaviorSubject, Observable, merge } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { TableDatabase } from './table-database';\nimport { TableModel } from './table-model.interface';\n\nexport class TableDataSource extends DataSource<any> {\n get filter(): string {\n return this._filterChange.value;\n }\n set filter(filter: string) {\n this._filterChange.next(filter);\n }\n private _filterChange = new BehaviorSubject('');\n\n constructor(\n private _database: TableDatabase,\n private _model: TableModel,\n private _sort: MatSort\n ) {\n super();\n }\n\n // Connect function called by the table to retrieve one stream containing\n // the data to render.\n connect(): Observable<any[]> {\n if (!this._database) {\n return merge([]);\n }\n const displayDataChanges = [\n this._database.dataChange,\n this._filterChange,\n this._sort.sortChange\n ];\n\n return merge(...displayDataChanges).pipe(\n map(() => {\n return this.getFilteredData(this._database.data);\n }),\n map((data) => {\n return this.getSortedData(data);\n })\n );\n }\n\n disconnect() {\n // empty\n }\n\n getFilteredData(data): any[] {\n if (!this.filter) {\n return data;\n }\n return data.slice().filter((item: any) => {\n const searchStr: string = this._model.columns\n .filter((c) => c.filterable)\n .map((c) => ObjectUtils.resolve(item, c.name))\n .join(' ')\n .toLowerCase();\n\n return searchStr.indexOf(this.filter.toLowerCase()) !== -1;\n });\n }\n\n getSortedData(data): any[] {\n if (!this._sort.active || this._sort.direction === '') {\n return data;\n }\n\n return data.sort((a, b) => {\n const propertyA: number | string = ObjectUtils.resolve(\n a,\n this._sort.active\n );\n const propertyB: number | string = ObjectUtils.resolve(\n b,\n this._sort.active\n );\n\n return ObjectUtils.naturalCompare(\n propertyB,\n propertyA,\n this._sort.direction\n );\n });\n }\n}\n","import { SelectionModel } from '@angular/cdk/collections';\nimport { NgClass } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n ViewChild\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSort, MatSortModule } from '@angular/material/sort';\nimport { MatTableModule } from '@angular/material/table';\n\nimport { IgoLanguageModule } from '@igo2/core/language';\nimport { ObjectUtils } from '@igo2/utils';\n\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\nimport { TableActionColor } from './table-action-color.enum';\nimport { TableDatabase } from './table-database';\nimport { TableDataSource } from './table-datasource';\nimport { TableModel } from './table-model.interface';\n\n@Component({\n selector: 'igo-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n imports: [\n MatFormFieldModule,\n MatInputModule,\n MatTableModule,\n MatSortModule,\n MatCheckboxModule,\n NgClass,\n MatButtonModule,\n MatIconModule,\n IgoLanguageModule\n ]\n})\nexport class TableComponent implements OnChanges, OnInit, AfterViewInit {\n @Input()\n get database(): TableDatabase {\n return this._database;\n }\n set database(value: TableDatabase) {\n this._database = value;\n }\n private _database: TableDatabase;\n\n @Input()\n get model(): TableModel {\n return this._model;\n }\n set model(value: TableModel) {\n this._model = value;\n }\n private _model: TableModel;\n\n @Input()\n get hasFilterInput(): boolean {\n return this._hasFIlterInput;\n }\n set hasFilterInput(value: boolean) {\n this._hasFIlterInput = value;\n }\n private _hasFIlterInput = true;\n\n public displayedColumns;\n public dataSource: TableDataSource | null;\n public selection = new SelectionModel<any>(true, []);\n\n @Output()\n select = new EventEmitter<{\n added: any[];\n removed: any[];\n source: SelectionModel<any>;\n }>();\n\n @ViewChild('filter') filter: ElementRef;\n @ViewChild(MatSort, { static: true }) sort: MatSort;\n\n ngOnInit() {\n this.dataSource = new TableDataSource(this.database, this.model, this.sort);\n\n if (this.model) {\n this.displayedColumns = this.model.columns\n .filter((c) => c.displayed !== false)\n .map((c) => c.name);\n\n if (this.model.selectionCheckbox) {\n this.displayedColumns.unshift('selectionCheckbox');\n }\n if (this.model.actions && this.model.actions.length) {\n this.displayedColumns.push('action');\n }\n }\n\n this.selection.changed.subscribe((e) => this.select.emit(e));\n }\n\n ngAfterViewInit() {\n if (this.filter) {\n fromEvent(this.filter.nativeElement, 'keyup')\n .pipe(debounceTime(150), distinctUntilChanged())\n .subscribe(() => {\n if (!this.dataSource) {\n return;\n }\n this.dataSource.filter = this.filter.nativeElement.value;\n });\n }\n }\n\n ngOnChanges(change) {\n if (change.database) {\n this.dataSource = new TableDataSource(\n this.database,\n this.model,\n this.sort\n );\n this.selection.clear();\n }\n }\n\n getActionColor(colorId: number): string {\n return TableActionColor[colorId];\n }\n\n getValue(row, key) {\n return ObjectUtils.resolve(row, key);\n }\n\n /** Whether the number of selected elements matches the total number of rows. */\n isAllSelected() {\n const numSelected = this.selection.selected.length;\n const numRows = this.database.data.length;\n return numSelected === numRows;\n }\n\n /** Selects all rows if they are not all selected; otherwise clear selection. */\n masterToggle() {\n this.isAllSelected()\n ? this.selection.clear()\n : this.database.data.forEach((row) => this.selection.select(row));\n }\n\n handleClickAction(event, action, row) {\n event.stopPropagation();\n action.click(row);\n }\n}\n","<div class=\"table-box\">\n @if (hasFilterInput) {\n <div class=\"table-header\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n }\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n >\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n >\n </mat-checkbox>\n </td>\n </ng-container>\n\n @for (column of model.columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sortable) {\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n }\n @if (!column.sortable) {\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n }\n @if (!column.html) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model.cellClassFunc ? model.cellClassFunc(row, column) : {}\n \"\n >\n {{ getValue(row, column.name) }}\n </td>\n } @else {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model.cellClassFunc ? model.cellClassFunc(row, column) : {}\n \"\n [innerHTML]=\"getValue(row, column.name)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Action Column -->\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n @for (action of model.actions; track action) {\n <button\n mat-mini-fab\n [color]=\"getActionColor(action.color)\"\n (click)=\"handleClickAction($event, action, row)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [ngClass]=\"model.rowClassFunc ? model.rowClassFunc(row) : {}\"\n (click)=\"selection.toggle(row)\"\n ></tr>\n </table>\n </div>\n</div>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { TableComponent } from './table.component';\n\n/**\n * @deprecated import the TableComponent directly\n */\n@NgModule({\n imports: [TableComponent],\n exports: [TableComponent]\n})\nexport class IgoTableModule {\n static forRoot(): ModuleWithProviders<IgoTableModule> {\n return {\n ngModule: IgoTableModule,\n providers: []\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AAC1B,IAAA,gBAAA,CAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO;AACP,IAAA,gBAAA,CAAA,gBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM;AACN,IAAA,gBAAA,CAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI;AACN,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,GAAA,EAAA,CAAA,CAAA;;MCEf,aAAa,CAAA;;AAExB,IAAA,UAAU,GAA2B,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;wGAAd,cAAc,EAAA,OAAA,EAAA,CAHf,cAAc,CAAA,EAAA,OAAA,EAAA,CACd,cAAc,CAAA,EAAA,CAAA;AAEb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHf,cAAc,CAAA,EAAA,CAAA;;2FAGb,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,OAAO,EAAE,CAAC,cAAc;AACzB,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Injectable, HostBinding, Input, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { EntityStore } from '@igo2/common/entity';
|
|
4
4
|
import { BehaviorSubject } from 'rxjs';
|
|
5
|
-
import {
|
|
5
|
+
import { NgClass, AsyncPipe } from '@angular/common';
|
|
6
6
|
import { ActionStore, ActionbarComponent } from '@igo2/common/action';
|
|
7
7
|
import { DynamicOutletComponent } from '@igo2/common/dynamic-component';
|
|
8
8
|
import { map } from 'rxjs/operators';
|
|
@@ -228,10 +228,10 @@ class ToolService {
|
|
|
228
228
|
getTools() {
|
|
229
229
|
return Object.values(ToolService.tools);
|
|
230
230
|
}
|
|
231
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
232
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
231
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ToolService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
232
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ToolService, providedIn: 'root' });
|
|
233
233
|
}
|
|
234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ToolService, decorators: [{
|
|
235
235
|
type: Injectable,
|
|
236
236
|
args: [{
|
|
237
237
|
providedIn: 'root'
|
|
@@ -461,18 +461,12 @@ class ToolboxComponent {
|
|
|
461
461
|
this.animating$$.unsubscribe();
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
465
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
464
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ToolboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
465
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: ToolboxComponent, isStandalone: true, selector: "igo-toolbox", inputs: { toolbox: "toolbox", animate: "animate", color: "color" }, host: { properties: { "class.color-grey": "this.classColorGrey", "class.color-primary": "this.classColorPrimary" } }, ngImport: i0, template: "@if ((toolbar$ | async).length > 0) {\n <igo-actionbar\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n [withTitle]=\"toolbarWithTitle$ | async\"\n [withTooltip]=\"(toolbarWithTitle$ | async) === false\"\n [scrollActive]=\"toolbarWithTitle$ | async\"\n [horizontal]=\"false\"\n >\n </igo-actionbar>\n}\n\n@if (activeTool$ | async; as tool) {\n <div\n class=\"igo-tool-container\"\n [ngClass]=\"{\n 'igo-tool-container-with-toolbar': !actionStore.empty,\n 'igo-tool-container-with-animation': animate\n }\"\n [@toolSlideInOut]=\"animation$ | async\"\n (@toolSlideInOut.start)=\"onAnimationStart()\"\n (@toolSlideInOut.done)=\"onAnimationComplete()\"\n >\n <igo-dynamic-outlet\n [component]=\"tool.component\"\n [inputs]=\"getToolInputs(tool)\"\n >\n </igo-dynamic-outlet>\n </div>\n}\n", styles: [":host{display:block;position:relative;overflow:hidden;width:100%;height:100%}:host .igo-tool-container{position:absolute;inset:0;margin-bottom:0}:host .igo-tool-container-with-animation{transform:translate3d(100%,0,0)}:host .igo-tool-container-with-toolbar{left:50px}:host igo-actionbar{height:100%}:host igo-actionbar.with-title{width:100%;overflow:auto}:host igo-actionbar:not(.with-title){width:48px;overflow:hidden;-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){:host igo-actionbar:not(.with-title){overflow:auto}}:host igo-dynamic-outlet{overflow:auto}:host.color-primary igo-actionbar:not(.with-title){color:var(--mat-sys-on-primary);background-color:var(--mat-sys-on-primary-container)}:host.color-primary igo-actionbar:not(.with-title) ::ng-deep button{color:var(--mat-sys-on-primary)}:host.color-primary igo-actionbar:not(.with-title) #lowChevron,:host.color-primary igo-actionbar:not(.with-title) #topChevron{background-color:var(--mat-sys-primary-container);color:#fff}:host ::ng-deep .color-grey>igo-actionbar:not(.with-title){box-shadow:unset;background-color:#737475}:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) #lowChevron,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) #topChevron{background-color:#737475;color:#fff}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar{color:#fff}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar:hover,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar:hover{color:#000}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.tool-activated,:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.children-tool-activated,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.tool-activated,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.children-tool-activated{color:var(--mat-sys-on-primary);background-color:var(--mat-sys-on-primary-container);color:#000}:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list>#lowChevron:hover,:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list>#topChevron:hover{background-color:var(--mat-sys-secondary-container);color:#000}:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list mat-list-item{color:var(--mat-sys-on-primary-container)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item:hover{color:var(--mat-sys-on-primary-container);background-color:var(--mat-sys-primary-container)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item:hover button{color:var(--mat-sys-on-primary-container)!important}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.tool-activated,:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.children-tool-activated{color:var(--mat-sys-on-background);background-color:var(--mat-sys-on-primary)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.tool-activated button,:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.children-tool-activated button{color:var(--mat-sys-on-background)!important;cursor:default}\n"], dependencies: [{ kind: "component", type: ActionbarComponent, selector: "igo-actionbar", inputs: ["store", "mode", "withToggleButton", "horizontal", "color", "iconColor", "withTitle", "withTooltip", "scrollActive", "withIcon", "icon", "xPosition", "yPosition", "overlayClass"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DynamicOutletComponent, selector: "igo-dynamic-outlet", inputs: ["component", "inputs", "subscribers"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], animations: [toolSlideInOut()], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
466
466
|
}
|
|
467
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
467
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ToolboxComponent, decorators: [{
|
|
468
468
|
type: Component,
|
|
469
|
-
args: [{ selector: 'igo-toolbox', animations: [toolSlideInOut()], changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
470
|
-
NgIf,
|
|
471
|
-
ActionbarComponent,
|
|
472
|
-
NgClass,
|
|
473
|
-
DynamicOutletComponent,
|
|
474
|
-
AsyncPipe
|
|
475
|
-
], template: "<igo-actionbar\n *ngIf=\"(toolbar$ | async).length > 0\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n [withTitle]=\"toolbarWithTitle$ | async\"\n [withTooltip]=\"(toolbarWithTitle$ | async) === false\"\n [scrollActive]=\"toolbarWithTitle$ | async\"\n [horizontal]=\"false\"\n>\n</igo-actionbar>\n\n<div\n *ngIf=\"activeTool$ | async as tool\"\n class=\"igo-tool-container\"\n [ngClass]=\"{\n 'igo-tool-container-with-toolbar': !actionStore.empty,\n 'igo-tool-container-with-animation': animate\n }\"\n [@toolSlideInOut]=\"animation$ | async\"\n (@toolSlideInOut.start)=\"onAnimationStart()\"\n (@toolSlideInOut.done)=\"onAnimationComplete()\"\n>\n <igo-dynamic-outlet\n [component]=\"tool.component\"\n [inputs]=\"getToolInputs(tool)\"\n >\n </igo-dynamic-outlet>\n</div>\n", styles: [":host{display:block;position:relative;overflow:hidden;width:100%;height:100%}:host .igo-tool-container{position:absolute;inset:0;margin-bottom:0}:host .igo-tool-container-with-animation{transform:translate3d(100%,0,0)}:host .igo-tool-container-with-toolbar{left:50px}:host igo-actionbar{height:100%}:host igo-actionbar.with-title{width:100%;overflow:auto}:host igo-actionbar:not(.with-title){width:48px;overflow:hidden;-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){:host igo-actionbar:not(.with-title){overflow:auto}}:host igo-dynamic-outlet{overflow:auto}:host.color-primary igo-actionbar:not(.with-title){color:var(--mat-sys-on-primary);background-color:var(--mat-sys-on-primary-container)}:host.color-primary igo-actionbar:not(.with-title) ::ng-deep button{color:var(--mat-sys-on-primary)}:host.color-primary igo-actionbar:not(.with-title) #lowChevron,:host.color-primary igo-actionbar:not(.with-title) #topChevron{background-color:var(--mat-sys-primary-container);color:#fff}:host ::ng-deep .color-grey>igo-actionbar:not(.with-title){box-shadow:unset;background-color:#737475}:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) #lowChevron,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) #topChevron{background-color:#737475;color:#fff}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar{color:#fff}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar:hover,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar:hover{color:#000}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.tool-activated,:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.children-tool-activated,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.tool-activated,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.children-tool-activated{color:var(--mat-sys-on-primary);background-color:var(--mat-sys-on-primary-container);color:#000}:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list>#lowChevron:hover,:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list>#topChevron:hover{background-color:var(--mat-sys-secondary-container);color:#000}:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list mat-list-item{color:var(--mat-sys-on-primary-container)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item:hover{color:var(--mat-sys-on-primary-container);background-color:var(--mat-sys-primary-container)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item:hover button{color:var(--mat-sys-on-primary-container)!important}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.tool-activated,:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.children-tool-activated{color:var(--mat-sys-on-background);background-color:var(--mat-sys-on-primary)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.tool-activated button,:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.children-tool-activated button{color:var(--mat-sys-on-background)!important;cursor:default}\n"] }]
|
|
469
|
+
args: [{ selector: 'igo-toolbox', animations: [toolSlideInOut()], changeDetection: ChangeDetectionStrategy.OnPush, imports: [ActionbarComponent, NgClass, DynamicOutletComponent, AsyncPipe], template: "@if ((toolbar$ | async).length > 0) {\n <igo-actionbar\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n [withTitle]=\"toolbarWithTitle$ | async\"\n [withTooltip]=\"(toolbarWithTitle$ | async) === false\"\n [scrollActive]=\"toolbarWithTitle$ | async\"\n [horizontal]=\"false\"\n >\n </igo-actionbar>\n}\n\n@if (activeTool$ | async; as tool) {\n <div\n class=\"igo-tool-container\"\n [ngClass]=\"{\n 'igo-tool-container-with-toolbar': !actionStore.empty,\n 'igo-tool-container-with-animation': animate\n }\"\n [@toolSlideInOut]=\"animation$ | async\"\n (@toolSlideInOut.start)=\"onAnimationStart()\"\n (@toolSlideInOut.done)=\"onAnimationComplete()\"\n >\n <igo-dynamic-outlet\n [component]=\"tool.component\"\n [inputs]=\"getToolInputs(tool)\"\n >\n </igo-dynamic-outlet>\n </div>\n}\n", styles: [":host{display:block;position:relative;overflow:hidden;width:100%;height:100%}:host .igo-tool-container{position:absolute;inset:0;margin-bottom:0}:host .igo-tool-container-with-animation{transform:translate3d(100%,0,0)}:host .igo-tool-container-with-toolbar{left:50px}:host igo-actionbar{height:100%}:host igo-actionbar.with-title{width:100%;overflow:auto}:host igo-actionbar:not(.with-title){width:48px;overflow:hidden;-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){:host igo-actionbar:not(.with-title){overflow:auto}}:host igo-dynamic-outlet{overflow:auto}:host.color-primary igo-actionbar:not(.with-title){color:var(--mat-sys-on-primary);background-color:var(--mat-sys-on-primary-container)}:host.color-primary igo-actionbar:not(.with-title) ::ng-deep button{color:var(--mat-sys-on-primary)}:host.color-primary igo-actionbar:not(.with-title) #lowChevron,:host.color-primary igo-actionbar:not(.with-title) #topChevron{background-color:var(--mat-sys-primary-container);color:#fff}:host ::ng-deep .color-grey>igo-actionbar:not(.with-title){box-shadow:unset;background-color:#737475}:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) #lowChevron,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) #topChevron{background-color:#737475;color:#fff}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar{color:#fff}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar:hover,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar:hover{color:#000}:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.tool-activated,:host ::ng-deep .color-primary>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.children-tool-activated,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.tool-activated,:host ::ng-deep .color-grey>igo-actionbar:not(.with-title) mat-list.mat-mdc-list-base .mat-mdc-list-item.mdc-list-item--with-leading-avatar.children-tool-activated{color:var(--mat-sys-on-primary);background-color:var(--mat-sys-on-primary-container);color:#000}:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list>#lowChevron:hover,:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list>#topChevron:hover{background-color:var(--mat-sys-secondary-container);color:#000}:host ::ng-deep>igo-actionbar:not(.with-title)>mat-list mat-list-item{color:var(--mat-sys-on-primary-container)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item:hover{color:var(--mat-sys-on-primary-container);background-color:var(--mat-sys-primary-container)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item:hover button{color:var(--mat-sys-on-primary-container)!important}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.tool-activated,:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.children-tool-activated{color:var(--mat-sys-on-background);background-color:var(--mat-sys-on-primary)}:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.tool-activated button,:host ::ng-deep>igo-actionbar mat-list.mat-mdc-list-base igo-actionbar-item mat-list-item.children-tool-activated button{color:var(--mat-sys-on-background)!important;cursor:default}\n"] }]
|
|
476
470
|
}], propDecorators: { toolbox: [{
|
|
477
471
|
type: Input
|
|
478
472
|
}], animate: [{
|
|
@@ -491,11 +485,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
491
485
|
* @deprecated import the ToolboxComponent directly
|
|
492
486
|
*/
|
|
493
487
|
class IgoToolboxModule {
|
|
494
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
495
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
496
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
488
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoToolboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
489
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: IgoToolboxModule, imports: [ToolboxComponent], exports: [ToolboxComponent] });
|
|
490
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoToolboxModule, imports: [ToolboxComponent] });
|
|
497
491
|
}
|
|
498
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoToolboxModule, decorators: [{
|
|
499
493
|
type: NgModule,
|
|
500
494
|
args: [{
|
|
501
495
|
imports: [ToolboxComponent],
|
|
@@ -516,11 +510,11 @@ class IgoToolModule {
|
|
|
516
510
|
providers: [ToolService]
|
|
517
511
|
};
|
|
518
512
|
}
|
|
519
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
520
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
521
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
513
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoToolModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
514
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: IgoToolModule, exports: [IgoToolboxModule] });
|
|
515
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoToolModule, imports: [IgoToolboxModule] });
|
|
522
516
|
}
|
|
523
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoToolModule, decorators: [{
|
|
524
518
|
type: NgModule,
|
|
525
519
|
args: [{
|
|
526
520
|
exports: [IgoToolboxModule]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-common-tool.mjs","sources":["../../../packages/common/tool/src/shared/toolbox.ts","../../../packages/common/tool/src/shared/tool.service.ts","../../../packages/common/tool/src/shared/tool-component.ts","../../../packages/common/tool/src/toolbox/toolbox.animation.ts","../../../packages/common/tool/src/toolbox/toolbox.component.ts","../../../packages/common/tool/src/toolbox/toolbox.component.html","../../../packages/common/tool/src/toolbox/toolbox.module.ts","../../../packages/common/tool/src/tool.module.ts","../../../packages/common/tool/src/igo2-common-tool.ts"],"sourcesContent":["import { EntityRecord, EntityStore } from '@igo2/common/entity';\n\nimport { BehaviorSubject, Subscription } from 'rxjs';\n\nimport { Tool, ToolboxOptions } from './tool.interface';\n\n/**\n * Service where all available tools and their component are registered.\n */\nexport class Toolbox {\n /**\n * Observable of the active tool\n */\n activeTool$ = new BehaviorSubject<Tool>(undefined);\n\n /**\n * Ordered list of tool names to display in a toolbar\n */\n toolbar$ = new BehaviorSubject<string[]>([]);\n\n /**\n * Observable of the active tool\n */\n private activeTool$$: Subscription;\n\n /**\n * Active tool history. Useful for activating the previous tool.\n */\n private activeToolHistory: string[] = [];\n private previousToolName: string;\n private currentToolName: string;\n\n /**\n * Tool store\n */\n private store = new EntityStore<Tool>([], {\n getKey: (tool: Tool) => tool.name\n });\n\n get tools$(): BehaviorSubject<Tool[]> {\n return this.store.entities$;\n }\n\n constructor(private options: ToolboxOptions = {}) {\n this.setToolbar(options.toolbar);\n this.initStore();\n }\n\n /**\n * Destroy the toolbox\n */\n destroy() {\n this.activeTool$$.unsubscribe();\n this.store.destroy();\n }\n\n /**\n * Return a tool\n * @param name Tool name\n * @returns tool Tool\n */\n getTool(name: string): Tool {\n return this.store.get(name);\n }\n\n /**\n * Return all tools\n * @returns Array of tools\n */\n getTools(): Tool[] {\n return this.store.all();\n }\n\n /**\n * Set tool configurations\n * @param tools Tools\n */\n setTools(tools: Tool[]) {\n this.store.load(tools);\n }\n\n /**\n * Get toolbar\n * @returns Toolbar value\n */\n getToolbar(): string[] {\n return this.toolbar$.getValue();\n }\n\n /**\n * Set toolbar\n * @param toolbar A list of tool names\n */\n setToolbar(toolbar: string[]) {\n this.toolbar$.next(toolbar || []);\n }\n\n /**\n * Activate a tool (and deactivate other tools)\n * @param name Tool name\n * @param options Tool options\n */\n activateTool(name: string, options: Record<string, any> = {}) {\n const tool = this.getTool(name);\n if (tool === undefined) {\n return;\n }\n\n this.store.state.update(tool, { active: true, options }, true);\n }\n\n /**\n * Activate the previous tool, if any\n */\n activatePreviousTool() {\n if (this.activeToolHistory.length <= 1) {\n this.deactivateTool();\n return;\n }\n const [previous] = this.activeToolHistory.splice(-2, 2);\n this.activateTool(previous);\n }\n\n getCurrentPreviousToolName(): [string, string] {\n return [this.previousToolName, this.currentToolName];\n }\n\n /**\n * Activate the tool below, if any\n */\n /* activateBelowTool() {\n const arrayTools = this.getToolbar();\n const index = arrayTools.findIndex(t => t === this.activeTool$.getValue().name);\n if (arrayTools[index + 1] !== undefined) {\n this.deactivateTool();\n const below = arrayTools[index + 1];\n this.activateTool(below);\n } else {\n this.deactivateTool();\n const below = arrayTools[0];\n this.activateTool(below);\n }\n } */\n\n /**\n * Activate the tool above, if any\n */\n /* activateAboveTool() {\n const arrayTools = this.getToolbar();\n const index = arrayTools.findIndex(t => t === this.activeTool$.getValue().name);\n if (arrayTools[index - 1] !== undefined) {\n this.deactivateTool();\n const above = arrayTools[index - 1];\n this.activateTool(above);\n } else {\n this.deactivateTool();\n const above = arrayTools[arrayTools.length - 1];\n this.activateTool(above);\n }\n } */\n\n /**\n * Deactivate the active tool\n */\n deactivateTool() {\n this.clearActiveToolHistory();\n this.store.state.updateAll({ active: false });\n }\n\n /**\n * Initialize the tool store and start observing the active tool\n */\n private initStore() {\n this.store = new EntityStore<Tool>([], {\n getKey: (entity: Tool) => entity.name\n });\n\n this.activeTool$$ = this.store.stateView\n .firstBy$((record: EntityRecord<Tool>) => record.state.active === true)\n .subscribe((record: EntityRecord<Tool>) => {\n if (record === undefined) {\n this.setActiveTool(undefined);\n return;\n }\n\n const tool = record.entity;\n const options = Object.assign(\n {},\n tool.options || {},\n record.state.options || {}\n );\n this.setActiveTool(Object.assign({}, tool, { options }));\n });\n }\n\n /**\n * Set the active tool and update the tool history\n * @param tool Tool\n */\n private setActiveTool(tool: Tool | undefined) {\n this.activeTool$.next(tool);\n if (tool === undefined) {\n this.clearActiveToolHistory();\n } else {\n this.activeToolHistory = this.activeToolHistory\n .filter((name: string) => name !== tool.name)\n .concat([tool.name]);\n\n this.previousToolName = this.currentToolName;\n this.currentToolName =\n this.activeToolHistory[this.activeToolHistory.length - 1];\n }\n }\n\n /**\n * Clear the tool history\n */\n private clearActiveToolHistory() {\n this.activeToolHistory = [];\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { Tool } from './tool.interface';\nimport { Toolbox } from './toolbox';\n\n/**\n * Service where runtime tool configurations are registered\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ToolService {\n static tools: Record<string, Tool> = {};\n\n /**\n * Toolbox that holds main tools\n */\n public toolbox: Toolbox = new Toolbox();\n\n static register(tool: Tool) {\n ToolService.tools[tool.name] = tool;\n }\n\n constructor() {\n this.toolbox.setTools(this.getTools());\n }\n\n /**\n * Return a tool\n * @param name Tool name\n * @returns tool Tool\n */\n getTool(name: string): Tool {\n return ToolService.tools[name];\n }\n\n /**\n * Return all tools\n * @returns tTols\n */\n getTools(): Tool[] {\n return Object.values(ToolService.tools);\n }\n}\n","import { Tool } from './tool.interface';\nimport { ToolService } from './tool.service';\n\nexport function ToolComponent(tool: Partial<Tool>): (cls: any) => any {\n return (compType: any) => {\n ToolService.register(\n Object.assign({}, tool, {\n component: compType\n } as Tool)\n );\n };\n}\n","import {\n AnimationTriggerMetadata,\n animate,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\n\nexport function toolSlideInOut(\n speed = '300ms',\n type = 'ease-in-out'\n): AnimationTriggerMetadata {\n return trigger('toolSlideInOut', [\n state(\n 'enter',\n style({\n transform: 'translate3d(0, 0, 0)'\n })\n ),\n transition('void => enter', animate(speed + ' ' + type))\n ]);\n}\n","import { AsyncPipe, NgClass, NgIf } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n OnDestroy,\n OnInit\n} from '@angular/core';\n\nimport { Action, ActionStore, ActionbarComponent } from '@igo2/common/action';\nimport { DynamicOutletComponent } from '@igo2/common/dynamic-component';\n\nimport { BehaviorSubject, Observable, Subscription } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { Tool } from '../shared/tool.interface';\nimport { Toolbox } from '../shared/toolbox';\nimport { ToolboxColor } from '../shared/toolbox.enums';\nimport { toolSlideInOut } from './toolbox.animation';\n\n@Component({\n selector: 'igo-toolbox',\n templateUrl: 'toolbox.component.html',\n styleUrls: ['toolbox.component.scss'],\n animations: [toolSlideInOut()],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgIf,\n ActionbarComponent,\n NgClass,\n DynamicOutletComponent,\n AsyncPipe\n ]\n})\nexport class ToolboxComponent implements OnInit, OnDestroy {\n /**\n * Observable of the active tool\n */\n activeTool$ = new BehaviorSubject<Tool>(undefined);\n\n get isActive(): boolean {\n return !!this.activeTool$.value;\n }\n\n /**\n * Store of actions that toggle tools\n */\n actionStore: ActionStore = new ActionStore([]);\n\n /**\n * Observable of he anmation state\n */\n animation$ = new BehaviorSubject<string>('none');\n\n /**\n * Observable of the toolbar\n */\n toolbar$ = new BehaviorSubject<string[]>([]);\n\n /**\n * Whether the Toolbar should display actions' titles\n */\n toolbarWithTitle$: Observable<boolean> = this.activeTool$.pipe(\n map((tool: Tool | undefined) => tool === undefined)\n );\n\n /**\n * Subscription to the active tool\n */\n private activeTool$$: Subscription;\n\n /**\n * Subscription to the toolbar\n */\n private toolbar$$: Subscription;\n\n /**\n * Observable of the ongoing animation. This is useful when\n * multiple animations are triggered at once i.e. when the user clicks\n * too fast on different actions\n */\n private animating$ = new BehaviorSubject<boolean>(false);\n\n /**\n * Subscription to the ongoing animation\n */\n private animating$$: Subscription;\n\n /**\n * Toolbox\n */\n @Input() toolbox: Toolbox;\n\n /**\n * Whether the toolbox should animate the first tool entering\n */\n @Input() animate = false;\n\n /**\n * Color of Toolbox\n */\n @Input() color: ToolboxColor = 'white';\n\n /**\n * @ignore\n */\n @HostBinding('class.color-grey')\n get classColorGrey() {\n return this.color === 'grey';\n }\n\n /**\n * @ignore\n */\n @HostBinding('class.color-primary')\n get classColorPrimary() {\n return this.color === 'primary';\n }\n\n /**\n * Initialize the toolbar and subscribe to the active tool\n * @internal\n */\n ngOnInit() {\n this.toolbar$$ = this.toolbox.toolbar$.subscribe((toolbar: string[]) =>\n this.onToolbarChange(toolbar)\n );\n this.activeTool$$ = this.toolbox.activeTool$.subscribe((tool: Tool) =>\n this.onActiveToolChange(tool)\n );\n }\n\n /**\n * Unsubscribe to the active tool and destroy the action store\n * @internal\n */\n ngOnDestroy() {\n this.toolbar$$.unsubscribe();\n this.activeTool$$.unsubscribe();\n this.actionStore.destroy();\n }\n\n /**\n * Track the starting animation\n * @internal\n */\n onAnimationStart() {\n this.animating$.next(true);\n }\n\n /**\n * Untrack the completed animation\n * @internal\n */\n onAnimationComplete() {\n this.animating$.next(false);\n }\n\n /**\n * Return a tool's inputs\n * @param tool Tool\n * @returns Tool inputs\n * @internal\n */\n getToolInputs(tool: Tool): Record<string, any> {\n return tool.options || {};\n }\n\n /**\n * Initialize an action store\n * @param toolbar Toolbar\n */\n private onToolbarChange(toolbar: string[]) {\n this.setToolbar(toolbar);\n }\n\n /**\n * Activate a tool and trigger an animation or not\n * @param tool Tool to activate\n */\n private onActiveToolChange(tool: Tool) {\n if (!this.animate) {\n this.setActiveTool(tool);\n return;\n }\n this.onAnimate(() => this.setActiveTool(tool));\n }\n\n /**\n * Set the active tool\n * @param tool Tool to activate\n */\n private setActiveTool(tool: Tool | undefined) {\n if (tool === undefined) {\n this.actionStore.state.updateAll({ active: false });\n } else {\n const action = this.actionStore.get(tool.name);\n if (action !== undefined) {\n this.actionStore.state.update(action, { active: true }, true);\n }\n }\n\n this.activeTool$.next(tool);\n if (this.animate) {\n this.animation$.next('enter');\n }\n }\n\n /**\n * Initialize the toolbar\n */\n private setToolbar(toolbar: string[]) {\n const actions = toolbar.reduce((acc: Action[], toolName: string) => {\n const tool = this.toolbox.getTool(toolName);\n if (tool === undefined) {\n return acc;\n }\n\n acc.push({\n id: tool.name,\n title: tool.title,\n icon: tool.icon,\n tooltip: tool.tooltip,\n args: [tool, this.toolbox],\n handler: (_tool: Tool, _toolbox: Toolbox) => {\n _toolbox.activateTool(_tool.name);\n },\n ngClass: (_tool: Tool) => {\n return this.toolbox.activeTool$.pipe(\n map((activeTool: Tool) => {\n let toolActivated = false;\n if (activeTool !== undefined && _tool.name === activeTool.name) {\n toolActivated = true;\n }\n\n let childrenToolActivated = false;\n if (\n activeTool !== undefined &&\n _tool.name === activeTool.parent\n ) {\n childrenToolActivated = true;\n }\n\n return {\n 'tool-activated': toolActivated,\n 'children-tool-activated': childrenToolActivated\n };\n })\n );\n }\n });\n return acc;\n }, []);\n this.actionStore.load(actions);\n this.toolbar$.next(toolbar);\n }\n\n /**\n * Observe the ongoing animation and ignore any incoming animation\n * while one is still ongoing.\n * @param callback Callback to execute when the animation completes\n */\n private onAnimate(callback: () => void) {\n this.unAnimate();\n this.animating$$ = this.animating$.subscribe((animation: boolean) => {\n if (!animation) {\n callback.call(this);\n this.unAnimate();\n }\n });\n }\n\n /**\n * Stop observing an animation when it's complete\n */\n private unAnimate() {\n if (this.animating$$) {\n this.animating$$.unsubscribe();\n }\n }\n}\n","<igo-actionbar\n *ngIf=\"(toolbar$ | async).length > 0\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n [withTitle]=\"toolbarWithTitle$ | async\"\n [withTooltip]=\"(toolbarWithTitle$ | async) === false\"\n [scrollActive]=\"toolbarWithTitle$ | async\"\n [horizontal]=\"false\"\n>\n</igo-actionbar>\n\n<div\n *ngIf=\"activeTool$ | async as tool\"\n class=\"igo-tool-container\"\n [ngClass]=\"{\n 'igo-tool-container-with-toolbar': !actionStore.empty,\n 'igo-tool-container-with-animation': animate\n }\"\n [@toolSlideInOut]=\"animation$ | async\"\n (@toolSlideInOut.start)=\"onAnimationStart()\"\n (@toolSlideInOut.done)=\"onAnimationComplete()\"\n>\n <igo-dynamic-outlet\n [component]=\"tool.component\"\n [inputs]=\"getToolInputs(tool)\"\n >\n </igo-dynamic-outlet>\n</div>\n","import { NgModule } from '@angular/core';\n\nimport { ToolboxComponent } from './toolbox.component';\n\n/**\n * @deprecated import the ToolboxComponent directly\n */\n@NgModule({\n imports: [ToolboxComponent],\n exports: [ToolboxComponent]\n})\nexport class IgoToolboxModule {}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { ToolService } from './shared/tool.service';\nimport { IgoToolboxModule } from './toolbox/toolbox.module';\n\n/**\n * @deprecated import the ToolboxComponent directly\n */\n@NgModule({\n exports: [IgoToolboxModule]\n})\nexport class IgoToolModule {\n /**\n * @deprecated it has no effect\n */\n static forRoot(): ModuleWithProviders<IgoToolModule> {\n return {\n ngModule: IgoToolModule,\n providers: [ToolService]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;AAMA;;AAEG;MACU,OAAO,CAAA;AAkCE,IAAA,OAAA;AAjCpB;;AAEG;AACH,IAAA,WAAW,GAAG,IAAI,eAAe,CAAO,SAAS,CAAC;AAElD;;AAEG;AACH,IAAA,QAAQ,GAAG,IAAI,eAAe,CAAW,EAAE,CAAC;AAE5C;;AAEG;AACK,IAAA,YAAY;AAEpB;;AAEG;IACK,iBAAiB,GAAa,EAAE;AAChC,IAAA,gBAAgB;AAChB,IAAA,eAAe;AAEvB;;AAEG;AACK,IAAA,KAAK,GAAG,IAAI,WAAW,CAAO,EAAE,EAAE;QACxC,MAAM,EAAE,CAAC,IAAU,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ool.mjs","sources":["../../../packages/common/tool/src/shared/toolbox.ts","../../../packages/common/tool/src/shared/tool.service.ts","../../../packages/common/tool/src/shared/tool-component.ts","../../../packages/common/tool/src/toolbox/toolbox.animation.ts","../../../packages/common/tool/src/toolbox/toolbox.component.ts","../../../packages/common/tool/src/toolbox/toolbox.component.html","../../../packages/common/tool/src/toolbox/toolbox.module.ts","../../../packages/common/tool/src/tool.module.ts","../../../packages/common/tool/src/igo2-common-tool.ts"],"sourcesContent":["import { EntityRecord, EntityStore } from '@igo2/common/entity';\n\nimport { BehaviorSubject, Subscription } from 'rxjs';\n\nimport { Tool, ToolboxOptions } from './tool.interface';\n\n/**\n * Service where all available tools and their component are registered.\n */\nexport class Toolbox {\n /**\n * Observable of the active tool\n */\n activeTool$ = new BehaviorSubject<Tool>(undefined);\n\n /**\n * Ordered list of tool names to display in a toolbar\n */\n toolbar$ = new BehaviorSubject<string[]>([]);\n\n /**\n * Observable of the active tool\n */\n private activeTool$$: Subscription;\n\n /**\n * Active tool history. Useful for activating the previous tool.\n */\n private activeToolHistory: string[] = [];\n private previousToolName: string;\n private currentToolName: string;\n\n /**\n * Tool store\n */\n private store = new EntityStore<Tool>([], {\n getKey: (tool: Tool) => tool.name\n });\n\n get tools$(): BehaviorSubject<Tool[]> {\n return this.store.entities$;\n }\n\n constructor(private options: ToolboxOptions = {}) {\n this.setToolbar(options.toolbar);\n this.initStore();\n }\n\n /**\n * Destroy the toolbox\n */\n destroy() {\n this.activeTool$$.unsubscribe();\n this.store.destroy();\n }\n\n /**\n * Return a tool\n * @param name Tool name\n * @returns tool Tool\n */\n getTool(name: string): Tool {\n return this.store.get(name);\n }\n\n /**\n * Return all tools\n * @returns Array of tools\n */\n getTools(): Tool[] {\n return this.store.all();\n }\n\n /**\n * Set tool configurations\n * @param tools Tools\n */\n setTools(tools: Tool[]) {\n this.store.load(tools);\n }\n\n /**\n * Get toolbar\n * @returns Toolbar value\n */\n getToolbar(): string[] {\n return this.toolbar$.getValue();\n }\n\n /**\n * Set toolbar\n * @param toolbar A list of tool names\n */\n setToolbar(toolbar: string[]) {\n this.toolbar$.next(toolbar || []);\n }\n\n /**\n * Activate a tool (and deactivate other tools)\n * @param name Tool name\n * @param options Tool options\n */\n activateTool(name: string, options: Record<string, any> = {}) {\n const tool = this.getTool(name);\n if (tool === undefined) {\n return;\n }\n\n this.store.state.update(tool, { active: true, options }, true);\n }\n\n /**\n * Activate the previous tool, if any\n */\n activatePreviousTool() {\n if (this.activeToolHistory.length <= 1) {\n this.deactivateTool();\n return;\n }\n const [previous] = this.activeToolHistory.splice(-2, 2);\n this.activateTool(previous);\n }\n\n getCurrentPreviousToolName(): [string, string] {\n return [this.previousToolName, this.currentToolName];\n }\n\n /**\n * Activate the tool below, if any\n */\n /* activateBelowTool() {\n const arrayTools = this.getToolbar();\n const index = arrayTools.findIndex(t => t === this.activeTool$.getValue().name);\n if (arrayTools[index + 1] !== undefined) {\n this.deactivateTool();\n const below = arrayTools[index + 1];\n this.activateTool(below);\n } else {\n this.deactivateTool();\n const below = arrayTools[0];\n this.activateTool(below);\n }\n } */\n\n /**\n * Activate the tool above, if any\n */\n /* activateAboveTool() {\n const arrayTools = this.getToolbar();\n const index = arrayTools.findIndex(t => t === this.activeTool$.getValue().name);\n if (arrayTools[index - 1] !== undefined) {\n this.deactivateTool();\n const above = arrayTools[index - 1];\n this.activateTool(above);\n } else {\n this.deactivateTool();\n const above = arrayTools[arrayTools.length - 1];\n this.activateTool(above);\n }\n } */\n\n /**\n * Deactivate the active tool\n */\n deactivateTool() {\n this.clearActiveToolHistory();\n this.store.state.updateAll({ active: false });\n }\n\n /**\n * Initialize the tool store and start observing the active tool\n */\n private initStore() {\n this.store = new EntityStore<Tool>([], {\n getKey: (entity: Tool) => entity.name\n });\n\n this.activeTool$$ = this.store.stateView\n .firstBy$((record: EntityRecord<Tool>) => record.state.active === true)\n .subscribe((record: EntityRecord<Tool>) => {\n if (record === undefined) {\n this.setActiveTool(undefined);\n return;\n }\n\n const tool = record.entity;\n const options = Object.assign(\n {},\n tool.options || {},\n record.state.options || {}\n );\n this.setActiveTool(Object.assign({}, tool, { options }));\n });\n }\n\n /**\n * Set the active tool and update the tool history\n * @param tool Tool\n */\n private setActiveTool(tool: Tool | undefined) {\n this.activeTool$.next(tool);\n if (tool === undefined) {\n this.clearActiveToolHistory();\n } else {\n this.activeToolHistory = this.activeToolHistory\n .filter((name: string) => name !== tool.name)\n .concat([tool.name]);\n\n this.previousToolName = this.currentToolName;\n this.currentToolName =\n this.activeToolHistory[this.activeToolHistory.length - 1];\n }\n }\n\n /**\n * Clear the tool history\n */\n private clearActiveToolHistory() {\n this.activeToolHistory = [];\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { Tool } from './tool.interface';\nimport { Toolbox } from './toolbox';\n\n/**\n * Service where runtime tool configurations are registered\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ToolService {\n static tools: Record<string, Tool> = {};\n\n /**\n * Toolbox that holds main tools\n */\n public toolbox: Toolbox = new Toolbox();\n\n static register(tool: Tool) {\n ToolService.tools[tool.name] = tool;\n }\n\n constructor() {\n this.toolbox.setTools(this.getTools());\n }\n\n /**\n * Return a tool\n * @param name Tool name\n * @returns tool Tool\n */\n getTool(name: string): Tool {\n return ToolService.tools[name];\n }\n\n /**\n * Return all tools\n * @returns tTols\n */\n getTools(): Tool[] {\n return Object.values(ToolService.tools);\n }\n}\n","import { Tool } from './tool.interface';\nimport { ToolService } from './tool.service';\n\nexport function ToolComponent(tool: Partial<Tool>): (cls: any) => any {\n return (compType: any) => {\n ToolService.register(\n Object.assign({}, tool, {\n component: compType\n } as Tool)\n );\n };\n}\n","import {\n AnimationTriggerMetadata,\n animate,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\n\nexport function toolSlideInOut(\n speed = '300ms',\n type = 'ease-in-out'\n): AnimationTriggerMetadata {\n return trigger('toolSlideInOut', [\n state(\n 'enter',\n style({\n transform: 'translate3d(0, 0, 0)'\n })\n ),\n transition('void => enter', animate(speed + ' ' + type))\n ]);\n}\n","import { AsyncPipe, NgClass } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n OnDestroy,\n OnInit\n} from '@angular/core';\n\nimport { Action, ActionStore, ActionbarComponent } from '@igo2/common/action';\nimport { DynamicOutletComponent } from '@igo2/common/dynamic-component';\n\nimport { BehaviorSubject, Observable, Subscription } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { Tool } from '../shared/tool.interface';\nimport { Toolbox } from '../shared/toolbox';\nimport { ToolboxColor } from '../shared/toolbox.enums';\nimport { toolSlideInOut } from './toolbox.animation';\n\n@Component({\n selector: 'igo-toolbox',\n templateUrl: 'toolbox.component.html',\n styleUrls: ['toolbox.component.scss'],\n animations: [toolSlideInOut()],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ActionbarComponent, NgClass, DynamicOutletComponent, AsyncPipe]\n})\nexport class ToolboxComponent implements OnInit, OnDestroy {\n /**\n * Observable of the active tool\n */\n activeTool$ = new BehaviorSubject<Tool>(undefined);\n\n get isActive(): boolean {\n return !!this.activeTool$.value;\n }\n\n /**\n * Store of actions that toggle tools\n */\n actionStore: ActionStore = new ActionStore([]);\n\n /**\n * Observable of he anmation state\n */\n animation$ = new BehaviorSubject<string>('none');\n\n /**\n * Observable of the toolbar\n */\n toolbar$ = new BehaviorSubject<string[]>([]);\n\n /**\n * Whether the Toolbar should display actions' titles\n */\n toolbarWithTitle$: Observable<boolean> = this.activeTool$.pipe(\n map((tool: Tool | undefined) => tool === undefined)\n );\n\n /**\n * Subscription to the active tool\n */\n private activeTool$$: Subscription;\n\n /**\n * Subscription to the toolbar\n */\n private toolbar$$: Subscription;\n\n /**\n * Observable of the ongoing animation. This is useful when\n * multiple animations are triggered at once i.e. when the user clicks\n * too fast on different actions\n */\n private animating$ = new BehaviorSubject<boolean>(false);\n\n /**\n * Subscription to the ongoing animation\n */\n private animating$$: Subscription;\n\n /**\n * Toolbox\n */\n @Input() toolbox: Toolbox;\n\n /**\n * Whether the toolbox should animate the first tool entering\n */\n @Input() animate = false;\n\n /**\n * Color of Toolbox\n */\n @Input() color: ToolboxColor = 'white';\n\n /**\n * @ignore\n */\n @HostBinding('class.color-grey')\n get classColorGrey() {\n return this.color === 'grey';\n }\n\n /**\n * @ignore\n */\n @HostBinding('class.color-primary')\n get classColorPrimary() {\n return this.color === 'primary';\n }\n\n /**\n * Initialize the toolbar and subscribe to the active tool\n * @internal\n */\n ngOnInit() {\n this.toolbar$$ = this.toolbox.toolbar$.subscribe((toolbar: string[]) =>\n this.onToolbarChange(toolbar)\n );\n this.activeTool$$ = this.toolbox.activeTool$.subscribe((tool: Tool) =>\n this.onActiveToolChange(tool)\n );\n }\n\n /**\n * Unsubscribe to the active tool and destroy the action store\n * @internal\n */\n ngOnDestroy() {\n this.toolbar$$.unsubscribe();\n this.activeTool$$.unsubscribe();\n this.actionStore.destroy();\n }\n\n /**\n * Track the starting animation\n * @internal\n */\n onAnimationStart() {\n this.animating$.next(true);\n }\n\n /**\n * Untrack the completed animation\n * @internal\n */\n onAnimationComplete() {\n this.animating$.next(false);\n }\n\n /**\n * Return a tool's inputs\n * @param tool Tool\n * @returns Tool inputs\n * @internal\n */\n getToolInputs(tool: Tool): Record<string, any> {\n return tool.options || {};\n }\n\n /**\n * Initialize an action store\n * @param toolbar Toolbar\n */\n private onToolbarChange(toolbar: string[]) {\n this.setToolbar(toolbar);\n }\n\n /**\n * Activate a tool and trigger an animation or not\n * @param tool Tool to activate\n */\n private onActiveToolChange(tool: Tool) {\n if (!this.animate) {\n this.setActiveTool(tool);\n return;\n }\n this.onAnimate(() => this.setActiveTool(tool));\n }\n\n /**\n * Set the active tool\n * @param tool Tool to activate\n */\n private setActiveTool(tool: Tool | undefined) {\n if (tool === undefined) {\n this.actionStore.state.updateAll({ active: false });\n } else {\n const action = this.actionStore.get(tool.name);\n if (action !== undefined) {\n this.actionStore.state.update(action, { active: true }, true);\n }\n }\n\n this.activeTool$.next(tool);\n if (this.animate) {\n this.animation$.next('enter');\n }\n }\n\n /**\n * Initialize the toolbar\n */\n private setToolbar(toolbar: string[]) {\n const actions = toolbar.reduce((acc: Action[], toolName: string) => {\n const tool = this.toolbox.getTool(toolName);\n if (tool === undefined) {\n return acc;\n }\n\n acc.push({\n id: tool.name,\n title: tool.title,\n icon: tool.icon,\n tooltip: tool.tooltip,\n args: [tool, this.toolbox],\n handler: (_tool: Tool, _toolbox: Toolbox) => {\n _toolbox.activateTool(_tool.name);\n },\n ngClass: (_tool: Tool) => {\n return this.toolbox.activeTool$.pipe(\n map((activeTool: Tool) => {\n let toolActivated = false;\n if (activeTool !== undefined && _tool.name === activeTool.name) {\n toolActivated = true;\n }\n\n let childrenToolActivated = false;\n if (\n activeTool !== undefined &&\n _tool.name === activeTool.parent\n ) {\n childrenToolActivated = true;\n }\n\n return {\n 'tool-activated': toolActivated,\n 'children-tool-activated': childrenToolActivated\n };\n })\n );\n }\n });\n return acc;\n }, []);\n this.actionStore.load(actions);\n this.toolbar$.next(toolbar);\n }\n\n /**\n * Observe the ongoing animation and ignore any incoming animation\n * while one is still ongoing.\n * @param callback Callback to execute when the animation completes\n */\n private onAnimate(callback: () => void) {\n this.unAnimate();\n this.animating$$ = this.animating$.subscribe((animation: boolean) => {\n if (!animation) {\n callback.call(this);\n this.unAnimate();\n }\n });\n }\n\n /**\n * Stop observing an animation when it's complete\n */\n private unAnimate() {\n if (this.animating$$) {\n this.animating$$.unsubscribe();\n }\n }\n}\n","@if ((toolbar$ | async).length > 0) {\n <igo-actionbar\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n [withTitle]=\"toolbarWithTitle$ | async\"\n [withTooltip]=\"(toolbarWithTitle$ | async) === false\"\n [scrollActive]=\"toolbarWithTitle$ | async\"\n [horizontal]=\"false\"\n >\n </igo-actionbar>\n}\n\n@if (activeTool$ | async; as tool) {\n <div\n class=\"igo-tool-container\"\n [ngClass]=\"{\n 'igo-tool-container-with-toolbar': !actionStore.empty,\n 'igo-tool-container-with-animation': animate\n }\"\n [@toolSlideInOut]=\"animation$ | async\"\n (@toolSlideInOut.start)=\"onAnimationStart()\"\n (@toolSlideInOut.done)=\"onAnimationComplete()\"\n >\n <igo-dynamic-outlet\n [component]=\"tool.component\"\n [inputs]=\"getToolInputs(tool)\"\n >\n </igo-dynamic-outlet>\n </div>\n}\n","import { NgModule } from '@angular/core';\n\nimport { ToolboxComponent } from './toolbox.component';\n\n/**\n * @deprecated import the ToolboxComponent directly\n */\n@NgModule({\n imports: [ToolboxComponent],\n exports: [ToolboxComponent]\n})\nexport class IgoToolboxModule {}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { ToolService } from './shared/tool.service';\nimport { IgoToolboxModule } from './toolbox/toolbox.module';\n\n/**\n * @deprecated import the ToolboxComponent directly\n */\n@NgModule({\n exports: [IgoToolboxModule]\n})\nexport class IgoToolModule {\n /**\n * @deprecated it has no effect\n */\n static forRoot(): ModuleWithProviders<IgoToolModule> {\n return {\n ngModule: IgoToolModule,\n providers: [ToolService]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;AAMA;;AAEG;MACU,OAAO,CAAA;AAkCE,IAAA,OAAA;AAjCpB;;AAEG;AACH,IAAA,WAAW,GAAG,IAAI,eAAe,CAAO,SAAS,CAAC;AAElD;;AAEG;AACH,IAAA,QAAQ,GAAG,IAAI,eAAe,CAAW,EAAE,CAAC;AAE5C;;AAEG;AACK,IAAA,YAAY;AAEpB;;AAEG;IACK,iBAAiB,GAAa,EAAE;AAChC,IAAA,gBAAgB;AAChB,IAAA,eAAe;AAEvB;;AAEG;AACK,IAAA,KAAK,GAAG,IAAI,WAAW,CAAO,EAAE,EAAE;QACxC,MAAM,EAAE,CAAC,IAAU,KAAK,IAAI,CAAC;AAC9B,KAAA,CAAC;AAEF,IAAA,IAAI,MAAM,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,KAAK,CA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