@coolon/angular-ui-powerups 1.9.0 → 1.11.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 +19 -0
- package/assets/styles.scss +7 -67
- package/bundles/coolon-angular-ui-powerups.umd.js +2623 -1581
- 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 +57 -44
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +55 -42
- 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 +37 -6
- 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-activity.js +47 -0
- package/esm2015/lib/components/forms/abstract-input-activity.js.map +1 -0
- package/esm2015/lib/components/forms/abstract-input-activity.metadata.json +1 -0
- package/esm2015/lib/components/forms/abstract-input-activity.ngfactory.js.map +1 -0
- package/esm2015/lib/components/forms/abstract-input.component.js +6 -1
- 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/number-input/number-input.component.js +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 +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/string-input/string-input-activity.js +22 -0
- package/esm2015/lib/components/forms/string-input/string-input-activity.js.map +1 -0
- package/esm2015/lib/components/forms/string-input/string-input-activity.metadata.json +1 -0
- package/esm2015/lib/components/forms/string-input/string-input-activity.ngfactory.js.map +1 -0
- package/esm2015/lib/components/forms/string-input/string-input.component.js +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 +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
- package/esm2015/lib/components/index.js +13 -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-editor.component.js +1 -0
- package/esm2015/lib/components/table/cell-editor.component.js.map +1 -0
- package/esm2015/lib/components/table/cell-editor.component.metadata.json +1 -0
- package/esm2015/lib/components/table/cell-renderer.js +1 -0
- package/esm2015/lib/components/table/cell-renderer.js.map +1 -0
- package/esm2015/lib/components/table/cell-renderer.metadata.json +1 -0
- package/esm2015/lib/components/table/column-model.js +160 -0
- package/esm2015/lib/components/table/column-model.js.map +1 -0
- package/esm2015/lib/components/table/column-model.metadata.json +1 -0
- package/esm2015/lib/components/table/column-template/column-template.directive.js +24 -0
- package/esm2015/lib/components/table/column-template/column-template.directive.js.map +1 -0
- package/esm2015/lib/components/table/column-template/column-template.directive.metadata.json +1 -0
- package/esm2015/lib/components/table/column-template/column-template.directive.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/column-text-properties.js +1 -0
- package/esm2015/lib/components/table/column-text-properties.js.map +1 -0
- package/esm2015/lib/components/table/column-text-properties.metadata.json +1 -0
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.js +27 -0
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.js.map +1 -0
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js +21 -0
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js.map +1 -0
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js +50 -0
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -0
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.metadata.json +1 -0
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.js +40 -0
- package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.js.map +1 -0
- package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js +32 -0
- package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -0
- package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +64 -0
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -0
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/table/table-def.js +1 -0
- package/esm2015/lib/components/table/table-def.js.map +1 -0
- package/esm2015/lib/components/table/table-def.metadata.json +1 -0
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +32 -0
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -0
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/table/table-model.js +197 -0
- package/esm2015/lib/components/table/table-model.js.map +1 -0
- package/esm2015/lib/components/table/table-model.metadata.json +1 -0
- package/esm2015/lib/components/table/table.component.js +60 -0
- package/esm2015/lib/components/table/table.component.js.map +1 -0
- package/esm2015/lib/components/table/table.component.metadata.json +1 -0
- package/esm2015/lib/components/table/table.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/table/table.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/activity.js +7 -1
- package/esm2015/lib/interaction/activity.js.map +1 -1
- package/esm2015/lib/interaction/activity.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +2 -2
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +22 -9
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +87 -0
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -0
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.js +86 -0
- package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.js.map +1 -0
- package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.metadata.json +1 -0
- package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/index.js +2 -0
- package/esm2015/lib/interaction/index.js.map +1 -1
- package/esm2015/lib/interaction/index.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.js +16 -4
- package/esm2015/lib/interaction/interaction.module.js.map +1 -1
- package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/coolon-angular-ui-powerups.js +55 -42
- 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 +37 -6
- 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-activity.js +50 -0
- package/esm5/lib/components/forms/abstract-input-activity.js.map +1 -0
- package/esm5/lib/components/forms/abstract-input-activity.ngfactory.js.map +1 -0
- package/esm5/lib/components/forms/abstract-input.component.js +6 -1
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js +1 -1
- package/esm5/lib/components/forms/string-input/string-input-activity.js +18 -0
- package/esm5/lib/components/forms/string-input/string-input-activity.js.map +1 -0
- package/esm5/lib/components/forms/string-input/string-input-activity.ngfactory.js.map +1 -0
- package/esm5/lib/components/forms/string-input/string-input.component.js +1 -1
- package/esm5/lib/components/forms/text-input/text-input.component.js +1 -1
- package/esm5/lib/components/index.js +13 -0
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/table/cell-editor.component.js +1 -0
- package/esm5/lib/components/table/cell-editor.component.js.map +1 -0
- package/esm5/lib/components/table/cell-renderer.js +1 -0
- package/esm5/lib/components/table/cell-renderer.js.map +1 -0
- package/esm5/lib/components/table/column-model.js +196 -0
- package/esm5/lib/components/table/column-model.js.map +1 -0
- package/esm5/lib/components/table/column-template/column-template.directive.js +25 -0
- package/esm5/lib/components/table/column-template/column-template.directive.js.map +1 -0
- package/esm5/lib/components/table/column-template/column-template.directive.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/column-text-properties.js +1 -0
- package/esm5/lib/components/table/column-text-properties.js.map +1 -0
- package/esm5/lib/components/table/default-cell-renderer/default-cell-renderer.component.js +32 -0
- package/esm5/lib/components/table/default-cell-renderer/default-cell-renderer.component.js.map +1 -0
- package/esm5/lib/components/table/default-cell-renderer/default-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/default-cell-renderer/default-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js +22 -0
- package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js.map +1 -0
- package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js +57 -0
- package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -0
- package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.js +47 -0
- package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.js.map +1 -0
- package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js +35 -0
- package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -0
- package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +66 -0
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -0
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/table/table-def.js +1 -0
- package/esm5/lib/components/table/table-def.js.map +1 -0
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +33 -0
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -0
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/table/table-model.js +213 -0
- package/esm5/lib/components/table/table-model.js.map +1 -0
- package/esm5/lib/components/table/table.component.js +62 -0
- package/esm5/lib/components/table/table.component.js.map +1 -0
- package/esm5/lib/components/table/table.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/table/table.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/interaction/activity.js +7 -2
- package/esm5/lib/interaction/activity.js.map +1 -1
- package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js +2 -2
- package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +23 -9
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
- package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +95 -0
- package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -0
- package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.ngfactory.js.map +1 -0
- package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/interaction/directives/interaction-context-trigger-for.directive.js +90 -0
- package/esm5/lib/interaction/directives/interaction-context-trigger-for.directive.js.map +1 -0
- package/esm5/lib/interaction/directives/interaction-context-trigger-for.directive.ngfactory.js.map +1 -0
- package/esm5/lib/interaction/index.js +2 -0
- package/esm5/lib/interaction/index.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.js +16 -4
- package/esm5/lib/interaction/interaction.module.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +2291 -1368
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +2536 -1526
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-input-activity.d.ts +18 -0
- package/lib/components/forms/abstract-input.component.d.ts +1 -0
- package/lib/components/forms/string-input/string-input-activity.d.ts +3 -0
- package/lib/components/index.d.ts +17 -0
- package/lib/components/table/cell-editor.component.d.ts +5 -0
- package/lib/components/table/cell-renderer.d.ts +3 -0
- package/lib/components/table/column-model.d.ts +84 -0
- package/lib/components/table/column-template/column-template.directive.d.ts +7 -0
- package/lib/components/table/column-text-properties.d.ts +3 -0
- package/lib/components/table/default-cell-renderer/default-cell-renderer.component.d.ts +6 -0
- package/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.d.ts +5 -0
- package/lib/components/table/edit-row-controls/edit-row-controls.component.d.ts +14 -0
- package/lib/components/table/select-cell-renderer/select-cell-renderer.component.d.ts +11 -0
- package/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.d.ts +9 -0
- package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +18 -0
- package/lib/components/table/table-def.d.ts +7 -0
- package/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts +8 -0
- package/lib/components/table/table-model.d.ts +114 -0
- package/lib/components/table/table.component.d.ts +40 -0
- package/lib/interaction/activity.d.ts +1 -0
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -1
- package/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.d.ts +21 -0
- package/lib/interaction/directives/interaction-context-trigger-for.directive.d.ts +17 -0
- package/lib/interaction/index.d.ts +2 -0
- package/package.json +5 -4
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import { __extends, __decorate, __metadata, __param, __awaiter, __generator, __assign, __spread } from 'tslib';
|
|
2
2
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
3
|
-
import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule,
|
|
3
|
+
import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, HostBinding, Component, ContentChild, TemplateRef, Self, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, QueryList, Optional, EventEmitter, Output, ChangeDetectorRef, ContentChildren, SkipSelf } from '@angular/core';
|
|
4
4
|
import { FormsModule } from '@angular/forms';
|
|
5
5
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
6
|
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
11
|
import { MatButtonModule } from '@angular/material/button';
|
|
11
12
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
12
13
|
import { MatIconModule } from '@angular/material/icon';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
14
|
+
import { MatTableModule } from '@angular/material/table';
|
|
15
|
+
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, FocusManager, MutableValueModel, TrackExternal, Command, Deferred, Trace, MutableListModel, Form, DelegatingFormValueModel, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MultipleSelectionModel, Guard, DebugContext, Binding, Functions } from '@coolon/pectin';
|
|
16
|
+
import { FlexModule, GridModule } from '@angular/flex-layout';
|
|
15
17
|
import { MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS, MatDialogModule } from '@angular/material/dialog';
|
|
16
18
|
import { RouterModule, UrlSegment, Router, UrlSerializer, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterOutlet } from '@angular/router';
|
|
17
19
|
import ___default, { isEqual, isNil } from 'lodash';
|
|
18
20
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
19
21
|
import { assert as assert$1, lang as lang$1, Opts, Klass } from '@coolon/typescript-utilities';
|
|
20
|
-
import {
|
|
22
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
23
|
+
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
24
|
+
import produce from 'immer';
|
|
21
25
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
22
26
|
import { MatListModule } from '@angular/material/list';
|
|
23
27
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
24
|
-
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
25
28
|
import { Memoize as Memoize$1 } from '@typescript-plus/fast-memoize-decorator';
|
|
26
29
|
import 'reflect-metadata';
|
|
27
30
|
import { style, query, group, animate, trigger, transition } from '@angular/animations';
|
|
@@ -362,45 +365,6 @@ var DirectivesModule = /** @class */ (function () {
|
|
|
362
365
|
return DirectivesModule;
|
|
363
366
|
}());
|
|
364
367
|
|
|
365
|
-
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
366
|
-
__extends(FocusContainerComponent, _super);
|
|
367
|
-
function FocusContainerComponent(focusManager) {
|
|
368
|
-
var _this = _super.call(this) || this;
|
|
369
|
-
_this.focusManager = focusManager;
|
|
370
|
-
_this.restoreFocusCommand = Command.create(function () {
|
|
371
|
-
_this.restoreFocus();
|
|
372
|
-
});
|
|
373
|
-
_this.tabIndex = -1;
|
|
374
|
-
return _this;
|
|
375
|
-
}
|
|
376
|
-
FocusContainerComponent.prototype.ngOnInit = function () {
|
|
377
|
-
};
|
|
378
|
-
// @Trace()
|
|
379
|
-
FocusContainerComponent.prototype.restoreFocus = function () {
|
|
380
|
-
this.focusManager.restoreFocus();
|
|
381
|
-
};
|
|
382
|
-
FocusContainerComponent.ctorParameters = function () { return [
|
|
383
|
-
{ type: FocusManager, decorators: [{ type: Self }] }
|
|
384
|
-
]; };
|
|
385
|
-
__decorate([
|
|
386
|
-
HostBinding('attr.tabindex'),
|
|
387
|
-
__metadata("design:type", Object)
|
|
388
|
-
], FocusContainerComponent.prototype, "tabIndex", void 0);
|
|
389
|
-
FocusContainerComponent = __decorate([
|
|
390
|
-
Component({
|
|
391
|
-
selector: 'aup-focus-container',
|
|
392
|
-
template: "<ng-content></ng-content>\n",
|
|
393
|
-
providers: [
|
|
394
|
-
{ provide: FocusManager }
|
|
395
|
-
],
|
|
396
|
-
styles: [":host{display:block}"]
|
|
397
|
-
}),
|
|
398
|
-
__param(0, Self()),
|
|
399
|
-
__metadata("design:paramtypes", [FocusManager])
|
|
400
|
-
], FocusContainerComponent);
|
|
401
|
-
return FocusContainerComponent;
|
|
402
|
-
}(DisposableComponent));
|
|
403
|
-
|
|
404
368
|
var FocusableComponent = /** @class */ (function (_super) {
|
|
405
369
|
__extends(FocusableComponent, _super);
|
|
406
370
|
function FocusableComponent(el, focusManager, focusBindingFactory) {
|
|
@@ -466,1826 +430,2785 @@ var FocusableComponent = /** @class */ (function (_super) {
|
|
|
466
430
|
return FocusableComponent;
|
|
467
431
|
}(DisposableComponent));
|
|
468
432
|
|
|
469
|
-
var
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
475
|
-
*
|
|
476
|
-
* @Input() @TrackExternal({useExisting: "delegatingFormValueModel"})
|
|
477
|
-
* valueModel: FormValueModel<string> | MutableValueModel<string>;
|
|
478
|
-
*
|
|
479
|
-
* This approach allows the input to accept plain or form models but all backed by a form
|
|
480
|
-
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
481
|
-
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
482
|
-
*/
|
|
483
|
-
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
484
|
-
_this.delegatingFormValueModel = _this.registerDisposable(new DelegatingFormValueModel());
|
|
485
|
-
// TODO: fix this.
|
|
486
|
-
// tslint:disable-next-line:no-output-native
|
|
487
|
-
_this.focus = new EventEmitter();
|
|
488
|
-
// tslint:disable-next-line:no-output-native
|
|
489
|
-
_this.blur = new EventEmitter();
|
|
490
|
-
// tslint:disable-next-line:no-output-native
|
|
491
|
-
_this.enterKey = new EventEmitter();
|
|
492
|
-
// tslint:disable-next-line:no-output-native
|
|
493
|
-
_this.escapeKey = new EventEmitter();
|
|
494
|
-
var self = _this;
|
|
495
|
-
_this.errorStateMatcher = {
|
|
496
|
-
isErrorState: function (control, form) {
|
|
497
|
-
return self.hasErrors();
|
|
498
|
-
}
|
|
499
|
-
};
|
|
500
|
-
return _this;
|
|
433
|
+
var Dimension = /** @class */ (function () {
|
|
434
|
+
function Dimension(width, height) {
|
|
435
|
+
this.width = width;
|
|
436
|
+
this.height = height;
|
|
501
437
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
this.
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
};
|
|
513
|
-
AbstractInputComponent.prototype.notifyEnterKey = function () {
|
|
514
|
-
this.safelyInvoke(this.enterCommand);
|
|
515
|
-
this.enterKey.emit();
|
|
438
|
+
return Dimension;
|
|
439
|
+
}());
|
|
440
|
+
|
|
441
|
+
var Point = /** @class */ (function () {
|
|
442
|
+
function Point(x, y) {
|
|
443
|
+
this.x = x;
|
|
444
|
+
this.y = y;
|
|
445
|
+
}
|
|
446
|
+
Point.from = function (data) {
|
|
447
|
+
return new Point(data.x, data.y);
|
|
516
448
|
};
|
|
517
|
-
|
|
518
|
-
this.
|
|
519
|
-
this.escapeKey.emit();
|
|
449
|
+
Point.prototype.translate = function (x, y) {
|
|
450
|
+
return new Point(this.x + x, this.y + y);
|
|
520
451
|
};
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
452
|
+
return Point;
|
|
453
|
+
}());
|
|
454
|
+
|
|
455
|
+
var Bounds = /** @class */ (function (_super) {
|
|
456
|
+
__extends(Bounds, _super);
|
|
457
|
+
function Bounds(top, left, width, height) {
|
|
458
|
+
var _this = _super.call(this, width, height) || this;
|
|
459
|
+
_this.top = top;
|
|
460
|
+
_this.left = left;
|
|
461
|
+
_this.width = width;
|
|
462
|
+
_this.height = height;
|
|
463
|
+
return _this;
|
|
464
|
+
}
|
|
465
|
+
Bounds.prototype.relativePositionOf = function (point) {
|
|
466
|
+
if (point instanceof MouseEvent) {
|
|
467
|
+
return new Point(point.clientX - this.left, point.clientY - this.top);
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
return new Point(point.x - this.left, point.y - this.top);
|
|
524
471
|
}
|
|
525
472
|
};
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
473
|
+
return Bounds;
|
|
474
|
+
}(Dimension));
|
|
475
|
+
(function (Bounds) {
|
|
476
|
+
function ofElement(element) {
|
|
477
|
+
var rect = element.getBoundingClientRect();
|
|
478
|
+
return new Bounds(rect.top, rect.left, rect.width, rect.height);
|
|
479
|
+
}
|
|
480
|
+
Bounds.ofElement = ofElement;
|
|
481
|
+
})(Bounds || (Bounds = {}));
|
|
482
|
+
|
|
483
|
+
var ResizeAwareComponent = /** @class */ (function (_super) {
|
|
484
|
+
__extends(ResizeAwareComponent, _super);
|
|
485
|
+
function ResizeAwareComponent(elementRef, ngZone) {
|
|
486
|
+
var _this = _super.call(this) || this;
|
|
487
|
+
_this.elementRef = elementRef;
|
|
488
|
+
_this.ngZone = ngZone;
|
|
489
|
+
_this._boundsModel = new MutableValueModel(new Bounds(0, 0, 0, 0));
|
|
490
|
+
return _this;
|
|
491
|
+
}
|
|
492
|
+
ResizeAwareComponent.prototype.ngAfterViewInit = function () {
|
|
493
|
+
var _this = this;
|
|
494
|
+
this.updateBounds();
|
|
495
|
+
var element = this.elementRef.nativeElement;
|
|
496
|
+
var ro = new ResizeObserver(function (entries, observer) {
|
|
497
|
+
_this.ngZone.run(function () { return _this.updateBounds(); });
|
|
498
|
+
});
|
|
499
|
+
ro.observe(element);
|
|
500
|
+
this.onDispose(function () { return ro.disconnect(); });
|
|
530
501
|
};
|
|
531
|
-
Object.defineProperty(
|
|
502
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
|
|
532
503
|
get: function () {
|
|
533
|
-
return this.
|
|
504
|
+
return this._boundsModel.readonly;
|
|
534
505
|
},
|
|
535
506
|
enumerable: true,
|
|
536
507
|
configurable: true
|
|
537
508
|
});
|
|
538
|
-
|
|
539
|
-
return !this.errorList.query().isEmpty();
|
|
540
|
-
};
|
|
541
|
-
Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
|
|
509
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
|
|
542
510
|
get: function () {
|
|
543
|
-
return this.
|
|
511
|
+
return this.elementRef.nativeElement;
|
|
544
512
|
},
|
|
545
513
|
enumerable: true,
|
|
546
514
|
configurable: true
|
|
547
515
|
});
|
|
548
|
-
|
|
516
|
+
// TODO: Make this handle body scroll
|
|
517
|
+
ResizeAwareComponent.prototype.relativePositionOf = function (point) {
|
|
518
|
+
return this.bounds.relativePositionOf(point);
|
|
519
|
+
};
|
|
520
|
+
Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
|
|
549
521
|
get: function () {
|
|
550
|
-
return this.
|
|
522
|
+
return this._boundsModel.value;
|
|
551
523
|
},
|
|
552
524
|
enumerable: true,
|
|
553
525
|
configurable: true
|
|
554
526
|
});
|
|
527
|
+
ResizeAwareComponent.prototype.updateBounds = function () {
|
|
528
|
+
this._boundsModel.value = Bounds.ofElement(this.nativeElement);
|
|
529
|
+
};
|
|
530
|
+
ResizeAwareComponent.ctorParameters = function () { return [
|
|
531
|
+
{ type: ElementRef },
|
|
532
|
+
{ type: NgZone }
|
|
533
|
+
]; };
|
|
534
|
+
ResizeAwareComponent = __decorate([
|
|
535
|
+
Directive(),
|
|
536
|
+
__metadata("design:paramtypes", [ElementRef, NgZone])
|
|
537
|
+
], ResizeAwareComponent);
|
|
538
|
+
return ResizeAwareComponent;
|
|
539
|
+
}(DisposableComponent));
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* @example
|
|
543
|
+
* // CSS Vars
|
|
544
|
+
* aup-card-container {
|
|
545
|
+
* --card-gap: var(--card-gap, 16px);
|
|
546
|
+
* --card-width: var(--card-width, 300px);
|
|
547
|
+
* --card-height: var(--card-height, auto);
|
|
548
|
+
* --card-min-height: var(--card-min-height, auto);
|
|
549
|
+
* --card-background: var(--card-background, #fcfcfb);
|
|
550
|
+
* }
|
|
551
|
+
*
|
|
552
|
+
* // Content Templates:
|
|
553
|
+
* #addCardTemplate
|
|
554
|
+
* <ng-template #addCardTemplate>
|
|
555
|
+
* This is a new card template, it will the the size of the other cards.
|
|
556
|
+
* </nav-template>
|
|
557
|
+
*
|
|
558
|
+
*/
|
|
559
|
+
var CardContainerComponent = /** @class */ (function (_super) {
|
|
560
|
+
__extends(CardContainerComponent, _super);
|
|
561
|
+
function CardContainerComponent() {
|
|
562
|
+
return _super.call(this) || this;
|
|
563
|
+
}
|
|
564
|
+
CardContainerComponent.prototype.ngOnInit = function () {
|
|
565
|
+
};
|
|
555
566
|
__decorate([
|
|
556
567
|
Input(),
|
|
557
|
-
|
|
558
|
-
], AbstractInputComponent.prototype, "label", void 0);
|
|
559
|
-
__decorate([
|
|
560
|
-
Input(),
|
|
561
|
-
__metadata("design:type", String)
|
|
562
|
-
], AbstractInputComponent.prototype, "floatLabel", void 0);
|
|
563
|
-
__decorate([
|
|
564
|
-
Input(),
|
|
565
|
-
__metadata("design:type", String)
|
|
566
|
-
], AbstractInputComponent.prototype, "hint", void 0);
|
|
567
|
-
__decorate([
|
|
568
|
-
Input(),
|
|
569
|
-
__metadata("design:type", String)
|
|
570
|
-
], AbstractInputComponent.prototype, "placeholder", void 0);
|
|
571
|
-
__decorate([
|
|
572
|
-
Input('command.focus'),
|
|
573
|
-
__metadata("design:type", Command)
|
|
574
|
-
], AbstractInputComponent.prototype, "focusCommand", void 0);
|
|
575
|
-
__decorate([
|
|
576
|
-
Input('command.blur'),
|
|
577
|
-
__metadata("design:type", Command)
|
|
578
|
-
], AbstractInputComponent.prototype, "blurCommand", void 0);
|
|
579
|
-
__decorate([
|
|
580
|
-
Input('command.enter'),
|
|
581
|
-
__metadata("design:type", Command)
|
|
582
|
-
], AbstractInputComponent.prototype, "enterCommand", void 0);
|
|
583
|
-
__decorate([
|
|
584
|
-
Input('command.escape'),
|
|
585
|
-
__metadata("design:type", Command)
|
|
586
|
-
], AbstractInputComponent.prototype, "escapeCommand", void 0);
|
|
587
|
-
__decorate([
|
|
588
|
-
Input('command.click'),
|
|
568
|
+
TrackExternal(),
|
|
589
569
|
__metadata("design:type", Command)
|
|
590
|
-
],
|
|
570
|
+
], CardContainerComponent.prototype, "addCardCommand", void 0);
|
|
591
571
|
__decorate([
|
|
592
|
-
|
|
593
|
-
__metadata("design:type",
|
|
594
|
-
],
|
|
595
|
-
__decorate([
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
__metadata("design:type", Object)
|
|
602
|
-
], AbstractInputComponent.prototype, "enterKey", void 0);
|
|
603
|
-
__decorate([
|
|
604
|
-
Output(),
|
|
605
|
-
__metadata("design:type", Object)
|
|
606
|
-
], AbstractInputComponent.prototype, "escapeKey", void 0);
|
|
607
|
-
__decorate([
|
|
608
|
-
HostListener('click'),
|
|
609
|
-
__metadata("design:type", Function),
|
|
610
|
-
__metadata("design:paramtypes", []),
|
|
611
|
-
__metadata("design:returntype", void 0)
|
|
612
|
-
], AbstractInputComponent.prototype, "notifyClick", null);
|
|
613
|
-
__decorate([
|
|
614
|
-
HostListener('focusin'),
|
|
615
|
-
__metadata("design:type", Function),
|
|
616
|
-
__metadata("design:paramtypes", []),
|
|
617
|
-
__metadata("design:returntype", void 0)
|
|
618
|
-
], AbstractInputComponent.prototype, "notifyFocusIn", null);
|
|
619
|
-
__decorate([
|
|
620
|
-
HostListener('focusout'),
|
|
621
|
-
__metadata("design:type", Function),
|
|
622
|
-
__metadata("design:paramtypes", []),
|
|
623
|
-
__metadata("design:returntype", void 0)
|
|
624
|
-
], AbstractInputComponent.prototype, "notifyFocusOut", null);
|
|
625
|
-
AbstractInputComponent = __decorate([
|
|
626
|
-
Component({ template: '' }),
|
|
572
|
+
ContentChild("addCardTemplate"),
|
|
573
|
+
__metadata("design:type", TemplateRef)
|
|
574
|
+
], CardContainerComponent.prototype, "addCardTemplate", void 0);
|
|
575
|
+
CardContainerComponent = __decorate([
|
|
576
|
+
Component({
|
|
577
|
+
selector: 'aup-card-container',
|
|
578
|
+
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",
|
|
579
|
+
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}"]
|
|
580
|
+
}),
|
|
627
581
|
__metadata("design:paramtypes", [])
|
|
628
|
-
],
|
|
629
|
-
return
|
|
582
|
+
], CardContainerComponent);
|
|
583
|
+
return CardContainerComponent;
|
|
630
584
|
}(DisposableComponent));
|
|
631
585
|
|
|
632
|
-
var
|
|
633
|
-
__extends(
|
|
634
|
-
function
|
|
586
|
+
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
587
|
+
__extends(FocusContainerComponent, _super);
|
|
588
|
+
function FocusContainerComponent(focusManager) {
|
|
635
589
|
var _this = _super.call(this) || this;
|
|
636
|
-
_this.
|
|
637
|
-
_this.
|
|
590
|
+
_this.focusManager = focusManager;
|
|
591
|
+
_this.restoreFocusCommand = Command.create(function () {
|
|
592
|
+
_this.restoreFocus();
|
|
593
|
+
});
|
|
594
|
+
_this.tabIndex = -1;
|
|
638
595
|
return _this;
|
|
639
596
|
}
|
|
640
|
-
|
|
597
|
+
FocusContainerComponent.prototype.ngOnInit = function () {
|
|
598
|
+
};
|
|
599
|
+
// @Trace()
|
|
600
|
+
FocusContainerComponent.prototype.restoreFocus = function () {
|
|
601
|
+
this.focusManager.restoreFocus();
|
|
641
602
|
};
|
|
603
|
+
FocusContainerComponent.ctorParameters = function () { return [
|
|
604
|
+
{ type: FocusManager, decorators: [{ type: Self }] }
|
|
605
|
+
]; };
|
|
642
606
|
__decorate([
|
|
643
|
-
|
|
607
|
+
HostBinding('attr.tabindex'),
|
|
644
608
|
__metadata("design:type", Object)
|
|
645
|
-
],
|
|
646
|
-
__decorate([
|
|
647
|
-
Input(),
|
|
648
|
-
__metadata("design:type", String)
|
|
649
|
-
], CheckboxInputComponent.prototype, "color", void 0);
|
|
650
|
-
__decorate([
|
|
651
|
-
Input(),
|
|
652
|
-
__metadata("design:type", String)
|
|
653
|
-
], CheckboxInputComponent.prototype, "labelPosition", void 0);
|
|
654
|
-
CheckboxInputComponent = __decorate([
|
|
609
|
+
], FocusContainerComponent.prototype, "tabIndex", void 0);
|
|
610
|
+
FocusContainerComponent = __decorate([
|
|
655
611
|
Component({
|
|
656
|
-
selector: 'aup-
|
|
657
|
-
template: "
|
|
658
|
-
|
|
612
|
+
selector: 'aup-focus-container',
|
|
613
|
+
template: "<ng-content></ng-content>\n",
|
|
614
|
+
providers: [
|
|
615
|
+
{ provide: FocusManager }
|
|
616
|
+
],
|
|
617
|
+
styles: [":host{display:block}"]
|
|
659
618
|
}),
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
619
|
+
__param(0, Self()),
|
|
620
|
+
__metadata("design:paramtypes", [FocusManager])
|
|
621
|
+
], FocusContainerComponent);
|
|
622
|
+
return FocusContainerComponent;
|
|
623
|
+
}(DisposableComponent));
|
|
664
624
|
|
|
665
|
-
var
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
_this
|
|
670
|
-
_this.
|
|
625
|
+
var ACTIVITY_DATA = new InjectionToken('InteractionActivityData');
|
|
626
|
+
var Activity = /** @class */ (function (_super) {
|
|
627
|
+
__extends(Activity, _super);
|
|
628
|
+
function Activity() {
|
|
629
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
630
|
+
_this._busyModel = new DelegatingValueModel().withDefault(false);
|
|
631
|
+
_this.class = 'aup-activity';
|
|
671
632
|
return _this;
|
|
672
633
|
}
|
|
673
|
-
|
|
634
|
+
Activity.prototype.initialise = function (nestedInteractionContext, activityContext) {
|
|
635
|
+
assert$1.isNil(this._activityContext);
|
|
636
|
+
this._activityContext = activityContext;
|
|
637
|
+
this._interactionContext = nestedInteractionContext;
|
|
638
|
+
};
|
|
639
|
+
Object.defineProperty(Activity.prototype, "interactionContext", {
|
|
640
|
+
get: function () {
|
|
641
|
+
assert$1.isTruthy(this.isInitialised());
|
|
642
|
+
return this._interactionContext;
|
|
643
|
+
},
|
|
644
|
+
enumerable: true,
|
|
645
|
+
configurable: true
|
|
646
|
+
});
|
|
647
|
+
Activity.prototype.done = function (result) {
|
|
648
|
+
return this._activityContext.onDone(result);
|
|
649
|
+
};
|
|
650
|
+
Activity.prototype.cancel = function (error) {
|
|
651
|
+
this._activityContext.onCancel(error);
|
|
652
|
+
};
|
|
653
|
+
// @Trace()
|
|
654
|
+
Activity.prototype.onActivityReady = function () {
|
|
655
|
+
};
|
|
656
|
+
Object.defineProperty(Activity.prototype, "busy", {
|
|
657
|
+
get: function () {
|
|
658
|
+
return this._busyModel.readonly;
|
|
659
|
+
},
|
|
660
|
+
enumerable: true,
|
|
661
|
+
configurable: true
|
|
662
|
+
});
|
|
663
|
+
Activity.prototype.busyWhile = function (busyModel) {
|
|
664
|
+
this._busyModel.setDelegate(busyModel);
|
|
665
|
+
};
|
|
666
|
+
Activity.prototype.isBusy = function () {
|
|
667
|
+
return this._busyModel.value;
|
|
668
|
+
};
|
|
669
|
+
Activity.prototype.isInitialised = function () {
|
|
670
|
+
return !!this._activityContext;
|
|
674
671
|
};
|
|
675
672
|
__decorate([
|
|
676
|
-
|
|
677
|
-
__metadata("design:type", Object)
|
|
678
|
-
], NumberInputComponent.prototype, "valueModel", void 0);
|
|
679
|
-
__decorate([
|
|
680
|
-
Input(),
|
|
681
|
-
__metadata("design:type", Object)
|
|
682
|
-
], NumberInputComponent.prototype, "min", void 0);
|
|
683
|
-
__decorate([
|
|
684
|
-
Input(),
|
|
673
|
+
HostBinding('class'),
|
|
685
674
|
__metadata("design:type", Object)
|
|
686
|
-
],
|
|
687
|
-
|
|
675
|
+
], Activity.prototype, "class", void 0);
|
|
676
|
+
return Activity;
|
|
677
|
+
}(DisposableComponent));
|
|
678
|
+
|
|
679
|
+
var AlertDialogComponent = /** @class */ (function (_super) {
|
|
680
|
+
__extends(AlertDialogComponent, _super);
|
|
681
|
+
function AlertDialogComponent(alert) {
|
|
682
|
+
var _this = _super.call(this) || this;
|
|
683
|
+
_this.alert = alert;
|
|
684
|
+
return _this;
|
|
685
|
+
}
|
|
686
|
+
AlertDialogComponent.prototype.ngOnInit = function () {
|
|
687
|
+
};
|
|
688
|
+
AlertDialogComponent.ctorParameters = function () { return [
|
|
689
|
+
{ type: undefined, decorators: [{ type: Inject, args: [ACTIVITY_DATA,] }] }
|
|
690
|
+
]; };
|
|
691
|
+
AlertDialogComponent = __decorate([
|
|
688
692
|
Component({
|
|
689
|
-
selector: 'aup-
|
|
690
|
-
template: "<
|
|
691
|
-
styles: [":host{display:block}
|
|
693
|
+
selector: 'aup-alert-dialog',
|
|
694
|
+
template: "<h3 matDialogTitle *ngIf=\"alert.title\">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of alert.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-raised-button color=\"primary\" (click)=\"done()\" data-cy=\"close-button\">{{alert.ok()}}</button>\n</div>\n",
|
|
695
|
+
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
|
|
692
696
|
}),
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
+
__param(0, Inject(ACTIVITY_DATA)),
|
|
698
|
+
__metadata("design:paramtypes", [Object])
|
|
699
|
+
], AlertDialogComponent);
|
|
700
|
+
return AlertDialogComponent;
|
|
701
|
+
}(Activity));
|
|
697
702
|
|
|
698
|
-
var
|
|
699
|
-
__extends(
|
|
700
|
-
function
|
|
701
|
-
|
|
703
|
+
var ConfirmThenDialogComponent = /** @class */ (function (_super) {
|
|
704
|
+
__extends(ConfirmThenDialogComponent, _super);
|
|
705
|
+
function ConfirmThenDialogComponent(config) {
|
|
706
|
+
var _this = _super.call(this) || this;
|
|
707
|
+
_this.config = config;
|
|
708
|
+
assert.notNil(config);
|
|
709
|
+
return _this;
|
|
702
710
|
}
|
|
703
|
-
|
|
711
|
+
ConfirmThenDialogComponent.prototype.ngOnInit = function () {
|
|
704
712
|
};
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
713
|
+
Object.defineProperty(ConfirmThenDialogComponent.prototype, "confirm", {
|
|
714
|
+
get: function () {
|
|
715
|
+
return this.config.confirm;
|
|
716
|
+
},
|
|
717
|
+
enumerable: true,
|
|
718
|
+
configurable: true
|
|
719
|
+
});
|
|
720
|
+
ConfirmThenDialogComponent.prototype.isDestructive = function () {
|
|
721
|
+
return this.confirm.destructive && this.confirm.destructive();
|
|
722
|
+
};
|
|
723
|
+
ConfirmThenDialogComponent.prototype.onConfirm = function () {
|
|
724
|
+
var _this = this;
|
|
725
|
+
this.interactionContext.startActivity(this.config.activityType, this.config.data)
|
|
726
|
+
.then(function (result) { return _this.done(result); })
|
|
727
|
+
.catch(function (error) { return _this.cancel(error); });
|
|
728
|
+
};
|
|
729
|
+
ConfirmThenDialogComponent.ctorParameters = function () { return [
|
|
730
|
+
{ type: undefined, decorators: [{ type: Inject, args: [ACTIVITY_DATA,] }] }
|
|
731
|
+
]; };
|
|
732
|
+
ConfirmThenDialogComponent = __decorate([
|
|
710
733
|
Component({
|
|
711
|
-
selector: 'aup-
|
|
712
|
-
template: "<
|
|
713
|
-
styles: [":host{display:block}
|
|
734
|
+
selector: 'aup-confirmation-dialog',
|
|
735
|
+
template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)=\"cancel()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"onConfirm()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</div>\n\n",
|
|
736
|
+
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
|
|
714
737
|
}),
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
738
|
+
__param(0, Inject(ACTIVITY_DATA)),
|
|
739
|
+
__metadata("design:paramtypes", [Object])
|
|
740
|
+
], ConfirmThenDialogComponent);
|
|
741
|
+
return ConfirmThenDialogComponent;
|
|
742
|
+
}(Activity));
|
|
719
743
|
|
|
720
|
-
var
|
|
721
|
-
__extends(
|
|
722
|
-
function
|
|
744
|
+
var ConfirmationDialogComponent = /** @class */ (function (_super) {
|
|
745
|
+
__extends(ConfirmationDialogComponent, _super);
|
|
746
|
+
function ConfirmationDialogComponent(confirm) {
|
|
723
747
|
var _this = _super.call(this) || this;
|
|
724
|
-
_this.
|
|
748
|
+
_this.confirm = confirm;
|
|
749
|
+
assert.notNil(confirm);
|
|
725
750
|
return _this;
|
|
726
751
|
}
|
|
727
|
-
|
|
752
|
+
ConfirmationDialogComponent.prototype.ngOnInit = function () {
|
|
728
753
|
};
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
__metadata("design:type", Object)
|
|
732
|
-
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
733
|
-
__decorate([
|
|
734
|
-
Input(), TrackExternal(),
|
|
735
|
-
__metadata("design:type", ListModel)
|
|
736
|
-
], SelectInputComponent.prototype, "optionsModel", void 0);
|
|
737
|
-
__decorate([
|
|
738
|
-
Input(), StoreInListModel('optionsModel'),
|
|
739
|
-
__metadata("design:type", Array)
|
|
740
|
-
], SelectInputComponent.prototype, "options", void 0);
|
|
741
|
-
__decorate([
|
|
742
|
-
Input(),
|
|
743
|
-
__metadata("design:type", Object)
|
|
744
|
-
], SelectInputComponent.prototype, "optionLabel", void 0);
|
|
745
|
-
__decorate([
|
|
746
|
-
Input(),
|
|
747
|
-
__metadata("design:type", Boolean)
|
|
748
|
-
], SelectInputComponent.prototype, "allowNil", void 0);
|
|
749
|
-
__decorate([
|
|
750
|
-
ContentChild("optionTemplate"),
|
|
751
|
-
__metadata("design:type", TemplateRef)
|
|
752
|
-
], SelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
753
|
-
__decorate([
|
|
754
|
-
ContentChild("nilOptionTemplate"),
|
|
755
|
-
__metadata("design:type", TemplateRef)
|
|
756
|
-
], SelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
757
|
-
__decorate([
|
|
758
|
-
Input(),
|
|
759
|
-
__metadata("design:type", Function)
|
|
760
|
-
], SelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
761
|
-
SelectInputComponent = __decorate([
|
|
762
|
-
Component({
|
|
763
|
-
selector: 'aup-select-input',
|
|
764
|
-
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]=\"delegatingFormValueModel.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",
|
|
765
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
766
|
-
}),
|
|
767
|
-
__metadata("design:paramtypes", [])
|
|
768
|
-
], SelectInputComponent);
|
|
769
|
-
return SelectInputComponent;
|
|
770
|
-
}(AbstractInputComponent));
|
|
771
|
-
|
|
772
|
-
var StringInputComponent = /** @class */ (function (_super) {
|
|
773
|
-
__extends(StringInputComponent, _super);
|
|
774
|
-
function StringInputComponent() {
|
|
775
|
-
var _this = _super.call(this) || this;
|
|
776
|
-
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
777
|
-
_this.clearCommand = Command.create(function () {
|
|
778
|
-
_this.valueModel.value = null;
|
|
779
|
-
});
|
|
780
|
-
_this.clearCommand.disableWhile(chain.stringValue(_this.valueModel).isBlank());
|
|
781
|
-
return _this;
|
|
782
|
-
}
|
|
783
|
-
StringInputComponent.prototype.ngOnInit = function () {
|
|
754
|
+
ConfirmationDialogComponent.prototype.isDestructive = function () {
|
|
755
|
+
return this.confirm.destructive && this.confirm.destructive();
|
|
784
756
|
};
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
__decorate([
|
|
790
|
-
Input(), TrackExternal({ defaultValue: false }),
|
|
791
|
-
__metadata("design:type", ValueModel)
|
|
792
|
-
], StringInputComponent.prototype, "enableClearModel", void 0);
|
|
793
|
-
__decorate([
|
|
794
|
-
Input(), StoreInValueModel('enableClearModel'),
|
|
795
|
-
__metadata("design:type", Boolean)
|
|
796
|
-
], StringInputComponent.prototype, "enableClear", void 0);
|
|
797
|
-
StringInputComponent = __decorate([
|
|
757
|
+
ConfirmationDialogComponent.ctorParameters = function () { return [
|
|
758
|
+
{ type: undefined, decorators: [{ type: Inject, args: [ACTIVITY_DATA,] }] }
|
|
759
|
+
]; };
|
|
760
|
+
ConfirmationDialogComponent = __decorate([
|
|
798
761
|
Component({
|
|
799
|
-
selector: 'aup-
|
|
800
|
-
template: "<
|
|
801
|
-
styles: [":host{display:block}
|
|
762
|
+
selector: 'aup-confirmation-dialog',
|
|
763
|
+
template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)=\"cancel()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"done()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</div>\n\n",
|
|
764
|
+
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
|
|
802
765
|
}),
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
766
|
+
__param(0, Inject(ACTIVITY_DATA)),
|
|
767
|
+
__metadata("design:paramtypes", [Object])
|
|
768
|
+
], ConfirmationDialogComponent);
|
|
769
|
+
return ConfirmationDialogComponent;
|
|
770
|
+
}(Activity));
|
|
807
771
|
|
|
808
|
-
var
|
|
809
|
-
|
|
810
|
-
function TextInputComponent() {
|
|
811
|
-
var _this = _super.call(this) || this;
|
|
812
|
-
_this.rows = 2;
|
|
813
|
-
return _this;
|
|
814
|
-
// const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
772
|
+
var AbstractInteractionContext = /** @class */ (function () {
|
|
773
|
+
function AbstractInteractionContext() {
|
|
815
774
|
}
|
|
816
|
-
|
|
775
|
+
AbstractInteractionContext.prototype.startActivity = function (activityType, data) {
|
|
776
|
+
return this.createAndLaunchActivity(activityType, data, false);
|
|
817
777
|
};
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
Component({
|
|
846
|
-
selector: 'aup-noop',
|
|
847
|
-
template: "",
|
|
848
|
-
styles: [":host{display:block}"]
|
|
849
|
-
}),
|
|
850
|
-
__metadata("design:paramtypes", [])
|
|
851
|
-
], NoopComponent);
|
|
852
|
-
return NoopComponent;
|
|
778
|
+
AbstractInteractionContext.prototype.confirm = function (confirm) {
|
|
779
|
+
// Important: we have to implement confirmOrReject as the main entry point
|
|
780
|
+
// as the canDeactivation guards need to be able to cancel an interaction
|
|
781
|
+
// without caring about returning a value.
|
|
782
|
+
return this.confirmOrReject(confirm).then(function () { return true; }).catch(function () { return false; });
|
|
783
|
+
};
|
|
784
|
+
AbstractInteractionContext.prototype.alert = function (alert) {
|
|
785
|
+
// TODO: Test disableClose === false
|
|
786
|
+
return this.createAndLaunchActivity(AlertDialogComponent, alert, false);
|
|
787
|
+
};
|
|
788
|
+
AbstractInteractionContext.prototype.confirmOrReject = function (confirm) {
|
|
789
|
+
return this.createAndLaunchActivity(ConfirmationDialogComponent, confirm, true);
|
|
790
|
+
};
|
|
791
|
+
/**
|
|
792
|
+
* Presents the confirmation to the user and runs the activity only if the user confirms.
|
|
793
|
+
* @param confirm:Confirm the confirmation to display.
|
|
794
|
+
* @param activityType the activity to run if confirmed.
|
|
795
|
+
* @param data the activity data.
|
|
796
|
+
*/
|
|
797
|
+
AbstractInteractionContext.prototype.confirmThen = function (confirm, activityType, data) {
|
|
798
|
+
return this.createAndLaunchActivity(ConfirmThenDialogComponent, {
|
|
799
|
+
confirm: confirm,
|
|
800
|
+
activityType: activityType,
|
|
801
|
+
data: data
|
|
802
|
+
}, true);
|
|
803
|
+
};
|
|
804
|
+
return AbstractInteractionContext;
|
|
853
805
|
}());
|
|
854
806
|
|
|
855
|
-
var
|
|
856
|
-
function
|
|
807
|
+
var ActivityRef = /** @class */ (function () {
|
|
808
|
+
function ActivityRef(activityClass, activityData, onComplete) {
|
|
809
|
+
this.activityClass = activityClass;
|
|
810
|
+
this.activityData = activityData;
|
|
811
|
+
this.onComplete = onComplete;
|
|
812
|
+
this._complete = false;
|
|
813
|
+
this.deferredResult = Deferred.defer();
|
|
857
814
|
}
|
|
858
|
-
|
|
815
|
+
ActivityRef.prototype.isActivityRealised = function () {
|
|
816
|
+
return !!this._activity;
|
|
859
817
|
};
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
818
|
+
ActivityRef.prototype.isComplete = function () {
|
|
819
|
+
return this._complete;
|
|
820
|
+
};
|
|
821
|
+
Object.defineProperty(ActivityRef.prototype, "activity", {
|
|
822
|
+
get: function () {
|
|
823
|
+
assert.isTruthy(this.isActivityRealised());
|
|
824
|
+
return this._activity;
|
|
825
|
+
},
|
|
826
|
+
enumerable: true,
|
|
827
|
+
configurable: true
|
|
828
|
+
});
|
|
829
|
+
ActivityRef.prototype.notifyActivityCreated = function (activity, nestedInteractionContext) {
|
|
830
|
+
assert.isNil(this._activity);
|
|
831
|
+
this._activity = activity;
|
|
832
|
+
var self = this;
|
|
833
|
+
this._activity.initialise(nestedInteractionContext, {
|
|
834
|
+
onDone: function (result) {
|
|
835
|
+
self.finishActivity(function (deferred) { return deferred.resolve(result); });
|
|
836
|
+
},
|
|
837
|
+
onCancel: function (error) {
|
|
838
|
+
self.finishActivity(function (deferred) { return deferred.reject(error); });
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
};
|
|
842
|
+
ActivityRef.prototype.finishActivity = function (resolveOrReject) {
|
|
843
|
+
assert.isFalsey(this.isComplete());
|
|
844
|
+
resolveOrReject(this.deferredResult);
|
|
845
|
+
this._complete = true;
|
|
846
|
+
this.onComplete(this);
|
|
847
|
+
};
|
|
848
|
+
ActivityRef.prototype.cancel = function () {
|
|
849
|
+
this.activity.cancel();
|
|
850
|
+
};
|
|
851
|
+
Object.defineProperty(ActivityRef.prototype, "activityResult", {
|
|
852
|
+
get: function () {
|
|
853
|
+
return this.deferredResult.promise;
|
|
854
|
+
},
|
|
855
|
+
enumerable: true,
|
|
856
|
+
configurable: true
|
|
857
|
+
});
|
|
858
|
+
return ActivityRef;
|
|
869
859
|
}());
|
|
870
860
|
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
861
|
+
/**
|
|
862
|
+
* ActivityOutletComponent creates and displays an activity and delegates the interaction context functionality to an
|
|
863
|
+
* external service.
|
|
864
|
+
*/
|
|
865
|
+
var ActivityOutletComponent = /** @class */ (function () {
|
|
866
|
+
function ActivityOutletComponent(componentFactoryResolver, viewContainerRef, injector) {
|
|
867
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
868
|
+
this.viewContainerRef = viewContainerRef;
|
|
869
|
+
this.injector = injector;
|
|
874
870
|
}
|
|
875
|
-
Object.defineProperty(
|
|
871
|
+
Object.defineProperty(ActivityOutletComponent.prototype, "activityRef", {
|
|
876
872
|
get: function () {
|
|
877
|
-
return this.
|
|
873
|
+
return this._activityRef;
|
|
874
|
+
},
|
|
875
|
+
set: function (activityRef) {
|
|
876
|
+
if (this.activityRef && !this.activityRef.isComplete()) {
|
|
877
|
+
lang$1.illegalState("changing activity before previous one has completed");
|
|
878
|
+
}
|
|
879
|
+
this._activityRef = activityRef;
|
|
880
|
+
this.loadActivity(activityRef);
|
|
878
881
|
},
|
|
879
882
|
enumerable: true,
|
|
880
883
|
configurable: true
|
|
881
884
|
});
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
var SwitchCaseWhenDirective = /** @class */ (function (_super) {
|
|
885
|
-
__extends(SwitchCaseWhenDirective, _super);
|
|
886
|
-
function SwitchCaseWhenDirective(templateRef) {
|
|
887
|
-
var _this = _super.call(this, templateRef) || this;
|
|
888
|
-
_this.isDefault = false;
|
|
889
|
-
return _this;
|
|
890
|
-
}
|
|
891
|
-
SwitchCaseWhenDirective_1 = SwitchCaseWhenDirective;
|
|
892
|
-
SwitchCaseWhenDirective.prototype.matches = function (value) {
|
|
893
|
-
return this.aupSwitchCaseWhen === value;
|
|
885
|
+
;
|
|
886
|
+
ActivityOutletComponent.prototype.ngOnInit = function () {
|
|
894
887
|
};
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
888
|
+
ActivityOutletComponent.prototype.loadActivity = function (activityRef) {
|
|
889
|
+
var injector = Injector.create({
|
|
890
|
+
providers: [
|
|
891
|
+
{ provide: ACTIVITY_DATA, useValue: activityRef.activityData }
|
|
892
|
+
],
|
|
893
|
+
parent: this.injector
|
|
894
|
+
});
|
|
895
|
+
var componentFactory = this.componentFactoryResolver.resolveComponentFactory(activityRef.activityClass);
|
|
896
|
+
this.viewContainerRef.clear();
|
|
897
|
+
// console.log(`creating component -> ${activityRef.activityClass.name}`);
|
|
898
|
+
this.activityComponentRef = this.viewContainerRef.createComponent(componentFactory, 0, injector);
|
|
899
|
+
this.activityRef.notifyActivityCreated(this.activityComponentRef.instance, this.nestedInteractionContext);
|
|
900
|
+
};
|
|
901
|
+
Object.defineProperty(ActivityOutletComponent.prototype, "component", {
|
|
902
|
+
get: function () {
|
|
903
|
+
return this.activityComponentRef.instance;
|
|
904
|
+
},
|
|
905
|
+
enumerable: true,
|
|
906
|
+
configurable: true
|
|
907
|
+
});
|
|
908
|
+
ActivityOutletComponent.ctorParameters = function () { return [
|
|
909
|
+
{ type: ComponentFactoryResolver },
|
|
910
|
+
{ type: ViewContainerRef },
|
|
911
|
+
{ type: Injector }
|
|
898
912
|
]; };
|
|
899
913
|
__decorate([
|
|
900
914
|
Input(),
|
|
901
915
|
__metadata("design:type", Object)
|
|
902
|
-
],
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
__extends(SwitchCaseDefaultDirective, _super);
|
|
914
|
-
function SwitchCaseDefaultDirective(templateRef) {
|
|
915
|
-
var _this = _super.call(this, templateRef) || this;
|
|
916
|
-
_this.isDefault = true;
|
|
917
|
-
return _this;
|
|
918
|
-
}
|
|
919
|
-
SwitchCaseDefaultDirective_1 = SwitchCaseDefaultDirective;
|
|
920
|
-
SwitchCaseDefaultDirective.prototype.matches = function (value) {
|
|
921
|
-
return false;
|
|
922
|
-
};
|
|
923
|
-
var SwitchCaseDefaultDirective_1;
|
|
924
|
-
SwitchCaseDefaultDirective.ctorParameters = function () { return [
|
|
925
|
-
{ type: TemplateRef }
|
|
926
|
-
]; };
|
|
927
|
-
SwitchCaseDefaultDirective = SwitchCaseDefaultDirective_1 = __decorate([
|
|
928
|
-
Directive({
|
|
929
|
-
selector: '[aupSwitchCaseDefault]',
|
|
930
|
-
providers: [{ provide: SwitchCaseOption, useExisting: SwitchCaseDefaultDirective_1 }]
|
|
916
|
+
], ActivityOutletComponent.prototype, "nestedInteractionContext", void 0);
|
|
917
|
+
__decorate([
|
|
918
|
+
Input(),
|
|
919
|
+
__metadata("design:type", ActivityRef),
|
|
920
|
+
__metadata("design:paramtypes", [ActivityRef])
|
|
921
|
+
], ActivityOutletComponent.prototype, "activityRef", null);
|
|
922
|
+
ActivityOutletComponent = __decorate([
|
|
923
|
+
Component({
|
|
924
|
+
selector: 'aup-activity-outlet',
|
|
925
|
+
template: '',
|
|
926
|
+
styles: [":host{display:block}"]
|
|
931
927
|
}),
|
|
932
|
-
__metadata("design:paramtypes", [
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
928
|
+
__metadata("design:paramtypes", [ComponentFactoryResolver,
|
|
929
|
+
ViewContainerRef,
|
|
930
|
+
Injector])
|
|
931
|
+
], ActivityOutletComponent);
|
|
932
|
+
return ActivityOutletComponent;
|
|
933
|
+
}());
|
|
934
|
+
|
|
935
|
+
var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
936
|
+
__extends(ActivityContainerComponent, _super);
|
|
937
|
+
function ActivityContainerComponent() {
|
|
939
938
|
var _this = _super.call(this) || this;
|
|
940
|
-
_this.
|
|
941
|
-
_this.
|
|
939
|
+
_this.dynamicHeight = false;
|
|
940
|
+
_this.activityTabs = [];
|
|
941
|
+
_this.garbage = new GarbageCollector();
|
|
942
942
|
return _this;
|
|
943
943
|
}
|
|
944
|
-
|
|
944
|
+
ActivityContainerComponent.prototype.ngOnInit = function () {
|
|
945
945
|
};
|
|
946
|
-
|
|
946
|
+
ActivityContainerComponent.prototype.ngAfterViewInit = function () {
|
|
947
947
|
var _this = this;
|
|
948
|
-
var
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
this.cdr.detectChanges();
|
|
948
|
+
var _a = Dsl.disposeWith(this), chain = _a.chain, observe = _a.observe;
|
|
949
|
+
// using the component directly rather than (animationDone)=.. allows us
|
|
950
|
+
// to keep our callback private.
|
|
951
|
+
observe.valuesFrom(this.tabs.animationDone).subscribe(function () { return _this.onAnimationFinished(); });
|
|
953
952
|
};
|
|
954
|
-
|
|
953
|
+
ActivityContainerComponent.prototype.initialise = function (identifier, api) {
|
|
954
|
+
assert.isFalsey(this.isInitialised());
|
|
955
|
+
assert.notNil(identifier);
|
|
956
|
+
assert.notNil(api);
|
|
957
|
+
this._identifier = identifier;
|
|
958
|
+
this.interactionServiceApi = api;
|
|
959
|
+
};
|
|
960
|
+
Object.defineProperty(ActivityContainerComponent.prototype, "identifier", {
|
|
961
|
+
get: function () {
|
|
962
|
+
return this._identifier;
|
|
963
|
+
},
|
|
964
|
+
enumerable: true,
|
|
965
|
+
configurable: true
|
|
966
|
+
});
|
|
967
|
+
ActivityContainerComponent.prototype.isInitialised = function () {
|
|
968
|
+
return !!this.identifier;
|
|
969
|
+
};
|
|
970
|
+
/**
|
|
971
|
+
* Returns true if an activity is currently running.
|
|
972
|
+
*/
|
|
973
|
+
ActivityContainerComponent.prototype.isActive = function () {
|
|
974
|
+
return this.getActiveActivityCount() > 0;
|
|
975
|
+
};
|
|
976
|
+
ActivityContainerComponent.prototype.registerDisposable = function (disposable) {
|
|
977
|
+
return this.garbage.registerDisposable(disposable);
|
|
978
|
+
};
|
|
979
|
+
ActivityContainerComponent.prototype.dispose = function () {
|
|
980
|
+
// TODO: think about auto cancelling any outstanding activity on dispose.
|
|
981
|
+
// See NavigationState.Navigating for a use-case.
|
|
982
|
+
assert.isFalsey(this.isActive());
|
|
983
|
+
this.garbage.dispose();
|
|
984
|
+
};
|
|
985
|
+
ActivityContainerComponent.prototype.getActiveActivityRef = function () {
|
|
986
|
+
if (!this.isActive()) {
|
|
987
|
+
lang$1.illegalState('no activity in progress');
|
|
988
|
+
}
|
|
989
|
+
return ___default.findLast(this.activityTabs, function (tab) { return !tab.isComplete(); });
|
|
990
|
+
};
|
|
991
|
+
/**
|
|
992
|
+
* Cancels the current activity and returns true the context is no longer active, false if
|
|
993
|
+
* there is still another activity running.
|
|
994
|
+
*/
|
|
995
|
+
// @Trace()
|
|
996
|
+
ActivityContainerComponent.prototype.cancelActiveActivity = function () {
|
|
997
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
998
|
+
var activity;
|
|
999
|
+
return __generator(this, function (_a) {
|
|
1000
|
+
activity = this.getActiveActivityRef();
|
|
1001
|
+
activity.cancel();
|
|
1002
|
+
if (this.isCleaningUp()) {
|
|
1003
|
+
return [2 /*return*/, this.waitForInteractionContextCleanupToFinish()];
|
|
1004
|
+
}
|
|
1005
|
+
else {
|
|
1006
|
+
return [2 /*return*/, !this.isActive()];
|
|
1007
|
+
}
|
|
1008
|
+
return [2 /*return*/];
|
|
1009
|
+
});
|
|
1010
|
+
});
|
|
1011
|
+
};
|
|
1012
|
+
// TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.
|
|
1013
|
+
// @Trace()
|
|
1014
|
+
ActivityContainerComponent.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
955
1015
|
var _this = this;
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1016
|
+
assert.isTruthy(this.isInitialised()); // make sure we've been initialised
|
|
1017
|
+
var activityRef = new ActivityRef(activityType, data, function () {
|
|
1018
|
+
var activeActivityCount = _this.getActiveActivityCount() > 0;
|
|
1019
|
+
if (activeActivityCount) {
|
|
1020
|
+
_this.triggerTabSynchronisation();
|
|
1021
|
+
}
|
|
1022
|
+
else {
|
|
1023
|
+
_this.finishAndStartCleanup();
|
|
960
1024
|
}
|
|
961
1025
|
});
|
|
962
|
-
|
|
963
|
-
|
|
1026
|
+
this.launchActivity(activityRef);
|
|
1027
|
+
// if this is the first activity let the interaction service know.
|
|
1028
|
+
if (this.activityTabs.length === 1) {
|
|
1029
|
+
// console.log('Now active!!!');
|
|
1030
|
+
this.interactionServiceApi.notifyActive(this);
|
|
964
1031
|
}
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
1032
|
+
return activityRef.activityResult;
|
|
1033
|
+
};
|
|
1034
|
+
ActivityContainerComponent.prototype.getActiveActivityCount = function () {
|
|
1035
|
+
return this.activityTabs.filter(function (ref) { return !ref.isComplete(); }).length;
|
|
1036
|
+
};
|
|
1037
|
+
/**
|
|
1038
|
+
* Checks if this interaction context has finished an is in the process of waiting
|
|
1039
|
+
* for all the infrastructure (including route updates) to be completed.
|
|
1040
|
+
*/
|
|
1041
|
+
ActivityContainerComponent.prototype.isCleaningUp = function () {
|
|
1042
|
+
return !!this._deferredCleanUp;
|
|
1043
|
+
};
|
|
1044
|
+
ActivityContainerComponent.prototype.waitForInteractionContextCleanupToFinish = function () {
|
|
1045
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1046
|
+
return __generator(this, function (_a) {
|
|
1047
|
+
return [2 /*return*/, this._deferredCleanUp ?
|
|
1048
|
+
this._deferredCleanUp :
|
|
1049
|
+
true];
|
|
1050
|
+
});
|
|
1051
|
+
});
|
|
1052
|
+
};
|
|
1053
|
+
// @Trace()
|
|
1054
|
+
ActivityContainerComponent.prototype.finishAndStartCleanup = function () {
|
|
1055
|
+
var _this = this;
|
|
1056
|
+
if (!this._deferredCleanUp) {
|
|
1057
|
+
// Important:
|
|
1058
|
+
// Clear our tabs so the next activity triggers a tab change.
|
|
1059
|
+
// Without this our animation done wasn't called when a single
|
|
1060
|
+
// new activity followed a single tab activity (since we're tracking
|
|
1061
|
+
// by activity index)
|
|
1062
|
+
this.activityTabs = [];
|
|
1063
|
+
var promise = this.interactionServiceApi.notifyFinished(this);
|
|
1064
|
+
this._deferredCleanUp = promise
|
|
1065
|
+
.finally(function () {
|
|
1066
|
+
_this._deferredCleanUp = null;
|
|
968
1067
|
});
|
|
969
|
-
if (matchingIndicies.length > 1) {
|
|
970
|
-
console.warn("found " + matchingIndicies.length + " default case values, displaying the first.");
|
|
971
|
-
}
|
|
972
1068
|
}
|
|
973
|
-
|
|
974
|
-
|
|
1069
|
+
};
|
|
1070
|
+
// @Trace()
|
|
1071
|
+
ActivityContainerComponent.prototype.launchActivity = function (activityRef) {
|
|
1072
|
+
var cleanedTabs = this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
1073
|
+
this.activityTabs = cleanedTabs.concat(activityRef);
|
|
1074
|
+
this.synchroniseSelectedTabIndex();
|
|
1075
|
+
};
|
|
1076
|
+
ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
|
|
1077
|
+
return index;
|
|
1078
|
+
};
|
|
1079
|
+
;
|
|
1080
|
+
ActivityContainerComponent.prototype.onAnimationFinished = function () {
|
|
1081
|
+
if (this.onAnimationFinishedJob) {
|
|
1082
|
+
this.onAnimationFinishedJob();
|
|
1083
|
+
this.onAnimationFinishedJob = undefined;
|
|
975
1084
|
}
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1085
|
+
};
|
|
1086
|
+
/**
|
|
1087
|
+
* Synchronises the selected tab index.
|
|
1088
|
+
*/
|
|
1089
|
+
ActivityContainerComponent.prototype.synchroniseSelectedTabIndex = function () {
|
|
1090
|
+
var _this = this;
|
|
1091
|
+
var previousIndex = this.tabs.selectedIndex;
|
|
1092
|
+
var newIndex = this.getActiveActivityCount() - 1;
|
|
1093
|
+
if (previousIndex !== newIndex) {
|
|
1094
|
+
this.tabs.selectedIndex = newIndex;
|
|
1095
|
+
this.onAnimationFinishedJob = function () {
|
|
1096
|
+
_this.getSelectedOutlet().component.onActivityReady();
|
|
1097
|
+
_this.activityTabs = _this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
1098
|
+
};
|
|
979
1099
|
}
|
|
980
1100
|
};
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
]; };
|
|
984
|
-
__decorate([
|
|
985
|
-
Input(), TrackExternal(),
|
|
986
|
-
__metadata("design:type", ValueModel)
|
|
987
|
-
], SwitchCaseComponent.prototype, "switchModel", void 0);
|
|
988
|
-
__decorate([
|
|
989
|
-
Input(), StoreInValueModel('switchModel'),
|
|
990
|
-
__metadata("design:type", Object)
|
|
991
|
-
], SwitchCaseComponent.prototype, "switch", void 0);
|
|
992
|
-
__decorate([
|
|
993
|
-
ContentChildren(SwitchCaseOption),
|
|
994
|
-
__metadata("design:type", QueryList)
|
|
995
|
-
], SwitchCaseComponent.prototype, "switchCaseOptions", void 0);
|
|
996
|
-
SwitchCaseComponent = __decorate([
|
|
997
|
-
Component({
|
|
998
|
-
selector: 'aup-switch-case',
|
|
999
|
-
template: "<mat-tab-group class=\"content-wrapper\" no-tab-header full-height-tabs [selectedIndex]=\"selectedIndex\">\n <mat-tab *ngFor=\"let option of switchCaseOptions\">\n <ng-template [ngTemplateOutlet]=\"option.templateRef\"></ng-template>\n </mat-tab>\n</mat-tab-group>\n\n\n",
|
|
1000
|
-
styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
|
|
1001
|
-
}),
|
|
1002
|
-
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
1003
|
-
], SwitchCaseComponent);
|
|
1004
|
-
return SwitchCaseComponent;
|
|
1005
|
-
}(DisposableComponent));
|
|
1006
|
-
|
|
1007
|
-
var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
1008
|
-
__extends(VerticalFocusContainerComponent, _super);
|
|
1009
|
-
function VerticalFocusContainerComponent(focusManager) {
|
|
1010
|
-
var _this = _super.call(this, focusManager) || this;
|
|
1011
|
-
_this.focusManager = focusManager;
|
|
1012
|
-
return _this;
|
|
1013
|
-
}
|
|
1014
|
-
VerticalFocusContainerComponent.prototype.arrowLeft = function (event) {
|
|
1015
|
-
if (this.leftArrowCommand.enabled.value) {
|
|
1016
|
-
event.preventDefault();
|
|
1017
|
-
event.stopPropagation();
|
|
1018
|
-
this.leftArrowCommand.execute();
|
|
1019
|
-
}
|
|
1101
|
+
ActivityContainerComponent.prototype.getSelectedOutlet = function () {
|
|
1102
|
+
return this.activityOutlets.toArray()[this.tabs.selectedIndex];
|
|
1020
1103
|
};
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
this.
|
|
1104
|
+
// @Trace()
|
|
1105
|
+
ActivityContainerComponent.prototype.triggerTabSynchronisation = function () {
|
|
1106
|
+
var _this = this;
|
|
1107
|
+
if (this.syncSelectedTabTimeout) {
|
|
1108
|
+
clearTimeout(this.syncSelectedTabTimeout);
|
|
1026
1109
|
}
|
|
1110
|
+
this.syncSelectedTabTimeout = setTimeout(function () {
|
|
1111
|
+
_this.syncSelectedTabTimeout = null;
|
|
1112
|
+
_this.synchroniseSelectedTabIndex();
|
|
1113
|
+
}, 75);
|
|
1027
1114
|
};
|
|
1028
|
-
VerticalFocusContainerComponent.prototype.arrowDown = function (event) {
|
|
1029
|
-
event.preventDefault();
|
|
1030
|
-
event.stopPropagation();
|
|
1031
|
-
this.focusManager.focusNext();
|
|
1032
|
-
};
|
|
1033
|
-
VerticalFocusContainerComponent.prototype.arrowUp = function (event) {
|
|
1034
|
-
event.preventDefault();
|
|
1035
|
-
event.stopPropagation();
|
|
1036
|
-
this.focusManager.focusPrevious();
|
|
1037
|
-
};
|
|
1038
|
-
VerticalFocusContainerComponent.prototype.ngOnInit = function () {
|
|
1039
|
-
};
|
|
1040
|
-
VerticalFocusContainerComponent.ctorParameters = function () { return [
|
|
1041
|
-
{ type: FocusManager, decorators: [{ type: Self }] }
|
|
1042
|
-
]; };
|
|
1043
|
-
__decorate([
|
|
1044
|
-
Input('command.arrowRight'),
|
|
1045
|
-
TrackExternal(),
|
|
1046
|
-
__metadata("design:type", Command)
|
|
1047
|
-
], VerticalFocusContainerComponent.prototype, "rightArrowCommand", void 0);
|
|
1048
|
-
__decorate([
|
|
1049
|
-
Input('command.arrowLeft'),
|
|
1050
|
-
TrackExternal(),
|
|
1051
|
-
__metadata("design:type", Command)
|
|
1052
|
-
], VerticalFocusContainerComponent.prototype, "leftArrowCommand", void 0);
|
|
1053
1115
|
__decorate([
|
|
1054
|
-
|
|
1055
|
-
__metadata("design:type",
|
|
1056
|
-
|
|
1057
|
-
__metadata("design:returntype", void 0)
|
|
1058
|
-
], VerticalFocusContainerComponent.prototype, "arrowLeft", null);
|
|
1116
|
+
Input(),
|
|
1117
|
+
__metadata("design:type", Object)
|
|
1118
|
+
], ActivityContainerComponent.prototype, "dynamicHeight", void 0);
|
|
1059
1119
|
__decorate([
|
|
1060
|
-
|
|
1061
|
-
__metadata("design:type",
|
|
1062
|
-
|
|
1063
|
-
__metadata("design:returntype", void 0)
|
|
1064
|
-
], VerticalFocusContainerComponent.prototype, "arrowRight", null);
|
|
1120
|
+
ViewChild('tabs', { static: true }),
|
|
1121
|
+
__metadata("design:type", MatTabGroup)
|
|
1122
|
+
], ActivityContainerComponent.prototype, "tabs", void 0);
|
|
1065
1123
|
__decorate([
|
|
1066
|
-
|
|
1067
|
-
__metadata("design:type",
|
|
1068
|
-
|
|
1069
|
-
__metadata("design:returntype", void 0)
|
|
1070
|
-
], VerticalFocusContainerComponent.prototype, "arrowDown", null);
|
|
1124
|
+
ViewChildren(ActivityOutletComponent),
|
|
1125
|
+
__metadata("design:type", QueryList)
|
|
1126
|
+
], ActivityContainerComponent.prototype, "activityOutlets", void 0);
|
|
1071
1127
|
__decorate([
|
|
1072
|
-
|
|
1128
|
+
Trace(),
|
|
1073
1129
|
__metadata("design:type", Function),
|
|
1074
|
-
__metadata("design:paramtypes", [
|
|
1130
|
+
__metadata("design:paramtypes", []),
|
|
1075
1131
|
__metadata("design:returntype", void 0)
|
|
1076
|
-
],
|
|
1077
|
-
|
|
1132
|
+
], ActivityContainerComponent.prototype, "dispose", null);
|
|
1133
|
+
ActivityContainerComponent = __decorate([
|
|
1078
1134
|
Component({
|
|
1079
|
-
selector: 'aup-
|
|
1080
|
-
template: "<
|
|
1081
|
-
|
|
1082
|
-
{ provide: FocusManager }
|
|
1083
|
-
],
|
|
1084
|
-
styles: [":host{display:block}"]
|
|
1135
|
+
selector: 'aup-activity-container',
|
|
1136
|
+
template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs; trackBy: activityIndex\" >\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
|
|
1137
|
+
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
1085
1138
|
}),
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
}(FocusContainerComponent));
|
|
1139
|
+
__metadata("design:paramtypes", [])
|
|
1140
|
+
], ActivityContainerComponent);
|
|
1141
|
+
return ActivityContainerComponent;
|
|
1142
|
+
}(AbstractInteractionContext));
|
|
1091
1143
|
|
|
1092
|
-
/**
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
*
|
|
1109
|
-
*/
|
|
1110
|
-
var CardContainerComponent = /** @class */ (function (_super) {
|
|
1111
|
-
__extends(CardContainerComponent, _super);
|
|
1112
|
-
function CardContainerComponent() {
|
|
1113
|
-
return _super.call(this) || this;
|
|
1144
|
+
var AddItemInteractionContextComponent = /** @class */ (function (_super) {
|
|
1145
|
+
__extends(AddItemInteractionContextComponent, _super);
|
|
1146
|
+
function AddItemInteractionContextComponent() {
|
|
1147
|
+
var _this = _super.call(this) || this;
|
|
1148
|
+
_this.tabindex = 0;
|
|
1149
|
+
_this.clickCommand = Command.create(function (context) {
|
|
1150
|
+
if (_this.activityClass) {
|
|
1151
|
+
_this.startActivity(_this.activityClass, _this.activityData).catch(function (e) {
|
|
1152
|
+
// don't care.
|
|
1153
|
+
});
|
|
1154
|
+
}
|
|
1155
|
+
else {
|
|
1156
|
+
_this.addCommand.withContext(context).execute();
|
|
1157
|
+
}
|
|
1158
|
+
});
|
|
1159
|
+
return _this;
|
|
1114
1160
|
}
|
|
1115
|
-
|
|
1161
|
+
Object.defineProperty(AddItemInteractionContextComponent.prototype, "active", {
|
|
1162
|
+
get: function () {
|
|
1163
|
+
return this.interactionContext ? this.interactionContext.isActive() : false;
|
|
1164
|
+
},
|
|
1165
|
+
enumerable: true,
|
|
1166
|
+
configurable: true
|
|
1167
|
+
});
|
|
1168
|
+
AddItemInteractionContextComponent.prototype.startActivity = function (activityType, data) {
|
|
1169
|
+
return this.interactionContext.startActivity(activityType, data);
|
|
1170
|
+
};
|
|
1171
|
+
AddItemInteractionContextComponent.prototype.ngOnInit = function () {
|
|
1116
1172
|
};
|
|
1173
|
+
__decorate([
|
|
1174
|
+
Input(),
|
|
1175
|
+
__metadata("design:type", String)
|
|
1176
|
+
], AddItemInteractionContextComponent.prototype, "label", void 0);
|
|
1177
|
+
__decorate([
|
|
1178
|
+
Input(),
|
|
1179
|
+
__metadata("design:type", Object)
|
|
1180
|
+
], AddItemInteractionContextComponent.prototype, "activityClass", void 0);
|
|
1181
|
+
__decorate([
|
|
1182
|
+
Input(),
|
|
1183
|
+
__metadata("design:type", Object)
|
|
1184
|
+
], AddItemInteractionContextComponent.prototype, "activityData", void 0);
|
|
1117
1185
|
__decorate([
|
|
1118
1186
|
Input(),
|
|
1119
1187
|
TrackExternal(),
|
|
1120
1188
|
__metadata("design:type", Command)
|
|
1121
|
-
],
|
|
1189
|
+
], AddItemInteractionContextComponent.prototype, "addCommand", void 0);
|
|
1122
1190
|
__decorate([
|
|
1123
|
-
|
|
1124
|
-
__metadata("design:type",
|
|
1125
|
-
],
|
|
1126
|
-
|
|
1191
|
+
ViewChild(InPlaceInteractionContextComponent),
|
|
1192
|
+
__metadata("design:type", InPlaceInteractionContextComponent)
|
|
1193
|
+
], AddItemInteractionContextComponent.prototype, "interactionContext", void 0);
|
|
1194
|
+
__decorate([
|
|
1195
|
+
HostBinding('class.interaction-active'),
|
|
1196
|
+
__metadata("design:type", Boolean),
|
|
1197
|
+
__metadata("design:paramtypes", [])
|
|
1198
|
+
], AddItemInteractionContextComponent.prototype, "active", null);
|
|
1199
|
+
__decorate([
|
|
1200
|
+
HostBinding('tabindex'),
|
|
1201
|
+
__metadata("design:type", Object)
|
|
1202
|
+
], AddItemInteractionContextComponent.prototype, "tabindex", void 0);
|
|
1203
|
+
AddItemInteractionContextComponent = __decorate([
|
|
1127
1204
|
Component({
|
|
1128
|
-
selector: 'aup-
|
|
1129
|
-
template: "<
|
|
1130
|
-
styles: [":
|
|
1205
|
+
selector: 'aup-add-item-interaction-context',
|
|
1206
|
+
template: "<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\">\n <a part=\"link\" class=\"link\" [pectinCommand]=\"clickCommand\"><mat-icon>add</mat-icon> {{label}}</a>\n</aup-in-place-interaction-context>\n",
|
|
1207
|
+
styles: [":host{--def-link-color:var(--link-color, currentColor);--def-link-backgound:var(--link-background, rgba(0, 0, 0, 0.05));--def-link-border-radius:var(--link-border-radius, 4px);--def-link-padding:var(--link-padding, calc(var(--aup-default-padding) / 2));display:flex;flex-direction:column;border-radius:var(--def-link-border-radius);box-sizing:border-box;outline:0}:host:hover{--link-background:rgba(0,0,0,0.1)}aup-in-place-interaction-context{border-radius:var(--def-link-border-radius)}a.link{display:flex;flex-direction:row;align-items:center;border-radius:var(--def-link-border-radius);color:var(--def-link-color);background:var(--def-link-backgound);padding:var(--def-link-padding);cursor:pointer;text-decoration:none}a.link mat-icon{margin-right:8px}"]
|
|
1131
1208
|
}),
|
|
1132
1209
|
__metadata("design:paramtypes", [])
|
|
1133
|
-
],
|
|
1134
|
-
return
|
|
1210
|
+
], AddItemInteractionContextComponent);
|
|
1211
|
+
return AddItemInteractionContextComponent;
|
|
1135
1212
|
}(DisposableComponent));
|
|
1136
1213
|
|
|
1137
|
-
var
|
|
1138
|
-
function
|
|
1214
|
+
var InteractionServiceRoutingAdapter = /** @class */ (function () {
|
|
1215
|
+
function InteractionServiceRoutingAdapter(activeInteractionContextIds, activeModalContext, createExclusiveInteractionContext) {
|
|
1216
|
+
this.activeInteractionContextIds = activeInteractionContextIds;
|
|
1217
|
+
this.activeModalContext = activeModalContext;
|
|
1218
|
+
this.createExclusiveInteractionContext = createExclusiveInteractionContext;
|
|
1139
1219
|
}
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
BrowserAnimationsModule,
|
|
1163
|
-
FormsModule,
|
|
1164
|
-
MatInputModule,
|
|
1165
|
-
MatFormFieldModule,
|
|
1166
|
-
MatSelectModule,
|
|
1167
|
-
MatTabsModule,
|
|
1168
|
-
DirectivesModule,
|
|
1169
|
-
MatIconModule,
|
|
1170
|
-
MatButtonModule,
|
|
1171
|
-
MatCheckboxModule
|
|
1172
|
-
],
|
|
1173
|
-
exports: [
|
|
1174
|
-
NumberInputComponent,
|
|
1175
|
-
StringInputComponent,
|
|
1176
|
-
TextInputComponent,
|
|
1177
|
-
PasswordInputComponent,
|
|
1178
|
-
CheckboxInputComponent,
|
|
1179
|
-
SelectInputComponent,
|
|
1180
|
-
ScrollContainerComponent,
|
|
1181
|
-
NoopComponent,
|
|
1182
|
-
SwitchCaseComponent,
|
|
1183
|
-
SwitchCaseWhenDirective,
|
|
1184
|
-
SwitchCaseDefaultDirective,
|
|
1185
|
-
FocusContainerComponent,
|
|
1186
|
-
VerticalFocusContainerComponent,
|
|
1187
|
-
FocusableComponent,
|
|
1188
|
-
CardContainerComponent
|
|
1189
|
-
],
|
|
1190
|
-
providers: [
|
|
1191
|
-
FocusBindingFactory
|
|
1192
|
-
]
|
|
1193
|
-
})
|
|
1194
|
-
], ComponentsModule);
|
|
1195
|
-
return ComponentsModule;
|
|
1220
|
+
InteractionServiceRoutingAdapter.prototype.isActive = function () {
|
|
1221
|
+
return this.getActiveInteractionContextIds().length > 0;
|
|
1222
|
+
};
|
|
1223
|
+
InteractionServiceRoutingAdapter.prototype.isModalActive = function () {
|
|
1224
|
+
return !!this.activeModalContext.value;
|
|
1225
|
+
};
|
|
1226
|
+
// @Trace()
|
|
1227
|
+
InteractionServiceRoutingAdapter.prototype.isComponentInteracting = function (component) {
|
|
1228
|
+
return component.interactionContext && component.interactionContext.isActive();
|
|
1229
|
+
};
|
|
1230
|
+
InteractionServiceRoutingAdapter.prototype.getActiveInteractionContextIds = function () {
|
|
1231
|
+
return this.activeInteractionContextIds.value;
|
|
1232
|
+
};
|
|
1233
|
+
// @Trace()
|
|
1234
|
+
InteractionServiceRoutingAdapter.prototype.cancelCurrentModalInteraction = function () {
|
|
1235
|
+
return this.activeModalContext.value.cancelActiveActivity();
|
|
1236
|
+
};
|
|
1237
|
+
// @Trace()
|
|
1238
|
+
InteractionServiceRoutingAdapter.prototype.cancelComponentInteraction = function (component) {
|
|
1239
|
+
return component.interactionContext.cancelActiveActivity();
|
|
1240
|
+
};
|
|
1241
|
+
return InteractionServiceRoutingAdapter;
|
|
1196
1242
|
}());
|
|
1197
1243
|
|
|
1198
|
-
var
|
|
1199
|
-
function
|
|
1200
|
-
this.width = width;
|
|
1201
|
-
this.height = height;
|
|
1244
|
+
var ModalInteractionContextFactory = /** @class */ (function () {
|
|
1245
|
+
function ModalInteractionContextFactory() {
|
|
1202
1246
|
}
|
|
1203
|
-
return
|
|
1247
|
+
return ModalInteractionContextFactory;
|
|
1204
1248
|
}());
|
|
1205
1249
|
|
|
1206
|
-
var
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
this.
|
|
1250
|
+
var inplaceMonitorCount = 0;
|
|
1251
|
+
var InteractionService = /** @class */ (function () {
|
|
1252
|
+
function InteractionService(modelInteractionContextFactory) {
|
|
1253
|
+
this.modelInteractionContextFactory = modelInteractionContextFactory;
|
|
1254
|
+
this.garbage = new GarbageCollector();
|
|
1255
|
+
// private readonly _activeModalContext = new MutableValueModel<InteractionContext>();
|
|
1256
|
+
// private readonly _activeInlineContext = new MutableValueModel<InteractionContext>();
|
|
1257
|
+
// private readonly _activeContext: ValueModelChain<InteractionContext>;
|
|
1258
|
+
this._navigationInProgress = new DelegatingValueModel().withDefault(false);
|
|
1259
|
+
var _a = Dsl.disposeWith(this.garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1260
|
+
this.exclusiveInteractionRegistry = new InteractionService_1.ContextRegistry();
|
|
1261
|
+
this.modalInteractionRegistry = new InteractionService_1.ContextRegistry();
|
|
1262
|
+
this.inPlaceInteractionRegistry = new InteractionService_1.ContextRegistry();
|
|
1263
|
+
this.modalInteractionRegistry.disableWhen(valueOf.any(this.exclusiveInteractionRegistry.active, this.modalInteractionRegistry.active).areTruthy());
|
|
1264
|
+
this.inPlaceInteractionRegistry.disableWhen(valueOf.any(this.exclusiveInteractionRegistry.active, this.modalInteractionRegistry.active, this.inPlaceInteractionRegistry.active).areTruthy());
|
|
1265
|
+
this.active = valueOf.any(this.inPlaceInteractionRegistry.active, this.modalInteractionRegistry.active).areTruthy();
|
|
1266
|
+
// TODO: chain.concat(listOrValueModels) would be nice.
|
|
1267
|
+
this.activeInteractionContextIds = chain(this.inPlaceInteractionRegistry.interactionContextIds)
|
|
1268
|
+
.concat(this.modalInteractionRegistry.interactionContextIds);
|
|
1269
|
+
this.activeModalContext = chain(this.modalInteractionRegistry.interactionContexts).first();
|
|
1270
|
+
this.inModalInteraction = chain(this.activeModalContext).isNotNil();
|
|
1210
1271
|
}
|
|
1211
|
-
|
|
1212
|
-
|
|
1272
|
+
InteractionService_1 = InteractionService;
|
|
1273
|
+
InteractionService.prototype.isActive = function () {
|
|
1274
|
+
return this.active.value;
|
|
1213
1275
|
};
|
|
1214
|
-
|
|
1215
|
-
|
|
1276
|
+
/**
|
|
1277
|
+
* @deprecated use #createModalInteractionContextDisposedWith instead.
|
|
1278
|
+
* @param disposable
|
|
1279
|
+
*/
|
|
1280
|
+
InteractionService.prototype.createModalInteractionContextFor = function (disposable) {
|
|
1281
|
+
return this.createModalInteractionContextDisposedWith(disposable);
|
|
1216
1282
|
};
|
|
1217
|
-
|
|
1283
|
+
/**
|
|
1284
|
+
* Creates a new model interaction context that will be disposed along with the component.
|
|
1285
|
+
* @param disposable
|
|
1286
|
+
*/
|
|
1287
|
+
InteractionService.prototype.createModalInteractionContextDisposedWith = function (disposable) {
|
|
1288
|
+
// TODO: look at making the registry the factory..
|
|
1289
|
+
return this.modelInteractionContextFactory.createInteractionContext('modal', new InteractionService_1.ApiAdapter(this.placeRouter, this.modalInteractionRegistry));
|
|
1290
|
+
};
|
|
1291
|
+
InteractionService.prototype.registerInplaceInteractionContext = function (interactionContext) {
|
|
1292
|
+
// TODO: look at making the registry the factory..
|
|
1293
|
+
// Todo: check for double registration.
|
|
1294
|
+
// Todo: allow multiple inplace interactions..
|
|
1295
|
+
interactionContext.initialise("ip" + ++inplaceMonitorCount, new InteractionService_1.ApiAdapter(this.placeRouter, this.inPlaceInteractionRegistry));
|
|
1296
|
+
};
|
|
1297
|
+
/**
|
|
1298
|
+
* Creates an interaction context that will prevent any other contexts from starting an
|
|
1299
|
+
* activity until it is disposed. This is intended for use by the router for passing
|
|
1300
|
+
* to PlaceComponent.canDeactivate(interactionContext). This ensures components don't
|
|
1301
|
+
* try and interact in a way that we can't track and synchronise with the browser back
|
|
1302
|
+
* button.
|
|
1303
|
+
*/
|
|
1304
|
+
InteractionService.prototype.registerPlaceRouter = function (router) {
|
|
1305
|
+
var _this = this;
|
|
1306
|
+
assert$1.isFalsey(this.placeRouter);
|
|
1307
|
+
this.placeRouter = router;
|
|
1308
|
+
this._navigationInProgress.setDelegate(this.placeRouter.navigationInProgress);
|
|
1309
|
+
var self = this;
|
|
1310
|
+
return new InteractionServiceRoutingAdapter(this.activeInteractionContextIds, this.activeModalContext, function () {
|
|
1311
|
+
return self.modelInteractionContextFactory.createInteractionContext('exclusive', new InteractionService_1.ApiAdapter(_this.placeRouter, _this.exclusiveInteractionRegistry));
|
|
1312
|
+
});
|
|
1313
|
+
};
|
|
1314
|
+
var InteractionService_1;
|
|
1315
|
+
InteractionService.ctorParameters = function () { return [
|
|
1316
|
+
{ type: ModalInteractionContextFactory }
|
|
1317
|
+
]; };
|
|
1318
|
+
InteractionService.ɵprov = ɵɵdefineInjectable({ factory: function InteractionService_Factory() { return new InteractionService(ɵɵinject(ModalInteractionContextFactory)); }, token: InteractionService, providedIn: "root" });
|
|
1319
|
+
InteractionService = InteractionService_1 = __decorate([
|
|
1320
|
+
Injectable({
|
|
1321
|
+
providedIn: 'root'
|
|
1322
|
+
}),
|
|
1323
|
+
__metadata("design:paramtypes", [ModalInteractionContextFactory])
|
|
1324
|
+
], InteractionService);
|
|
1325
|
+
return InteractionService;
|
|
1218
1326
|
}());
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1327
|
+
(function (InteractionService) {
|
|
1328
|
+
/**
|
|
1329
|
+
* Provides a mechanism for the service to keep track of what the API adapters are doing to
|
|
1330
|
+
* ensure the rules are followed, i.e. modal or in-place interaction aren't started while
|
|
1331
|
+
* an exclusive routing interaction is active.
|
|
1332
|
+
*/
|
|
1333
|
+
var ContextRegistry = /** @class */ (function (_super) {
|
|
1334
|
+
__extends(ContextRegistry, _super);
|
|
1335
|
+
function ContextRegistry() {
|
|
1336
|
+
var _this = _super.call(this) || this;
|
|
1337
|
+
_this._interactions = new MutableListModel();
|
|
1338
|
+
_this._disabledDelegate = new DelegatingValueModel().withDefault(false);
|
|
1339
|
+
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1340
|
+
_this.active = chain(_this._interactions).isNotEmpty();
|
|
1341
|
+
_this.interactionContextIds = chain(_this._interactions).pluck("identifier");
|
|
1342
|
+
return _this;
|
|
1233
1343
|
}
|
|
1234
|
-
|
|
1235
|
-
|
|
1344
|
+
Object.defineProperty(ContextRegistry.prototype, "interactionContexts", {
|
|
1345
|
+
get: function () {
|
|
1346
|
+
return this._interactions.readonly;
|
|
1347
|
+
},
|
|
1348
|
+
enumerable: true,
|
|
1349
|
+
configurable: true
|
|
1350
|
+
});
|
|
1351
|
+
ContextRegistry.prototype.start = function (context) {
|
|
1352
|
+
this._interactions.push(context);
|
|
1353
|
+
};
|
|
1354
|
+
ContextRegistry.prototype.finish = function (context) {
|
|
1355
|
+
this._interactions.remove(context);
|
|
1356
|
+
};
|
|
1357
|
+
ContextRegistry.prototype.isActive = function () {
|
|
1358
|
+
return this.active.value;
|
|
1359
|
+
};
|
|
1360
|
+
ContextRegistry.prototype.disableWhen = function (disabled) {
|
|
1361
|
+
this._disabledDelegate.setDelegate(disabled);
|
|
1362
|
+
};
|
|
1363
|
+
return ContextRegistry;
|
|
1364
|
+
}(GarbageCollector));
|
|
1365
|
+
InteractionService.ContextRegistry = ContextRegistry;
|
|
1366
|
+
var ApiAdapter = /** @class */ (function () {
|
|
1367
|
+
function ApiAdapter(placeRouter, contextRegistry) {
|
|
1368
|
+
this.placeRouter = placeRouter;
|
|
1369
|
+
this.contextRegistry = contextRegistry;
|
|
1236
1370
|
}
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
(
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
}
|
|
1371
|
+
// @Trace()
|
|
1372
|
+
ApiAdapter.prototype.notifyActive = function (context) {
|
|
1373
|
+
assert$1.isTruthy(context.identifier);
|
|
1374
|
+
this.contextRegistry.start(context);
|
|
1375
|
+
return this.isNavigationInProgress() ? Promise.resolve() : this.placeRouter.syncInteractionContextIdsWithRouter();
|
|
1376
|
+
};
|
|
1377
|
+
// @Trace()
|
|
1378
|
+
ApiAdapter.prototype.isNavigationInProgress = function () {
|
|
1379
|
+
return this.placeRouter.navigationInProgress.value;
|
|
1380
|
+
};
|
|
1381
|
+
// @Trace()
|
|
1382
|
+
ApiAdapter.prototype.notifyFinished = function (context) {
|
|
1383
|
+
this.contextRegistry.finish(context);
|
|
1384
|
+
// :: Important ::
|
|
1385
|
+
// This method will be traversed by both the place router (during can canDeactivate guards) and user land code
|
|
1386
|
+
// (both when routing is idle and while it is active in PlaceComponent.canDeactivate()).
|
|
1387
|
+
// The result of pushInteractionIdsToRoute will not start until after the current route finishes, and the
|
|
1388
|
+
// current route won't finish until after this promise returns... Deadlock.
|
|
1389
|
+
// So in order to keep this logic out of the activities we perform the check here and ensure that
|
|
1390
|
+
// any interactions with the context while routing is active returns immediately.
|
|
1391
|
+
return this.isNavigationInProgress() ? Promise.resolve() : this.placeRouter.syncInteractionContextIdsWithRouter();
|
|
1392
|
+
};
|
|
1393
|
+
return ApiAdapter;
|
|
1394
|
+
}());
|
|
1395
|
+
InteractionService.ApiAdapter = ApiAdapter;
|
|
1396
|
+
})(InteractionService || (InteractionService = {}));
|
|
1247
1397
|
|
|
1248
|
-
var
|
|
1249
|
-
__extends(
|
|
1250
|
-
function
|
|
1398
|
+
var InPlaceInteractionContextComponent = /** @class */ (function (_super) {
|
|
1399
|
+
__extends(InPlaceInteractionContextComponent, _super);
|
|
1400
|
+
function InPlaceInteractionContextComponent(interactionService, tabConfig) {
|
|
1251
1401
|
var _this = _super.call(this) || this;
|
|
1252
|
-
_this.
|
|
1253
|
-
_this.
|
|
1254
|
-
|
|
1402
|
+
_this.interactionService = interactionService;
|
|
1403
|
+
_this.tabConfig = tabConfig;
|
|
1404
|
+
/**
|
|
1405
|
+
* If true then the first startActivity call will slide the activity into view. If false
|
|
1406
|
+
* the activity will replace the existing content immediately.
|
|
1407
|
+
*/
|
|
1408
|
+
_this.animateFirstActivity = true;
|
|
1255
1409
|
return _this;
|
|
1256
1410
|
}
|
|
1257
|
-
|
|
1258
|
-
var _this = this;
|
|
1259
|
-
this.updateBounds();
|
|
1260
|
-
var element = this.elementRef.nativeElement;
|
|
1261
|
-
var ro = new ResizeObserver(function (entries, observer) {
|
|
1262
|
-
_this.ngZone.run(function () { return _this.updateBounds(); });
|
|
1263
|
-
});
|
|
1264
|
-
ro.observe(element);
|
|
1265
|
-
this.onDispose(function () { return ro.disconnect(); });
|
|
1266
|
-
};
|
|
1267
|
-
Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
|
|
1411
|
+
Object.defineProperty(InPlaceInteractionContextComponent.prototype, "animationDuration", {
|
|
1268
1412
|
get: function () {
|
|
1269
|
-
|
|
1413
|
+
var _a;
|
|
1414
|
+
return this.animateFirstActivity ? (((_a = this.tabConfig) === null || _a === void 0 ? void 0 : _a.animationDuration) || '500ms') : "0ms";
|
|
1270
1415
|
},
|
|
1271
1416
|
enumerable: true,
|
|
1272
1417
|
configurable: true
|
|
1273
1418
|
});
|
|
1274
|
-
|
|
1419
|
+
InPlaceInteractionContextComponent.prototype.ngAfterViewInit = function () {
|
|
1420
|
+
this.interactionService.registerInplaceInteractionContext(this);
|
|
1421
|
+
};
|
|
1422
|
+
InPlaceInteractionContextComponent.prototype.initialise = function (id, api) {
|
|
1423
|
+
this.activityContainerComponent.initialise(id, api);
|
|
1424
|
+
};
|
|
1425
|
+
Object.defineProperty(InPlaceInteractionContextComponent.prototype, "identifier", {
|
|
1275
1426
|
get: function () {
|
|
1276
|
-
return this.
|
|
1427
|
+
return this.activityContainerComponent.identifier;
|
|
1277
1428
|
},
|
|
1278
1429
|
enumerable: true,
|
|
1279
1430
|
configurable: true
|
|
1280
1431
|
});
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
return this.bounds.relativePositionOf(point);
|
|
1432
|
+
InPlaceInteractionContextComponent.prototype.alert = function (alert) {
|
|
1433
|
+
return this.activityContainerComponent.alert(alert);
|
|
1284
1434
|
};
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
return this._boundsModel.value;
|
|
1288
|
-
},
|
|
1289
|
-
enumerable: true,
|
|
1290
|
-
configurable: true
|
|
1291
|
-
});
|
|
1292
|
-
ResizeAwareComponent.prototype.updateBounds = function () {
|
|
1293
|
-
this._boundsModel.value = Bounds.ofElement(this.nativeElement);
|
|
1435
|
+
InPlaceInteractionContextComponent.prototype.cancelActiveActivity = function () {
|
|
1436
|
+
return this.activityContainerComponent.cancelActiveActivity();
|
|
1294
1437
|
};
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1438
|
+
InPlaceInteractionContextComponent.prototype.confirm = function (confirm) {
|
|
1439
|
+
return this.activityContainerComponent.confirm(confirm);
|
|
1440
|
+
};
|
|
1441
|
+
InPlaceInteractionContextComponent.prototype.confirmOrReject = function (confirm) {
|
|
1442
|
+
return this.activityContainerComponent.confirmOrReject(confirm);
|
|
1443
|
+
};
|
|
1444
|
+
InPlaceInteractionContextComponent.prototype.confirmThen = function (confirm, activityType, data) {
|
|
1445
|
+
return this.activityContainerComponent.confirmThen(confirm, activityType);
|
|
1446
|
+
};
|
|
1447
|
+
InPlaceInteractionContextComponent.prototype.isActive = function () {
|
|
1448
|
+
return this.activityContainerComponent.isActive();
|
|
1449
|
+
};
|
|
1450
|
+
InPlaceInteractionContextComponent.prototype.startActivity = function (activityType, data) {
|
|
1451
|
+
return this.activityContainerComponent.startActivity(activityType, data);
|
|
1452
|
+
};
|
|
1453
|
+
InPlaceInteractionContextComponent.ctorParameters = function () { return [
|
|
1454
|
+
{ type: InteractionService },
|
|
1455
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_TABS_CONFIG,] }, { type: Optional }] }
|
|
1298
1456
|
]; };
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
__metadata("design:
|
|
1302
|
-
],
|
|
1303
|
-
|
|
1457
|
+
__decorate([
|
|
1458
|
+
ViewChild('activityContainer', { static: true }),
|
|
1459
|
+
__metadata("design:type", ActivityContainerComponent)
|
|
1460
|
+
], InPlaceInteractionContextComponent.prototype, "activityContainerComponent", void 0);
|
|
1461
|
+
__decorate([
|
|
1462
|
+
Input(),
|
|
1463
|
+
__metadata("design:type", Object)
|
|
1464
|
+
], InPlaceInteractionContextComponent.prototype, "animateFirstActivity", void 0);
|
|
1465
|
+
InPlaceInteractionContextComponent = __decorate([
|
|
1466
|
+
Component({
|
|
1467
|
+
selector: 'aup-in-place-interaction-context',
|
|
1468
|
+
template: "<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\" [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n",
|
|
1469
|
+
styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
|
|
1470
|
+
}),
|
|
1471
|
+
__param(1, Inject(MAT_TABS_CONFIG)), __param(1, Optional()),
|
|
1472
|
+
__metadata("design:paramtypes", [InteractionService, Object])
|
|
1473
|
+
], InPlaceInteractionContextComponent);
|
|
1474
|
+
return InPlaceInteractionContextComponent;
|
|
1304
1475
|
}(DisposableComponent));
|
|
1305
1476
|
|
|
1306
|
-
/**
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
_this.
|
|
1477
|
+
var PopupInteractionContextComponent = /** @class */ (function (_super) {
|
|
1478
|
+
__extends(PopupInteractionContextComponent, _super);
|
|
1479
|
+
function PopupInteractionContextComponent(_element, _overlay) {
|
|
1480
|
+
var _this = _super.call(this) || this;
|
|
1481
|
+
_this._element = _element;
|
|
1482
|
+
_this._overlay = _overlay;
|
|
1483
|
+
_this.outputPortal = new ComponentPortal(InPlaceInteractionContextComponent);
|
|
1484
|
+
_this.anchorX = 'start';
|
|
1485
|
+
_this.anchorY = 'bottom';
|
|
1315
1486
|
return _this;
|
|
1316
1487
|
}
|
|
1317
|
-
Object.defineProperty(
|
|
1488
|
+
Object.defineProperty(PopupInteractionContextComponent.prototype, "active", {
|
|
1318
1489
|
get: function () {
|
|
1319
|
-
return this.
|
|
1490
|
+
return this.isActive();
|
|
1320
1491
|
},
|
|
1321
1492
|
enumerable: true,
|
|
1322
1493
|
configurable: true
|
|
1323
1494
|
});
|
|
1324
|
-
|
|
1495
|
+
PopupInteractionContextComponent.prototype.startActivity = function (activityType, data) {
|
|
1496
|
+
var _this = this;
|
|
1497
|
+
var overlayRef = this._overlay.create({
|
|
1498
|
+
hasBackdrop: false,
|
|
1499
|
+
panelClass: 'aup-popup-interaction-panel',
|
|
1500
|
+
positionStrategy: this._overlay.position()
|
|
1501
|
+
.flexibleConnectedTo(this._element)
|
|
1502
|
+
.withPositions(this.computePositions())
|
|
1503
|
+
.withGrowAfterOpen(true)
|
|
1504
|
+
});
|
|
1505
|
+
var componentRef = overlayRef.attach(this.outputPortal);
|
|
1506
|
+
this.interactionContext = componentRef.instance;
|
|
1507
|
+
return new Promise(function (resolve, reject) {
|
|
1508
|
+
// HACK: afterViewInit won't have been called yet. Need to add when.valueOf(interactionContext.ready).becomesTruthy(...)
|
|
1509
|
+
setTimeout(function () {
|
|
1510
|
+
_this.interactionContext.startActivity(activityType, data)
|
|
1511
|
+
.then(resolve)
|
|
1512
|
+
.catch(reject)
|
|
1513
|
+
.finally(function () { return overlayRef.dispose(); });
|
|
1514
|
+
});
|
|
1515
|
+
});
|
|
1325
1516
|
};
|
|
1326
|
-
|
|
1327
|
-
|
|
1517
|
+
PopupInteractionContextComponent.prototype.computePositions = function () {
|
|
1518
|
+
var overlayX = this.anchorX === 'start' ? 'start' : 'end';
|
|
1519
|
+
var overlayY = this.anchorY === 'top' ? 'bottom' : 'top';
|
|
1520
|
+
return [
|
|
1521
|
+
{ originX: this.anchorX, originY: this.anchorY, overlayX: overlayX, overlayY: overlayY }
|
|
1522
|
+
// TODO: compute some meaningful alternatives.
|
|
1523
|
+
// { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
|
|
1524
|
+
// { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },
|
|
1525
|
+
// { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
|
|
1526
|
+
// { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }
|
|
1527
|
+
];
|
|
1328
1528
|
};
|
|
1529
|
+
PopupInteractionContextComponent.prototype.cancelActiveActivity = function () {
|
|
1530
|
+
return this.interactionContext.cancelActiveActivity();
|
|
1531
|
+
};
|
|
1532
|
+
PopupInteractionContextComponent.prototype.isActive = function () {
|
|
1533
|
+
return this.interactionContext && this.interactionContext.isActive();
|
|
1534
|
+
};
|
|
1535
|
+
PopupInteractionContextComponent.prototype.ngOnInit = function () {
|
|
1536
|
+
};
|
|
1537
|
+
PopupInteractionContextComponent.ctorParameters = function () { return [
|
|
1538
|
+
{ type: ElementRef },
|
|
1539
|
+
{ type: Overlay }
|
|
1540
|
+
]; };
|
|
1329
1541
|
__decorate([
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
__metadata("design:
|
|
1333
|
-
],
|
|
1542
|
+
HostBinding('class.interaction-active'),
|
|
1543
|
+
__metadata("design:type", Boolean),
|
|
1544
|
+
__metadata("design:paramtypes", [])
|
|
1545
|
+
], PopupInteractionContextComponent.prototype, "active", null);
|
|
1334
1546
|
__decorate([
|
|
1335
1547
|
Input(),
|
|
1336
1548
|
__metadata("design:type", String)
|
|
1337
|
-
],
|
|
1338
|
-
__decorate([
|
|
1339
|
-
Input(),
|
|
1340
|
-
TrackExternal(),
|
|
1341
|
-
__metadata("design:type", Command)
|
|
1342
|
-
], ActivityActionsComponent.prototype, "cancelCommand", void 0);
|
|
1549
|
+
], PopupInteractionContextComponent.prototype, "anchorX", void 0);
|
|
1343
1550
|
__decorate([
|
|
1344
1551
|
Input(),
|
|
1345
1552
|
__metadata("design:type", String)
|
|
1346
|
-
],
|
|
1347
|
-
__decorate([
|
|
1348
|
-
HostBinding('class.align-end'),
|
|
1349
|
-
__metadata("design:type", Boolean),
|
|
1350
|
-
__metadata("design:paramtypes", [])
|
|
1351
|
-
], ActivityActionsComponent.prototype, "alignEnd", null);
|
|
1352
|
-
ActivityActionsComponent = __decorate([
|
|
1553
|
+
], PopupInteractionContextComponent.prototype, "anchorY", void 0);
|
|
1554
|
+
PopupInteractionContextComponent = __decorate([
|
|
1353
1555
|
Component({
|
|
1354
|
-
selector: 'aup-
|
|
1355
|
-
template: "<
|
|
1356
|
-
styles: [":host{display:
|
|
1357
|
-
})
|
|
1358
|
-
|
|
1359
|
-
|
|
1556
|
+
selector: 'aup-popup-interaction-context',
|
|
1557
|
+
template: "<ng-content></ng-content>\n",
|
|
1558
|
+
styles: [":host{display:inline}:host.interaction-active{background:rgba(0,0,0,.05)}"]
|
|
1559
|
+
}),
|
|
1560
|
+
__metadata("design:paramtypes", [ElementRef, Overlay])
|
|
1561
|
+
], PopupInteractionContextComponent);
|
|
1562
|
+
return PopupInteractionContextComponent;
|
|
1360
1563
|
}(DisposableComponent));
|
|
1361
1564
|
|
|
1362
|
-
var
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
_this.
|
|
1565
|
+
var InteractionContextTriggerFor = /** @class */ (function (_super) {
|
|
1566
|
+
__extends(InteractionContextTriggerFor, _super);
|
|
1567
|
+
function InteractionContextTriggerFor() {
|
|
1568
|
+
var _this = _super.call(this) || this;
|
|
1569
|
+
_this.activityDone = new EventEmitter();
|
|
1570
|
+
_this.activityCancelled = new EventEmitter();
|
|
1368
1571
|
return _this;
|
|
1369
1572
|
}
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
assert$1.isTruthy(this.isInitialised());
|
|
1378
|
-
return this._interactionContext;
|
|
1379
|
-
},
|
|
1380
|
-
enumerable: true,
|
|
1381
|
-
configurable: true
|
|
1382
|
-
});
|
|
1383
|
-
Activity.prototype.done = function (result) {
|
|
1384
|
-
return this._activityContext.onDone(result);
|
|
1385
|
-
};
|
|
1386
|
-
Activity.prototype.cancel = function (error) {
|
|
1387
|
-
this._activityContext.onCancel(error);
|
|
1388
|
-
};
|
|
1389
|
-
// @Trace()
|
|
1390
|
-
Activity.prototype.onActivityReady = function () {
|
|
1391
|
-
};
|
|
1392
|
-
Object.defineProperty(Activity.prototype, "busy", {
|
|
1393
|
-
get: function () {
|
|
1394
|
-
return this._busyModel.readonly;
|
|
1395
|
-
},
|
|
1396
|
-
enumerable: true,
|
|
1397
|
-
configurable: true
|
|
1398
|
-
});
|
|
1399
|
-
Activity.prototype.busyWhile = function (busyModel) {
|
|
1400
|
-
this._busyModel.setDelegate(busyModel);
|
|
1573
|
+
InteractionContextTriggerFor.prototype.onEnter = function (event) {
|
|
1574
|
+
if (!this.aupInteractionContextTriggerFor.isActive()) {
|
|
1575
|
+
this.startActivity();
|
|
1576
|
+
}
|
|
1577
|
+
else {
|
|
1578
|
+
this.aupInteractionContextTriggerFor.cancelActiveActivity();
|
|
1579
|
+
}
|
|
1401
1580
|
};
|
|
1402
|
-
|
|
1403
|
-
|
|
1581
|
+
InteractionContextTriggerFor.prototype.onClick = function (event) {
|
|
1582
|
+
if (!this.aupInteractionContextTriggerFor.isActive()) {
|
|
1583
|
+
this.startActivity();
|
|
1584
|
+
}
|
|
1585
|
+
else {
|
|
1586
|
+
this.aupInteractionContextTriggerFor.cancelActiveActivity();
|
|
1587
|
+
}
|
|
1404
1588
|
};
|
|
1405
|
-
|
|
1406
|
-
|
|
1589
|
+
InteractionContextTriggerFor.prototype.startActivity = function () {
|
|
1590
|
+
var _this = this;
|
|
1591
|
+
assert.isTruthy(this.aupInteractionContextTriggerFor);
|
|
1592
|
+
assert.isFalsey(this.aupInteractionContextTriggerFor.isActive());
|
|
1593
|
+
assert.isTruthy(this.activityClass);
|
|
1594
|
+
this.aupInteractionContextTriggerFor.startActivity(this.activityClass, this.activityData)
|
|
1595
|
+
.then(function (result) {
|
|
1596
|
+
_this.activityDone.emit(result);
|
|
1597
|
+
})
|
|
1598
|
+
.catch(function (error) {
|
|
1599
|
+
_this.activityCancelled.emit(error);
|
|
1600
|
+
});
|
|
1407
1601
|
};
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
var AlertDialogComponent = /** @class */ (function (_super) {
|
|
1412
|
-
__extends(AlertDialogComponent, _super);
|
|
1413
|
-
function AlertDialogComponent(alert) {
|
|
1414
|
-
var _this = _super.call(this) || this;
|
|
1415
|
-
_this.alert = alert;
|
|
1416
|
-
return _this;
|
|
1417
|
-
}
|
|
1418
|
-
AlertDialogComponent.prototype.ngOnInit = function () {
|
|
1602
|
+
InteractionContextTriggerFor.prototype.prepareActivityData = function () {
|
|
1603
|
+
return ___default.isFunction(this.activityDataFactory()) ? this.activityDataFactory() : this.activityData;
|
|
1419
1604
|
};
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1605
|
+
__decorate([
|
|
1606
|
+
Input(),
|
|
1607
|
+
__metadata("design:type", Object)
|
|
1608
|
+
], InteractionContextTriggerFor.prototype, "aupInteractionContextTriggerFor", void 0);
|
|
1609
|
+
__decorate([
|
|
1610
|
+
Input(),
|
|
1611
|
+
__metadata("design:type", Object)
|
|
1612
|
+
], InteractionContextTriggerFor.prototype, "activityClass", void 0);
|
|
1613
|
+
__decorate([
|
|
1614
|
+
Input(),
|
|
1615
|
+
__metadata("design:type", Object)
|
|
1616
|
+
], InteractionContextTriggerFor.prototype, "activityData", void 0);
|
|
1617
|
+
__decorate([
|
|
1618
|
+
Input(),
|
|
1619
|
+
__metadata("design:type", Function)
|
|
1620
|
+
], InteractionContextTriggerFor.prototype, "activityDataFactory", void 0);
|
|
1621
|
+
__decorate([
|
|
1622
|
+
Output(),
|
|
1623
|
+
__metadata("design:type", Object)
|
|
1624
|
+
], InteractionContextTriggerFor.prototype, "activityDone", void 0);
|
|
1625
|
+
__decorate([
|
|
1626
|
+
Output(),
|
|
1627
|
+
__metadata("design:type", Object)
|
|
1628
|
+
], InteractionContextTriggerFor.prototype, "activityCancelled", void 0);
|
|
1629
|
+
__decorate([
|
|
1630
|
+
HostListener('keyup.enter'),
|
|
1631
|
+
__metadata("design:type", Function),
|
|
1632
|
+
__metadata("design:paramtypes", [KeyboardEvent]),
|
|
1633
|
+
__metadata("design:returntype", void 0)
|
|
1634
|
+
], InteractionContextTriggerFor.prototype, "onEnter", null);
|
|
1635
|
+
__decorate([
|
|
1636
|
+
HostListener('click'),
|
|
1637
|
+
__metadata("design:type", Function),
|
|
1638
|
+
__metadata("design:paramtypes", [MouseEvent]),
|
|
1639
|
+
__metadata("design:returntype", void 0)
|
|
1640
|
+
], InteractionContextTriggerFor.prototype, "onClick", null);
|
|
1641
|
+
InteractionContextTriggerFor = __decorate([
|
|
1642
|
+
Directive({
|
|
1643
|
+
selector: '[aupInteractionContextTriggerFor]'
|
|
1428
1644
|
}),
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
}(Activity));
|
|
1645
|
+
__metadata("design:paramtypes", [])
|
|
1646
|
+
], InteractionContextTriggerFor);
|
|
1647
|
+
return InteractionContextTriggerFor;
|
|
1648
|
+
}(GarbageCollector));
|
|
1434
1649
|
|
|
1435
|
-
var
|
|
1436
|
-
__extends(
|
|
1437
|
-
function
|
|
1650
|
+
var DialogInteractionContext = /** @class */ (function (_super) {
|
|
1651
|
+
__extends(DialogInteractionContext, _super);
|
|
1652
|
+
function DialogInteractionContext(identifier, api, dialogService, config) {
|
|
1438
1653
|
var _this = _super.call(this) || this;
|
|
1654
|
+
_this.identifier = identifier;
|
|
1655
|
+
_this.api = api;
|
|
1656
|
+
_this.dialogService = dialogService;
|
|
1439
1657
|
_this.config = config;
|
|
1440
|
-
|
|
1658
|
+
_this.garbage = new GarbageCollector();
|
|
1659
|
+
assert$1.notNil(dialogService);
|
|
1441
1660
|
return _this;
|
|
1442
1661
|
}
|
|
1443
|
-
|
|
1662
|
+
DialogInteractionContext.prototype.cancelActiveActivity = function () {
|
|
1663
|
+
return this.activityContainer.cancelActiveActivity();
|
|
1444
1664
|
};
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
configurable: true
|
|
1451
|
-
});
|
|
1452
|
-
ConfirmThenDialogComponent.prototype.isDestructive = function () {
|
|
1453
|
-
return this.confirm.destructive && this.confirm.destructive();
|
|
1665
|
+
DialogInteractionContext.prototype.dispose = function () {
|
|
1666
|
+
if (this.isActive()) {
|
|
1667
|
+
lang.illegalState('Dispose called while active.');
|
|
1668
|
+
}
|
|
1669
|
+
this.garbage.dispose();
|
|
1454
1670
|
};
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
this.interactionContext.startActivity(this.config.activityType, this.config.data)
|
|
1458
|
-
.then(function (result) { return _this.done(result); })
|
|
1459
|
-
.catch(function (error) { return _this.cancel(error); });
|
|
1671
|
+
DialogInteractionContext.prototype.registerDisposable = function (disposable) {
|
|
1672
|
+
return this.garbage.registerDisposable(disposable);
|
|
1460
1673
|
};
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1674
|
+
DialogInteractionContext.prototype.isActive = function () {
|
|
1675
|
+
return !!this.activityContainer && this.activityContainer.isActive();
|
|
1676
|
+
};
|
|
1677
|
+
DialogInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
1678
|
+
var _this = this;
|
|
1679
|
+
assert$1.isNil(this._currentActivityRef);
|
|
1680
|
+
var config = __assign(__assign({}, this.config), {
|
|
1681
|
+
disableClose: disableClose,
|
|
1682
|
+
panelClass: 'dialog-interaction-context'
|
|
1683
|
+
});
|
|
1684
|
+
var self = this;
|
|
1685
|
+
var matDialogRef = this.dialogService.open(ActivityContainerComponent, config);
|
|
1686
|
+
var activityContainer = this.activityContainer = matDialogRef.componentInstance;
|
|
1687
|
+
this.activityContainer.initialise(this.identifier, this.api);
|
|
1688
|
+
var activityResult = this.activityContainer.startActivity(activityType, data);
|
|
1689
|
+
activityResult.finally(function () { return matDialogRef.close(); });
|
|
1690
|
+
// we need to check if our onDone/onCancel methods above we called or if we were
|
|
1691
|
+
// closed by the user clicking the backdrop. If the later then we need to cancel our
|
|
1692
|
+
// activity.
|
|
1693
|
+
matDialogRef.afterClosed().subscribe(function (promiseAlreadyFinished) {
|
|
1694
|
+
if (activityContainer.isActive()) {
|
|
1695
|
+
activityContainer.cancelActiveActivity();
|
|
1696
|
+
}
|
|
1697
|
+
_this.activityContainer = null;
|
|
1698
|
+
});
|
|
1699
|
+
matDialogRef.updateSize();
|
|
1700
|
+
matDialogRef.afterOpened().subscribe(function (promiseAlreadyFinished) {
|
|
1701
|
+
matDialogRef.updateSize();
|
|
1702
|
+
});
|
|
1703
|
+
return activityResult;
|
|
1704
|
+
};
|
|
1705
|
+
return DialogInteractionContext;
|
|
1706
|
+
}(AbstractInteractionContext));
|
|
1475
1707
|
|
|
1476
|
-
var
|
|
1477
|
-
|
|
1478
|
-
|
|
1708
|
+
var DIALOG_INTERACTION_SERVICE_DEFAULTS = new InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
|
|
1709
|
+
var DialogInteractionContextFactory = /** @class */ (function (_super) {
|
|
1710
|
+
__extends(DialogInteractionContextFactory, _super);
|
|
1711
|
+
function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
|
|
1479
1712
|
var _this = _super.call(this) || this;
|
|
1480
|
-
_this.
|
|
1481
|
-
|
|
1713
|
+
_this.dialogService = dialogService;
|
|
1714
|
+
_this.dialogServiceDefaults = dialogServiceDefaults;
|
|
1715
|
+
_this.matDialogDefaultConfig = matDialogDefaultConfig;
|
|
1716
|
+
assert$1.notNil(dialogService);
|
|
1482
1717
|
return _this;
|
|
1483
1718
|
}
|
|
1484
|
-
|
|
1719
|
+
DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
|
|
1720
|
+
var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
|
|
1721
|
+
return new DialogInteractionContext(identifier, api, this.dialogService, config);
|
|
1485
1722
|
};
|
|
1486
|
-
|
|
1487
|
-
|
|
1723
|
+
DialogInteractionContextFactory.ctorParameters = function () { return [
|
|
1724
|
+
{ type: MatDialog },
|
|
1725
|
+
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [DIALOG_INTERACTION_SERVICE_DEFAULTS,] }] },
|
|
1726
|
+
{ type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DIALOG_DEFAULT_OPTIONS,] }] }
|
|
1727
|
+
]; };
|
|
1728
|
+
DialogInteractionContextFactory.ɵprov = ɵɵdefineInjectable({ factory: function DialogInteractionContextFactory_Factory() { return new DialogInteractionContextFactory(ɵɵinject(MatDialog), ɵɵinject(DIALOG_INTERACTION_SERVICE_DEFAULTS, 8), ɵɵinject(MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionContextFactory, providedIn: "root" });
|
|
1729
|
+
DialogInteractionContextFactory = __decorate([
|
|
1730
|
+
Injectable({
|
|
1731
|
+
providedIn: 'root'
|
|
1732
|
+
}),
|
|
1733
|
+
__param(1, Optional()), __param(1, Inject(DIALOG_INTERACTION_SERVICE_DEFAULTS)),
|
|
1734
|
+
__param(2, Optional()), __param(2, Inject(MAT_DIALOG_DEFAULT_OPTIONS)),
|
|
1735
|
+
__metadata("design:paramtypes", [MatDialog,
|
|
1736
|
+
MatDialogConfig,
|
|
1737
|
+
MatDialogConfig])
|
|
1738
|
+
], DialogInteractionContextFactory);
|
|
1739
|
+
return DialogInteractionContextFactory;
|
|
1740
|
+
}(ModalInteractionContextFactory));
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* @file Automatically generated by barrelsby.
|
|
1744
|
+
*/
|
|
1745
|
+
|
|
1746
|
+
var AbstractInputActivity = /** @class */ (function (_super) {
|
|
1747
|
+
__extends(AbstractInputActivity, _super);
|
|
1748
|
+
function AbstractInputActivity(data) {
|
|
1749
|
+
var _this = _super.call(this) || this;
|
|
1750
|
+
_this.data = data;
|
|
1751
|
+
_this.class = 'aup-input-activity';
|
|
1752
|
+
var form = new Form();
|
|
1753
|
+
_this.valueModel = form.valueModel(_this.data.initialValue);
|
|
1754
|
+
_this.valueModel.validateUsing(data.validators || []);
|
|
1755
|
+
_this.confirmCommand = Command.create(function () {
|
|
1756
|
+
if (_this.valueModel.validate()) {
|
|
1757
|
+
if (data.save) {
|
|
1758
|
+
return Promise.resolve(data.save(_this.valueModel, _this.interactionContext))
|
|
1759
|
+
.then(function () { return _this.done(); });
|
|
1760
|
+
}
|
|
1761
|
+
else {
|
|
1762
|
+
_this.done(_this.valueModel.value);
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
});
|
|
1766
|
+
_this.cancelCommand = Command.create(function () {
|
|
1767
|
+
_this.cancel();
|
|
1768
|
+
});
|
|
1769
|
+
return _this;
|
|
1770
|
+
}
|
|
1771
|
+
AbstractInputActivity.prototype.onActivityReady = function () {
|
|
1772
|
+
this.valueModel.focusContext.requestFocus();
|
|
1488
1773
|
};
|
|
1489
|
-
|
|
1774
|
+
AbstractInputActivity.ctorParameters = function () { return [
|
|
1490
1775
|
{ type: undefined, decorators: [{ type: Inject, args: [ACTIVITY_DATA,] }] }
|
|
1491
1776
|
]; };
|
|
1492
|
-
|
|
1777
|
+
__decorate([
|
|
1778
|
+
HostBinding('class'),
|
|
1779
|
+
__metadata("design:type", Object)
|
|
1780
|
+
], AbstractInputActivity.prototype, "class", void 0);
|
|
1781
|
+
AbstractInputActivity = __decorate([
|
|
1493
1782
|
Component({
|
|
1494
|
-
|
|
1495
|
-
template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)=\"cancel()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"done()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</div>\n\n",
|
|
1496
|
-
styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
|
|
1783
|
+
template: ""
|
|
1497
1784
|
}),
|
|
1498
1785
|
__param(0, Inject(ACTIVITY_DATA)),
|
|
1499
1786
|
__metadata("design:paramtypes", [Object])
|
|
1500
|
-
],
|
|
1501
|
-
return
|
|
1787
|
+
], AbstractInputActivity);
|
|
1788
|
+
return AbstractInputActivity;
|
|
1502
1789
|
}(Activity));
|
|
1503
1790
|
|
|
1504
|
-
var
|
|
1505
|
-
|
|
1791
|
+
var AbstractInputComponent = /** @class */ (function (_super) {
|
|
1792
|
+
__extends(AbstractInputComponent, _super);
|
|
1793
|
+
function AbstractInputComponent() {
|
|
1794
|
+
var _this = _super.call(this) || this;
|
|
1795
|
+
/**
|
|
1796
|
+
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1797
|
+
*
|
|
1798
|
+
* @Input() @TrackExternal({useExisting: "delegatingFormValueModel"})
|
|
1799
|
+
* valueModel: FormValueModel<string> | MutableValueModel<string>;
|
|
1800
|
+
*
|
|
1801
|
+
* This approach allows the input to accept plain or form models but all backed by a form
|
|
1802
|
+
* friendly delegate. We have to use an existing delegate for union types as pectin just
|
|
1803
|
+
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1804
|
+
*/
|
|
1805
|
+
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1806
|
+
_this.delegatingFormValueModel = _this.registerDisposable(new DelegatingFormValueModel());
|
|
1807
|
+
// TODO: fix this.
|
|
1808
|
+
// tslint:disable-next-line:no-output-native
|
|
1809
|
+
_this.focus = new EventEmitter();
|
|
1810
|
+
// tslint:disable-next-line:no-output-native
|
|
1811
|
+
_this.blur = new EventEmitter();
|
|
1812
|
+
// tslint:disable-next-line:no-output-native
|
|
1813
|
+
_this.enterKey = new EventEmitter();
|
|
1814
|
+
// tslint:disable-next-line:no-output-native
|
|
1815
|
+
_this.escapeKey = new EventEmitter();
|
|
1816
|
+
_this.baseClassName = 'aup-input-component';
|
|
1817
|
+
var self = _this;
|
|
1818
|
+
_this.errorStateMatcher = {
|
|
1819
|
+
isErrorState: function (control, form) {
|
|
1820
|
+
return self.hasErrors();
|
|
1821
|
+
}
|
|
1822
|
+
};
|
|
1823
|
+
return _this;
|
|
1506
1824
|
}
|
|
1507
|
-
|
|
1508
|
-
|
|
1825
|
+
AbstractInputComponent.prototype.notifyClick = function () {
|
|
1826
|
+
this.safelyInvoke(this.clickCommand);
|
|
1509
1827
|
};
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
// without caring about returning a value.
|
|
1514
|
-
return this.confirmOrReject(confirm).then(function () { return true; }).catch(function () { return false; });
|
|
1828
|
+
AbstractInputComponent.prototype.notifyFocusIn = function () {
|
|
1829
|
+
this.safelyInvoke(this.focusCommand);
|
|
1830
|
+
this.focus.emit();
|
|
1515
1831
|
};
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1832
|
+
AbstractInputComponent.prototype.notifyFocusOut = function () {
|
|
1833
|
+
this.safelyInvoke(this.blurCommand);
|
|
1834
|
+
this.blur.emit();
|
|
1519
1835
|
};
|
|
1520
|
-
|
|
1521
|
-
|
|
1836
|
+
AbstractInputComponent.prototype.notifyEnterKey = function () {
|
|
1837
|
+
this.safelyInvoke(this.enterCommand);
|
|
1838
|
+
this.enterKey.emit();
|
|
1522
1839
|
};
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
* @param activityType the activity to run if confirmed.
|
|
1527
|
-
* @param data the activity data.
|
|
1528
|
-
*/
|
|
1529
|
-
AbstractInteractionContext.prototype.confirmThen = function (confirm, activityType, data) {
|
|
1530
|
-
return this.createAndLaunchActivity(ConfirmThenDialogComponent, {
|
|
1531
|
-
confirm: confirm,
|
|
1532
|
-
activityType: activityType,
|
|
1533
|
-
data: data
|
|
1534
|
-
}, true);
|
|
1840
|
+
AbstractInputComponent.prototype.notifyEscapeKey = function () {
|
|
1841
|
+
this.safelyInvoke(this.escapeCommand);
|
|
1842
|
+
this.escapeKey.emit();
|
|
1535
1843
|
};
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
function ActivityRef(activityClass, activityData, onComplete) {
|
|
1541
|
-
this.activityClass = activityClass;
|
|
1542
|
-
this.activityData = activityData;
|
|
1543
|
-
this.onComplete = onComplete;
|
|
1544
|
-
this._complete = false;
|
|
1545
|
-
this.deferredResult = Deferred.defer();
|
|
1546
|
-
}
|
|
1547
|
-
ActivityRef.prototype.isActivityRealised = function () {
|
|
1548
|
-
return !!this._activity;
|
|
1844
|
+
AbstractInputComponent.prototype.safelyInvoke = function (command) {
|
|
1845
|
+
if (command && command.enabled.value) {
|
|
1846
|
+
command.execute();
|
|
1847
|
+
}
|
|
1549
1848
|
};
|
|
1550
|
-
|
|
1551
|
-
return this._complete;
|
|
1849
|
+
AbstractInputComponent.prototype.ngOnInit = function () {
|
|
1552
1850
|
};
|
|
1553
|
-
|
|
1851
|
+
AbstractInputComponent.prototype.isEnabled = function () {
|
|
1852
|
+
return this.enabled.value;
|
|
1853
|
+
};
|
|
1854
|
+
Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
|
|
1554
1855
|
get: function () {
|
|
1555
|
-
|
|
1556
|
-
return this._activity;
|
|
1856
|
+
return this.delegatingFormValueModel.enabled;
|
|
1557
1857
|
},
|
|
1558
1858
|
enumerable: true,
|
|
1559
1859
|
configurable: true
|
|
1560
1860
|
});
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
this._activity = activity;
|
|
1564
|
-
var self = this;
|
|
1565
|
-
this._activity.initialise(nestedInteractionContext, {
|
|
1566
|
-
onDone: function (result) {
|
|
1567
|
-
self.finishActivity(function (deferred) { return deferred.resolve(result); });
|
|
1568
|
-
},
|
|
1569
|
-
onCancel: function (error) {
|
|
1570
|
-
self.finishActivity(function (deferred) { return deferred.reject(error); });
|
|
1571
|
-
}
|
|
1572
|
-
});
|
|
1573
|
-
};
|
|
1574
|
-
ActivityRef.prototype.finishActivity = function (resolveOrReject) {
|
|
1575
|
-
assert.isFalsey(this.isComplete());
|
|
1576
|
-
resolveOrReject(this.deferredResult);
|
|
1577
|
-
this._complete = true;
|
|
1578
|
-
this.onComplete(this);
|
|
1579
|
-
};
|
|
1580
|
-
ActivityRef.prototype.cancel = function () {
|
|
1581
|
-
this.activity.cancel();
|
|
1861
|
+
AbstractInputComponent.prototype.hasErrors = function () {
|
|
1862
|
+
return !this.errorList.query().isEmpty();
|
|
1582
1863
|
};
|
|
1583
|
-
Object.defineProperty(
|
|
1864
|
+
Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
|
|
1584
1865
|
get: function () {
|
|
1585
|
-
return this.
|
|
1866
|
+
return this.delegatingFormValueModel.errorList;
|
|
1586
1867
|
},
|
|
1587
1868
|
enumerable: true,
|
|
1588
1869
|
configurable: true
|
|
1589
1870
|
});
|
|
1590
|
-
|
|
1591
|
-
}());
|
|
1592
|
-
|
|
1593
|
-
/**
|
|
1594
|
-
* ActivityOutletComponent creates and displays an activity and delegates the interaction context functionality to an
|
|
1595
|
-
* external service.
|
|
1596
|
-
*/
|
|
1597
|
-
var ActivityOutletComponent = /** @class */ (function () {
|
|
1598
|
-
function ActivityOutletComponent(componentFactoryResolver, viewContainerRef, injector) {
|
|
1599
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
1600
|
-
this.viewContainerRef = viewContainerRef;
|
|
1601
|
-
this.injector = injector;
|
|
1602
|
-
}
|
|
1603
|
-
Object.defineProperty(ActivityOutletComponent.prototype, "activityRef", {
|
|
1871
|
+
Object.defineProperty(AbstractInputComponent.prototype, "firstError", {
|
|
1604
1872
|
get: function () {
|
|
1605
|
-
return this.
|
|
1606
|
-
},
|
|
1607
|
-
set: function (activityRef) {
|
|
1608
|
-
if (this.activityRef && !this.activityRef.isComplete()) {
|
|
1609
|
-
lang$1.illegalState("changing activity before previous one has completed");
|
|
1610
|
-
}
|
|
1611
|
-
this._activityRef = activityRef;
|
|
1612
|
-
this.loadActivity(activityRef);
|
|
1873
|
+
return this.hasErrors() ? this.errorList.value[0] : null;
|
|
1613
1874
|
},
|
|
1614
1875
|
enumerable: true,
|
|
1615
1876
|
configurable: true
|
|
1616
1877
|
});
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1878
|
+
__decorate([
|
|
1879
|
+
Input(),
|
|
1880
|
+
__metadata("design:type", String)
|
|
1881
|
+
], AbstractInputComponent.prototype, "label", void 0);
|
|
1882
|
+
__decorate([
|
|
1883
|
+
Input(),
|
|
1884
|
+
__metadata("design:type", String)
|
|
1885
|
+
], AbstractInputComponent.prototype, "floatLabel", void 0);
|
|
1886
|
+
__decorate([
|
|
1887
|
+
Input(),
|
|
1888
|
+
__metadata("design:type", String)
|
|
1889
|
+
], AbstractInputComponent.prototype, "hint", void 0);
|
|
1890
|
+
__decorate([
|
|
1891
|
+
Input(),
|
|
1892
|
+
__metadata("design:type", String)
|
|
1893
|
+
], AbstractInputComponent.prototype, "placeholder", void 0);
|
|
1894
|
+
__decorate([
|
|
1895
|
+
Input('command.focus'),
|
|
1896
|
+
__metadata("design:type", Command)
|
|
1897
|
+
], AbstractInputComponent.prototype, "focusCommand", void 0);
|
|
1898
|
+
__decorate([
|
|
1899
|
+
Input('command.blur'),
|
|
1900
|
+
__metadata("design:type", Command)
|
|
1901
|
+
], AbstractInputComponent.prototype, "blurCommand", void 0);
|
|
1902
|
+
__decorate([
|
|
1903
|
+
Input('command.enter'),
|
|
1904
|
+
__metadata("design:type", Command)
|
|
1905
|
+
], AbstractInputComponent.prototype, "enterCommand", void 0);
|
|
1906
|
+
__decorate([
|
|
1907
|
+
Input('command.escape'),
|
|
1908
|
+
__metadata("design:type", Command)
|
|
1909
|
+
], AbstractInputComponent.prototype, "escapeCommand", void 0);
|
|
1910
|
+
__decorate([
|
|
1911
|
+
Input('command.click'),
|
|
1912
|
+
__metadata("design:type", Command)
|
|
1913
|
+
], AbstractInputComponent.prototype, "clickCommand", void 0);
|
|
1914
|
+
__decorate([
|
|
1915
|
+
Output(),
|
|
1916
|
+
__metadata("design:type", Object)
|
|
1917
|
+
], AbstractInputComponent.prototype, "focus", void 0);
|
|
1918
|
+
__decorate([
|
|
1919
|
+
Output(),
|
|
1920
|
+
__metadata("design:type", Object)
|
|
1921
|
+
], AbstractInputComponent.prototype, "blur", void 0);
|
|
1922
|
+
__decorate([
|
|
1923
|
+
Output(),
|
|
1924
|
+
__metadata("design:type", Object)
|
|
1925
|
+
], AbstractInputComponent.prototype, "enterKey", void 0);
|
|
1926
|
+
__decorate([
|
|
1927
|
+
Output(),
|
|
1928
|
+
__metadata("design:type", Object)
|
|
1929
|
+
], AbstractInputComponent.prototype, "escapeKey", void 0);
|
|
1930
|
+
__decorate([
|
|
1931
|
+
HostBinding('class'),
|
|
1932
|
+
__metadata("design:type", Object)
|
|
1933
|
+
], AbstractInputComponent.prototype, "baseClassName", void 0);
|
|
1934
|
+
__decorate([
|
|
1935
|
+
HostListener('click'),
|
|
1936
|
+
__metadata("design:type", Function),
|
|
1937
|
+
__metadata("design:paramtypes", []),
|
|
1938
|
+
__metadata("design:returntype", void 0)
|
|
1939
|
+
], AbstractInputComponent.prototype, "notifyClick", null);
|
|
1940
|
+
__decorate([
|
|
1941
|
+
HostListener('focusin'),
|
|
1942
|
+
__metadata("design:type", Function),
|
|
1943
|
+
__metadata("design:paramtypes", []),
|
|
1944
|
+
__metadata("design:returntype", void 0)
|
|
1945
|
+
], AbstractInputComponent.prototype, "notifyFocusIn", null);
|
|
1946
|
+
__decorate([
|
|
1947
|
+
HostListener('focusout'),
|
|
1948
|
+
__metadata("design:type", Function),
|
|
1949
|
+
__metadata("design:paramtypes", []),
|
|
1950
|
+
__metadata("design:returntype", void 0)
|
|
1951
|
+
], AbstractInputComponent.prototype, "notifyFocusOut", null);
|
|
1952
|
+
AbstractInputComponent = __decorate([
|
|
1953
|
+
Component({ template: '' }),
|
|
1954
|
+
__metadata("design:paramtypes", [])
|
|
1955
|
+
], AbstractInputComponent);
|
|
1956
|
+
return AbstractInputComponent;
|
|
1957
|
+
}(DisposableComponent));
|
|
1958
|
+
|
|
1959
|
+
var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
1960
|
+
__extends(CheckboxInputComponent, _super);
|
|
1961
|
+
function CheckboxInputComponent() {
|
|
1962
|
+
var _this = _super.call(this) || this;
|
|
1963
|
+
_this.color = 'accent';
|
|
1964
|
+
_this.labelPosition = 'after';
|
|
1965
|
+
return _this;
|
|
1966
|
+
}
|
|
1967
|
+
CheckboxInputComponent.prototype.ngOnInit = function () {
|
|
1968
|
+
};
|
|
1969
|
+
__decorate([
|
|
1970
|
+
Input(), TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
|
|
1971
|
+
__metadata("design:type", Object)
|
|
1972
|
+
], CheckboxInputComponent.prototype, "valueModel", void 0);
|
|
1973
|
+
__decorate([
|
|
1974
|
+
Input(),
|
|
1975
|
+
__metadata("design:type", String)
|
|
1976
|
+
], CheckboxInputComponent.prototype, "color", void 0);
|
|
1977
|
+
__decorate([
|
|
1978
|
+
Input(),
|
|
1979
|
+
__metadata("design:type", String)
|
|
1980
|
+
], CheckboxInputComponent.prototype, "labelPosition", void 0);
|
|
1981
|
+
CheckboxInputComponent = __decorate([
|
|
1982
|
+
Component({
|
|
1983
|
+
selector: 'aup-checkbox-input',
|
|
1984
|
+
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"valueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
|
|
1985
|
+
styles: [":host{display:inline-flex;flex-direction:column;margin-top:24px;margin-bottom:16px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]
|
|
1986
|
+
}),
|
|
1987
|
+
__metadata("design:paramtypes", [])
|
|
1988
|
+
], CheckboxInputComponent);
|
|
1989
|
+
return CheckboxInputComponent;
|
|
1990
|
+
}(AbstractInputComponent));
|
|
1991
|
+
|
|
1992
|
+
var NumberInputComponent = /** @class */ (function (_super) {
|
|
1993
|
+
__extends(NumberInputComponent, _super);
|
|
1994
|
+
function NumberInputComponent() {
|
|
1995
|
+
var _this = _super.call(this) || this;
|
|
1996
|
+
_this.min = Number.MIN_SAFE_INTEGER;
|
|
1997
|
+
_this.max = Number.MAX_SAFE_INTEGER;
|
|
1998
|
+
return _this;
|
|
1999
|
+
}
|
|
2000
|
+
NumberInputComponent.prototype.ngOnInit = function () {
|
|
2001
|
+
};
|
|
2002
|
+
__decorate([
|
|
2003
|
+
Input(), TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
|
|
2004
|
+
__metadata("design:type", Object)
|
|
2005
|
+
], NumberInputComponent.prototype, "valueModel", void 0);
|
|
2006
|
+
__decorate([
|
|
2007
|
+
Input(),
|
|
2008
|
+
__metadata("design:type", Object)
|
|
2009
|
+
], NumberInputComponent.prototype, "min", void 0);
|
|
2010
|
+
__decorate([
|
|
2011
|
+
Input(),
|
|
2012
|
+
__metadata("design:type", Object)
|
|
2013
|
+
], NumberInputComponent.prototype, "max", void 0);
|
|
2014
|
+
NumberInputComponent = __decorate([
|
|
2015
|
+
Component({
|
|
2016
|
+
selector: 'aup-number-input',
|
|
2017
|
+
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]=\"delegatingFormValueModel?.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",
|
|
2018
|
+
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}"]
|
|
2019
|
+
}),
|
|
2020
|
+
__metadata("design:paramtypes", [])
|
|
2021
|
+
], NumberInputComponent);
|
|
2022
|
+
return NumberInputComponent;
|
|
2023
|
+
}(AbstractInputComponent));
|
|
2024
|
+
|
|
2025
|
+
var PasswordInputComponent = /** @class */ (function (_super) {
|
|
2026
|
+
__extends(PasswordInputComponent, _super);
|
|
2027
|
+
function PasswordInputComponent() {
|
|
2028
|
+
return _super.call(this) || this;
|
|
2029
|
+
}
|
|
2030
|
+
PasswordInputComponent.prototype.ngOnInit = function () {
|
|
2031
|
+
};
|
|
2032
|
+
__decorate([
|
|
2033
|
+
Input(), TrackExternal({ delegateTo: "delegatingFormValueModel" }),
|
|
2034
|
+
__metadata("design:type", Object)
|
|
2035
|
+
], PasswordInputComponent.prototype, "valueModel", void 0);
|
|
2036
|
+
PasswordInputComponent = __decorate([
|
|
2037
|
+
Component({
|
|
2038
|
+
selector: 'aup-password-input',
|
|
2039
|
+
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]=\"delegatingFormValueModel.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",
|
|
2040
|
+
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}"]
|
|
2041
|
+
}),
|
|
2042
|
+
__metadata("design:paramtypes", [])
|
|
2043
|
+
], PasswordInputComponent);
|
|
2044
|
+
return PasswordInputComponent;
|
|
2045
|
+
}(AbstractInputComponent));
|
|
2046
|
+
|
|
2047
|
+
var SelectInputComponent = /** @class */ (function (_super) {
|
|
2048
|
+
__extends(SelectInputComponent, _super);
|
|
2049
|
+
function SelectInputComponent() {
|
|
2050
|
+
var _this = _super.call(this) || this;
|
|
2051
|
+
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
2052
|
+
return _this;
|
|
2053
|
+
}
|
|
2054
|
+
SelectInputComponent.prototype.ngOnInit = function () {
|
|
2055
|
+
};
|
|
2056
|
+
__decorate([
|
|
2057
|
+
Input(), TrackExternal({ delegateTo: "delegatingFormValueModel" }),
|
|
2058
|
+
__metadata("design:type", Object)
|
|
2059
|
+
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
2060
|
+
__decorate([
|
|
2061
|
+
Input(), TrackExternal(),
|
|
2062
|
+
__metadata("design:type", ListModel)
|
|
2063
|
+
], SelectInputComponent.prototype, "optionsModel", void 0);
|
|
2064
|
+
__decorate([
|
|
2065
|
+
Input(), StoreInListModel('optionsModel'),
|
|
2066
|
+
__metadata("design:type", Array)
|
|
2067
|
+
], SelectInputComponent.prototype, "options", void 0);
|
|
2068
|
+
__decorate([
|
|
2069
|
+
Input(),
|
|
2070
|
+
__metadata("design:type", Object)
|
|
2071
|
+
], SelectInputComponent.prototype, "optionLabel", void 0);
|
|
2072
|
+
__decorate([
|
|
2073
|
+
Input(),
|
|
2074
|
+
__metadata("design:type", Boolean)
|
|
2075
|
+
], SelectInputComponent.prototype, "allowNil", void 0);
|
|
2076
|
+
__decorate([
|
|
2077
|
+
ContentChild("optionTemplate"),
|
|
2078
|
+
__metadata("design:type", TemplateRef)
|
|
2079
|
+
], SelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
2080
|
+
__decorate([
|
|
2081
|
+
ContentChild("nilOptionTemplate"),
|
|
2082
|
+
__metadata("design:type", TemplateRef)
|
|
2083
|
+
], SelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
2084
|
+
__decorate([
|
|
2085
|
+
Input(),
|
|
2086
|
+
__metadata("design:type", Function)
|
|
2087
|
+
], SelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
2088
|
+
SelectInputComponent = __decorate([
|
|
2089
|
+
Component({
|
|
2090
|
+
selector: 'aup-select-input',
|
|
2091
|
+
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]=\"delegatingFormValueModel.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",
|
|
2092
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
2093
|
+
}),
|
|
2094
|
+
__metadata("design:paramtypes", [])
|
|
2095
|
+
], SelectInputComponent);
|
|
2096
|
+
return SelectInputComponent;
|
|
2097
|
+
}(AbstractInputComponent));
|
|
2098
|
+
|
|
2099
|
+
var StringInputActivity = /** @class */ (function (_super) {
|
|
2100
|
+
__extends(StringInputActivity, _super);
|
|
2101
|
+
function StringInputActivity() {
|
|
2102
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2103
|
+
}
|
|
2104
|
+
StringInputActivity = __decorate([
|
|
2105
|
+
Component({
|
|
2106
|
+
selector: 'aup-string-input-activity',
|
|
2107
|
+
template: "\n <aup-string-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"></aup-string-input>\n <aup-activity-actions align=\"end\"\n [confirmCommand]=\"confirmCommand\"\n [cancelCommand]=\"cancelCommand\"></aup-activity-actions>\n "
|
|
2108
|
+
})
|
|
2109
|
+
], StringInputActivity);
|
|
2110
|
+
return StringInputActivity;
|
|
2111
|
+
}(AbstractInputActivity));
|
|
2112
|
+
|
|
2113
|
+
var StringInputComponent = /** @class */ (function (_super) {
|
|
2114
|
+
__extends(StringInputComponent, _super);
|
|
2115
|
+
function StringInputComponent() {
|
|
2116
|
+
var _this = _super.call(this) || this;
|
|
2117
|
+
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2118
|
+
_this.clearCommand = Command.create(function () {
|
|
2119
|
+
_this.valueModel.value = null;
|
|
1626
2120
|
});
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
this.activityRef.notifyActivityCreated(this.activityComponentRef.instance, this.nestedInteractionContext);
|
|
2121
|
+
_this.clearCommand.disableWhile(chain.stringValue(_this.valueModel).isBlank());
|
|
2122
|
+
return _this;
|
|
2123
|
+
}
|
|
2124
|
+
StringInputComponent.prototype.ngOnInit = function () {
|
|
1632
2125
|
};
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
]
|
|
2126
|
+
__decorate([
|
|
2127
|
+
Input(), TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
|
|
2128
|
+
__metadata("design:type", Object)
|
|
2129
|
+
], StringInputComponent.prototype, "valueModel", void 0);
|
|
2130
|
+
__decorate([
|
|
2131
|
+
Input(), TrackExternal({ defaultValue: false }),
|
|
2132
|
+
__metadata("design:type", ValueModel)
|
|
2133
|
+
], StringInputComponent.prototype, "enableClearModel", void 0);
|
|
2134
|
+
__decorate([
|
|
2135
|
+
Input(), StoreInValueModel('enableClearModel'),
|
|
2136
|
+
__metadata("design:type", Boolean)
|
|
2137
|
+
], StringInputComponent.prototype, "enableClear", void 0);
|
|
2138
|
+
StringInputComponent = __decorate([
|
|
2139
|
+
Component({
|
|
2140
|
+
selector: 'aup-string-input',
|
|
2141
|
+
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]=\"delegatingFormValueModel.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",
|
|
2142
|
+
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}"]
|
|
2143
|
+
}),
|
|
2144
|
+
__metadata("design:paramtypes", [])
|
|
2145
|
+
], StringInputComponent);
|
|
2146
|
+
return StringInputComponent;
|
|
2147
|
+
}(AbstractInputComponent));
|
|
2148
|
+
|
|
2149
|
+
var TextInputComponent = /** @class */ (function (_super) {
|
|
2150
|
+
__extends(TextInputComponent, _super);
|
|
2151
|
+
function TextInputComponent() {
|
|
2152
|
+
var _this = _super.call(this) || this;
|
|
2153
|
+
_this.rows = 2;
|
|
2154
|
+
return _this;
|
|
2155
|
+
// const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
2156
|
+
}
|
|
2157
|
+
TextInputComponent.prototype.ngOnInit = function () {
|
|
2158
|
+
};
|
|
2159
|
+
__decorate([
|
|
2160
|
+
Input(), TrackExternal({ delegateTo: 'delegatingFormValueModel' }),
|
|
2161
|
+
__metadata("design:type", Object)
|
|
2162
|
+
], TextInputComponent.prototype, "valueModel", void 0);
|
|
1645
2163
|
__decorate([
|
|
1646
2164
|
Input(),
|
|
1647
2165
|
__metadata("design:type", Object)
|
|
1648
|
-
],
|
|
2166
|
+
], TextInputComponent.prototype, "rows", void 0);
|
|
1649
2167
|
__decorate([
|
|
1650
2168
|
Input(),
|
|
1651
|
-
__metadata("design:type",
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
ActivityOutletComponent = __decorate([
|
|
2169
|
+
__metadata("design:type", Number)
|
|
2170
|
+
], TextInputComponent.prototype, "cols", void 0);
|
|
2171
|
+
TextInputComponent = __decorate([
|
|
1655
2172
|
Component({
|
|
1656
|
-
selector: 'aup-
|
|
1657
|
-
template:
|
|
2173
|
+
selector: 'aup-text-input',
|
|
2174
|
+
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]=\"delegatingFormValueModel.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",
|
|
2175
|
+
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}"]
|
|
2176
|
+
}),
|
|
2177
|
+
__metadata("design:paramtypes", [])
|
|
2178
|
+
], TextInputComponent);
|
|
2179
|
+
return TextInputComponent;
|
|
2180
|
+
}(AbstractInputComponent));
|
|
2181
|
+
|
|
2182
|
+
var NoopComponent = /** @class */ (function () {
|
|
2183
|
+
function NoopComponent() {
|
|
2184
|
+
}
|
|
2185
|
+
NoopComponent = __decorate([
|
|
2186
|
+
Component({
|
|
2187
|
+
selector: 'aup-noop',
|
|
2188
|
+
template: "",
|
|
1658
2189
|
styles: [":host{display:block}"]
|
|
1659
2190
|
}),
|
|
1660
|
-
__metadata("design:paramtypes", [
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
2191
|
+
__metadata("design:paramtypes", [])
|
|
2192
|
+
], NoopComponent);
|
|
2193
|
+
return NoopComponent;
|
|
2194
|
+
}());
|
|
2195
|
+
|
|
2196
|
+
var ScrollContainerComponent = /** @class */ (function () {
|
|
2197
|
+
function ScrollContainerComponent() {
|
|
2198
|
+
}
|
|
2199
|
+
ScrollContainerComponent.prototype.ngOnInit = function () {
|
|
2200
|
+
};
|
|
2201
|
+
ScrollContainerComponent = __decorate([
|
|
2202
|
+
Component({
|
|
2203
|
+
selector: 'aup-scroll-container',
|
|
2204
|
+
template: "<div class=\"container\">\n <ng-content></ng-content>\n</div>\n",
|
|
2205
|
+
styles: [":host{display:flex;flex-direction:column;min-height:0;align-items:stretch}.container{display:flex;flex-direction:column;flex:1;flex-basis:0;overflow-y:scroll;align-items:stretch}"]
|
|
2206
|
+
}),
|
|
2207
|
+
__metadata("design:paramtypes", [])
|
|
2208
|
+
], ScrollContainerComponent);
|
|
2209
|
+
return ScrollContainerComponent;
|
|
1665
2210
|
}());
|
|
1666
2211
|
|
|
1667
|
-
var
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
var _this = _super.call(this) || this;
|
|
1671
|
-
_this.dynamicHeight = false;
|
|
1672
|
-
_this.activityTabs = [];
|
|
1673
|
-
_this.garbage = new GarbageCollector();
|
|
1674
|
-
return _this;
|
|
2212
|
+
var SwitchCaseOption = /** @class */ (function () {
|
|
2213
|
+
function SwitchCaseOption(templateRef) {
|
|
2214
|
+
this.templateRef = templateRef;
|
|
1675
2215
|
}
|
|
1676
|
-
|
|
1677
|
-
};
|
|
1678
|
-
ActivityContainerComponent.prototype.ngAfterViewInit = function () {
|
|
1679
|
-
var _this = this;
|
|
1680
|
-
var _a = Dsl.disposeWith(this), chain = _a.chain, observe = _a.observe;
|
|
1681
|
-
observe.valuesFrom(this.tabs.animationDone).subscribe(function () { return _this.onAnimationFinished(); });
|
|
1682
|
-
};
|
|
1683
|
-
ActivityContainerComponent.prototype.initialise = function (identifier, api) {
|
|
1684
|
-
assert.isFalsey(this.isInitialised());
|
|
1685
|
-
assert.notNil(identifier);
|
|
1686
|
-
assert.notNil(api);
|
|
1687
|
-
this._identifier = identifier;
|
|
1688
|
-
this.interactionServiceApi = api;
|
|
1689
|
-
};
|
|
1690
|
-
Object.defineProperty(ActivityContainerComponent.prototype, "identifier", {
|
|
2216
|
+
Object.defineProperty(SwitchCaseOption.prototype, "name", {
|
|
1691
2217
|
get: function () {
|
|
1692
|
-
return this.
|
|
2218
|
+
return this.constructor.name;
|
|
1693
2219
|
},
|
|
1694
2220
|
enumerable: true,
|
|
1695
2221
|
configurable: true
|
|
1696
2222
|
});
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
return
|
|
1705
|
-
}
|
|
1706
|
-
|
|
1707
|
-
|
|
2223
|
+
return SwitchCaseOption;
|
|
2224
|
+
}());
|
|
2225
|
+
var SwitchCaseWhenDirective = /** @class */ (function (_super) {
|
|
2226
|
+
__extends(SwitchCaseWhenDirective, _super);
|
|
2227
|
+
function SwitchCaseWhenDirective(templateRef) {
|
|
2228
|
+
var _this = _super.call(this, templateRef) || this;
|
|
2229
|
+
_this.isDefault = false;
|
|
2230
|
+
return _this;
|
|
2231
|
+
}
|
|
2232
|
+
SwitchCaseWhenDirective_1 = SwitchCaseWhenDirective;
|
|
2233
|
+
SwitchCaseWhenDirective.prototype.matches = function (value) {
|
|
2234
|
+
return this.aupSwitchCaseWhen === value;
|
|
1708
2235
|
};
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
2236
|
+
var SwitchCaseWhenDirective_1;
|
|
2237
|
+
SwitchCaseWhenDirective.ctorParameters = function () { return [
|
|
2238
|
+
{ type: TemplateRef }
|
|
2239
|
+
]; };
|
|
2240
|
+
__decorate([
|
|
2241
|
+
Input(),
|
|
2242
|
+
__metadata("design:type", Object)
|
|
2243
|
+
], SwitchCaseWhenDirective.prototype, "aupSwitchCaseWhen", void 0);
|
|
2244
|
+
SwitchCaseWhenDirective = SwitchCaseWhenDirective_1 = __decorate([
|
|
2245
|
+
Directive({
|
|
2246
|
+
selector: '[aupSwitchCaseWhen]',
|
|
2247
|
+
providers: [{ provide: SwitchCaseOption, useExisting: SwitchCaseWhenDirective_1 }]
|
|
2248
|
+
}),
|
|
2249
|
+
__metadata("design:paramtypes", [TemplateRef])
|
|
2250
|
+
], SwitchCaseWhenDirective);
|
|
2251
|
+
return SwitchCaseWhenDirective;
|
|
2252
|
+
}(SwitchCaseOption));
|
|
2253
|
+
var SwitchCaseDefaultDirective = /** @class */ (function (_super) {
|
|
2254
|
+
__extends(SwitchCaseDefaultDirective, _super);
|
|
2255
|
+
function SwitchCaseDefaultDirective(templateRef) {
|
|
2256
|
+
var _this = _super.call(this, templateRef) || this;
|
|
2257
|
+
_this.isDefault = true;
|
|
2258
|
+
return _this;
|
|
2259
|
+
}
|
|
2260
|
+
SwitchCaseDefaultDirective_1 = SwitchCaseDefaultDirective;
|
|
2261
|
+
SwitchCaseDefaultDirective.prototype.matches = function (value) {
|
|
2262
|
+
return false;
|
|
1714
2263
|
};
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
2264
|
+
var SwitchCaseDefaultDirective_1;
|
|
2265
|
+
SwitchCaseDefaultDirective.ctorParameters = function () { return [
|
|
2266
|
+
{ type: TemplateRef }
|
|
2267
|
+
]; };
|
|
2268
|
+
SwitchCaseDefaultDirective = SwitchCaseDefaultDirective_1 = __decorate([
|
|
2269
|
+
Directive({
|
|
2270
|
+
selector: '[aupSwitchCaseDefault]',
|
|
2271
|
+
providers: [{ provide: SwitchCaseOption, useExisting: SwitchCaseDefaultDirective_1 }]
|
|
2272
|
+
}),
|
|
2273
|
+
__metadata("design:paramtypes", [TemplateRef])
|
|
2274
|
+
], SwitchCaseDefaultDirective);
|
|
2275
|
+
return SwitchCaseDefaultDirective;
|
|
2276
|
+
}(SwitchCaseOption));
|
|
2277
|
+
var SwitchCaseComponent = /** @class */ (function (_super) {
|
|
2278
|
+
__extends(SwitchCaseComponent, _super);
|
|
2279
|
+
function SwitchCaseComponent(cdr) {
|
|
2280
|
+
var _this = _super.call(this) || this;
|
|
2281
|
+
_this.cdr = cdr;
|
|
2282
|
+
_this.selectedIndex = 0;
|
|
2283
|
+
return _this;
|
|
2284
|
+
}
|
|
2285
|
+
SwitchCaseComponent.prototype.ngOnInit = function () {
|
|
1720
2286
|
};
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
var activity;
|
|
1729
|
-
return __generator(this, function (_a) {
|
|
1730
|
-
activity = this.getActiveActivityRef();
|
|
1731
|
-
activity.cancel();
|
|
1732
|
-
if (this.isCleaningUp()) {
|
|
1733
|
-
return [2 /*return*/, this.waitForInteractionContextCleanupToFinish()];
|
|
1734
|
-
}
|
|
1735
|
-
else {
|
|
1736
|
-
return [2 /*return*/, !this.isActive()];
|
|
1737
|
-
}
|
|
1738
|
-
return [2 /*return*/];
|
|
1739
|
-
});
|
|
1740
|
-
});
|
|
2287
|
+
SwitchCaseComponent.prototype.ngAfterContentInit = function () {
|
|
2288
|
+
var _this = this;
|
|
2289
|
+
var subscription = this.switchCaseOptions.changes.subscribe(function (change) { return _this.updateSelection(); });
|
|
2290
|
+
this.onDispose(function () { return subscription.unsubscribe(); });
|
|
2291
|
+
var _a = Dsl.disposeWith(this), chain = _a.chain, when = _a.when;
|
|
2292
|
+
when.valueOf(this.switchModel).changes(function () { return _this.updateSelection(); }, { initialValue: 'triggerChange' });
|
|
2293
|
+
this.cdr.detectChanges();
|
|
1741
2294
|
};
|
|
1742
|
-
|
|
1743
|
-
// @Trace()
|
|
1744
|
-
ActivityContainerComponent.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
|
|
2295
|
+
SwitchCaseComponent.prototype.updateSelection = function () {
|
|
1745
2296
|
var _this = this;
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
_this.triggerTabSynchronisation();
|
|
1751
|
-
}
|
|
1752
|
-
else {
|
|
1753
|
-
_this.finishAndStartCleanup();
|
|
2297
|
+
var matchingIndicies = [];
|
|
2298
|
+
this.switchCaseOptions.forEach(function (option, index) {
|
|
2299
|
+
if (option.matches(_this.switchModel.value)) {
|
|
2300
|
+
matchingIndicies.push(index);
|
|
1754
2301
|
}
|
|
1755
2302
|
});
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
if (this.activityTabs.length === 1) {
|
|
1759
|
-
// console.log('Now active!!!');
|
|
1760
|
-
this.interactionServiceApi.notifyActive(this);
|
|
2303
|
+
if (matchingIndicies.length > 1) {
|
|
2304
|
+
console.warn("found " + matchingIndicies.length + " matching case values, displaying the first.");
|
|
1761
2305
|
}
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
return this.activityTabs.filter(function (ref) { return !ref.isComplete(); }).length;
|
|
1766
|
-
};
|
|
1767
|
-
/**
|
|
1768
|
-
* Checks if this interaction context has finished an is in the process of waiting
|
|
1769
|
-
* for all the infrastructure (including route updates) to be completed.
|
|
1770
|
-
*/
|
|
1771
|
-
ActivityContainerComponent.prototype.isCleaningUp = function () {
|
|
1772
|
-
return !!this._deferredCleanUp;
|
|
1773
|
-
};
|
|
1774
|
-
ActivityContainerComponent.prototype.waitForInteractionContextCleanupToFinish = function () {
|
|
1775
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1776
|
-
return __generator(this, function (_a) {
|
|
1777
|
-
return [2 /*return*/, this._deferredCleanUp ?
|
|
1778
|
-
this._deferredCleanUp :
|
|
1779
|
-
true];
|
|
1780
|
-
});
|
|
1781
|
-
});
|
|
1782
|
-
};
|
|
1783
|
-
// @Trace()
|
|
1784
|
-
ActivityContainerComponent.prototype.finishAndStartCleanup = function () {
|
|
1785
|
-
var _this = this;
|
|
1786
|
-
if (!this._deferredCleanUp) {
|
|
1787
|
-
var promise = this.interactionServiceApi.notifyFinished(this);
|
|
1788
|
-
this._deferredCleanUp = promise
|
|
1789
|
-
.finally(function () {
|
|
1790
|
-
_this._deferredCleanUp = null;
|
|
2306
|
+
if (matchingIndicies.length === 0) {
|
|
2307
|
+
this.switchCaseOptions.forEach(function (option, index) {
|
|
2308
|
+
matchingIndicies.push(index);
|
|
1791
2309
|
});
|
|
2310
|
+
if (matchingIndicies.length > 1) {
|
|
2311
|
+
console.warn("found " + matchingIndicies.length + " default case values, displaying the first.");
|
|
2312
|
+
}
|
|
1792
2313
|
}
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
};
|
|
1800
|
-
ActivityContainerComponent.prototype.activityIndex = function (index, activityRef) {
|
|
1801
|
-
return index;
|
|
1802
|
-
};
|
|
1803
|
-
;
|
|
1804
|
-
// @Trace()
|
|
1805
|
-
ActivityContainerComponent.prototype.onAnimationFinished = function () {
|
|
1806
|
-
this.getSelectedOutlet().component.onActivityReady();
|
|
1807
|
-
this.activityTabs = this.activityTabs.filter(function (tab) { return !tab.isComplete(); });
|
|
1808
|
-
};
|
|
1809
|
-
/**
|
|
1810
|
-
* Synchronises the selected tab index. Returns true if there was no change to the selected index.
|
|
1811
|
-
*/
|
|
1812
|
-
// @Trace()
|
|
1813
|
-
ActivityContainerComponent.prototype.synchroniseSelectedTabIndex = function () {
|
|
1814
|
-
var previousIndex = this.tabs.selectedIndex;
|
|
1815
|
-
var newIndex = this.getActiveActivityCount() - 1;
|
|
1816
|
-
this.tabs.selectedIndex = newIndex;
|
|
1817
|
-
return previousIndex === newIndex;
|
|
1818
|
-
};
|
|
1819
|
-
ActivityContainerComponent.prototype.getSelectedOutlet = function () {
|
|
1820
|
-
return this.activityOutlets.toArray()[this.tabs.selectedIndex];
|
|
1821
|
-
};
|
|
1822
|
-
// @Trace()
|
|
1823
|
-
ActivityContainerComponent.prototype.triggerTabSynchronisation = function () {
|
|
1824
|
-
var _this = this;
|
|
1825
|
-
if (this.syncSelectedTabTimeout) {
|
|
1826
|
-
clearTimeout(this.syncSelectedTabTimeout);
|
|
2314
|
+
if (matchingIndicies.length > 0) {
|
|
2315
|
+
this.selectedIndex = matchingIndicies[0];
|
|
2316
|
+
}
|
|
2317
|
+
else {
|
|
2318
|
+
console.warn("found no matching or default case values.");
|
|
2319
|
+
this.selectedIndex = -1;
|
|
1827
2320
|
}
|
|
1828
|
-
this.syncSelectedTabTimeout = setTimeout(function () {
|
|
1829
|
-
_this.syncSelectedTabTimeout = null;
|
|
1830
|
-
_this.synchroniseSelectedTabIndex();
|
|
1831
|
-
}, 75);
|
|
1832
2321
|
};
|
|
2322
|
+
SwitchCaseComponent.ctorParameters = function () { return [
|
|
2323
|
+
{ type: ChangeDetectorRef }
|
|
2324
|
+
]; };
|
|
1833
2325
|
__decorate([
|
|
1834
|
-
Input(),
|
|
1835
|
-
__metadata("design:type",
|
|
1836
|
-
],
|
|
2326
|
+
Input(), TrackExternal(),
|
|
2327
|
+
__metadata("design:type", ValueModel)
|
|
2328
|
+
], SwitchCaseComponent.prototype, "switchModel", void 0);
|
|
1837
2329
|
__decorate([
|
|
1838
|
-
|
|
1839
|
-
__metadata("design:type",
|
|
1840
|
-
],
|
|
2330
|
+
Input(), StoreInValueModel('switchModel'),
|
|
2331
|
+
__metadata("design:type", Object)
|
|
2332
|
+
], SwitchCaseComponent.prototype, "switch", void 0);
|
|
1841
2333
|
__decorate([
|
|
1842
|
-
|
|
2334
|
+
ContentChildren(SwitchCaseOption),
|
|
1843
2335
|
__metadata("design:type", QueryList)
|
|
1844
|
-
],
|
|
2336
|
+
], SwitchCaseComponent.prototype, "switchCaseOptions", void 0);
|
|
2337
|
+
SwitchCaseComponent = __decorate([
|
|
2338
|
+
Component({
|
|
2339
|
+
selector: 'aup-switch-case',
|
|
2340
|
+
template: "<mat-tab-group class=\"content-wrapper\" no-tab-header full-height-tabs [selectedIndex]=\"selectedIndex\">\n <mat-tab *ngFor=\"let option of switchCaseOptions\">\n <ng-template [ngTemplateOutlet]=\"option.templateRef\"></ng-template>\n </mat-tab>\n</mat-tab-group>\n\n\n",
|
|
2341
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
|
|
2342
|
+
}),
|
|
2343
|
+
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
2344
|
+
], SwitchCaseComponent);
|
|
2345
|
+
return SwitchCaseComponent;
|
|
2346
|
+
}(DisposableComponent));
|
|
2347
|
+
|
|
2348
|
+
var DefaultCellRendererComponent = /** @class */ (function () {
|
|
2349
|
+
function DefaultCellRendererComponent() {
|
|
2350
|
+
}
|
|
2351
|
+
Object.defineProperty(DefaultCellRendererComponent.prototype, "value", {
|
|
2352
|
+
get: function () {
|
|
2353
|
+
return this._value;
|
|
2354
|
+
},
|
|
2355
|
+
set: function (value) {
|
|
2356
|
+
this._value = value;
|
|
2357
|
+
},
|
|
2358
|
+
enumerable: true,
|
|
2359
|
+
configurable: true
|
|
2360
|
+
});
|
|
1845
2361
|
__decorate([
|
|
1846
|
-
|
|
1847
|
-
__metadata("design:type",
|
|
1848
|
-
__metadata("design:paramtypes", [])
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
ActivityContainerComponent = __decorate([
|
|
2362
|
+
Input(),
|
|
2363
|
+
__metadata("design:type", Object),
|
|
2364
|
+
__metadata("design:paramtypes", [Object])
|
|
2365
|
+
], DefaultCellRendererComponent.prototype, "value", null);
|
|
2366
|
+
DefaultCellRendererComponent = __decorate([
|
|
1852
2367
|
Component({
|
|
1853
|
-
selector: 'aup-
|
|
1854
|
-
template: "
|
|
1855
|
-
styles: ["
|
|
2368
|
+
selector: 'aup-default-cell-renderer',
|
|
2369
|
+
template: "{{value}}\n",
|
|
2370
|
+
styles: [""]
|
|
1856
2371
|
}),
|
|
1857
2372
|
__metadata("design:paramtypes", [])
|
|
1858
|
-
],
|
|
1859
|
-
return
|
|
1860
|
-
}(
|
|
2373
|
+
], DefaultCellRendererComponent);
|
|
2374
|
+
return DefaultCellRendererComponent;
|
|
2375
|
+
}());
|
|
1861
2376
|
|
|
1862
|
-
var
|
|
1863
|
-
function
|
|
1864
|
-
this.activeInteractionContextIds = activeInteractionContextIds;
|
|
1865
|
-
this.activeModalContext = activeModalContext;
|
|
1866
|
-
this.createExclusiveInteractionContext = createExclusiveInteractionContext;
|
|
2377
|
+
var DefaultHeaderCellRendererComponent = /** @class */ (function () {
|
|
2378
|
+
function DefaultHeaderCellRendererComponent() {
|
|
1867
2379
|
}
|
|
1868
|
-
|
|
1869
|
-
|
|
2380
|
+
__decorate([
|
|
2381
|
+
Input(),
|
|
2382
|
+
__metadata("design:type", ColumnModel)
|
|
2383
|
+
], DefaultHeaderCellRendererComponent.prototype, "columnModel", void 0);
|
|
2384
|
+
DefaultHeaderCellRendererComponent = __decorate([
|
|
2385
|
+
Component({
|
|
2386
|
+
selector: 'aup-default-header-renderer',
|
|
2387
|
+
template: "{{columnModel.getHeaderText()}}\n",
|
|
2388
|
+
styles: [""]
|
|
2389
|
+
}),
|
|
2390
|
+
__metadata("design:paramtypes", [])
|
|
2391
|
+
], DefaultHeaderCellRendererComponent);
|
|
2392
|
+
return DefaultHeaderCellRendererComponent;
|
|
2393
|
+
}());
|
|
2394
|
+
|
|
2395
|
+
// export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
|
|
2396
|
+
// export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
|
|
2397
|
+
/**
|
|
2398
|
+
* Example:
|
|
2399
|
+
* @example
|
|
2400
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2401
|
+
* table.pluck("firstName");
|
|
2402
|
+
* table.pluck("lastName");
|
|
2403
|
+
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
2404
|
+
* });
|
|
2405
|
+
*
|
|
2406
|
+
* Editable tables
|
|
2407
|
+
* @example
|
|
2408
|
+
* const saveCommand = UnaryCommand.create((form: Form<Hero>) => {
|
|
2409
|
+
* if (form.validate()) {
|
|
2410
|
+
* // normal form save stuff
|
|
2411
|
+
* return true; // finish editing
|
|
2412
|
+
* }
|
|
2413
|
+
* return false; // continue editiing
|
|
2414
|
+
* }
|
|
2415
|
+
* const colorsNames: ListModel<string> = ...;
|
|
2416
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2417
|
+
* table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
|
|
2418
|
+
* table.pluck("lastName").cellEditor(StringInputComponent, {
|
|
2419
|
+
* validators: [Validator.present("We need a last name")]
|
|
2420
|
+
* });
|
|
2421
|
+
* table.pluck("age").cellEditor(NumberInputComponent);
|
|
2422
|
+
* table.pluck("favoriteColor").cellEditor(SelectInputComponent, {
|
|
2423
|
+
* initialiseComponent(component: SelectInputComponent) {
|
|
2424
|
+
* selectInput.optionsModel = colorsNames; // <- initialise our component
|
|
2425
|
+
* }
|
|
2426
|
+
* });
|
|
2427
|
+
* table.addEditControls(saveCommand); // <- required to enable editing
|
|
2428
|
+
* });
|
|
2429
|
+
*
|
|
2430
|
+
* Selection models
|
|
2431
|
+
* @example
|
|
2432
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2433
|
+
* table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
|
|
2434
|
+
* table.pluck("firstName");
|
|
2435
|
+
* table.pluck("lastName");
|
|
2436
|
+
* });
|
|
2437
|
+
*
|
|
2438
|
+
* Custom cell renderers and editors
|
|
2439
|
+
* @example
|
|
2440
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2441
|
+
* table.pluck("favoriteColor")
|
|
2442
|
+
* .cellHeaderRenderer(CellHeaderRendererComponent, (component, column) => {
|
|
2443
|
+
* // configure your component with what ever you need.
|
|
2444
|
+
* });
|
|
2445
|
+
* .cellRenderer(CellRendererComponent) // <-- interface CellEditor { value: string; }
|
|
2446
|
+
* .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
|
|
2447
|
+
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
2448
|
+
* });
|
|
2449
|
+
*
|
|
2450
|
+
* I18n
|
|
2451
|
+
* @example
|
|
2452
|
+
* [table.yml]
|
|
2453
|
+
* table:
|
|
2454
|
+
* columns(ColumnTextProperties[]):
|
|
2455
|
+
* firstName:
|
|
2456
|
+
* headerText: "First Name"
|
|
2457
|
+
* fullName:
|
|
2458
|
+
* headerText: "Full Name"
|
|
2459
|
+
*
|
|
2460
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
2461
|
+
* table.pluck("favoriteColor").cellRenderer(...).cellEditor(...);
|
|
2462
|
+
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
2463
|
+
*
|
|
2464
|
+
* table.columnTextProperties(I18n.table.columns); // <- configures all columns
|
|
2465
|
+
* });
|
|
2466
|
+
*/
|
|
2467
|
+
var TableModel = /** @class */ (function () {
|
|
2468
|
+
function TableModel(sourceOfTruth) {
|
|
2469
|
+
this.sourceOfTruth = sourceOfTruth;
|
|
2470
|
+
this._garbage = new GarbageCollector();
|
|
2471
|
+
this._columns = new MutableListModel();
|
|
2472
|
+
this._editorSessions = new MutableListModel();
|
|
2473
|
+
this.identityOf = sourceOfTruth.identityOf;
|
|
2474
|
+
var _a = Dsl.disposeWith(this._garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2475
|
+
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
2476
|
+
this._rowsBeingEdited = new MutableListModel([], {
|
|
2477
|
+
identifiedWith: this.identityOf
|
|
2478
|
+
});
|
|
2479
|
+
this._editorSessionByRowId = chain(this._editorSessions).indexBy('rowId');
|
|
2480
|
+
this.editing = chain(this._editorSessions).count().isGreaterThan(0);
|
|
2481
|
+
this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
|
|
2482
|
+
}
|
|
2483
|
+
TableModel_1 = TableModel;
|
|
2484
|
+
TableModel.fromList = function (sourceOfTruth, builder) {
|
|
2485
|
+
var model = new TableModel_1(sourceOfTruth);
|
|
2486
|
+
builder(model);
|
|
2487
|
+
return model;
|
|
1870
2488
|
};
|
|
1871
|
-
|
|
1872
|
-
|
|
2489
|
+
Object.defineProperty(TableModel.prototype, "rowsBeingEdited", {
|
|
2490
|
+
get: function () {
|
|
2491
|
+
return this._rowsBeingEdited.readonly;
|
|
2492
|
+
},
|
|
2493
|
+
enumerable: true,
|
|
2494
|
+
configurable: true
|
|
2495
|
+
});
|
|
2496
|
+
TableModel.prototype.getTrackByFunction = function () {
|
|
2497
|
+
var _this = this;
|
|
2498
|
+
return function (index, item) {
|
|
2499
|
+
return _this.identityOf ? _this.identityOf(item) : index;
|
|
2500
|
+
};
|
|
1873
2501
|
};
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
2502
|
+
Object.defineProperty(TableModel.prototype, "columns", {
|
|
2503
|
+
get: function () {
|
|
2504
|
+
return this._columns.readonly;
|
|
2505
|
+
},
|
|
2506
|
+
enumerable: true,
|
|
2507
|
+
configurable: true
|
|
2508
|
+
});
|
|
2509
|
+
TableModel.prototype.pluck = function (property) {
|
|
2510
|
+
return this.addColumn(new PropertyColumnModel(property, this));
|
|
1877
2511
|
};
|
|
1878
|
-
|
|
1879
|
-
return this.
|
|
2512
|
+
TableModel.prototype.addSelectionColumn = function (selectionModel) {
|
|
2513
|
+
return this.addColumn(new SelectionColumnModel('selection', this, selectionModel));
|
|
1880
2514
|
};
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
return this.
|
|
2515
|
+
TableModel.prototype.addEditControls = function (saveCommand) {
|
|
2516
|
+
this.saveCommand = saveCommand;
|
|
2517
|
+
return this.addColumn(new EditorControlColumnModel('editControls', saveCommand, this));
|
|
1884
2518
|
};
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
return component.interactionContext.cancelActiveActivity();
|
|
2519
|
+
TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
|
|
2520
|
+
return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
|
|
1888
2521
|
};
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
var inplaceMonitorCount = 0;
|
|
1899
|
-
var InteractionService = /** @class */ (function () {
|
|
1900
|
-
function InteractionService(modelInteractionContextFactory) {
|
|
1901
|
-
this.modelInteractionContextFactory = modelInteractionContextFactory;
|
|
1902
|
-
this.garbage = new GarbageCollector();
|
|
1903
|
-
// private readonly _activeModalContext = new MutableValueModel<InteractionContext>();
|
|
1904
|
-
// private readonly _activeInlineContext = new MutableValueModel<InteractionContext>();
|
|
1905
|
-
// private readonly _activeContext: ValueModelChain<InteractionContext>;
|
|
1906
|
-
this._navigationInProgress = new DelegatingValueModel().withDefault(false);
|
|
1907
|
-
var _a = Dsl.disposeWith(this.garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1908
|
-
this.exclusiveInteractionRegistry = new InteractionService_1.ContextRegistry();
|
|
1909
|
-
this.modalInteractionRegistry = new InteractionService_1.ContextRegistry();
|
|
1910
|
-
this.inPlaceInteractionRegistry = new InteractionService_1.ContextRegistry();
|
|
1911
|
-
this.modalInteractionRegistry.disableWhen(valueOf.any(this.exclusiveInteractionRegistry.active, this.modalInteractionRegistry.active).areTruthy());
|
|
1912
|
-
this.inPlaceInteractionRegistry.disableWhen(valueOf.any(this.exclusiveInteractionRegistry.active, this.modalInteractionRegistry.active, this.inPlaceInteractionRegistry.active).areTruthy());
|
|
1913
|
-
this.active = valueOf.any(this.inPlaceInteractionRegistry.active, this.modalInteractionRegistry.active).areTruthy();
|
|
1914
|
-
// TODO: chain.concat(listOrValueModels) would be nice.
|
|
1915
|
-
this.activeInteractionContextIds = chain(this.inPlaceInteractionRegistry.interactionContextIds)
|
|
1916
|
-
.concat(this.modalInteractionRegistry.interactionContextIds);
|
|
1917
|
-
this.activeModalContext = chain(this.modalInteractionRegistry.interactionContexts).first();
|
|
1918
|
-
this.inModalInteraction = chain(this.activeModalContext).isNotNil();
|
|
1919
|
-
}
|
|
1920
|
-
InteractionService_1 = InteractionService;
|
|
1921
|
-
InteractionService.prototype.isActive = function () {
|
|
1922
|
-
return this.active.value;
|
|
2522
|
+
TableModel.prototype.addColumn = function (column) {
|
|
2523
|
+
if (this._columnsById.get(column.columnId)) {
|
|
2524
|
+
lang.illegalState("Column with id=" + column.columnId + " already exists");
|
|
2525
|
+
}
|
|
2526
|
+
else {
|
|
2527
|
+
this._columns.push(column);
|
|
2528
|
+
}
|
|
2529
|
+
return column;
|
|
1923
2530
|
};
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
* @param disposable
|
|
1927
|
-
*/
|
|
1928
|
-
InteractionService.prototype.createModalInteractionContextFor = function (disposable) {
|
|
1929
|
-
return this.createModalInteractionContextDisposedWith(disposable);
|
|
2531
|
+
TableModel.prototype.columnTextProperties = function (columnTextProperties) {
|
|
2532
|
+
this._columnTextPropertiesLookup = columnTextProperties;
|
|
1930
2533
|
};
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
*/
|
|
1935
|
-
InteractionService.prototype.createModalInteractionContextDisposedWith = function (disposable) {
|
|
1936
|
-
// TODO: look at making the registry the factory..
|
|
1937
|
-
return this.modelInteractionContextFactory.createInteractionContext('modal', new InteractionService_1.ApiAdapter(this.placeRouter, this.modalInteractionRegistry));
|
|
2534
|
+
TableModel.prototype.getColumnTextProperties = function (column) {
|
|
2535
|
+
var factory = this._columnTextPropertiesLookup[column.columnId];
|
|
2536
|
+
return factory ? factory() : undefined;
|
|
1938
2537
|
};
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
2538
|
+
TableModel.prototype.startEditSession = function (row) {
|
|
2539
|
+
var _this = this;
|
|
2540
|
+
var rowId = this.identityOf(row);
|
|
2541
|
+
if (this._rowsBeingEdited.query().indexOf(row) > -1) {
|
|
2542
|
+
return lang.illegalState("Row with id=" + rowId + " already being edited");
|
|
2543
|
+
}
|
|
2544
|
+
else {
|
|
2545
|
+
var editSession_1 = new TableModel_1.EditSession(rowId, row, this.saveCommand);
|
|
2546
|
+
var when = Dsl.disposeWith(editSession_1).when;
|
|
2547
|
+
when.valueOf(editSession_1.rowValueModel).changes(function (editedValue) {
|
|
2548
|
+
_this._rowsBeingEdited.replaceOrPush(editedValue);
|
|
2549
|
+
}, { initialValue: 'triggerChangeUnlessNil' });
|
|
2550
|
+
this._editorSessions.push(editSession_1);
|
|
2551
|
+
editSession_1.onDispose(function () {
|
|
2552
|
+
_this._rowsBeingEdited.remove(editSession_1.rowValueModel.value);
|
|
2553
|
+
_this._editorSessions.remove(editSession_1);
|
|
2554
|
+
});
|
|
2555
|
+
return editSession_1;
|
|
2556
|
+
}
|
|
1944
2557
|
};
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
* try and interact in a way that we can't track and synchronise with the browser back
|
|
1950
|
-
* button.
|
|
1951
|
-
*/
|
|
1952
|
-
InteractionService.prototype.registerPlaceRouter = function (router) {
|
|
2558
|
+
TableModel.prototype.getEditSessionFor = function (row) {
|
|
2559
|
+
return this._editorSessionByRowId.get(this.identityOf(row));
|
|
2560
|
+
};
|
|
2561
|
+
TableModel.prototype.cancelAllEditorSessions = function () {
|
|
1953
2562
|
var _this = this;
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
return new InteractionServiceRoutingAdapter(this.activeInteractionContextIds, this.activeModalContext, function () {
|
|
1959
|
-
return self.modelInteractionContextFactory.createInteractionContext('exclusive', new InteractionService_1.ApiAdapter(_this.placeRouter, _this.exclusiveInteractionRegistry));
|
|
2563
|
+
this._editorSessions.runInTransaction(function (draft) {
|
|
2564
|
+
_this._rowsBeingEdited.runInTransaction(function () {
|
|
2565
|
+
draft.value.forEach(function (session) { return session.dispose(); });
|
|
2566
|
+
});
|
|
1960
2567
|
});
|
|
1961
2568
|
};
|
|
1962
|
-
var
|
|
1963
|
-
|
|
1964
|
-
{ type:
|
|
1965
|
-
]; };
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
},
|
|
1996
|
-
enumerable: true,
|
|
1997
|
-
configurable: true
|
|
1998
|
-
});
|
|
1999
|
-
ContextRegistry.prototype.start = function (context) {
|
|
2000
|
-
this._interactions.push(context);
|
|
2001
|
-
};
|
|
2002
|
-
ContextRegistry.prototype.finish = function (context) {
|
|
2003
|
-
this._interactions.remove(context);
|
|
2004
|
-
};
|
|
2005
|
-
ContextRegistry.prototype.isActive = function () {
|
|
2006
|
-
return this.active.value;
|
|
2007
|
-
};
|
|
2008
|
-
ContextRegistry.prototype.disableWhen = function (disabled) {
|
|
2009
|
-
this._disabledDelegate.setDelegate(disabled);
|
|
2010
|
-
};
|
|
2011
|
-
return ContextRegistry;
|
|
2012
|
-
}(GarbageCollector));
|
|
2013
|
-
InteractionService.ContextRegistry = ContextRegistry;
|
|
2014
|
-
var ApiAdapter = /** @class */ (function () {
|
|
2015
|
-
function ApiAdapter(placeRouter, contextRegistry) {
|
|
2016
|
-
this.placeRouter = placeRouter;
|
|
2017
|
-
this.contextRegistry = contextRegistry;
|
|
2018
|
-
}
|
|
2019
|
-
// @Trace()
|
|
2020
|
-
ApiAdapter.prototype.notifyActive = function (context) {
|
|
2021
|
-
assert$1.isTruthy(context.identifier);
|
|
2022
|
-
this.contextRegistry.start(context);
|
|
2023
|
-
return this.isNavigationInProgress() ? Promise.resolve() : this.placeRouter.syncInteractionContextIdsWithRouter();
|
|
2024
|
-
};
|
|
2025
|
-
// @Trace()
|
|
2026
|
-
ApiAdapter.prototype.isNavigationInProgress = function () {
|
|
2027
|
-
return this.placeRouter.navigationInProgress.value;
|
|
2028
|
-
};
|
|
2029
|
-
// @Trace()
|
|
2030
|
-
ApiAdapter.prototype.notifyFinished = function (context) {
|
|
2031
|
-
this.contextRegistry.finish(context);
|
|
2032
|
-
// :: Important ::
|
|
2033
|
-
// This method will be traversed by both the place router (during can canDeactivate guards) and user land code
|
|
2034
|
-
// (both when routing is idle and while it is active in PlaceComponent.canDeactivate()).
|
|
2035
|
-
// The result of pushInteractionIdsToRoute will not start until after the current route finishes, and the
|
|
2036
|
-
// current route won't finish until after this promise returns... Deadlock.
|
|
2037
|
-
// So in order to keep this logic out of the activities we perform the check here and ensure that
|
|
2038
|
-
// any interactions with the context while routing is active returns immediately.
|
|
2039
|
-
return this.isNavigationInProgress() ? Promise.resolve() : this.placeRouter.syncInteractionContextIdsWithRouter();
|
|
2040
|
-
};
|
|
2041
|
-
return ApiAdapter;
|
|
2042
|
-
}());
|
|
2043
|
-
InteractionService.ApiAdapter = ApiAdapter;
|
|
2044
|
-
})(InteractionService || (InteractionService = {}));
|
|
2569
|
+
var TableModel_1;
|
|
2570
|
+
TableModel.ctorParameters = function () { return [
|
|
2571
|
+
{ type: ListModel }
|
|
2572
|
+
]; };
|
|
2573
|
+
TableModel = TableModel_1 = __decorate([
|
|
2574
|
+
TrackExternal.Strategy(new TrackExternal.OneTimeBinding()),
|
|
2575
|
+
__metadata("design:paramtypes", [ListModel])
|
|
2576
|
+
], TableModel);
|
|
2577
|
+
return TableModel;
|
|
2578
|
+
}());
|
|
2579
|
+
(function (TableModel) {
|
|
2580
|
+
var EditSession = /** @class */ (function (_super) {
|
|
2581
|
+
__extends(EditSession, _super);
|
|
2582
|
+
function EditSession(rowId, row, saveCommand) {
|
|
2583
|
+
var _this = _super.call(this) || this;
|
|
2584
|
+
_this.rowId = rowId;
|
|
2585
|
+
_this.saveCommand = saveCommand;
|
|
2586
|
+
_this._editorValue = new MutableValueModel();
|
|
2587
|
+
_this.rowValueModel = _this._editorValue.readonly;
|
|
2588
|
+
_this.form = new Form();
|
|
2589
|
+
_this.form.load(row);
|
|
2590
|
+
_this._editorValue.value = row;
|
|
2591
|
+
_this.form.onEdit(function () {
|
|
2592
|
+
_this._editorValue.value = produce(_this._editorValue.value, function (draft) {
|
|
2593
|
+
_this.form.writeDirtyStateTo(draft);
|
|
2594
|
+
});
|
|
2595
|
+
});
|
|
2596
|
+
return _this;
|
|
2597
|
+
}
|
|
2598
|
+
return EditSession;
|
|
2599
|
+
}(GarbageCollector));
|
|
2600
|
+
TableModel.EditSession = EditSession;
|
|
2601
|
+
})(TableModel || (TableModel = {}));
|
|
2045
2602
|
|
|
2046
|
-
var
|
|
2047
|
-
__extends(
|
|
2048
|
-
function
|
|
2603
|
+
var EditRowControls = /** @class */ (function (_super) {
|
|
2604
|
+
__extends(EditRowControls, _super);
|
|
2605
|
+
function EditRowControls() {
|
|
2049
2606
|
var _this = _super.call(this) || this;
|
|
2050
|
-
_this.
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2607
|
+
_this.saveCommand = Command.create(function () {
|
|
2608
|
+
_this.editSession.saveCommand.execute(_this.editSession.form)
|
|
2609
|
+
.then(function (finished) {
|
|
2610
|
+
if (finished) {
|
|
2611
|
+
_this.editSession.dispose();
|
|
2612
|
+
}
|
|
2613
|
+
});
|
|
2614
|
+
});
|
|
2615
|
+
_this.cancelCommand = Command.create(function () {
|
|
2616
|
+
_this.editSession.dispose();
|
|
2617
|
+
});
|
|
2057
2618
|
return _this;
|
|
2058
2619
|
}
|
|
2059
|
-
|
|
2620
|
+
EditRowControls.prototype.ngOnInit = function () {
|
|
2621
|
+
};
|
|
2622
|
+
Object.defineProperty(EditRowControls.prototype, "form", {
|
|
2060
2623
|
get: function () {
|
|
2061
2624
|
var _a;
|
|
2062
|
-
return
|
|
2625
|
+
return (_a = this.editSession) === null || _a === void 0 ? void 0 : _a.form;
|
|
2063
2626
|
},
|
|
2064
2627
|
enumerable: true,
|
|
2065
2628
|
configurable: true
|
|
2066
2629
|
});
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2630
|
+
__decorate([
|
|
2631
|
+
Input(),
|
|
2632
|
+
__metadata("design:type", Object)
|
|
2633
|
+
], EditRowControls.prototype, "row", void 0);
|
|
2634
|
+
__decorate([
|
|
2635
|
+
Input(),
|
|
2636
|
+
TrackExternal(),
|
|
2637
|
+
__metadata("design:type", Command)
|
|
2638
|
+
], EditRowControls.prototype, "editRowCommand", void 0);
|
|
2639
|
+
__decorate([
|
|
2640
|
+
Input(),
|
|
2641
|
+
__metadata("design:type", TableModel.EditSession)
|
|
2642
|
+
], EditRowControls.prototype, "editSession", void 0);
|
|
2643
|
+
EditRowControls = __decorate([
|
|
2644
|
+
Component({
|
|
2645
|
+
selector: 'aup-row-editor-controls',
|
|
2646
|
+
template: "<button *ngIf=\"!editSession\" mat-icon-button [pectinCommand]=\"editRowCommand\" class=\"edit-button\"><mat-icon>edit</mat-icon></button>\n<button *ngIf=\"editSession\" mat-icon-button [pectinCommand]=\"saveCommand\"><mat-icon>done</mat-icon></button>\n<button *ngIf=\"editSession\" mat-icon-button [pectinCommand]=\"cancelCommand\"><mat-icon>clear</mat-icon></button>\n",
|
|
2647
|
+
styles: [":host{display:block;width:80px}.edit-button{visibility:hidden}:host-context(tr:hover) .edit-button{visibility:visible}"]
|
|
2648
|
+
}),
|
|
2649
|
+
__metadata("design:paramtypes", [])
|
|
2650
|
+
], EditRowControls);
|
|
2651
|
+
return EditRowControls;
|
|
2652
|
+
}(DisposableComponent));
|
|
2653
|
+
|
|
2654
|
+
var SelectCellRendererComponent = /** @class */ (function (_super) {
|
|
2655
|
+
__extends(SelectCellRendererComponent, _super);
|
|
2656
|
+
function SelectCellRendererComponent() {
|
|
2657
|
+
var _this = _super.call(this) || this;
|
|
2658
|
+
_this.selectCommand = Command.create(function () {
|
|
2659
|
+
_this.selectionModel.selectCommand.execute(_this.row);
|
|
2660
|
+
});
|
|
2661
|
+
return _this;
|
|
2662
|
+
}
|
|
2663
|
+
Object.defineProperty(SelectCellRendererComponent.prototype, "row", {
|
|
2074
2664
|
get: function () {
|
|
2075
|
-
return this.
|
|
2665
|
+
return this._row;
|
|
2666
|
+
},
|
|
2667
|
+
set: function (value) {
|
|
2668
|
+
this._row = value;
|
|
2076
2669
|
},
|
|
2077
2670
|
enumerable: true,
|
|
2078
2671
|
configurable: true
|
|
2079
2672
|
});
|
|
2080
|
-
|
|
2081
|
-
return this.
|
|
2082
|
-
};
|
|
2083
|
-
InPlaceInteractionContextComponent.prototype.cancelActiveActivity = function () {
|
|
2084
|
-
return this.activityContainerComponent.cancelActiveActivity();
|
|
2085
|
-
};
|
|
2086
|
-
InPlaceInteractionContextComponent.prototype.confirm = function (confirm) {
|
|
2087
|
-
return this.activityContainerComponent.confirm(confirm);
|
|
2088
|
-
};
|
|
2089
|
-
InPlaceInteractionContextComponent.prototype.confirmOrReject = function (confirm) {
|
|
2090
|
-
return this.activityContainerComponent.confirmOrReject(confirm);
|
|
2673
|
+
SelectCellRendererComponent.prototype.isSelected = function () {
|
|
2674
|
+
return this.selectionModel.isSelected(this.row);
|
|
2091
2675
|
};
|
|
2092
|
-
InPlaceInteractionContextComponent.prototype.confirmThen = function (confirm, activityType, data) {
|
|
2093
|
-
return this.activityContainerComponent.confirmThen(confirm, activityType);
|
|
2094
|
-
};
|
|
2095
|
-
InPlaceInteractionContextComponent.prototype.isActive = function () {
|
|
2096
|
-
return this.activityContainerComponent.isActive();
|
|
2097
|
-
};
|
|
2098
|
-
InPlaceInteractionContextComponent.prototype.startActivity = function (activityType, data) {
|
|
2099
|
-
return this.activityContainerComponent.startActivity(activityType, data);
|
|
2100
|
-
};
|
|
2101
|
-
InPlaceInteractionContextComponent.ctorParameters = function () { return [
|
|
2102
|
-
{ type: InteractionService },
|
|
2103
|
-
{ type: undefined, decorators: [{ type: Inject, args: [MAT_TABS_CONFIG,] }, { type: Optional }] }
|
|
2104
|
-
]; };
|
|
2105
2676
|
__decorate([
|
|
2106
|
-
|
|
2107
|
-
__metadata("design:type",
|
|
2108
|
-
|
|
2677
|
+
Input(),
|
|
2678
|
+
__metadata("design:type", Object),
|
|
2679
|
+
__metadata("design:paramtypes", [Object])
|
|
2680
|
+
], SelectCellRendererComponent.prototype, "row", null);
|
|
2109
2681
|
__decorate([
|
|
2110
2682
|
Input(),
|
|
2111
2683
|
__metadata("design:type", Object)
|
|
2112
|
-
],
|
|
2113
|
-
|
|
2684
|
+
], SelectCellRendererComponent.prototype, "selectionModel", void 0);
|
|
2685
|
+
SelectCellRendererComponent = __decorate([
|
|
2114
2686
|
Component({
|
|
2115
|
-
selector: 'aup-
|
|
2116
|
-
template: "<mat-
|
|
2117
|
-
styles: ["
|
|
2687
|
+
selector: 'aup-select-cell-renderer',
|
|
2688
|
+
template: "<mat-checkbox [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\"></mat-checkbox>\n",
|
|
2689
|
+
styles: [""]
|
|
2118
2690
|
}),
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
return InPlaceInteractionContextComponent;
|
|
2691
|
+
__metadata("design:paramtypes", [])
|
|
2692
|
+
], SelectCellRendererComponent);
|
|
2693
|
+
return SelectCellRendererComponent;
|
|
2123
2694
|
}(DisposableComponent));
|
|
2124
2695
|
|
|
2125
|
-
var
|
|
2126
|
-
__extends(
|
|
2127
|
-
function
|
|
2696
|
+
var SelectHeaderCellRendererComponent = /** @class */ (function (_super) {
|
|
2697
|
+
__extends(SelectHeaderCellRendererComponent, _super);
|
|
2698
|
+
function SelectHeaderCellRendererComponent() {
|
|
2128
2699
|
var _this = _super.call(this) || this;
|
|
2129
|
-
_this.
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
_this.config = config;
|
|
2133
|
-
_this.garbage = new GarbageCollector();
|
|
2134
|
-
assert$1.notNil(dialogService);
|
|
2700
|
+
_this.selectCommand = Command.create(function () {
|
|
2701
|
+
_this.selectionModel.toggleAllCommand.execute();
|
|
2702
|
+
});
|
|
2135
2703
|
return _this;
|
|
2136
2704
|
}
|
|
2137
|
-
|
|
2138
|
-
return this.
|
|
2705
|
+
SelectHeaderCellRendererComponent.prototype.isSelected = function () {
|
|
2706
|
+
return this.selectionModel.allSelected.value;
|
|
2139
2707
|
};
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
lang.illegalState('Dispose called while active.');
|
|
2143
|
-
}
|
|
2144
|
-
this.garbage.dispose();
|
|
2708
|
+
SelectHeaderCellRendererComponent.prototype.isIntermediate = function () {
|
|
2709
|
+
return this.selectionModel.someSelected.value;
|
|
2145
2710
|
};
|
|
2146
|
-
|
|
2147
|
-
|
|
2711
|
+
__decorate([
|
|
2712
|
+
Input(),
|
|
2713
|
+
__metadata("design:type", MultipleSelectionModel)
|
|
2714
|
+
], SelectHeaderCellRendererComponent.prototype, "selectionModel", void 0);
|
|
2715
|
+
SelectHeaderCellRendererComponent = __decorate([
|
|
2716
|
+
Component({
|
|
2717
|
+
selector: 'aup-select-header-cell-renderer',
|
|
2718
|
+
template: "<mat-checkbox [pectinCommand]=\"selectCommand\" [checked]=\"isSelected()\" [indeterminate]=\"this.isIntermediate()\"></mat-checkbox>\n",
|
|
2719
|
+
styles: [""]
|
|
2720
|
+
}),
|
|
2721
|
+
__metadata("design:paramtypes", [])
|
|
2722
|
+
], SelectHeaderCellRendererComponent);
|
|
2723
|
+
return SelectHeaderCellRendererComponent;
|
|
2724
|
+
}(DisposableComponent));
|
|
2725
|
+
|
|
2726
|
+
var ColumnModel = /** @class */ (function () {
|
|
2727
|
+
function ColumnModel(columnId, defaults) {
|
|
2728
|
+
this.columnId = columnId;
|
|
2729
|
+
this.defaults = defaults;
|
|
2730
|
+
this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
|
|
2731
|
+
component.columnModel = column;
|
|
2732
|
+
});
|
|
2733
|
+
}
|
|
2734
|
+
ColumnModel.prototype.getHeaderText = function () {
|
|
2735
|
+
var _a;
|
|
2736
|
+
return ((_a = this.getColumnTextProperties()) === null || _a === void 0 ? void 0 : _a.headerText()) || this.getDefaultHeaderText();
|
|
2148
2737
|
};
|
|
2149
|
-
|
|
2150
|
-
return
|
|
2738
|
+
ColumnModel.prototype.getDefaultHeaderText = function () {
|
|
2739
|
+
return this.columnId;
|
|
2151
2740
|
};
|
|
2152
|
-
|
|
2741
|
+
ColumnModel.prototype.getColumnTextProperties = function () {
|
|
2742
|
+
return this._columnTextProperties || this.defaults.getColumnTextProperties(this);
|
|
2743
|
+
};
|
|
2744
|
+
ColumnModel.prototype.textProperties = function (columnTextProperties) {
|
|
2745
|
+
this._columnTextProperties = columnTextProperties;
|
|
2746
|
+
return this;
|
|
2747
|
+
};
|
|
2748
|
+
ColumnModel.prototype.setCellRenderer = function (cellRenderer, initialiser) {
|
|
2749
|
+
this._cellRendererConfig = {
|
|
2750
|
+
portal: new ComponentPortal(cellRenderer),
|
|
2751
|
+
pushState: initialiser
|
|
2752
|
+
};
|
|
2753
|
+
};
|
|
2754
|
+
ColumnModel.prototype.cellHeaderRenderer = function (cellRenderer, initialiser) {
|
|
2755
|
+
this._columnHeaderConfig = {
|
|
2756
|
+
portal: new ComponentPortal(cellRenderer),
|
|
2757
|
+
initialiseComponent: initialiser
|
|
2758
|
+
};
|
|
2759
|
+
};
|
|
2760
|
+
ColumnModel.prototype.setCellEditor = function (cellEditor) {
|
|
2761
|
+
this._cellEditorConfig = cellEditor;
|
|
2762
|
+
};
|
|
2763
|
+
Object.defineProperty(ColumnModel.prototype, "cellRendererPortal", {
|
|
2764
|
+
get: function () {
|
|
2765
|
+
return this._cellRendererConfig.portal;
|
|
2766
|
+
},
|
|
2767
|
+
enumerable: true,
|
|
2768
|
+
configurable: true
|
|
2769
|
+
});
|
|
2770
|
+
Object.defineProperty(ColumnModel.prototype, "columnHeaderCellRendererPortal", {
|
|
2771
|
+
get: function () {
|
|
2772
|
+
return this._columnHeaderConfig.portal;
|
|
2773
|
+
},
|
|
2774
|
+
enumerable: true,
|
|
2775
|
+
configurable: true
|
|
2776
|
+
});
|
|
2777
|
+
Object.defineProperty(ColumnModel.prototype, "cellEditorPortal", {
|
|
2778
|
+
get: function () {
|
|
2779
|
+
var _a;
|
|
2780
|
+
return (_a = this._cellEditorConfig) === null || _a === void 0 ? void 0 : _a.portal;
|
|
2781
|
+
},
|
|
2782
|
+
enumerable: true,
|
|
2783
|
+
configurable: true
|
|
2784
|
+
});
|
|
2785
|
+
ColumnModel.prototype.hasEditor = function () {
|
|
2786
|
+
return !!this._cellEditorConfig;
|
|
2787
|
+
};
|
|
2788
|
+
ColumnModel.prototype.updateCellRenderer = function (component, row, editRowCommand, editSession) {
|
|
2789
|
+
this._cellRendererConfig.pushState(component, row, editRowCommand, editSession);
|
|
2790
|
+
};
|
|
2791
|
+
ColumnModel.prototype.initialiseHeader = function (component) {
|
|
2792
|
+
this._columnHeaderConfig.initialiseComponent(component, this);
|
|
2793
|
+
};
|
|
2794
|
+
ColumnModel.prototype.initialiseEditor = function (component, editSession) {
|
|
2795
|
+
this._cellEditorConfig.initialiseComponent(component, editSession);
|
|
2796
|
+
};
|
|
2797
|
+
__decorate([
|
|
2798
|
+
Memoize(),
|
|
2799
|
+
__metadata("design:type", Function),
|
|
2800
|
+
__metadata("design:paramtypes", []),
|
|
2801
|
+
__metadata("design:returntype", String)
|
|
2802
|
+
], ColumnModel.prototype, "getHeaderText", null);
|
|
2803
|
+
__decorate([
|
|
2804
|
+
Memoize(),
|
|
2805
|
+
__metadata("design:type", Function),
|
|
2806
|
+
__metadata("design:paramtypes", []),
|
|
2807
|
+
__metadata("design:returntype", Object)
|
|
2808
|
+
], ColumnModel.prototype, "getColumnTextProperties", null);
|
|
2809
|
+
return ColumnModel;
|
|
2810
|
+
}());
|
|
2811
|
+
var PropertyColumnModel = /** @class */ (function (_super) {
|
|
2812
|
+
__extends(PropertyColumnModel, _super);
|
|
2813
|
+
function PropertyColumnModel(property, defaults) {
|
|
2814
|
+
var _this = _super.call(this, property.toString(), defaults) || this;
|
|
2815
|
+
_this.property = property;
|
|
2816
|
+
_this.cellRenderer(DefaultCellRendererComponent);
|
|
2817
|
+
return _this;
|
|
2818
|
+
}
|
|
2819
|
+
PropertyColumnModel.prototype.cellRenderer = function (componentType) {
|
|
2153
2820
|
var _this = this;
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
disableClose: disableClose,
|
|
2157
|
-
panelClass: 'dialog-interaction-context'
|
|
2821
|
+
this.setCellRenderer(componentType, function (component, row) {
|
|
2822
|
+
component.value = row[_this.property];
|
|
2158
2823
|
});
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
var
|
|
2162
|
-
this.
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2824
|
+
};
|
|
2825
|
+
PropertyColumnModel.prototype.cellEditor = function (editor, options) {
|
|
2826
|
+
var _this = this;
|
|
2827
|
+
this.setCellEditor({
|
|
2828
|
+
portal: new ComponentPortal(editor),
|
|
2829
|
+
initialiseComponent: function (component, editSession) {
|
|
2830
|
+
var formValueModel = editSession.form.pluck(_this.property);
|
|
2831
|
+
if (options === null || options === void 0 ? void 0 : options.validators) {
|
|
2832
|
+
formValueModel.validateUsing(options.validators);
|
|
2833
|
+
}
|
|
2834
|
+
component.valueModel = formValueModel;
|
|
2835
|
+
if (options === null || options === void 0 ? void 0 : options.initialiseComponent) {
|
|
2836
|
+
options.initialiseComponent(component);
|
|
2837
|
+
}
|
|
2171
2838
|
}
|
|
2172
|
-
_this.activityContainer = null;
|
|
2173
2839
|
});
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2840
|
+
return this;
|
|
2841
|
+
};
|
|
2842
|
+
return PropertyColumnModel;
|
|
2843
|
+
}(ColumnModel));
|
|
2844
|
+
var CustomValueColumnModel = /** @class */ (function (_super) {
|
|
2845
|
+
__extends(CustomValueColumnModel, _super);
|
|
2846
|
+
function CustomValueColumnModel(columnId, defaults, getValue) {
|
|
2847
|
+
var _this = _super.call(this, columnId, defaults) || this;
|
|
2848
|
+
_this.getValue = getValue;
|
|
2849
|
+
_this.cellRenderer(DefaultCellRendererComponent);
|
|
2850
|
+
return _this;
|
|
2851
|
+
}
|
|
2852
|
+
CustomValueColumnModel.prototype.cellRenderer = function (componentType) {
|
|
2853
|
+
var _this = this;
|
|
2854
|
+
this.setCellRenderer(componentType, function (component, row) {
|
|
2855
|
+
component.value = _this.getValue(row);
|
|
2177
2856
|
});
|
|
2178
|
-
return activityResult;
|
|
2179
2857
|
};
|
|
2180
|
-
return
|
|
2181
|
-
}(
|
|
2858
|
+
return CustomValueColumnModel;
|
|
2859
|
+
}(ColumnModel));
|
|
2860
|
+
var EditorControlColumnModel = /** @class */ (function (_super) {
|
|
2861
|
+
__extends(EditorControlColumnModel, _super);
|
|
2862
|
+
function EditorControlColumnModel(columnId, saveCommand, defaults) {
|
|
2863
|
+
var _this = _super.call(this, columnId, defaults) || this;
|
|
2864
|
+
_this.cellRenderer(EditRowControls);
|
|
2865
|
+
return _this;
|
|
2866
|
+
}
|
|
2867
|
+
EditorControlColumnModel.prototype.cellRenderer = function (componentType) {
|
|
2868
|
+
this.setCellRenderer(componentType, function (component, row, editRowCommand, editSession) {
|
|
2869
|
+
component.row = row;
|
|
2870
|
+
component.editSession = editSession;
|
|
2871
|
+
component.editRowCommand = editRowCommand;
|
|
2872
|
+
});
|
|
2873
|
+
};
|
|
2874
|
+
EditorControlColumnModel.prototype.getDefaultHeaderText = function () {
|
|
2875
|
+
return '';
|
|
2876
|
+
};
|
|
2877
|
+
return EditorControlColumnModel;
|
|
2878
|
+
}(ColumnModel));
|
|
2879
|
+
var CustomTemplateColumnModel = /** @class */ (function (_super) {
|
|
2880
|
+
__extends(CustomTemplateColumnModel, _super);
|
|
2881
|
+
function CustomTemplateColumnModel(columnId, defaults, component) {
|
|
2882
|
+
return _super.call(this, columnId, defaults) || this;
|
|
2883
|
+
}
|
|
2884
|
+
return CustomTemplateColumnModel;
|
|
2885
|
+
}(ColumnModel));
|
|
2886
|
+
var SelectionColumnModel = /** @class */ (function (_super) {
|
|
2887
|
+
__extends(SelectionColumnModel, _super);
|
|
2888
|
+
function SelectionColumnModel(columnId, defaults, selectionModel) {
|
|
2889
|
+
var _this = _super.call(this, columnId, defaults) || this;
|
|
2890
|
+
if (selectionModel instanceof MultipleSelectionModel) {
|
|
2891
|
+
_this.cellHeaderRenderer(SelectHeaderCellRendererComponent, function (component) {
|
|
2892
|
+
component.selectionModel = selectionModel;
|
|
2893
|
+
});
|
|
2894
|
+
}
|
|
2895
|
+
_this.setCellRenderer(SelectCellRendererComponent, function (component, row, editRowCommand, editSession) {
|
|
2896
|
+
component.row = row;
|
|
2897
|
+
component.selectionModel = selectionModel;
|
|
2898
|
+
});
|
|
2899
|
+
return _this;
|
|
2900
|
+
}
|
|
2901
|
+
SelectionColumnModel.prototype.getDefaultHeaderText = function () {
|
|
2902
|
+
return '';
|
|
2903
|
+
};
|
|
2904
|
+
return SelectionColumnModel;
|
|
2905
|
+
}(ColumnModel));
|
|
2906
|
+
|
|
2907
|
+
/**
|
|
2908
|
+
* Create your model:
|
|
2909
|
+
* @example
|
|
2910
|
+
* this.heroTableModel = TableModel.fromList(heroList, table => {
|
|
2911
|
+
* table.pluck("firstName");
|
|
2912
|
+
* table.pluck("lastName");
|
|
2913
|
+
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
2914
|
+
* });
|
|
2915
|
+
*
|
|
2916
|
+
* Create your table
|
|
2917
|
+
* @example
|
|
2918
|
+
* <aup-table [tableModel]="heroTableModel"></aup-table>
|
|
2919
|
+
*
|
|
2920
|
+
* Styling
|
|
2921
|
+
* @example
|
|
2922
|
+
* aup-table {
|
|
2923
|
+
* --column-gap: 10px; // defaults to 24px
|
|
2924
|
+
* aup-table-cell-renderer {
|
|
2925
|
+
* &:first-column {
|
|
2926
|
+
* // do stuff
|
|
2927
|
+
* }
|
|
2928
|
+
* &:last-column {
|
|
2929
|
+
* // do stuff
|
|
2930
|
+
* }
|
|
2931
|
+
* }
|
|
2932
|
+
* }
|
|
2933
|
+
*/
|
|
2934
|
+
var TableComponent = /** @class */ (function (_super) {
|
|
2935
|
+
__extends(TableComponent, _super);
|
|
2936
|
+
function TableComponent() {
|
|
2937
|
+
return _super.call(this) || this;
|
|
2938
|
+
}
|
|
2939
|
+
TableComponent.prototype.ngOnInit = function () {
|
|
2940
|
+
var _a = Dsl.disposeWith(this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2941
|
+
this.columns = chain(this.tableModel.columns);
|
|
2942
|
+
this.columnIds = chain(this.columns).pluck('columnId');
|
|
2943
|
+
};
|
|
2944
|
+
TableComponent.prototype.isEditing = function (row) {
|
|
2945
|
+
return !!this.tableModel.getEditSessionFor(row);
|
|
2946
|
+
};
|
|
2947
|
+
__decorate([
|
|
2948
|
+
Input(),
|
|
2949
|
+
TrackExternal(),
|
|
2950
|
+
__metadata("design:type", TableModel)
|
|
2951
|
+
], TableComponent.prototype, "tableModel", void 0);
|
|
2952
|
+
TableComponent = __decorate([
|
|
2953
|
+
Component({
|
|
2954
|
+
selector: 'aup-table',
|
|
2955
|
+
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.getTrackByFunction()\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\" matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef>\n <aup-table-header-cell-renderer [column]=\"column\"\n [attr.column-index]=\"index\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [class.first-column]=\"first\"\n [class.last-column]=\"last\"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value;\"></tr>\n\n</table>\n",
|
|
2956
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{flex:1}"]
|
|
2957
|
+
}),
|
|
2958
|
+
__metadata("design:paramtypes", [])
|
|
2959
|
+
], TableComponent);
|
|
2960
|
+
return TableComponent;
|
|
2961
|
+
}(DisposableComponent));
|
|
2962
|
+
|
|
2963
|
+
var ColumnTemplateDirective = /** @class */ (function () {
|
|
2964
|
+
function ColumnTemplateDirective(host, templateRef, viewContainer) {
|
|
2965
|
+
this.templateRef = templateRef;
|
|
2966
|
+
this.viewContainer = viewContainer;
|
|
2967
|
+
}
|
|
2968
|
+
ColumnTemplateDirective.ctorParameters = function () { return [
|
|
2969
|
+
{ type: TableComponent },
|
|
2970
|
+
{ type: TemplateRef },
|
|
2971
|
+
{ type: ViewContainerRef }
|
|
2972
|
+
]; };
|
|
2973
|
+
ColumnTemplateDirective = __decorate([
|
|
2974
|
+
Directive({
|
|
2975
|
+
selector: '[aupColumnTemplate]'
|
|
2976
|
+
}),
|
|
2977
|
+
__metadata("design:paramtypes", [TableComponent,
|
|
2978
|
+
TemplateRef,
|
|
2979
|
+
ViewContainerRef])
|
|
2980
|
+
], ColumnTemplateDirective);
|
|
2981
|
+
return ColumnTemplateDirective;
|
|
2982
|
+
}());
|
|
2983
|
+
|
|
2984
|
+
var TableCellRendererComponent = /** @class */ (function () {
|
|
2985
|
+
function TableCellRendererComponent() {
|
|
2986
|
+
var _this = this;
|
|
2987
|
+
this.defaultClassNames = "aup-header-cell-renderer";
|
|
2988
|
+
this.editRowCommand = Command.create(function () {
|
|
2989
|
+
_this.tableModel.startEditSession(_this.row);
|
|
2990
|
+
});
|
|
2991
|
+
}
|
|
2992
|
+
TableCellRendererComponent.prototype.initialiseRenderer = function (instance) {
|
|
2993
|
+
if (this.renderer !== instance) {
|
|
2994
|
+
this.renderer = instance;
|
|
2995
|
+
this.column.updateCellRenderer(this.renderer, this.row, this.editRowCommand, this.editSession);
|
|
2996
|
+
}
|
|
2997
|
+
};
|
|
2998
|
+
TableCellRendererComponent.prototype.initialiseEditor = function (instance) {
|
|
2999
|
+
if (this.editor !== instance) {
|
|
3000
|
+
this.editor = instance;
|
|
3001
|
+
this.column.initialiseEditor(this.editor, this.editSession);
|
|
3002
|
+
}
|
|
3003
|
+
};
|
|
3004
|
+
TableCellRendererComponent.prototype.ngOnChanges = function (changes) {
|
|
3005
|
+
if (this.renderer) {
|
|
3006
|
+
this.column.updateCellRenderer(this.renderer, this.row, this.editRowCommand, this.editSession);
|
|
3007
|
+
this.renderer.editSession = this.editSession;
|
|
3008
|
+
}
|
|
3009
|
+
};
|
|
3010
|
+
TableCellRendererComponent.prototype.hasActiveEditor = function () {
|
|
3011
|
+
return this.editSession && this.column.hasEditor();
|
|
3012
|
+
};
|
|
3013
|
+
__decorate([
|
|
3014
|
+
Input(),
|
|
3015
|
+
__metadata("design:type", Object)
|
|
3016
|
+
], TableCellRendererComponent.prototype, "row", void 0);
|
|
3017
|
+
__decorate([
|
|
3018
|
+
Input(),
|
|
3019
|
+
__metadata("design:type", ColumnModel)
|
|
3020
|
+
], TableCellRendererComponent.prototype, "column", void 0);
|
|
3021
|
+
__decorate([
|
|
3022
|
+
Input(),
|
|
3023
|
+
__metadata("design:type", TableModel.EditSession)
|
|
3024
|
+
], TableCellRendererComponent.prototype, "editSession", void 0);
|
|
3025
|
+
__decorate([
|
|
3026
|
+
Input(),
|
|
3027
|
+
__metadata("design:type", TableModel)
|
|
3028
|
+
], TableCellRendererComponent.prototype, "tableModel", void 0);
|
|
3029
|
+
__decorate([
|
|
3030
|
+
HostBinding('class'),
|
|
3031
|
+
__metadata("design:type", Object)
|
|
3032
|
+
], TableCellRendererComponent.prototype, "defaultClassNames", void 0);
|
|
3033
|
+
TableCellRendererComponent = __decorate([
|
|
3034
|
+
Component({
|
|
3035
|
+
selector: 'aup-table-cell-renderer',
|
|
3036
|
+
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",
|
|
3037
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}"]
|
|
3038
|
+
}),
|
|
3039
|
+
__metadata("design:paramtypes", [])
|
|
3040
|
+
], TableCellRendererComponent);
|
|
3041
|
+
return TableCellRendererComponent;
|
|
3042
|
+
}());
|
|
3043
|
+
|
|
3044
|
+
var TableHeaderCellRendererComponent = /** @class */ (function () {
|
|
3045
|
+
function TableHeaderCellRendererComponent() {
|
|
3046
|
+
this.defaultClassNames = "aup-header-cell-renderer";
|
|
3047
|
+
}
|
|
3048
|
+
TableHeaderCellRendererComponent.prototype.initialiseHeader = function (instance) {
|
|
3049
|
+
if (this.renderer !== instance) {
|
|
3050
|
+
this.renderer = instance;
|
|
3051
|
+
this.column.initialiseHeader(this.renderer);
|
|
3052
|
+
}
|
|
3053
|
+
};
|
|
3054
|
+
__decorate([
|
|
3055
|
+
Input(),
|
|
3056
|
+
__metadata("design:type", ColumnModel)
|
|
3057
|
+
], TableHeaderCellRendererComponent.prototype, "column", void 0);
|
|
3058
|
+
__decorate([
|
|
3059
|
+
HostBinding('class'),
|
|
3060
|
+
__metadata("design:type", Object)
|
|
3061
|
+
], TableHeaderCellRendererComponent.prototype, "defaultClassNames", void 0);
|
|
3062
|
+
TableHeaderCellRendererComponent = __decorate([
|
|
3063
|
+
Component({
|
|
3064
|
+
selector: 'aup-table-header-cell-renderer',
|
|
3065
|
+
template: "<ng-container [cdkPortalOutlet]=\"column.columnHeaderCellRendererPortal\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
|
|
3066
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}"]
|
|
3067
|
+
}),
|
|
3068
|
+
__metadata("design:paramtypes", [])
|
|
3069
|
+
], TableHeaderCellRendererComponent);
|
|
3070
|
+
return TableHeaderCellRendererComponent;
|
|
3071
|
+
}());
|
|
2182
3072
|
|
|
2183
|
-
var
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
_this.dialogService = dialogService;
|
|
2189
|
-
_this.dialogServiceDefaults = dialogServiceDefaults;
|
|
2190
|
-
_this.matDialogDefaultConfig = matDialogDefaultConfig;
|
|
2191
|
-
assert$1.notNil(dialogService);
|
|
3073
|
+
var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
3074
|
+
__extends(VerticalFocusContainerComponent, _super);
|
|
3075
|
+
function VerticalFocusContainerComponent(focusManager) {
|
|
3076
|
+
var _this = _super.call(this, focusManager) || this;
|
|
3077
|
+
_this.focusManager = focusManager;
|
|
2192
3078
|
return _this;
|
|
2193
3079
|
}
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
3080
|
+
VerticalFocusContainerComponent.prototype.arrowLeft = function (event) {
|
|
3081
|
+
if (this.leftArrowCommand.enabled.value) {
|
|
3082
|
+
event.preventDefault();
|
|
3083
|
+
event.stopPropagation();
|
|
3084
|
+
this.leftArrowCommand.execute();
|
|
3085
|
+
}
|
|
2197
3086
|
};
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
3087
|
+
VerticalFocusContainerComponent.prototype.arrowRight = function (event) {
|
|
3088
|
+
if (this.rightArrowCommand.enabled.value) {
|
|
3089
|
+
event.preventDefault();
|
|
3090
|
+
event.stopPropagation();
|
|
3091
|
+
this.rightArrowCommand.execute();
|
|
3092
|
+
}
|
|
3093
|
+
};
|
|
3094
|
+
VerticalFocusContainerComponent.prototype.arrowDown = function (event) {
|
|
3095
|
+
event.preventDefault();
|
|
3096
|
+
event.stopPropagation();
|
|
3097
|
+
this.focusManager.focusNext();
|
|
3098
|
+
};
|
|
3099
|
+
VerticalFocusContainerComponent.prototype.arrowUp = function (event) {
|
|
3100
|
+
event.preventDefault();
|
|
3101
|
+
event.stopPropagation();
|
|
3102
|
+
this.focusManager.focusPrevious();
|
|
3103
|
+
};
|
|
3104
|
+
VerticalFocusContainerComponent.prototype.ngOnInit = function () {
|
|
3105
|
+
};
|
|
3106
|
+
VerticalFocusContainerComponent.ctorParameters = function () { return [
|
|
3107
|
+
{ type: FocusManager, decorators: [{ type: Self }] }
|
|
2202
3108
|
]; };
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
3109
|
+
__decorate([
|
|
3110
|
+
Input('command.arrowRight'),
|
|
3111
|
+
TrackExternal(),
|
|
3112
|
+
__metadata("design:type", Command)
|
|
3113
|
+
], VerticalFocusContainerComponent.prototype, "rightArrowCommand", void 0);
|
|
3114
|
+
__decorate([
|
|
3115
|
+
Input('command.arrowLeft'),
|
|
3116
|
+
TrackExternal(),
|
|
3117
|
+
__metadata("design:type", Command)
|
|
3118
|
+
], VerticalFocusContainerComponent.prototype, "leftArrowCommand", void 0);
|
|
3119
|
+
__decorate([
|
|
3120
|
+
HostListener('keyup.arrowLeft', ['$event']),
|
|
3121
|
+
__metadata("design:type", Function),
|
|
3122
|
+
__metadata("design:paramtypes", [KeyboardEvent]),
|
|
3123
|
+
__metadata("design:returntype", void 0)
|
|
3124
|
+
], VerticalFocusContainerComponent.prototype, "arrowLeft", null);
|
|
3125
|
+
__decorate([
|
|
3126
|
+
HostListener('keyup.arrowRight', ['$event']),
|
|
3127
|
+
__metadata("design:type", Function),
|
|
3128
|
+
__metadata("design:paramtypes", [KeyboardEvent]),
|
|
3129
|
+
__metadata("design:returntype", void 0)
|
|
3130
|
+
], VerticalFocusContainerComponent.prototype, "arrowRight", null);
|
|
3131
|
+
__decorate([
|
|
3132
|
+
HostListener('keyup.arrowDown', ['$event']),
|
|
3133
|
+
__metadata("design:type", Function),
|
|
3134
|
+
__metadata("design:paramtypes", [KeyboardEvent]),
|
|
3135
|
+
__metadata("design:returntype", void 0)
|
|
3136
|
+
], VerticalFocusContainerComponent.prototype, "arrowDown", null);
|
|
3137
|
+
__decorate([
|
|
3138
|
+
HostListener('keyup.arrowUp', ['$event']),
|
|
3139
|
+
__metadata("design:type", Function),
|
|
3140
|
+
__metadata("design:paramtypes", [KeyboardEvent]),
|
|
3141
|
+
__metadata("design:returntype", void 0)
|
|
3142
|
+
], VerticalFocusContainerComponent.prototype, "arrowUp", null);
|
|
3143
|
+
VerticalFocusContainerComponent = __decorate([
|
|
3144
|
+
Component({
|
|
3145
|
+
selector: 'aup-vertical-focus-container',
|
|
3146
|
+
template: "<ng-content></ng-content>\n",
|
|
3147
|
+
providers: [
|
|
3148
|
+
{ provide: FocusManager }
|
|
3149
|
+
],
|
|
3150
|
+
styles: [":host{display:block}"]
|
|
2207
3151
|
}),
|
|
2208
|
-
__param(
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
], DialogInteractionContextFactory);
|
|
2214
|
-
return DialogInteractionContextFactory;
|
|
2215
|
-
}(ModalInteractionContextFactory));
|
|
3152
|
+
__param(0, Self()),
|
|
3153
|
+
__metadata("design:paramtypes", [FocusManager])
|
|
3154
|
+
], VerticalFocusContainerComponent);
|
|
3155
|
+
return VerticalFocusContainerComponent;
|
|
3156
|
+
}(FocusContainerComponent));
|
|
2216
3157
|
|
|
2217
3158
|
/**
|
|
2218
3159
|
* @file Automatically generated by barrelsby.
|
|
2219
3160
|
*/
|
|
2220
3161
|
|
|
2221
|
-
var
|
|
2222
|
-
__extends(
|
|
2223
|
-
function
|
|
2224
|
-
var _this = _super.
|
|
2225
|
-
_this.
|
|
2226
|
-
_this.clickCommand = Command.create(function (context) {
|
|
2227
|
-
if (_this.activityClass) {
|
|
2228
|
-
_this.startActivity(_this.activityClass, _this.activityData).catch(function (e) {
|
|
2229
|
-
// don't care.
|
|
2230
|
-
});
|
|
2231
|
-
}
|
|
2232
|
-
else {
|
|
2233
|
-
_this.addCommand.withContext(context).execute();
|
|
2234
|
-
}
|
|
2235
|
-
});
|
|
3162
|
+
var ActivityActionsComponent = /** @class */ (function (_super) {
|
|
3163
|
+
__extends(ActivityActionsComponent, _super);
|
|
3164
|
+
function ActivityActionsComponent() {
|
|
3165
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
3166
|
+
_this.align = 'start';
|
|
2236
3167
|
return _this;
|
|
2237
3168
|
}
|
|
2238
|
-
Object.defineProperty(
|
|
3169
|
+
Object.defineProperty(ActivityActionsComponent.prototype, "alignEnd", {
|
|
2239
3170
|
get: function () {
|
|
2240
|
-
return this.
|
|
3171
|
+
return this.align === 'end';
|
|
2241
3172
|
},
|
|
2242
3173
|
enumerable: true,
|
|
2243
3174
|
configurable: true
|
|
2244
3175
|
});
|
|
2245
|
-
|
|
2246
|
-
return this.interactionContext.startActivity(activityType, data);
|
|
3176
|
+
ActivityActionsComponent.prototype.ngOnInit = function () {
|
|
2247
3177
|
};
|
|
2248
|
-
|
|
3178
|
+
ActivityActionsComponent.prototype.hasConfirmText = function () {
|
|
3179
|
+
return !___default.isEmpty(this.confirmText);
|
|
2249
3180
|
};
|
|
2250
3181
|
__decorate([
|
|
2251
3182
|
Input(),
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
Input(),
|
|
2256
|
-
__metadata("design:type", Object)
|
|
2257
|
-
], AddItemInteractionContextComponent.prototype, "activityClass", void 0);
|
|
3183
|
+
TrackExternal(),
|
|
3184
|
+
__metadata("design:type", Command)
|
|
3185
|
+
], ActivityActionsComponent.prototype, "confirmCommand", void 0);
|
|
2258
3186
|
__decorate([
|
|
2259
3187
|
Input(),
|
|
2260
|
-
__metadata("design:type",
|
|
2261
|
-
],
|
|
3188
|
+
__metadata("design:type", String)
|
|
3189
|
+
], ActivityActionsComponent.prototype, "confirmText", void 0);
|
|
2262
3190
|
__decorate([
|
|
2263
3191
|
Input(),
|
|
2264
3192
|
TrackExternal(),
|
|
2265
3193
|
__metadata("design:type", Command)
|
|
2266
|
-
],
|
|
3194
|
+
], ActivityActionsComponent.prototype, "cancelCommand", void 0);
|
|
2267
3195
|
__decorate([
|
|
2268
|
-
|
|
2269
|
-
__metadata("design:type",
|
|
2270
|
-
],
|
|
3196
|
+
Input(),
|
|
3197
|
+
__metadata("design:type", String)
|
|
3198
|
+
], ActivityActionsComponent.prototype, "align", void 0);
|
|
2271
3199
|
__decorate([
|
|
2272
|
-
HostBinding('class.
|
|
3200
|
+
HostBinding('class.align-end'),
|
|
2273
3201
|
__metadata("design:type", Boolean),
|
|
2274
3202
|
__metadata("design:paramtypes", [])
|
|
2275
|
-
],
|
|
2276
|
-
__decorate([
|
|
2277
|
-
HostBinding('tabindex'),
|
|
2278
|
-
__metadata("design:type", Object)
|
|
2279
|
-
], AddItemInteractionContextComponent.prototype, "tabindex", void 0);
|
|
2280
|
-
AddItemInteractionContextComponent = __decorate([
|
|
3203
|
+
], ActivityActionsComponent.prototype, "alignEnd", null);
|
|
3204
|
+
ActivityActionsComponent = __decorate([
|
|
2281
3205
|
Component({
|
|
2282
|
-
selector: 'aup-
|
|
2283
|
-
template: "<
|
|
2284
|
-
styles: [":host{
|
|
2285
|
-
})
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
return AddItemInteractionContextComponent;
|
|
3206
|
+
selector: 'aup-activity-actions',
|
|
3207
|
+
template: "<button class=\"cancel\" mat-icon-button [pectinCommand]=\"cancelCommand\">\n <mat-icon>clear</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"!hasConfirmText()\" mat-icon-button [pectinCommand]=\"confirmCommand\">\n <mat-icon>done</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"hasConfirmText()\" mat-button [pectinCommand]=\"confirmCommand\">{{confirmText}}</button>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n",
|
|
3208
|
+
styles: [":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}.content{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.content{-ms-grid-row:1;-ms-grid-column:1}"]
|
|
3209
|
+
})
|
|
3210
|
+
], ActivityActionsComponent);
|
|
3211
|
+
return ActivityActionsComponent;
|
|
2289
3212
|
}(DisposableComponent));
|
|
2290
3213
|
|
|
2291
3214
|
var InteractionModule = /** @class */ (function () {
|
|
@@ -2301,7 +3224,9 @@ var InteractionModule = /** @class */ (function () {
|
|
|
2301
3224
|
PortalModule,
|
|
2302
3225
|
RouterModule,
|
|
2303
3226
|
MatIconModule,
|
|
2304
|
-
DirectivesModule
|
|
3227
|
+
DirectivesModule,
|
|
3228
|
+
FlexModule,
|
|
3229
|
+
GridModule
|
|
2305
3230
|
],
|
|
2306
3231
|
declarations: [
|
|
2307
3232
|
ActivityContainerComponent,
|
|
@@ -2311,14 +3236,18 @@ var InteractionModule = /** @class */ (function () {
|
|
|
2311
3236
|
ActivityOutletComponent,
|
|
2312
3237
|
InPlaceInteractionContextComponent,
|
|
2313
3238
|
AddItemInteractionContextComponent,
|
|
2314
|
-
ActivityActionsComponent
|
|
3239
|
+
ActivityActionsComponent,
|
|
3240
|
+
PopupInteractionContextComponent,
|
|
3241
|
+
InteractionContextTriggerFor
|
|
2315
3242
|
],
|
|
2316
3243
|
exports: [
|
|
2317
3244
|
ActivityContainerComponent,
|
|
2318
3245
|
ActivityOutletComponent,
|
|
2319
3246
|
InPlaceInteractionContextComponent,
|
|
2320
3247
|
AddItemInteractionContextComponent,
|
|
2321
|
-
ActivityActionsComponent
|
|
3248
|
+
ActivityActionsComponent,
|
|
3249
|
+
PopupInteractionContextComponent,
|
|
3250
|
+
InteractionContextTriggerFor
|
|
2322
3251
|
],
|
|
2323
3252
|
entryComponents: [
|
|
2324
3253
|
ActivityContainerComponent,
|
|
@@ -2327,13 +3256,94 @@ var InteractionModule = /** @class */ (function () {
|
|
|
2327
3256
|
AlertDialogComponent
|
|
2328
3257
|
],
|
|
2329
3258
|
providers: [
|
|
2330
|
-
InteractionService
|
|
3259
|
+
InteractionService
|
|
3260
|
+
// {
|
|
3261
|
+
// provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
|
|
3262
|
+
// }
|
|
2331
3263
|
]
|
|
2332
3264
|
})
|
|
2333
3265
|
], InteractionModule);
|
|
2334
3266
|
return InteractionModule;
|
|
2335
3267
|
}());
|
|
2336
3268
|
|
|
3269
|
+
var ComponentsModule = /** @class */ (function () {
|
|
3270
|
+
function ComponentsModule() {
|
|
3271
|
+
}
|
|
3272
|
+
ComponentsModule = __decorate([
|
|
3273
|
+
NgModule({
|
|
3274
|
+
declarations: [
|
|
3275
|
+
AbstractInputComponent,
|
|
3276
|
+
AbstractInputActivity,
|
|
3277
|
+
NumberInputComponent,
|
|
3278
|
+
StringInputComponent,
|
|
3279
|
+
StringInputActivity,
|
|
3280
|
+
TextInputComponent,
|
|
3281
|
+
PasswordInputComponent,
|
|
3282
|
+
SelectInputComponent,
|
|
3283
|
+
CheckboxInputComponent,
|
|
3284
|
+
ScrollContainerComponent,
|
|
3285
|
+
NoopComponent,
|
|
3286
|
+
SwitchCaseComponent,
|
|
3287
|
+
SwitchCaseWhenDirective,
|
|
3288
|
+
SwitchCaseDefaultDirective,
|
|
3289
|
+
FocusContainerComponent,
|
|
3290
|
+
VerticalFocusContainerComponent,
|
|
3291
|
+
FocusableComponent,
|
|
3292
|
+
CardContainerComponent,
|
|
3293
|
+
TableComponent,
|
|
3294
|
+
EditRowControls,
|
|
3295
|
+
ColumnTemplateDirective,
|
|
3296
|
+
DefaultCellRendererComponent,
|
|
3297
|
+
TableCellRendererComponent,
|
|
3298
|
+
SelectCellRendererComponent,
|
|
3299
|
+
SelectHeaderCellRendererComponent,
|
|
3300
|
+
DefaultHeaderCellRendererComponent,
|
|
3301
|
+
TableHeaderCellRendererComponent
|
|
3302
|
+
],
|
|
3303
|
+
imports: [
|
|
3304
|
+
CommonModule,
|
|
3305
|
+
BrowserAnimationsModule,
|
|
3306
|
+
FormsModule,
|
|
3307
|
+
MatInputModule,
|
|
3308
|
+
MatFormFieldModule,
|
|
3309
|
+
MatSelectModule,
|
|
3310
|
+
MatTabsModule,
|
|
3311
|
+
DirectivesModule,
|
|
3312
|
+
MatIconModule,
|
|
3313
|
+
MatButtonModule,
|
|
3314
|
+
MatCheckboxModule,
|
|
3315
|
+
InteractionModule,
|
|
3316
|
+
MatTableModule,
|
|
3317
|
+
PortalModule
|
|
3318
|
+
],
|
|
3319
|
+
exports: [
|
|
3320
|
+
NumberInputComponent,
|
|
3321
|
+
StringInputComponent,
|
|
3322
|
+
TextInputComponent,
|
|
3323
|
+
PasswordInputComponent,
|
|
3324
|
+
CheckboxInputComponent,
|
|
3325
|
+
SelectInputComponent,
|
|
3326
|
+
ScrollContainerComponent,
|
|
3327
|
+
NoopComponent,
|
|
3328
|
+
SwitchCaseComponent,
|
|
3329
|
+
SwitchCaseWhenDirective,
|
|
3330
|
+
SwitchCaseDefaultDirective,
|
|
3331
|
+
FocusContainerComponent,
|
|
3332
|
+
VerticalFocusContainerComponent,
|
|
3333
|
+
FocusableComponent,
|
|
3334
|
+
CardContainerComponent,
|
|
3335
|
+
TableComponent,
|
|
3336
|
+
EditRowControls,
|
|
3337
|
+
ColumnTemplateDirective
|
|
3338
|
+
],
|
|
3339
|
+
providers: [
|
|
3340
|
+
FocusBindingFactory,
|
|
3341
|
+
]
|
|
3342
|
+
})
|
|
3343
|
+
], ComponentsModule);
|
|
3344
|
+
return ComponentsModule;
|
|
3345
|
+
}());
|
|
3346
|
+
|
|
2337
3347
|
var ParameterDefinition = /** @class */ (function () {
|
|
2338
3348
|
function ParameterDefinition(propertyName, options, urlFormat) {
|
|
2339
3349
|
this.propertyName = propertyName;
|
|
@@ -5110,5 +6120,5 @@ function VisitParameterList(options) {
|
|
|
5110
6120
|
* Generated bundle index. Do not edit.
|
|
5111
6121
|
*/
|
|
5112
6122
|
|
|
5113
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputComponent, AbstractInteractionContext, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CardContainerComponent, CheckboxInputComponent, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, InPlaceInteractionContextComponent, 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, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SelectInputComponent, SidePlaceNavigationComponent, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, DirectivesModule as ɵa, CommandDirective as ɵb,
|
|
6123
|
+
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, 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, CardContainerComponent as ɵba, TableComponent as ɵbb, EditRowControls as ɵbc, ColumnTemplateDirective as ɵbd, DefaultCellRendererComponent as ɵbe, TableCellRendererComponent as ɵbf, SelectCellRendererComponent as ɵbg, SelectHeaderCellRendererComponent as ɵbh, DefaultHeaderCellRendererComponent as ɵbi, TableHeaderCellRendererComponent as ɵbj, InteractionModule as ɵbk, ActivityContainerComponent as ɵbl, AbstractInteractionContext as ɵbm, ActivityOutletComponent as ɵbn, ConfirmationDialogComponent as ɵbo, ACTIVITY_DATA as ɵbp, Activity as ɵbq, ConfirmThenDialogComponent as ɵbs, AlertDialogComponent as ɵbt, InPlaceInteractionContextComponent as ɵbv, InteractionService as ɵbw, ModalInteractionContextFactory as ɵbx, AddItemInteractionContextComponent as ɵby, DisposableComponent as ɵbz, FocusBindingDirective as ɵc, InPlaceInteractionContextComponent as ɵca, ActivityActionsComponent as ɵcb, PopupInteractionContextComponent as ɵcc, InteractionContextTriggerFor as ɵcd, PlaceModule as ɵce, EmptyStateComponent as ɵcf, BusyOverlayComponent as ɵcg, PlaceOutletComponent as ɵch, leftRightPlaceAnimation as ɵci, LEFT_RIGHT_PLACE_ANIMATION as ɵcj, AUP_PLACE_CONFIG as ɵck, PlaceRouter as ɵcm, UrlService as ɵcn, PlaceHistory as ɵco, TabbedPlaceNavigationComponent as ɵcp, AbstractPlaceNavigationComponent as ɵcq, ListPlaceNavComponent as ɵcr, SidePlaceNavigationComponent as ɵcs, DisposableComponent as ɵd, FocusBindingFactory as ɵe, ComponentsModule as ɵf, AbstractInputComponent as ɵg, AbstractInputActivity as ɵh, Activity as ɵi, ACTIVITY_DATA as ɵj, NumberInputComponent as ɵk, StringInputComponent as ɵl, StringInputActivity as ɵm, TextInputComponent as ɵn, PasswordInputComponent as ɵo, SelectInputComponent as ɵp, CheckboxInputComponent as ɵq, ScrollContainerComponent as ɵr, NoopComponent as ɵs, SwitchCaseOption as ɵt, SwitchCaseWhenDirective as ɵu, SwitchCaseDefaultDirective as ɵv, SwitchCaseComponent as ɵw, FocusContainerComponent as ɵx, VerticalFocusContainerComponent as ɵy, FocusableComponent as ɵz };
|
|
5114
6124
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|