@coolon/angular-ui-powerups 1.12.0 → 1.13.0
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/CHANGELOG.md +8 -0
- package/assets/table.scss +32 -1
- package/bundles/coolon-angular-ui-powerups.umd.js +760 -426
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.d.ts +58 -55
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +56 -53
- package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/card-container/card-container.component.js +1 -1
- package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
- package/esm2015/lib/components/components.module.js +9 -2
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.js +10 -15
- package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.js +27 -0
- package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -0
- package/esm2015/lib/components/forms/abstract-list-input.component.metadata.json +1 -0
- package/esm2015/lib/components/forms/abstract-list-input.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/forms/abstract-value-input.component.js +27 -0
- package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -0
- package/esm2015/lib/components/forms/abstract-value-input.component.metadata.json +1 -0
- package/esm2015/lib/components/forms/abstract-value-input.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +3 -3
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +54 -0
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -0
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -0
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/forms/number-input/number-input.component.js +4 -4
- package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +4 -4
- package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.js +4 -4
- package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.js +4 -4
- package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.js +4 -4
- package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
- package/esm2015/lib/components/index.js +3 -0
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/table/cell-editors.js +1 -0
- package/esm2015/lib/components/table/cell-editors.js.map +1 -0
- package/esm2015/lib/components/table/cell-editors.metadata.json +1 -0
- package/esm2015/lib/components/table/column-model.js +205 -60
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/column-template/column-template.directive.js +26 -1
- package/esm2015/lib/components/table/column-template/column-template.directive.js.map +1 -1
- package/esm2015/lib/components/table/column-template/column-template.directive.metadata.json +1 -1
- package/esm2015/lib/components/table/edit-session.js +10 -7
- package/esm2015/lib/components/table/edit-session.js.map +1 -1
- package/esm2015/lib/components/table/edit-session.metadata.json +1 -1
- package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.js +1 -12
- package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js +6 -8
- package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +43 -19
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +12 -8
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table-model.js +15 -4
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table.component.js +8 -0
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/esm5/coolon-angular-ui-powerups.js +56 -53
- package/esm5/coolon-angular-ui-powerups.js.map +1 -1
- package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/card-container/card-container.component.js +1 -1
- package/esm5/lib/components/components.module.js +9 -2
- package/esm5/lib/components/components.module.js.map +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/forms/abstract-input.component.js +18 -15
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-list-input.component.js +30 -0
- package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -0
- package/esm5/lib/components/forms/abstract-list-input.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/forms/abstract-value-input.component.js +30 -0
- package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -0
- package/esm5/lib/components/forms/abstract-value-input.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +3 -3
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +57 -0
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -0
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/forms/number-input/number-input.component.js +4 -4
- package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js +4 -4
- package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm5/lib/components/forms/select-input/select-input.component.js +4 -4
- package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/string-input/string-input.component.js +4 -4
- package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm5/lib/components/forms/text-input/text-input.component.js +4 -4
- package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm5/lib/components/index.js +3 -0
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/table/cell-editors.js +1 -0
- package/esm5/lib/components/table/cell-editors.js.map +1 -0
- package/esm5/lib/components/table/column-model.js +243 -80
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/column-template/column-template.directive.js +26 -1
- package/esm5/lib/components/table/column-template/column-template.directive.js.map +1 -1
- package/esm5/lib/components/table/edit-session.js +10 -7
- package/esm5/lib/components/table/edit-session.js.map +1 -1
- package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.js +1 -16
- package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js +6 -8
- package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +43 -19
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +12 -8
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/table-model.js +15 -4
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/components/table/table.component.js +8 -0
- package/esm5/lib/components/table/table.component.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +579 -288
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +673 -358
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-input.component.d.ts +10 -12
- package/lib/components/forms/abstract-list-input.component.d.ts +16 -0
- package/lib/components/forms/abstract-value-input.component.d.ts +16 -0
- package/lib/components/forms/checkbox-input/checkbox-input.component.d.ts +4 -4
- package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +15 -0
- package/lib/components/forms/number-input/number-input.component.d.ts +4 -4
- package/lib/components/forms/password-input/password-input.component.d.ts +4 -4
- package/lib/components/forms/select-input/select-input.component.d.ts +4 -4
- package/lib/components/forms/string-input/string-input.component.d.ts +4 -4
- package/lib/components/forms/text-input/text-input.component.d.ts +4 -4
- package/lib/components/index.d.ts +4 -1
- package/lib/components/table/cell-editors.d.ts +9 -0
- package/lib/components/table/column-model.d.ts +85 -33
- package/lib/components/table/column-template/column-template.directive.d.ts +8 -2
- package/lib/components/table/edit-session.d.ts +4 -4
- package/lib/components/table/select-cell-renderer/select-cell-renderer.component.d.ts +1 -3
- package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +13 -6
- package/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts +8 -4
- package/lib/components/table/table-model.d.ts +5 -1
- package/lib/components/table/table.component.d.ts +3 -1
- package/package.json +1 -1
- package/esm2015/lib/components/table/cell-editor.component.js +0 -1
- package/esm2015/lib/components/table/cell-editor.component.js.map +0 -1
- package/esm2015/lib/components/table/cell-editor.component.metadata.json +0 -1
- package/esm5/lib/components/table/cell-editor.component.js +0 -1
- package/esm5/lib/components/table/cell-editor.component.js.map +0 -1
- package/lib/components/table/cell-editor.component.d.ts +0 -5
|
@@ -7,12 +7,12 @@ import { MatInputModule } from '@angular/material/input';
|
|
|
7
7
|
import { MatSelectModule } from '@angular/material/select';
|
|
8
8
|
import { MatTabsModule, MatTabGroup, MAT_TABS_CONFIG } from '@angular/material/tabs';
|
|
9
9
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
10
|
-
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
10
|
+
import { ComponentPortal, PortalModule, TemplatePortal } from '@angular/cdk/portal';
|
|
11
11
|
import { MatButtonModule } from '@angular/material/button';
|
|
12
12
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
13
13
|
import { MatIconModule } from '@angular/material/icon';
|
|
14
14
|
import { MatTableModule } from '@angular/material/table';
|
|
15
|
-
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, Deferred, Trace, MutableListModel, FocusManager, Form, DelegatingFormValueModel, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MutableValueModel, MultipleSelectionModel, Guard, DebugContext, Binding, Functions } from '@coolon/pectin';
|
|
15
|
+
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, Deferred, Trace, MutableListModel, FocusManager, Form, DelegatingFormListModel, DelegatingFormValueModel, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MutableValueModel, MultipleSelectionModel, Guard, DebugContext, Binding, Functions } from '@coolon/pectin';
|
|
16
16
|
import { FlexModule, GridModule } from '@angular/flex-layout';
|
|
17
17
|
import { MatDialogModule, MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
|
18
18
|
import { RouterModule, UrlSegment, Router, UrlSerializer, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterOutlet } from '@angular/router';
|
|
@@ -1379,7 +1379,7 @@ CardContainerComponent = __decorate([
|
|
|
1379
1379
|
Component({
|
|
1380
1380
|
selector: 'aup-card-container',
|
|
1381
1381
|
template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <mat-icon>add</mat-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n\n</div>\n",
|
|
1382
|
-
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px)}aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
|
|
1382
|
+
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px)}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{padding-left:var(--default-column-gap);flex:1}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
|
|
1383
1383
|
}),
|
|
1384
1384
|
__metadata("design:paramtypes", [])
|
|
1385
1385
|
], CardContainerComponent);
|
|
@@ -1608,18 +1608,6 @@ AbstractInputActivity = __decorate([
|
|
|
1608
1608
|
let AbstractInputComponent = class AbstractInputComponent extends DisposableComponent {
|
|
1609
1609
|
constructor() {
|
|
1610
1610
|
super();
|
|
1611
|
-
/**
|
|
1612
|
-
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1613
|
-
*
|
|
1614
|
-
* @Input() @TrackExternal({useExisting: "delegatingFormValueModel"})
|
|
1615
|
-
* valueModel: FormValueModel<string> | MutableValueModel<string>;
|
|
1616
|
-
*
|
|
1617
|
-
* This approach allows the input to accept plain or form models but all backed by a form
|
|
1618
|
-
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
1619
|
-
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1620
|
-
*/
|
|
1621
|
-
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1622
|
-
this.delegatingFormValueModel = this.registerDisposable(new DelegatingFormValueModel());
|
|
1623
1611
|
// TODO: fix this.
|
|
1624
1612
|
// tslint:disable-next-line:no-output-native
|
|
1625
1613
|
this.focus = new EventEmitter();
|
|
@@ -1637,6 +1625,9 @@ let AbstractInputComponent = class AbstractInputComponent extends DisposableComp
|
|
|
1637
1625
|
}
|
|
1638
1626
|
};
|
|
1639
1627
|
}
|
|
1628
|
+
get inputModel() {
|
|
1629
|
+
return lang$1.abstractMethod(this.constructor, "inputModel");
|
|
1630
|
+
}
|
|
1640
1631
|
notifyClick() {
|
|
1641
1632
|
this.safelyInvoke(this.clickCommand);
|
|
1642
1633
|
}
|
|
@@ -1667,17 +1658,20 @@ let AbstractInputComponent = class AbstractInputComponent extends DisposableComp
|
|
|
1667
1658
|
return this.enabled.value;
|
|
1668
1659
|
}
|
|
1669
1660
|
get enabled() {
|
|
1670
|
-
return this.
|
|
1661
|
+
return this.inputModel.enabled;
|
|
1671
1662
|
}
|
|
1672
1663
|
hasErrors() {
|
|
1673
1664
|
return !this.errorList.query().isEmpty();
|
|
1674
1665
|
}
|
|
1675
1666
|
get errorList() {
|
|
1676
|
-
return this.
|
|
1667
|
+
return this.inputModel.errorList;
|
|
1677
1668
|
}
|
|
1678
1669
|
get firstError() {
|
|
1679
1670
|
return this.hasErrors() ? this.errorList.value[0] : null;
|
|
1680
1671
|
}
|
|
1672
|
+
get focusContext() {
|
|
1673
|
+
return this.inputModel.focusContext;
|
|
1674
|
+
}
|
|
1681
1675
|
};
|
|
1682
1676
|
__decorate([
|
|
1683
1677
|
Input(),
|
|
@@ -1758,7 +1752,49 @@ AbstractInputComponent = __decorate([
|
|
|
1758
1752
|
__metadata("design:paramtypes", [])
|
|
1759
1753
|
], AbstractInputComponent);
|
|
1760
1754
|
|
|
1761
|
-
let
|
|
1755
|
+
let AbstractListInputComponent = class AbstractListInputComponent extends AbstractInputComponent {
|
|
1756
|
+
constructor() {
|
|
1757
|
+
super(...arguments);
|
|
1758
|
+
/**
|
|
1759
|
+
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1760
|
+
*
|
|
1761
|
+
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
1762
|
+
* valueModel: FormListModel<string> | IMutableListModel<string>;
|
|
1763
|
+
*
|
|
1764
|
+
* This approach allows the input to accept plain or form models but all backed by a form
|
|
1765
|
+
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
1766
|
+
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1767
|
+
*/
|
|
1768
|
+
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1769
|
+
this.inputModel = this.registerDisposable(new DelegatingFormListModel());
|
|
1770
|
+
}
|
|
1771
|
+
};
|
|
1772
|
+
AbstractListInputComponent = __decorate([
|
|
1773
|
+
Component({ template: '' })
|
|
1774
|
+
], AbstractListInputComponent);
|
|
1775
|
+
|
|
1776
|
+
let AbstractValueInputComponent = class AbstractValueInputComponent extends AbstractInputComponent {
|
|
1777
|
+
constructor() {
|
|
1778
|
+
super(...arguments);
|
|
1779
|
+
/**
|
|
1780
|
+
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1781
|
+
*
|
|
1782
|
+
* @Input() @TrackExternal({useExisting: "inputModel"})
|
|
1783
|
+
* valueModel: FormValueModel<string> | IMutableValueModel<string>;
|
|
1784
|
+
*
|
|
1785
|
+
* This approach allows the input to accept plain or form models but all backed by a form
|
|
1786
|
+
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
1787
|
+
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1788
|
+
*/
|
|
1789
|
+
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1790
|
+
this.inputModel = this.registerDisposable(new DelegatingFormValueModel());
|
|
1791
|
+
}
|
|
1792
|
+
};
|
|
1793
|
+
AbstractValueInputComponent = __decorate([
|
|
1794
|
+
Component({ template: '' })
|
|
1795
|
+
], AbstractValueInputComponent);
|
|
1796
|
+
|
|
1797
|
+
let CheckboxInputComponent = class CheckboxInputComponent extends AbstractValueInputComponent {
|
|
1762
1798
|
constructor() {
|
|
1763
1799
|
super();
|
|
1764
1800
|
this.color = 'accent';
|
|
@@ -1768,7 +1804,7 @@ let CheckboxInputComponent = class CheckboxInputComponent extends AbstractInputC
|
|
|
1768
1804
|
}
|
|
1769
1805
|
};
|
|
1770
1806
|
__decorate([
|
|
1771
|
-
Input(), TrackExternal({ delegateTo: '
|
|
1807
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
1772
1808
|
__metadata("design:type", Object)
|
|
1773
1809
|
], CheckboxInputComponent.prototype, "valueModel", void 0);
|
|
1774
1810
|
__decorate([
|
|
@@ -1788,7 +1824,7 @@ CheckboxInputComponent = __decorate([
|
|
|
1788
1824
|
__metadata("design:paramtypes", [])
|
|
1789
1825
|
], CheckboxInputComponent);
|
|
1790
1826
|
|
|
1791
|
-
let NumberInputComponent = class NumberInputComponent extends
|
|
1827
|
+
let NumberInputComponent = class NumberInputComponent extends AbstractValueInputComponent {
|
|
1792
1828
|
constructor() {
|
|
1793
1829
|
super();
|
|
1794
1830
|
this.min = Number.MIN_SAFE_INTEGER;
|
|
@@ -1798,7 +1834,7 @@ let NumberInputComponent = class NumberInputComponent extends AbstractInputCompo
|
|
|
1798
1834
|
}
|
|
1799
1835
|
};
|
|
1800
1836
|
__decorate([
|
|
1801
|
-
Input(), TrackExternal({ delegateTo: '
|
|
1837
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
1802
1838
|
__metadata("design:type", Object)
|
|
1803
1839
|
], NumberInputComponent.prototype, "valueModel", void 0);
|
|
1804
1840
|
__decorate([
|
|
@@ -1812,13 +1848,13 @@ __decorate([
|
|
|
1812
1848
|
NumberInputComponent = __decorate([
|
|
1813
1849
|
Component({
|
|
1814
1850
|
selector: 'aup-number-input',
|
|
1815
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"
|
|
1851
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1816
1852
|
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}"]
|
|
1817
1853
|
}),
|
|
1818
1854
|
__metadata("design:paramtypes", [])
|
|
1819
1855
|
], NumberInputComponent);
|
|
1820
1856
|
|
|
1821
|
-
let PasswordInputComponent = class PasswordInputComponent extends
|
|
1857
|
+
let PasswordInputComponent = class PasswordInputComponent extends AbstractValueInputComponent {
|
|
1822
1858
|
constructor() {
|
|
1823
1859
|
super();
|
|
1824
1860
|
}
|
|
@@ -1826,19 +1862,19 @@ let PasswordInputComponent = class PasswordInputComponent extends AbstractInputC
|
|
|
1826
1862
|
}
|
|
1827
1863
|
};
|
|
1828
1864
|
__decorate([
|
|
1829
|
-
Input(), TrackExternal({ delegateTo: "
|
|
1865
|
+
Input(), TrackExternal({ delegateTo: "inputModel" }),
|
|
1830
1866
|
__metadata("design:type", Object)
|
|
1831
1867
|
], PasswordInputComponent.prototype, "valueModel", void 0);
|
|
1832
1868
|
PasswordInputComponent = __decorate([
|
|
1833
1869
|
Component({
|
|
1834
1870
|
selector: 'aup-password-input',
|
|
1835
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"
|
|
1871
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
1836
1872
|
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}"]
|
|
1837
1873
|
}),
|
|
1838
1874
|
__metadata("design:paramtypes", [])
|
|
1839
1875
|
], PasswordInputComponent);
|
|
1840
1876
|
|
|
1841
|
-
let SelectInputComponent = class SelectInputComponent extends
|
|
1877
|
+
let SelectInputComponent = class SelectInputComponent extends AbstractValueInputComponent {
|
|
1842
1878
|
constructor() {
|
|
1843
1879
|
super();
|
|
1844
1880
|
this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
|
|
@@ -1847,7 +1883,7 @@ let SelectInputComponent = class SelectInputComponent extends AbstractInputCompo
|
|
|
1847
1883
|
}
|
|
1848
1884
|
};
|
|
1849
1885
|
__decorate([
|
|
1850
|
-
Input(), TrackExternal({ delegateTo: "
|
|
1886
|
+
Input(), TrackExternal({ delegateTo: "inputModel" }),
|
|
1851
1887
|
__metadata("design:type", Object)
|
|
1852
1888
|
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
1853
1889
|
__decorate([
|
|
@@ -1881,7 +1917,7 @@ __decorate([
|
|
|
1881
1917
|
SelectInputComponent = __decorate([
|
|
1882
1918
|
Component({
|
|
1883
1919
|
selector: 'aup-select-input',
|
|
1884
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"
|
|
1920
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1885
1921
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1886
1922
|
}),
|
|
1887
1923
|
__metadata("design:paramtypes", [])
|
|
@@ -1905,7 +1941,7 @@ StringInputActivity = __decorate([
|
|
|
1905
1941
|
})
|
|
1906
1942
|
], StringInputActivity);
|
|
1907
1943
|
|
|
1908
|
-
let StringInputComponent = class StringInputComponent extends
|
|
1944
|
+
let StringInputComponent = class StringInputComponent extends AbstractValueInputComponent {
|
|
1909
1945
|
constructor() {
|
|
1910
1946
|
super();
|
|
1911
1947
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
@@ -1918,7 +1954,7 @@ let StringInputComponent = class StringInputComponent extends AbstractInputCompo
|
|
|
1918
1954
|
}
|
|
1919
1955
|
};
|
|
1920
1956
|
__decorate([
|
|
1921
|
-
Input(), TrackExternal({ delegateTo: '
|
|
1957
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
1922
1958
|
__metadata("design:type", Object)
|
|
1923
1959
|
], StringInputComponent.prototype, "valueModel", void 0);
|
|
1924
1960
|
__decorate([
|
|
@@ -1932,13 +1968,13 @@ __decorate([
|
|
|
1932
1968
|
StringInputComponent = __decorate([
|
|
1933
1969
|
Component({
|
|
1934
1970
|
selector: 'aup-string-input',
|
|
1935
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"
|
|
1971
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n\n",
|
|
1936
1972
|
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}button[disabled]{visibility:hidden}"]
|
|
1937
1973
|
}),
|
|
1938
1974
|
__metadata("design:paramtypes", [])
|
|
1939
1975
|
], StringInputComponent);
|
|
1940
1976
|
|
|
1941
|
-
let TextInputComponent = class TextInputComponent extends
|
|
1977
|
+
let TextInputComponent = class TextInputComponent extends AbstractValueInputComponent {
|
|
1942
1978
|
constructor() {
|
|
1943
1979
|
super();
|
|
1944
1980
|
this.rows = 2;
|
|
@@ -1948,7 +1984,7 @@ let TextInputComponent = class TextInputComponent extends AbstractInputComponent
|
|
|
1948
1984
|
}
|
|
1949
1985
|
};
|
|
1950
1986
|
__decorate([
|
|
1951
|
-
Input(), TrackExternal({ delegateTo: '
|
|
1987
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
1952
1988
|
__metadata("design:type", Object)
|
|
1953
1989
|
], TextInputComponent.prototype, "valueModel", void 0);
|
|
1954
1990
|
__decorate([
|
|
@@ -1962,7 +1998,7 @@ __decorate([
|
|
|
1962
1998
|
TextInputComponent = __decorate([
|
|
1963
1999
|
Component({
|
|
1964
2000
|
selector: 'aup-text-input',
|
|
1965
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"
|
|
2001
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
1966
2002
|
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
1967
2003
|
}),
|
|
1968
2004
|
__metadata("design:paramtypes", [])
|
|
@@ -2154,17 +2190,20 @@ DefaultHeaderCellRendererComponent = __decorate([
|
|
|
2154
2190
|
], DefaultHeaderCellRendererComponent);
|
|
2155
2191
|
|
|
2156
2192
|
class EditSession extends GarbageCollector {
|
|
2157
|
-
constructor(rowId, row, saveCommand) {
|
|
2193
|
+
constructor(rowId, row, form, saveCommand) {
|
|
2158
2194
|
super();
|
|
2159
2195
|
this.rowId = rowId;
|
|
2196
|
+
this.form = form;
|
|
2160
2197
|
this.saveCommand = saveCommand;
|
|
2161
|
-
this.
|
|
2162
|
-
this.
|
|
2163
|
-
this.form = new Form();
|
|
2198
|
+
this._liveRowValue = new MutableValueModel();
|
|
2199
|
+
this.liveRowValue = this._liveRowValue.readonly;
|
|
2164
2200
|
this.form.load(row);
|
|
2165
|
-
this.
|
|
2201
|
+
this._liveRowValue.value = row;
|
|
2166
2202
|
this.form.onEdit(() => {
|
|
2167
|
-
|
|
2203
|
+
// if (!this._liveRowValue.value[immerable]) {
|
|
2204
|
+
// console.warn()
|
|
2205
|
+
// }
|
|
2206
|
+
this._liveRowValue.value = produce(this._liveRowValue.value, draft => {
|
|
2168
2207
|
this.form.writeDirtyStateTo(draft);
|
|
2169
2208
|
});
|
|
2170
2209
|
});
|
|
@@ -2222,25 +2261,14 @@ let SelectCellRendererComponent = class SelectCellRendererComponent extends Disp
|
|
|
2222
2261
|
this.selectionModel.selectCommand.execute(this.row);
|
|
2223
2262
|
});
|
|
2224
2263
|
}
|
|
2225
|
-
set row(value) {
|
|
2226
|
-
this._row = value;
|
|
2227
|
-
}
|
|
2228
|
-
get row() {
|
|
2229
|
-
return this._row;
|
|
2230
|
-
}
|
|
2231
2264
|
isSelected() {
|
|
2232
2265
|
return this.selectionModel.isSelected(this.row);
|
|
2233
2266
|
}
|
|
2234
2267
|
};
|
|
2235
|
-
__decorate([
|
|
2236
|
-
Input(),
|
|
2237
|
-
__metadata("design:type", Object),
|
|
2238
|
-
__metadata("design:paramtypes", [Object])
|
|
2239
|
-
], SelectCellRendererComponent.prototype, "row", null);
|
|
2240
2268
|
__decorate([
|
|
2241
2269
|
Input(),
|
|
2242
2270
|
__metadata("design:type", Object)
|
|
2243
|
-
], SelectCellRendererComponent.prototype, "
|
|
2271
|
+
], SelectCellRendererComponent.prototype, "row", void 0);
|
|
2244
2272
|
SelectCellRendererComponent = __decorate([
|
|
2245
2273
|
Component({
|
|
2246
2274
|
selector: 'aup-select-cell-renderer',
|
|
@@ -2258,16 +2286,14 @@ let SelectHeaderCellRendererComponent = class SelectHeaderCellRendererComponent
|
|
|
2258
2286
|
});
|
|
2259
2287
|
}
|
|
2260
2288
|
isSelected() {
|
|
2261
|
-
|
|
2289
|
+
var _a;
|
|
2290
|
+
return ((_a = this.selectionModel) === null || _a === void 0 ? void 0 : _a.allSelected.value) || false;
|
|
2262
2291
|
}
|
|
2263
2292
|
isIntermediate() {
|
|
2264
|
-
|
|
2293
|
+
var _a;
|
|
2294
|
+
return ((_a = this.selectionModel) === null || _a === void 0 ? void 0 : _a.someSelected.value) || false;
|
|
2265
2295
|
}
|
|
2266
2296
|
};
|
|
2267
|
-
__decorate([
|
|
2268
|
-
Input(),
|
|
2269
|
-
__metadata("design:type", MultipleSelectionModel)
|
|
2270
|
-
], SelectHeaderCellRendererComponent.prototype, "selectionModel", void 0);
|
|
2271
2297
|
SelectHeaderCellRendererComponent = __decorate([
|
|
2272
2298
|
Component({
|
|
2273
2299
|
selector: 'aup-select-header-cell-renderer',
|
|
@@ -2277,167 +2303,6 @@ SelectHeaderCellRendererComponent = __decorate([
|
|
|
2277
2303
|
__metadata("design:paramtypes", [])
|
|
2278
2304
|
], SelectHeaderCellRendererComponent);
|
|
2279
2305
|
|
|
2280
|
-
class ColumnModel {
|
|
2281
|
-
constructor(columnId, defaults) {
|
|
2282
|
-
this.columnId = columnId;
|
|
2283
|
-
this.defaults = defaults;
|
|
2284
|
-
this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, (component, column) => {
|
|
2285
|
-
component.headerText = column.getHeaderText();
|
|
2286
|
-
});
|
|
2287
|
-
}
|
|
2288
|
-
getHeaderText() {
|
|
2289
|
-
var _a;
|
|
2290
|
-
return ((_a = this.getColumnTextProperties()) === null || _a === void 0 ? void 0 : _a.headerText()) || this.getDefaultHeaderText();
|
|
2291
|
-
}
|
|
2292
|
-
getDefaultHeaderText() {
|
|
2293
|
-
return this.columnId;
|
|
2294
|
-
}
|
|
2295
|
-
getColumnTextProperties() {
|
|
2296
|
-
return this._columnTextProperties || this.defaults.getColumnTextProperties(this);
|
|
2297
|
-
}
|
|
2298
|
-
textProperties(columnTextProperties) {
|
|
2299
|
-
this._columnTextProperties = columnTextProperties;
|
|
2300
|
-
return this;
|
|
2301
|
-
}
|
|
2302
|
-
setCellRenderer(cellRenderer, initialiser) {
|
|
2303
|
-
this._cellRendererConfig = {
|
|
2304
|
-
portal: new ComponentPortal(cellRenderer),
|
|
2305
|
-
pushState: initialiser
|
|
2306
|
-
};
|
|
2307
|
-
}
|
|
2308
|
-
cellHeaderRenderer(cellRenderer, initialiser) {
|
|
2309
|
-
this._columnHeaderConfig = {
|
|
2310
|
-
portal: new ComponentPortal(cellRenderer),
|
|
2311
|
-
initialiseComponent: initialiser
|
|
2312
|
-
};
|
|
2313
|
-
return this;
|
|
2314
|
-
}
|
|
2315
|
-
setCellEditor(cellEditor) {
|
|
2316
|
-
this._cellEditorConfig = cellEditor;
|
|
2317
|
-
}
|
|
2318
|
-
get cellRendererPortal() {
|
|
2319
|
-
return this._cellRendererConfig.portal;
|
|
2320
|
-
}
|
|
2321
|
-
get columnHeaderCellRendererPortal() {
|
|
2322
|
-
return this._columnHeaderConfig.portal;
|
|
2323
|
-
}
|
|
2324
|
-
get cellEditorPortal() {
|
|
2325
|
-
var _a;
|
|
2326
|
-
return (_a = this._cellEditorConfig) === null || _a === void 0 ? void 0 : _a.portal;
|
|
2327
|
-
}
|
|
2328
|
-
hasEditor() {
|
|
2329
|
-
return !!this._cellEditorConfig;
|
|
2330
|
-
}
|
|
2331
|
-
updateCellRenderer(component, row, editRowCommand, editSession) {
|
|
2332
|
-
this._cellRendererConfig.pushState(component, row, editRowCommand, editSession);
|
|
2333
|
-
}
|
|
2334
|
-
initialiseHeader(component) {
|
|
2335
|
-
this._columnHeaderConfig.initialiseComponent(component, this);
|
|
2336
|
-
}
|
|
2337
|
-
initialiseEditor(component, editSession) {
|
|
2338
|
-
this._cellEditorConfig.initialiseComponent(component, editSession);
|
|
2339
|
-
}
|
|
2340
|
-
}
|
|
2341
|
-
__decorate([
|
|
2342
|
-
Memoize(),
|
|
2343
|
-
__metadata("design:type", Function),
|
|
2344
|
-
__metadata("design:paramtypes", []),
|
|
2345
|
-
__metadata("design:returntype", String)
|
|
2346
|
-
], ColumnModel.prototype, "getHeaderText", null);
|
|
2347
|
-
__decorate([
|
|
2348
|
-
Memoize(),
|
|
2349
|
-
__metadata("design:type", Function),
|
|
2350
|
-
__metadata("design:paramtypes", []),
|
|
2351
|
-
__metadata("design:returntype", Object)
|
|
2352
|
-
], ColumnModel.prototype, "getColumnTextProperties", null);
|
|
2353
|
-
class PropertyColumnModel extends ColumnModel {
|
|
2354
|
-
constructor(property, defaults) {
|
|
2355
|
-
super(property.toString(), defaults);
|
|
2356
|
-
this.property = property;
|
|
2357
|
-
this._format = (value) => value;
|
|
2358
|
-
this.cellRenderer(DefaultCellRendererComponent);
|
|
2359
|
-
}
|
|
2360
|
-
cellRenderer(componentType) {
|
|
2361
|
-
this.setCellRenderer(componentType, (component, row) => {
|
|
2362
|
-
component.value = this._format(row[this.property]);
|
|
2363
|
-
});
|
|
2364
|
-
return this;
|
|
2365
|
-
}
|
|
2366
|
-
cellEditor(editor, options) {
|
|
2367
|
-
this.setCellEditor({
|
|
2368
|
-
portal: new ComponentPortal(editor),
|
|
2369
|
-
initialiseComponent: (component, editSession) => {
|
|
2370
|
-
const formValueModel = editSession.form.pluck(this.property);
|
|
2371
|
-
if (options === null || options === void 0 ? void 0 : options.validators) {
|
|
2372
|
-
formValueModel.validateUsing(options.validators);
|
|
2373
|
-
}
|
|
2374
|
-
component.valueModel = formValueModel;
|
|
2375
|
-
if (options === null || options === void 0 ? void 0 : options.initialiseComponent) {
|
|
2376
|
-
options.initialiseComponent(component);
|
|
2377
|
-
}
|
|
2378
|
-
}
|
|
2379
|
-
});
|
|
2380
|
-
return this;
|
|
2381
|
-
}
|
|
2382
|
-
format(formatter) {
|
|
2383
|
-
assert$1.isFunction(formatter);
|
|
2384
|
-
this._format = formatter;
|
|
2385
|
-
return this;
|
|
2386
|
-
}
|
|
2387
|
-
}
|
|
2388
|
-
class CustomValueColumnModel extends ColumnModel {
|
|
2389
|
-
constructor(columnId, defaults, getValue) {
|
|
2390
|
-
super(columnId, defaults);
|
|
2391
|
-
this.getValue = getValue;
|
|
2392
|
-
this.cellRenderer(DefaultCellRendererComponent);
|
|
2393
|
-
}
|
|
2394
|
-
cellRenderer(componentType) {
|
|
2395
|
-
this.setCellRenderer(componentType, (component, row) => {
|
|
2396
|
-
component.value = this.getValue(row);
|
|
2397
|
-
});
|
|
2398
|
-
return this;
|
|
2399
|
-
}
|
|
2400
|
-
}
|
|
2401
|
-
class EditorControlColumnModel extends ColumnModel {
|
|
2402
|
-
constructor(columnId, saveCommand, defaults) {
|
|
2403
|
-
super(columnId, defaults);
|
|
2404
|
-
this.cellRenderer(EditRowControls);
|
|
2405
|
-
}
|
|
2406
|
-
cellRenderer(componentType) {
|
|
2407
|
-
this.setCellRenderer(componentType, (component, row, editRowCommand, editSession) => {
|
|
2408
|
-
component.row = row;
|
|
2409
|
-
component.editSession = editSession;
|
|
2410
|
-
component.editRowCommand = editRowCommand;
|
|
2411
|
-
});
|
|
2412
|
-
return this;
|
|
2413
|
-
}
|
|
2414
|
-
getDefaultHeaderText() {
|
|
2415
|
-
return '';
|
|
2416
|
-
}
|
|
2417
|
-
}
|
|
2418
|
-
class CustomTemplateColumnModel extends ColumnModel {
|
|
2419
|
-
constructor(columnId, defaults, component) {
|
|
2420
|
-
super(columnId, defaults);
|
|
2421
|
-
}
|
|
2422
|
-
}
|
|
2423
|
-
class SelectionColumnModel extends ColumnModel {
|
|
2424
|
-
constructor(columnId, defaults, selectionModel) {
|
|
2425
|
-
super(columnId, defaults);
|
|
2426
|
-
if (selectionModel instanceof MultipleSelectionModel) {
|
|
2427
|
-
this.cellHeaderRenderer(SelectHeaderCellRendererComponent, (component) => {
|
|
2428
|
-
component.selectionModel = selectionModel;
|
|
2429
|
-
});
|
|
2430
|
-
}
|
|
2431
|
-
this.setCellRenderer(SelectCellRendererComponent, (component, row, editRowCommand, editSession) => {
|
|
2432
|
-
component.row = row;
|
|
2433
|
-
component.selectionModel = selectionModel;
|
|
2434
|
-
});
|
|
2435
|
-
}
|
|
2436
|
-
getDefaultHeaderText() {
|
|
2437
|
-
return '';
|
|
2438
|
-
}
|
|
2439
|
-
}
|
|
2440
|
-
|
|
2441
2306
|
var TableModel_1;
|
|
2442
2307
|
// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
|
|
2443
2308
|
// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
|
|
@@ -2517,6 +2382,7 @@ let TableModel = TableModel_1 = class TableModel {
|
|
|
2517
2382
|
this._garbage = new GarbageCollector();
|
|
2518
2383
|
this._columns = new MutableListModel();
|
|
2519
2384
|
this._editorSessions = new MutableListModel();
|
|
2385
|
+
this._createForm = (row) => new Form();
|
|
2520
2386
|
this.identityOf = sourceOfTruth.identityOf;
|
|
2521
2387
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this._garbage);
|
|
2522
2388
|
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
@@ -2546,6 +2412,9 @@ let TableModel = TableModel_1 = class TableModel {
|
|
|
2546
2412
|
pluck(property) {
|
|
2547
2413
|
return this.addColumn(new PropertyColumnModel(property, this));
|
|
2548
2414
|
}
|
|
2415
|
+
pluckList(property) {
|
|
2416
|
+
return this.addColumn(new ListPropertyColumnModel(property, this));
|
|
2417
|
+
}
|
|
2549
2418
|
addSelectionColumn(selectionModel) {
|
|
2550
2419
|
return this.addColumn(new SelectionColumnModel('selection', this, selectionModel));
|
|
2551
2420
|
}
|
|
@@ -2556,6 +2425,13 @@ let TableModel = TableModel_1 = class TableModel {
|
|
|
2556
2425
|
addCustomColumn(columnId, dataAccessor) {
|
|
2557
2426
|
return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
|
|
2558
2427
|
}
|
|
2428
|
+
addTemplateColumn(columnId) {
|
|
2429
|
+
return this.addColumn(new CustomTemplateColumnModel(columnId, this));
|
|
2430
|
+
}
|
|
2431
|
+
useFormFactory(factory) {
|
|
2432
|
+
this._createForm = factory;
|
|
2433
|
+
return this;
|
|
2434
|
+
}
|
|
2559
2435
|
addColumn(column) {
|
|
2560
2436
|
if (this._columnsById.get(column.columnId)) {
|
|
2561
2437
|
lang.illegalState(`Column with id=${column.columnId} already exists`);
|
|
@@ -2578,14 +2454,14 @@ let TableModel = TableModel_1 = class TableModel {
|
|
|
2578
2454
|
return lang.illegalState(`Row with id=${rowId} already being edited`);
|
|
2579
2455
|
}
|
|
2580
2456
|
else {
|
|
2581
|
-
const editSession = new EditSession(rowId, row, this.saveCommand);
|
|
2457
|
+
const editSession = new EditSession(rowId, row, this._createForm(row), this.saveCommand);
|
|
2582
2458
|
const { when } = Dsl.disposeWith(editSession);
|
|
2583
|
-
when.valueOf(editSession.
|
|
2459
|
+
when.valueOf(editSession.liveRowValue).changes((editedValue) => {
|
|
2584
2460
|
this._rowsBeingEdited.replaceOrPush(editedValue);
|
|
2585
2461
|
}, { initialValue: 'triggerChangeUnlessNil' });
|
|
2586
2462
|
this._editorSessions.push(editSession);
|
|
2587
2463
|
editSession.onDispose(() => {
|
|
2588
|
-
this._rowsBeingEdited.remove(editSession.
|
|
2464
|
+
this._rowsBeingEdited.remove(editSession.liveRowValue.value);
|
|
2589
2465
|
this._editorSessions.remove(editSession);
|
|
2590
2466
|
});
|
|
2591
2467
|
return editSession;
|
|
@@ -2610,6 +2486,391 @@ TableModel = TableModel_1 = __decorate([
|
|
|
2610
2486
|
__metadata("design:paramtypes", [ListModel])
|
|
2611
2487
|
], TableModel);
|
|
2612
2488
|
|
|
2489
|
+
let TableCellRendererComponent = class TableCellRendererComponent {
|
|
2490
|
+
constructor() {
|
|
2491
|
+
this.defaultClassNames = 'aup-cell-renderer';
|
|
2492
|
+
this.fillCell = false;
|
|
2493
|
+
this.padChild = false;
|
|
2494
|
+
this.editRowCommand = Command.create(() => {
|
|
2495
|
+
this.tableModel.startEditSession(this.row);
|
|
2496
|
+
});
|
|
2497
|
+
}
|
|
2498
|
+
ngOnInit() {
|
|
2499
|
+
this.column.attachCell(this);
|
|
2500
|
+
}
|
|
2501
|
+
hasActiveEditor() {
|
|
2502
|
+
return !!this.editSession && !!this.column.hasEditorPortal();
|
|
2503
|
+
}
|
|
2504
|
+
initialiseRenderer(instance) {
|
|
2505
|
+
this.column.onRendererAttached(this, instance);
|
|
2506
|
+
}
|
|
2507
|
+
initialiseEditor(instance) {
|
|
2508
|
+
this.column.onEditorAttached(this, instance);
|
|
2509
|
+
}
|
|
2510
|
+
// @Trace()
|
|
2511
|
+
ngOnChanges(changes) {
|
|
2512
|
+
this.column.updatePortalContent(this);
|
|
2513
|
+
}
|
|
2514
|
+
getRendererPortal() {
|
|
2515
|
+
return this[CELL_RENDERER_PORTAL];
|
|
2516
|
+
}
|
|
2517
|
+
getEditorPortal() {
|
|
2518
|
+
return this[CELL_EDITOR_PORTAL];
|
|
2519
|
+
}
|
|
2520
|
+
getRowData() {
|
|
2521
|
+
return {
|
|
2522
|
+
row: this.row,
|
|
2523
|
+
editSession: this.editSession,
|
|
2524
|
+
editRowCommand: this.editRowCommand
|
|
2525
|
+
};
|
|
2526
|
+
}
|
|
2527
|
+
};
|
|
2528
|
+
__decorate([
|
|
2529
|
+
Input(),
|
|
2530
|
+
__metadata("design:type", Object)
|
|
2531
|
+
], TableCellRendererComponent.prototype, "row", void 0);
|
|
2532
|
+
__decorate([
|
|
2533
|
+
Input(),
|
|
2534
|
+
__metadata("design:type", ColumnModel)
|
|
2535
|
+
], TableCellRendererComponent.prototype, "column", void 0);
|
|
2536
|
+
__decorate([
|
|
2537
|
+
Input(),
|
|
2538
|
+
__metadata("design:type", EditSession)
|
|
2539
|
+
], TableCellRendererComponent.prototype, "editSession", void 0);
|
|
2540
|
+
__decorate([
|
|
2541
|
+
Input(),
|
|
2542
|
+
__metadata("design:type", TableModel)
|
|
2543
|
+
], TableCellRendererComponent.prototype, "tableModel", void 0);
|
|
2544
|
+
__decorate([
|
|
2545
|
+
HostBinding('class'),
|
|
2546
|
+
__metadata("design:type", Object)
|
|
2547
|
+
], TableCellRendererComponent.prototype, "defaultClassNames", void 0);
|
|
2548
|
+
__decorate([
|
|
2549
|
+
HostBinding('class.fillCell'),
|
|
2550
|
+
__metadata("design:type", Object)
|
|
2551
|
+
], TableCellRendererComponent.prototype, "fillCell", void 0);
|
|
2552
|
+
__decorate([
|
|
2553
|
+
HostBinding('class.padChild'),
|
|
2554
|
+
__metadata("design:type", Object)
|
|
2555
|
+
], TableCellRendererComponent.prototype, "padChild", void 0);
|
|
2556
|
+
__decorate([
|
|
2557
|
+
Trace(),
|
|
2558
|
+
__metadata("design:type", Function),
|
|
2559
|
+
__metadata("design:paramtypes", [Object]),
|
|
2560
|
+
__metadata("design:returntype", void 0)
|
|
2561
|
+
], TableCellRendererComponent.prototype, "initialiseEditor", null);
|
|
2562
|
+
TableCellRendererComponent = __decorate([
|
|
2563
|
+
Component({
|
|
2564
|
+
selector: 'aup-table-cell-renderer',
|
|
2565
|
+
template: "<ng-container *ngIf=\"!hasActiveEditor()\" [cdkPortalOutlet]=\"getRendererPortal()\" (attached)=\"initialiseRenderer($event.instance)\"></ng-container>\n<ng-container *ngIf=\"hasActiveEditor()\" [cdkPortalOutlet]=\"getEditorPortal()\" (attached)=\"initialiseEditor($event.instance)\"></ng-container>\n",
|
|
2566
|
+
styles: [""]
|
|
2567
|
+
}),
|
|
2568
|
+
__metadata("design:paramtypes", [])
|
|
2569
|
+
], TableCellRendererComponent);
|
|
2570
|
+
|
|
2571
|
+
const HEADER_CELL_RENDERER_PORTAL = Symbol('aup-cell-header-renderer-component-ref');
|
|
2572
|
+
const CELL_RENDERER_PORTAL = Symbol('aup-cell-renderer-component-ref');
|
|
2573
|
+
const CELL_EDITOR_PORTAL = Symbol('aup-cell-editor-component-ref');
|
|
2574
|
+
const PORTAL_RENDERER_COMPONENT = Symbol('aup-cell-renderer-portal-component');
|
|
2575
|
+
const PORTAL_EDITOR_COMPONENT = Symbol('aup-cell-editor-portal-component');
|
|
2576
|
+
const noop = () => {
|
|
2577
|
+
};
|
|
2578
|
+
const ɵ0 = noop;
|
|
2579
|
+
class CellPortalRef {
|
|
2580
|
+
constructor() {
|
|
2581
|
+
}
|
|
2582
|
+
}
|
|
2583
|
+
class CellHeaderPortalRef extends CellPortalRef {
|
|
2584
|
+
constructor(componentType, initialiseHeader) {
|
|
2585
|
+
super();
|
|
2586
|
+
this.componentType = componentType;
|
|
2587
|
+
this.initialiseHeader = initialiseHeader;
|
|
2588
|
+
}
|
|
2589
|
+
initialiseHost(host, columnModel) {
|
|
2590
|
+
assert$1.isTruthy(host);
|
|
2591
|
+
host[HEADER_CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
2592
|
+
}
|
|
2593
|
+
onPortalAttached(host, portalComponent) {
|
|
2594
|
+
this.initialiseHeader(portalComponent, host.column);
|
|
2595
|
+
}
|
|
2596
|
+
}
|
|
2597
|
+
class CellRendererPortalRef extends CellPortalRef {
|
|
2598
|
+
}
|
|
2599
|
+
class ComponentCellRendererPortalRef extends CellRendererPortalRef {
|
|
2600
|
+
constructor(componentType, updateComponent) {
|
|
2601
|
+
super();
|
|
2602
|
+
this.componentType = componentType;
|
|
2603
|
+
this.updateComponent = updateComponent;
|
|
2604
|
+
}
|
|
2605
|
+
initialiseHost(host, columnModel) {
|
|
2606
|
+
host[CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
2607
|
+
}
|
|
2608
|
+
onPortalAttached(host, portalComponent) {
|
|
2609
|
+
host[PORTAL_RENDERER_COMPONENT] = portalComponent;
|
|
2610
|
+
this.updateComponent(portalComponent, host.getRowData());
|
|
2611
|
+
}
|
|
2612
|
+
pushState(host) {
|
|
2613
|
+
if (host[PORTAL_RENDERER_COMPONENT]) {
|
|
2614
|
+
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData());
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
class CellEditorPortalRef extends CellPortalRef {
|
|
2619
|
+
constructor(componentType, initialiseEditorSession) {
|
|
2620
|
+
super();
|
|
2621
|
+
this.componentType = componentType;
|
|
2622
|
+
this.initialiseEditorSession = initialiseEditorSession;
|
|
2623
|
+
}
|
|
2624
|
+
initialiseHost(host, columnModel) {
|
|
2625
|
+
assert$1.isTruthy(host);
|
|
2626
|
+
host[CELL_EDITOR_PORTAL] = new ComponentPortal(this.componentType);
|
|
2627
|
+
}
|
|
2628
|
+
onPortalAttached(host, portalComponent) {
|
|
2629
|
+
host[PORTAL_EDITOR_COMPONENT] = portalComponent;
|
|
2630
|
+
this.initialiseEditorSession(portalComponent, host.editSession);
|
|
2631
|
+
}
|
|
2632
|
+
}
|
|
2633
|
+
__decorate([
|
|
2634
|
+
Trace(),
|
|
2635
|
+
__metadata("design:type", Function),
|
|
2636
|
+
__metadata("design:paramtypes", [TableCellRendererComponent, Object]),
|
|
2637
|
+
__metadata("design:returntype", void 0)
|
|
2638
|
+
], CellEditorPortalRef.prototype, "onPortalAttached", null);
|
|
2639
|
+
class TemplateCellRendererPortalRef extends CellRendererPortalRef {
|
|
2640
|
+
constructor() {
|
|
2641
|
+
super();
|
|
2642
|
+
}
|
|
2643
|
+
registerPortal(templateRef, viewContainer, fillCell, padChild) {
|
|
2644
|
+
this.templateRef = templateRef;
|
|
2645
|
+
this.viewContainer = viewContainer;
|
|
2646
|
+
this.fillCell = fillCell;
|
|
2647
|
+
this.padChild = padChild;
|
|
2648
|
+
}
|
|
2649
|
+
initialiseHost(host, columnModel) {
|
|
2650
|
+
assert$1.isTruthy(host);
|
|
2651
|
+
}
|
|
2652
|
+
onPortalAttached(host, portalComponent) {
|
|
2653
|
+
// don't care
|
|
2654
|
+
}
|
|
2655
|
+
pushState(host) {
|
|
2656
|
+
host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());
|
|
2657
|
+
host.fillCell = this.fillCell;
|
|
2658
|
+
host.padChild = this.padChild;
|
|
2659
|
+
}
|
|
2660
|
+
createPortal(data) {
|
|
2661
|
+
return new TemplatePortal(this.templateRef, this.viewContainer, Object.assign(Object.assign({}, (data)), { $implicit: data.row }));
|
|
2662
|
+
}
|
|
2663
|
+
}
|
|
2664
|
+
__decorate([
|
|
2665
|
+
Trace(),
|
|
2666
|
+
__metadata("design:type", Function),
|
|
2667
|
+
__metadata("design:paramtypes", [TableCellRendererComponent, void 0]),
|
|
2668
|
+
__metadata("design:returntype", void 0)
|
|
2669
|
+
], TemplateCellRendererPortalRef.prototype, "onPortalAttached", null);
|
|
2670
|
+
class ColumnModel {
|
|
2671
|
+
constructor(columnId, defaults) {
|
|
2672
|
+
this.columnId = columnId;
|
|
2673
|
+
this.defaults = defaults;
|
|
2674
|
+
this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, (component, column) => {
|
|
2675
|
+
component.headerText = column.getHeaderText();
|
|
2676
|
+
});
|
|
2677
|
+
}
|
|
2678
|
+
getHeaderText() {
|
|
2679
|
+
var _a;
|
|
2680
|
+
return ((_a = this.getColumnTextProperties()) === null || _a === void 0 ? void 0 : _a.headerText()) || this.getDefaultHeaderText();
|
|
2681
|
+
}
|
|
2682
|
+
getDefaultHeaderText() {
|
|
2683
|
+
return this.columnId;
|
|
2684
|
+
}
|
|
2685
|
+
getColumnTextProperties() {
|
|
2686
|
+
return this._columnTextProperties || this.defaults.getColumnTextProperties(this);
|
|
2687
|
+
}
|
|
2688
|
+
textProperties(columnTextProperties) {
|
|
2689
|
+
this._columnTextProperties = columnTextProperties;
|
|
2690
|
+
return this;
|
|
2691
|
+
}
|
|
2692
|
+
configureHeaderRenderer(config) {
|
|
2693
|
+
this._columnHeaderPortalRef = config;
|
|
2694
|
+
}
|
|
2695
|
+
configureCellRenderer(config) {
|
|
2696
|
+
this._cellRendererPortalRef = config;
|
|
2697
|
+
}
|
|
2698
|
+
configureCellEditor(cellEditor) {
|
|
2699
|
+
this._cellEditorPortalRef = cellEditor;
|
|
2700
|
+
}
|
|
2701
|
+
cellHeaderRenderer(componentType, initialiser) {
|
|
2702
|
+
this.configureHeaderRenderer(new CellHeaderPortalRef(componentType, initialiser));
|
|
2703
|
+
return this;
|
|
2704
|
+
}
|
|
2705
|
+
hasEditorPortal() {
|
|
2706
|
+
return !!this._cellEditorPortalRef;
|
|
2707
|
+
}
|
|
2708
|
+
attachHeaderCell(host) {
|
|
2709
|
+
this._columnHeaderPortalRef.initialiseHost(host, this);
|
|
2710
|
+
}
|
|
2711
|
+
attachCell(host) {
|
|
2712
|
+
this._cellRendererPortalRef.initialiseHost(host, this);
|
|
2713
|
+
if (this.hasEditorPortal()) {
|
|
2714
|
+
this._cellEditorPortalRef.initialiseHost(host, this);
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
onHeaderAttached(host, component) {
|
|
2718
|
+
this._columnHeaderPortalRef.onPortalAttached(host, component);
|
|
2719
|
+
}
|
|
2720
|
+
onRendererAttached(host, component) {
|
|
2721
|
+
this._cellRendererPortalRef.onPortalAttached(host, component);
|
|
2722
|
+
}
|
|
2723
|
+
onEditorAttached(host, component) {
|
|
2724
|
+
this._cellEditorPortalRef.onPortalAttached(host, component);
|
|
2725
|
+
}
|
|
2726
|
+
updatePortalContent(host) {
|
|
2727
|
+
this._cellRendererPortalRef.pushState(host);
|
|
2728
|
+
}
|
|
2729
|
+
}
|
|
2730
|
+
__decorate([
|
|
2731
|
+
Memoize(),
|
|
2732
|
+
__metadata("design:type", Function),
|
|
2733
|
+
__metadata("design:paramtypes", []),
|
|
2734
|
+
__metadata("design:returntype", String)
|
|
2735
|
+
], ColumnModel.prototype, "getHeaderText", null);
|
|
2736
|
+
__decorate([
|
|
2737
|
+
Memoize(),
|
|
2738
|
+
__metadata("design:type", Function),
|
|
2739
|
+
__metadata("design:paramtypes", []),
|
|
2740
|
+
__metadata("design:returntype", Object)
|
|
2741
|
+
], ColumnModel.prototype, "getColumnTextProperties", null);
|
|
2742
|
+
__decorate([
|
|
2743
|
+
Trace(),
|
|
2744
|
+
__metadata("design:type", Function),
|
|
2745
|
+
__metadata("design:paramtypes", [TableCellRendererComponent, Object]),
|
|
2746
|
+
__metadata("design:returntype", void 0)
|
|
2747
|
+
], ColumnModel.prototype, "onEditorAttached", null);
|
|
2748
|
+
class PropertyColumnModel extends ColumnModel {
|
|
2749
|
+
constructor(property, defaults) {
|
|
2750
|
+
super(property.toString(), defaults);
|
|
2751
|
+
this.property = property;
|
|
2752
|
+
this._format = (value) => value;
|
|
2753
|
+
this.cellRenderer(DefaultCellRendererComponent);
|
|
2754
|
+
}
|
|
2755
|
+
cellRenderer(componentType) {
|
|
2756
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
|
|
2757
|
+
component.value = this._format(rowData.row[this.property]);
|
|
2758
|
+
}));
|
|
2759
|
+
return this;
|
|
2760
|
+
}
|
|
2761
|
+
cellEditor(editor, validatorsOrInitialiser, initialiseComponent) {
|
|
2762
|
+
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
2763
|
+
const initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
2764
|
+
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
2765
|
+
const formValueModel = editSession.form.pluck(this.property);
|
|
2766
|
+
if (validators) {
|
|
2767
|
+
formValueModel.validateUsing(validators);
|
|
2768
|
+
}
|
|
2769
|
+
component.valueModel = formValueModel;
|
|
2770
|
+
if (initialiser) {
|
|
2771
|
+
initialiser(component);
|
|
2772
|
+
}
|
|
2773
|
+
}));
|
|
2774
|
+
return this;
|
|
2775
|
+
}
|
|
2776
|
+
format(formatter) {
|
|
2777
|
+
assert$1.isFunction(formatter);
|
|
2778
|
+
this._format = formatter;
|
|
2779
|
+
return this;
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
class ListPropertyColumnModel extends ColumnModel {
|
|
2783
|
+
constructor(property, defaults) {
|
|
2784
|
+
super(property.toString(), defaults);
|
|
2785
|
+
this.property = property;
|
|
2786
|
+
this._format = (value) => value.map(v => v === null || v === void 0 ? void 0 : v.toString()).join(', ');
|
|
2787
|
+
this.cellRenderer(DefaultCellRendererComponent);
|
|
2788
|
+
}
|
|
2789
|
+
cellRenderer(componentType) {
|
|
2790
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
|
|
2791
|
+
component.value = this._format(rowData.row[this.property]);
|
|
2792
|
+
}));
|
|
2793
|
+
return this;
|
|
2794
|
+
}
|
|
2795
|
+
cellEditor(editor, validatorsOrInitialiser, initialiseComponent) {
|
|
2796
|
+
const validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
2797
|
+
const initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
2798
|
+
this.configureCellEditor(new CellEditorPortalRef(editor, (component, editSession) => {
|
|
2799
|
+
const formListModel = editSession.form.pluckList(this.property);
|
|
2800
|
+
if (validators) {
|
|
2801
|
+
formListModel.validateUsing(validators);
|
|
2802
|
+
}
|
|
2803
|
+
component.listModel = formListModel;
|
|
2804
|
+
if (initialiser) {
|
|
2805
|
+
initialiser(component);
|
|
2806
|
+
}
|
|
2807
|
+
}));
|
|
2808
|
+
return this;
|
|
2809
|
+
}
|
|
2810
|
+
format(formatter) {
|
|
2811
|
+
assert$1.isFunction(formatter);
|
|
2812
|
+
this._format = formatter;
|
|
2813
|
+
return this;
|
|
2814
|
+
}
|
|
2815
|
+
}
|
|
2816
|
+
class CustomValueColumnModel extends ColumnModel {
|
|
2817
|
+
constructor(columnId, defaults, getValue) {
|
|
2818
|
+
super(columnId, defaults);
|
|
2819
|
+
this.getValue = getValue;
|
|
2820
|
+
this.cellRenderer(DefaultCellRendererComponent);
|
|
2821
|
+
}
|
|
2822
|
+
cellRenderer(componentType) {
|
|
2823
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
|
|
2824
|
+
component.value = this.getValue(rowData.row);
|
|
2825
|
+
}));
|
|
2826
|
+
return this;
|
|
2827
|
+
}
|
|
2828
|
+
}
|
|
2829
|
+
class EditorControlColumnModel extends ColumnModel {
|
|
2830
|
+
constructor(columnId, saveCommand, defaults) {
|
|
2831
|
+
super(columnId, defaults);
|
|
2832
|
+
this.cellRenderer(EditRowControls);
|
|
2833
|
+
}
|
|
2834
|
+
cellRenderer(componentType) {
|
|
2835
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData) => {
|
|
2836
|
+
component.row = rowData.row;
|
|
2837
|
+
component.editSession = rowData.editSession;
|
|
2838
|
+
component.editRowCommand = rowData.editRowCommand;
|
|
2839
|
+
}));
|
|
2840
|
+
return this;
|
|
2841
|
+
}
|
|
2842
|
+
getDefaultHeaderText() {
|
|
2843
|
+
return '';
|
|
2844
|
+
}
|
|
2845
|
+
}
|
|
2846
|
+
class CustomTemplateColumnModel extends ColumnModel {
|
|
2847
|
+
constructor(columnId, defaults) {
|
|
2848
|
+
super(columnId, defaults);
|
|
2849
|
+
this.config = new TemplateCellRendererPortalRef();
|
|
2850
|
+
this.configureCellRenderer(this.config);
|
|
2851
|
+
}
|
|
2852
|
+
setTemplate(templateRef, viewContainer, fillCell, padChild) {
|
|
2853
|
+
this.config.registerPortal(templateRef, viewContainer, fillCell, padChild);
|
|
2854
|
+
}
|
|
2855
|
+
}
|
|
2856
|
+
class SelectionColumnModel extends ColumnModel {
|
|
2857
|
+
constructor(columnId, defaults, selectionModel) {
|
|
2858
|
+
super(columnId, defaults);
|
|
2859
|
+
if (selectionModel instanceof MultipleSelectionModel) {
|
|
2860
|
+
this.cellHeaderRenderer(SelectHeaderCellRendererComponent, (component) => {
|
|
2861
|
+
component.selectionModel = selectionModel;
|
|
2862
|
+
});
|
|
2863
|
+
}
|
|
2864
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(SelectCellRendererComponent, (component, rowData) => {
|
|
2865
|
+
component.row = rowData.row;
|
|
2866
|
+
component.selectionModel = selectionModel;
|
|
2867
|
+
}));
|
|
2868
|
+
}
|
|
2869
|
+
getDefaultHeaderText() {
|
|
2870
|
+
return '';
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
|
|
2613
2874
|
/**
|
|
2614
2875
|
* Create your model:
|
|
2615
2876
|
* @example
|
|
@@ -2645,10 +2906,17 @@ let TableComponent = class TableComponent extends DisposableComponent {
|
|
|
2645
2906
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
2646
2907
|
this.columns = chain(this.tableModel.columns);
|
|
2647
2908
|
this.columnIds = chain(this.columns).pluck('columnId');
|
|
2909
|
+
this.columnsById = chain(this.columns).indexBy('columnId');
|
|
2648
2910
|
}
|
|
2649
2911
|
isEditing(row) {
|
|
2650
2912
|
return !!this.tableModel.getEditSessionFor(row);
|
|
2651
2913
|
}
|
|
2914
|
+
registerColumnTemplate(columnId, templateRef, viewContainer, fillCell, padChild) {
|
|
2915
|
+
const column = this.columnsById.get(columnId);
|
|
2916
|
+
if (column instanceof CustomTemplateColumnModel) {
|
|
2917
|
+
column.setTemplate(templateRef, viewContainer, fillCell, padChild);
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2652
2920
|
};
|
|
2653
2921
|
__decorate([
|
|
2654
2922
|
Input(),
|
|
@@ -2666,8 +2934,16 @@ TableComponent = __decorate([
|
|
|
2666
2934
|
|
|
2667
2935
|
let ColumnTemplateDirective = class ColumnTemplateDirective {
|
|
2668
2936
|
constructor(host, templateRef, viewContainer) {
|
|
2937
|
+
this.host = host;
|
|
2669
2938
|
this.templateRef = templateRef;
|
|
2670
2939
|
this.viewContainer = viewContainer;
|
|
2940
|
+
this.aupColumnTemplateFillCell = false;
|
|
2941
|
+
this.aupColumnTemplateAutoPadChild = undefined;
|
|
2942
|
+
}
|
|
2943
|
+
ngOnInit() {
|
|
2944
|
+
var _a;
|
|
2945
|
+
assert.isTruthy(this.aupColumnTemplateColumnId);
|
|
2946
|
+
this.host.registerColumnTemplate(this.aupColumnTemplateColumnId, this.templateRef, this.viewContainer, this.aupColumnTemplateFillCell, (_a = this.aupColumnTemplateAutoPadChild) !== null && _a !== void 0 ? _a : this.aupColumnTemplateFillCell);
|
|
2671
2947
|
}
|
|
2672
2948
|
};
|
|
2673
2949
|
ColumnTemplateDirective.ctorParameters = () => [
|
|
@@ -2675,82 +2951,44 @@ ColumnTemplateDirective.ctorParameters = () => [
|
|
|
2675
2951
|
{ type: TemplateRef },
|
|
2676
2952
|
{ type: ViewContainerRef }
|
|
2677
2953
|
];
|
|
2678
|
-
ColumnTemplateDirective = __decorate([
|
|
2679
|
-
Directive({
|
|
2680
|
-
selector: '[aupColumnTemplate]'
|
|
2681
|
-
}),
|
|
2682
|
-
__metadata("design:paramtypes", [TableComponent,
|
|
2683
|
-
TemplateRef,
|
|
2684
|
-
ViewContainerRef])
|
|
2685
|
-
], ColumnTemplateDirective);
|
|
2686
|
-
|
|
2687
|
-
let TableCellRendererComponent = class TableCellRendererComponent {
|
|
2688
|
-
constructor() {
|
|
2689
|
-
this.defaultClassNames = "aup-header-cell-renderer";
|
|
2690
|
-
this.editRowCommand = Command.create(() => {
|
|
2691
|
-
this.tableModel.startEditSession(this.row);
|
|
2692
|
-
});
|
|
2693
|
-
}
|
|
2694
|
-
initialiseRenderer(instance) {
|
|
2695
|
-
if (this.renderer !== instance) {
|
|
2696
|
-
this.renderer = instance;
|
|
2697
|
-
this.column.updateCellRenderer(this.renderer, this.row, this.editRowCommand, this.editSession);
|
|
2698
|
-
}
|
|
2699
|
-
}
|
|
2700
|
-
initialiseEditor(instance) {
|
|
2701
|
-
if (this.editor !== instance) {
|
|
2702
|
-
this.editor = instance;
|
|
2703
|
-
this.column.initialiseEditor(this.editor, this.editSession);
|
|
2704
|
-
}
|
|
2705
|
-
}
|
|
2706
|
-
ngOnChanges(changes) {
|
|
2707
|
-
if (this.renderer) {
|
|
2708
|
-
this.column.updateCellRenderer(this.renderer, this.row, this.editRowCommand, this.editSession);
|
|
2709
|
-
this.renderer.editSession = this.editSession;
|
|
2710
|
-
}
|
|
2711
|
-
}
|
|
2712
|
-
hasActiveEditor() {
|
|
2713
|
-
return this.editSession && this.column.hasEditor();
|
|
2714
|
-
}
|
|
2715
|
-
};
|
|
2716
2954
|
__decorate([
|
|
2717
2955
|
Input(),
|
|
2718
|
-
__metadata("design:type",
|
|
2719
|
-
],
|
|
2956
|
+
__metadata("design:type", String)
|
|
2957
|
+
], ColumnTemplateDirective.prototype, "aupColumnTemplate", void 0);
|
|
2720
2958
|
__decorate([
|
|
2721
2959
|
Input(),
|
|
2722
|
-
__metadata("design:type",
|
|
2723
|
-
],
|
|
2960
|
+
__metadata("design:type", String)
|
|
2961
|
+
], ColumnTemplateDirective.prototype, "aupColumnTemplateColumnId", void 0);
|
|
2724
2962
|
__decorate([
|
|
2725
2963
|
Input(),
|
|
2726
|
-
__metadata("design:type",
|
|
2727
|
-
],
|
|
2964
|
+
__metadata("design:type", Object)
|
|
2965
|
+
], ColumnTemplateDirective.prototype, "aupColumnTemplateFillCell", void 0);
|
|
2728
2966
|
__decorate([
|
|
2729
2967
|
Input(),
|
|
2730
|
-
__metadata("design:type", TableModel)
|
|
2731
|
-
], TableCellRendererComponent.prototype, "tableModel", void 0);
|
|
2732
|
-
__decorate([
|
|
2733
|
-
HostBinding('class'),
|
|
2734
2968
|
__metadata("design:type", Object)
|
|
2735
|
-
],
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
selector: '
|
|
2739
|
-
template: "<ng-container *ngIf=\"!hasActiveEditor()\" [cdkPortalOutlet]=\"column.cellRendererPortal\" (attached)=\"initialiseRenderer($event.instance)\"></ng-container>\n<ng-container *ngIf=\"hasActiveEditor()\" [cdkPortalOutlet]=\"column.cellEditorPortal\" (attached)=\"initialiseEditor($event.instance)\"></ng-container>\n",
|
|
2740
|
-
styles: [":host{display:flex;flex-direction:column;align-items:stretch}"]
|
|
2969
|
+
], ColumnTemplateDirective.prototype, "aupColumnTemplateAutoPadChild", void 0);
|
|
2970
|
+
ColumnTemplateDirective = __decorate([
|
|
2971
|
+
Directive({
|
|
2972
|
+
selector: '[aupColumnTemplate]'
|
|
2741
2973
|
}),
|
|
2742
|
-
__metadata("design:paramtypes", [
|
|
2743
|
-
|
|
2974
|
+
__metadata("design:paramtypes", [TableComponent,
|
|
2975
|
+
TemplateRef,
|
|
2976
|
+
ViewContainerRef])
|
|
2977
|
+
], ColumnTemplateDirective);
|
|
2744
2978
|
|
|
2745
2979
|
let TableHeaderCellRendererComponent = class TableHeaderCellRendererComponent {
|
|
2746
2980
|
constructor() {
|
|
2747
|
-
this.defaultClassNames =
|
|
2981
|
+
this.defaultClassNames = 'aup-header-cell-renderer';
|
|
2748
2982
|
}
|
|
2983
|
+
ngOnInit() {
|
|
2984
|
+
this.column.attachHeaderCell(this);
|
|
2985
|
+
}
|
|
2986
|
+
// @Trace()
|
|
2749
2987
|
initialiseHeader(instance) {
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2988
|
+
this.column.onHeaderAttached(this, instance);
|
|
2989
|
+
}
|
|
2990
|
+
getPortal() {
|
|
2991
|
+
return this[HEADER_CELL_RENDERER_PORTAL];
|
|
2754
2992
|
}
|
|
2755
2993
|
};
|
|
2756
2994
|
__decorate([
|
|
@@ -2764,8 +3002,8 @@ __decorate([
|
|
|
2764
3002
|
TableHeaderCellRendererComponent = __decorate([
|
|
2765
3003
|
Component({
|
|
2766
3004
|
selector: 'aup-table-header-cell-renderer',
|
|
2767
|
-
template: "<ng-container [cdkPortalOutlet]=\"
|
|
2768
|
-
styles: [":host{display:flex;flex-direction:column;align-items:stretch}"]
|
|
3005
|
+
template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
|
|
3006
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]
|
|
2769
3007
|
}),
|
|
2770
3008
|
__metadata("design:paramtypes", [])
|
|
2771
3009
|
], TableHeaderCellRendererComponent);
|
|
@@ -2852,12 +3090,63 @@ VerticalFocusContainerComponent = __decorate([
|
|
|
2852
3090
|
__metadata("design:paramtypes", [FocusManager])
|
|
2853
3091
|
], VerticalFocusContainerComponent);
|
|
2854
3092
|
|
|
3093
|
+
let MultipleSelectInputComponent = class MultipleSelectInputComponent extends AbstractListInputComponent {
|
|
3094
|
+
constructor() {
|
|
3095
|
+
super();
|
|
3096
|
+
this.optionLabelFormat = (option) => (option && this.optionLabel) ? option[this.optionLabel] : option;
|
|
3097
|
+
}
|
|
3098
|
+
ngOnInit() {
|
|
3099
|
+
}
|
|
3100
|
+
};
|
|
3101
|
+
__decorate([
|
|
3102
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
3103
|
+
__metadata("design:type", Object)
|
|
3104
|
+
], MultipleSelectInputComponent.prototype, "listModel", void 0);
|
|
3105
|
+
__decorate([
|
|
3106
|
+
Input(), TrackExternal(),
|
|
3107
|
+
__metadata("design:type", ListModel)
|
|
3108
|
+
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
3109
|
+
__decorate([
|
|
3110
|
+
Input(), StoreInListModel('optionsModel'),
|
|
3111
|
+
__metadata("design:type", Array)
|
|
3112
|
+
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
3113
|
+
__decorate([
|
|
3114
|
+
Input(),
|
|
3115
|
+
__metadata("design:type", Object)
|
|
3116
|
+
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
3117
|
+
__decorate([
|
|
3118
|
+
Input(),
|
|
3119
|
+
__metadata("design:type", Boolean)
|
|
3120
|
+
], MultipleSelectInputComponent.prototype, "allowNil", void 0);
|
|
3121
|
+
__decorate([
|
|
3122
|
+
ContentChild('optionTemplate'),
|
|
3123
|
+
__metadata("design:type", TemplateRef)
|
|
3124
|
+
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
3125
|
+
__decorate([
|
|
3126
|
+
ContentChild('nilOptionTemplate'),
|
|
3127
|
+
__metadata("design:type", TemplateRef)
|
|
3128
|
+
], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
3129
|
+
__decorate([
|
|
3130
|
+
Input(),
|
|
3131
|
+
__metadata("design:type", Function)
|
|
3132
|
+
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
3133
|
+
MultipleSelectInputComponent = __decorate([
|
|
3134
|
+
Component({
|
|
3135
|
+
selector: 'aup-multiple-select-input',
|
|
3136
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"listModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
3137
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
3138
|
+
}),
|
|
3139
|
+
__metadata("design:paramtypes", [])
|
|
3140
|
+
], MultipleSelectInputComponent);
|
|
3141
|
+
|
|
2855
3142
|
let ComponentsModule = class ComponentsModule {
|
|
2856
3143
|
};
|
|
2857
3144
|
ComponentsModule = __decorate([
|
|
2858
3145
|
NgModule({
|
|
2859
3146
|
declarations: [
|
|
2860
3147
|
AbstractInputComponent,
|
|
3148
|
+
AbstractValueInputComponent,
|
|
3149
|
+
AbstractListInputComponent,
|
|
2861
3150
|
AbstractInputActivity,
|
|
2862
3151
|
NumberInputComponent,
|
|
2863
3152
|
StringInputComponent,
|
|
@@ -2883,7 +3172,8 @@ ComponentsModule = __decorate([
|
|
|
2883
3172
|
SelectCellRendererComponent,
|
|
2884
3173
|
SelectHeaderCellRendererComponent,
|
|
2885
3174
|
DefaultHeaderCellRendererComponent,
|
|
2886
|
-
TableHeaderCellRendererComponent
|
|
3175
|
+
TableHeaderCellRendererComponent,
|
|
3176
|
+
MultipleSelectInputComponent
|
|
2887
3177
|
],
|
|
2888
3178
|
imports: [
|
|
2889
3179
|
CommonModule,
|
|
@@ -2919,7 +3209,8 @@ ComponentsModule = __decorate([
|
|
|
2919
3209
|
CardContainerComponent,
|
|
2920
3210
|
TableComponent,
|
|
2921
3211
|
EditRowControls,
|
|
2922
|
-
ColumnTemplateDirective
|
|
3212
|
+
ColumnTemplateDirective,
|
|
3213
|
+
MultipleSelectInputComponent
|
|
2923
3214
|
],
|
|
2924
3215
|
providers: [
|
|
2925
3216
|
FocusBindingFactory,
|
|
@@ -5491,5 +5782,5 @@ function VisitParameterList(options) {
|
|
|
5491
5782
|
* Generated bundle index. Do not edit.
|
|
5492
5783
|
*/
|
|
5493
5784
|
|
|
5494
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CardContainerComponent, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ModalInteractionContextFactory, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputComponent, SelectionColumnModel, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, DirectivesModule as ɵa, CommandDirective as ɵb,
|
|
5785
|
+
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandDirective, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalInteractionContextFactory, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputComponent, SelectionColumnModel, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TemplateCellRendererPortalRef, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0, DirectivesModule as ɵa, CommandDirective as ɵb, VerticalFocusContainerComponent as ɵba, FocusableComponent as ɵbb, CardContainerComponent as ɵbc, TableComponent as ɵbd, EditRowControls as ɵbe, ColumnTemplateDirective as ɵbf, DefaultCellRendererComponent as ɵbg, TableCellRendererComponent as ɵbh, SelectCellRendererComponent as ɵbi, SelectHeaderCellRendererComponent as ɵbj, DefaultHeaderCellRendererComponent as ɵbk, TableHeaderCellRendererComponent as ɵbl, MultipleSelectInputComponent as ɵbm, InteractionModule as ɵbn, ActivityContainerComponent as ɵbo, AbstractInteractionContext as ɵbp, ActivityOutletComponent as ɵbq, ConfirmationDialogComponent as ɵbr, ACTIVITY_DATA as ɵbs, Activity as ɵbt, ConfirmThenDialogComponent as ɵbv, AlertDialogComponent as ɵbw, InPlaceInteractionContextComponent as ɵby, InteractionService as ɵbz, FocusBindingDirective as ɵc, ModalInteractionContextFactory as ɵca, AddItemInteractionContextComponent as ɵcb, ActivityActionsComponent as ɵcc, PopupInteractionContextComponent as ɵcd, InteractionContextTriggerFor as ɵce, PlaceModule as ɵcf, EmptyStateComponent as ɵcg, BusyOverlayComponent as ɵch, PlaceOutletComponent as ɵci, leftRightPlaceAnimation as ɵcj, LEFT_RIGHT_PLACE_ANIMATION as ɵck, AUP_PLACE_CONFIG as ɵcl, PlaceRouter as ɵcn, UrlService as ɵco, PlaceHistory as ɵcp, TabbedPlaceNavigationComponent as ɵcq, AbstractPlaceNavigationComponent as ɵcr, ListPlaceNavComponent as ɵcs, SidePlaceNavigationComponent as ɵct, DisposableComponent as ɵd, FocusBindingFactory as ɵe, ComponentsModule as ɵf, AbstractInputComponent as ɵg, AbstractValueInputComponent as ɵh, AbstractListInputComponent as ɵi, AbstractInputActivity as ɵj, Activity as ɵk, ACTIVITY_DATA as ɵl, NumberInputComponent as ɵm, StringInputComponent as ɵn, StringInputActivity as ɵo, TextInputComponent as ɵp, PasswordInputComponent as ɵq, SelectInputComponent as ɵr, CheckboxInputComponent as ɵs, ScrollContainerComponent as ɵt, NoopComponent as ɵu, SwitchCaseOption as ɵv, SwitchCaseWhenDirective as ɵw, SwitchCaseDefaultDirective as ɵx, SwitchCaseComponent as ɵy, FocusContainerComponent as ɵz };
|
|
5495
5786
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|