@coolon/angular-ui-powerups 2.0.0-alpha.28 → 2.0.0-alpha.3
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 +0 -170
- package/assets/form.scss +4 -5
- package/assets/styles.scss +0 -2
- package/bundles/coolon-angular-ui-powerups.umd.js +339 -1137
- 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 +54 -64
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +52 -62
- 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 +14 -58
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.js +4 -12
- package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.js +6 -51
- package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.js +3 -47
- package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +6 -3
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +13 -8
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.js +6 -3
- package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +7 -4
- package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.js +5 -2
- package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.js +7 -3
- package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.js +6 -3
- package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
- package/esm2015/lib/components/icon/icon.component.js +4 -17
- package/esm2015/lib/components/icon/icon.component.js.map +1 -1
- package/esm2015/lib/components/icon/icon.component.metadata.json +1 -1
- package/esm2015/lib/components/index.js +1 -12
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/table/cell-editors.js.map +1 -1
- package/esm2015/lib/components/table/{cell-portal-ref.js → cell-protal-ref.js} +3 -7
- package/esm2015/lib/components/table/cell-protal-ref.js.map +1 -0
- package/esm2015/lib/components/table/{cell-portal-ref.metadata.json → cell-protal-ref.metadata.json} +1 -1
- package/esm2015/lib/components/table/column-model.js +11 -66
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +1 -1
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-model.js +10 -11
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table.component.js +1 -1
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +7 -2
- 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/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/place-component.js +1 -1
- package/esm2015/lib/place/place-component.js.map +1 -1
- package/esm2015/lib/place/place-router.js +8 -2
- package/esm2015/lib/place/place-router.js.map +1 -1
- package/esm2015/lib/place/place-router.metadata.json +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js +3 -2
- package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
- package/esm2015/lib/place/route/parameter-decorators.metadata.json +1 -1
- package/esm5/coolon-angular-ui-powerups.js +52 -62
- 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 +14 -58
- package/esm5/lib/components/components.module.js.map +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/forms/abstract-input.component.js +4 -12
- package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-list-input.component.js +6 -56
- package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js +3 -52
- package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +6 -3
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js +13 -8
- package/esm5/lib/components/forms/multiple-select-input/multiple-select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js +6 -3
- package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js +7 -4
- package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
- package/esm5/lib/components/forms/select-input/select-input.component.js +5 -2
- package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
- package/esm5/lib/components/forms/string-input/string-input.component.js +7 -3
- package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm5/lib/components/forms/text-input/text-input.component.js +6 -3
- package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm5/lib/components/icon/icon.component.js +3 -15
- package/esm5/lib/components/icon/icon.component.js.map +1 -1
- package/esm5/lib/components/index.js +1 -12
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/table/cell-editors.js.map +1 -1
- package/esm5/lib/components/table/{cell-portal-ref.js → cell-protal-ref.js} +3 -7
- package/esm5/lib/components/table/cell-protal-ref.js.map +1 -0
- package/esm5/lib/components/table/column-model.js +11 -67
- package/esm5/lib/components/table/column-model.js.map +1 -1
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +1 -1
- package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +1 -1
- package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -1
- package/esm5/lib/components/table/table-model.js +11 -11
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/components/table/table.component.js +1 -1
- package/esm5/lib/components/table/table.component.js.map +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +7 -2
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/place-component.js +1 -1
- package/esm5/lib/place/place-component.js.map +1 -1
- package/esm5/lib/place/place-router.js +8 -2
- package/esm5/lib/place/place-router.js.map +1 -1
- package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +3 -2
- package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +240 -973
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +269 -1051
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-input.component.d.ts +2 -8
- package/lib/components/forms/abstract-list-input.component.d.ts +3 -10
- package/lib/components/forms/abstract-value-input.component.d.ts +3 -9
- package/lib/components/forms/checkbox-input/checkbox-input.component.d.ts +2 -0
- package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +4 -8
- package/lib/components/forms/number-input/number-input.component.d.ts +2 -0
- package/lib/components/forms/password-input/password-input.component.d.ts +2 -0
- package/lib/components/forms/select-input/select-input.component.d.ts +2 -2
- package/lib/components/forms/string-input/string-input.component.d.ts +2 -1
- package/lib/components/forms/text-input/text-input.component.d.ts +2 -0
- package/lib/components/icon/icon.component.d.ts +0 -15
- package/lib/components/index.d.ts +1 -13
- package/lib/components/table/cell-editors.d.ts +3 -3
- package/lib/components/table/{cell-portal-ref.d.ts → cell-protal-ref.d.ts} +4 -4
- package/lib/components/table/column-model.d.ts +12 -18
- package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +1 -1
- package/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts +1 -1
- package/lib/components/table/table-model.d.ts +4 -12
- package/package.json +4 -4
- package/assets/commands.scss +0 -3
- package/assets/icons.scss +0 -30
- package/esm2015/lib/components/commands/command-bar.component.js +0 -51
- package/esm2015/lib/components/commands/command-bar.component.js.map +0 -1
- package/esm2015/lib/components/commands/command-bar.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/command-bar.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/command-container.js +0 -20
- package/esm2015/lib/components/commands/command-container.js.map +0 -1
- package/esm2015/lib/components/commands/command-container.metadata.json +0 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.js +0 -91
- package/esm2015/lib/components/commands/command-face/command-face.component.js.map +0 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.scss.ngstyle.js.map +0 -1
- package/esm2015/lib/components/commands/command-face.js +0 -74
- package/esm2015/lib/components/commands/command-face.js.map +0 -1
- package/esm2015/lib/components/commands/command-face.metadata.json +0 -1
- package/esm2015/lib/components/commands/command.component.js +0 -38
- package/esm2015/lib/components/commands/command.component.js.map +0 -1
- package/esm2015/lib/components/commands/command.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/command.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js +0 -50
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.js +0 -35
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js +0 -46
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +0 -62
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js +0 -70
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +0 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.metadata.json +0 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/components/table/cell-portal-ref.js.map +0 -1
- package/esm2015/lib/components/table/mutable-cell-renderer.js +0 -1
- package/esm2015/lib/components/table/mutable-cell-renderer.js.map +0 -1
- package/esm2015/lib/components/table/mutable-cell-renderer.metadata.json +0 -1
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js +0 -82
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js.map +0 -1
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.metadata.json +0 -1
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/command-bar.component.js +0 -31
- package/esm5/lib/components/commands/command-bar.component.js.map +0 -1
- package/esm5/lib/components/commands/command-bar.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/command-container.js +0 -30
- package/esm5/lib/components/commands/command-container.js.map +0 -1
- package/esm5/lib/components/commands/command-face/command-face.component.js +0 -122
- package/esm5/lib/components/commands/command-face/command-face.component.js.map +0 -1
- package/esm5/lib/components/commands/command-face/command-face.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/command-face/command-face.component.scss.ngstyle.js.map +0 -1
- package/esm5/lib/components/commands/command-face.js +0 -103
- package/esm5/lib/components/commands/command-face.js.map +0 -1
- package/esm5/lib/components/commands/command.component.js +0 -41
- package/esm5/lib/components/commands/command.component.js.map +0 -1
- package/esm5/lib/components/commands/command.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js +0 -57
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu/more-menu.component.js +0 -30
- package/esm5/lib/components/commands/popup-menu/more-menu.component.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.js +0 -42
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +0 -66
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +0 -1
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js +0 -73
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.js.map +0 -1
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/forms/autocomplete-input/autocomplete-input.component.scss.shim.ngstyle.js.map +0 -1
- package/esm5/lib/components/table/cell-portal-ref.js.map +0 -1
- package/esm5/lib/components/table/mutable-cell-renderer.js +0 -1
- package/esm5/lib/components/table/mutable-cell-renderer.js.map +0 -1
- package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js +0 -66
- package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js.map +0 -1
- package/esm5/lib/components/table/table-row-menu/table-row-menu.component.ngfactory.js.map +0 -1
- package/lib/components/commands/command-bar.component.d.ts +0 -10
- package/lib/components/commands/command-container.d.ts +0 -15
- package/lib/components/commands/command-face/command-face.component.d.ts +0 -29
- package/lib/components/commands/command-face.d.ts +0 -24
- package/lib/components/commands/command.component.d.ts +0 -15
- package/lib/components/commands/popup-menu/abstract-popup-menu.component.d.ts +0 -15
- package/lib/components/commands/popup-menu/more-menu.component.d.ts +0 -8
- package/lib/components/commands/popup-menu/popup-menu.component.d.ts +0 -14
- package/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.d.ts +0 -21
- package/lib/components/forms/autocomplete-input/autocomplete-input.component.d.ts +0 -25
- package/lib/components/table/mutable-cell-renderer.d.ts +0 -6
- package/lib/components/table/table-row-menu/table-row-menu.component.d.ts +0 -25
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __extends, __decorate, __metadata, __param, __assign, __awaiter, __generator, __spread } from 'tslib';
|
|
2
2
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
3
|
-
import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, ContentChild, TemplateRef, Component,
|
|
3
|
+
import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, ContentChild, TemplateRef, Component, Self, HostBinding, EventEmitter, Output, ChangeDetectorRef, ContentChildren, QueryList, ViewContainerRef, InjectionToken, Injector, ComponentFactoryResolver, ViewChild, ViewChildren, Optional, 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';
|
|
@@ -9,21 +9,18 @@ import { MatTabsModule, MatTabGroup, MAT_TABS_CONFIG } from '@angular/material/t
|
|
|
9
9
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
10
10
|
import { ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
11
11
|
import { CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
12
|
-
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
13
12
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
13
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
15
14
|
import { MatIconModule } from '@angular/material/icon';
|
|
16
|
-
import { MatMenu, MatMenuTrigger, _MatMenuDirectivesModule, MatMenuModule } from '@angular/material/menu';
|
|
17
15
|
import { MatTableModule } from '@angular/material/table';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
21
|
-
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, MutableListModel, Disposable, MutableValueModel, StoreInValueModel, ListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, StoreInListModel, ValueModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Functions } from '@coolon/pectin';
|
|
16
|
+
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, FocusManager, Form, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MutableValueModel, MultipleSelectionModel, MutableListModel, DirtyTrackingForm, DelegatingCommand, Deferred, Trace, Guard, DebugContext, Binding, Functions } from '@coolon/pectin';
|
|
17
|
+
import { assert as assert$1, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
|
|
22
18
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
23
19
|
import ___default, { isEqual, isNil } from 'lodash';
|
|
24
|
-
import { Enum } from 'typescript-string-enums';
|
|
25
|
-
import { assert as assert$1, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
|
|
26
20
|
import produce from 'immer';
|
|
21
|
+
import { FaIconLibrary, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
22
|
+
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
23
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
27
24
|
import { FlexModule, GridModule } from '@angular/flex-layout';
|
|
28
25
|
import { MatDialogModule, MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
|
29
26
|
import { RouterModule, UrlSegment, Router, UrlSerializer, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterOutlet } from '@angular/router';
|
|
@@ -409,486 +406,13 @@ var CardContainerComponent = /** @class */ (function (_super) {
|
|
|
409
406
|
Component({
|
|
410
407
|
selector: 'aup-card-container',
|
|
411
408
|
template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-icon icon=\"mat:add\"></aup-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",
|
|
412
|
-
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white
|
|
409
|
+
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-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{padding-bottom:0;border-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}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);--resolved-row-hover-background-color:var(--row-hover-background-color, rgba(0, 0, 0, 0.05))}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table .mat-table tr.enable-hover:hover{background-color:var(--resolved-row-hover-background-color)}aup-table .mat-table td.enable-cursor{cursor:pointer}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{padding-left:var(--default-column-gap);flex:1}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
|
|
413
410
|
}),
|
|
414
411
|
__metadata("design:paramtypes", [])
|
|
415
412
|
], CardContainerComponent);
|
|
416
413
|
return CardContainerComponent;
|
|
417
414
|
}(DisposableComponent));
|
|
418
415
|
|
|
419
|
-
var CommandFace;
|
|
420
|
-
(function (CommandFace) {
|
|
421
|
-
var Position;
|
|
422
|
-
(function (Position) {
|
|
423
|
-
Position["START"] = "start";
|
|
424
|
-
Position["END"] = "end";
|
|
425
|
-
})(Position = CommandFace.Position || (CommandFace.Position = {}));
|
|
426
|
-
var Adapter = /** @class */ (function () {
|
|
427
|
-
function Adapter(face) {
|
|
428
|
-
this.face = face;
|
|
429
|
-
}
|
|
430
|
-
Object.defineProperty(Adapter.prototype, "text", {
|
|
431
|
-
get: function () {
|
|
432
|
-
return ___default.isFunction(this.face.text) ? this.face.text() : undefined;
|
|
433
|
-
},
|
|
434
|
-
enumerable: true,
|
|
435
|
-
configurable: true
|
|
436
|
-
});
|
|
437
|
-
Object.defineProperty(Adapter.prototype, "icon", {
|
|
438
|
-
get: function () {
|
|
439
|
-
return ___default.isFunction(this.face.icon) ? this.face.icon() : undefined;
|
|
440
|
-
},
|
|
441
|
-
enumerable: true,
|
|
442
|
-
configurable: true
|
|
443
|
-
});
|
|
444
|
-
Object.defineProperty(Adapter.prototype, "iconPosition", {
|
|
445
|
-
get: function () {
|
|
446
|
-
return ___default.isFunction(this.face.iconPosition) ? this.face.iconPosition() : undefined;
|
|
447
|
-
},
|
|
448
|
-
enumerable: true,
|
|
449
|
-
configurable: true
|
|
450
|
-
});
|
|
451
|
-
Object.defineProperty(Adapter.prototype, "tooltip", {
|
|
452
|
-
get: function () {
|
|
453
|
-
return ___default.isFunction(this.face.tooltip) ? this.face.tooltip() : undefined;
|
|
454
|
-
},
|
|
455
|
-
enumerable: true,
|
|
456
|
-
configurable: true
|
|
457
|
-
});
|
|
458
|
-
Object.defineProperty(Adapter.prototype, "iconPositionStart", {
|
|
459
|
-
get: function () {
|
|
460
|
-
return this.iconPosition === CommandFace.Position.START;
|
|
461
|
-
},
|
|
462
|
-
enumerable: true,
|
|
463
|
-
configurable: true
|
|
464
|
-
});
|
|
465
|
-
Object.defineProperty(Adapter.prototype, "iconPositionEnd", {
|
|
466
|
-
get: function () {
|
|
467
|
-
return this.iconPosition === CommandFace.Position.END;
|
|
468
|
-
},
|
|
469
|
-
enumerable: true,
|
|
470
|
-
configurable: true
|
|
471
|
-
});
|
|
472
|
-
Object.defineProperty(Adapter.prototype, "destructive", {
|
|
473
|
-
get: function () {
|
|
474
|
-
return ___default.isFunction(this.face.destructive) ? this.face.destructive() : false;
|
|
475
|
-
},
|
|
476
|
-
enumerable: true,
|
|
477
|
-
configurable: true
|
|
478
|
-
});
|
|
479
|
-
__decorate([
|
|
480
|
-
Memoize(),
|
|
481
|
-
__metadata("design:type", Object),
|
|
482
|
-
__metadata("design:paramtypes", [])
|
|
483
|
-
], Adapter.prototype, "text", null);
|
|
484
|
-
__decorate([
|
|
485
|
-
Memoize(),
|
|
486
|
-
__metadata("design:type", Object),
|
|
487
|
-
__metadata("design:paramtypes", [])
|
|
488
|
-
], Adapter.prototype, "icon", null);
|
|
489
|
-
__decorate([
|
|
490
|
-
Memoize(),
|
|
491
|
-
__metadata("design:type", Object),
|
|
492
|
-
__metadata("design:paramtypes", [])
|
|
493
|
-
], Adapter.prototype, "iconPosition", null);
|
|
494
|
-
__decorate([
|
|
495
|
-
Memoize(),
|
|
496
|
-
__metadata("design:type", Object),
|
|
497
|
-
__metadata("design:paramtypes", [])
|
|
498
|
-
], Adapter.prototype, "tooltip", null);
|
|
499
|
-
__decorate([
|
|
500
|
-
Memoize(),
|
|
501
|
-
__metadata("design:type", Boolean),
|
|
502
|
-
__metadata("design:paramtypes", [])
|
|
503
|
-
], Adapter.prototype, "iconPositionStart", null);
|
|
504
|
-
__decorate([
|
|
505
|
-
Memoize(),
|
|
506
|
-
__metadata("design:type", Boolean),
|
|
507
|
-
__metadata("design:paramtypes", [])
|
|
508
|
-
], Adapter.prototype, "iconPositionEnd", null);
|
|
509
|
-
__decorate([
|
|
510
|
-
Memoize(),
|
|
511
|
-
__metadata("design:type", Boolean),
|
|
512
|
-
__metadata("design:paramtypes", [])
|
|
513
|
-
], Adapter.prototype, "destructive", null);
|
|
514
|
-
return Adapter;
|
|
515
|
-
}());
|
|
516
|
-
CommandFace.Adapter = Adapter;
|
|
517
|
-
})(CommandFace || (CommandFace = {}));
|
|
518
|
-
|
|
519
|
-
var CommandContainer = /** @class */ (function (_super) {
|
|
520
|
-
__extends(CommandContainer, _super);
|
|
521
|
-
function CommandContainer() {
|
|
522
|
-
var _this = _super.call(this) || this;
|
|
523
|
-
_this._commandRegistrations = new MutableListModel();
|
|
524
|
-
return _this;
|
|
525
|
-
}
|
|
526
|
-
Object.defineProperty(CommandContainer.prototype, "commandRegistrations", {
|
|
527
|
-
get: function () {
|
|
528
|
-
return this._commandRegistrations.readonly;
|
|
529
|
-
},
|
|
530
|
-
enumerable: true,
|
|
531
|
-
configurable: true
|
|
532
|
-
});
|
|
533
|
-
CommandContainer.prototype.registerCommand = function (command, face) {
|
|
534
|
-
var _this = this;
|
|
535
|
-
var registration = { command: command, faceAdapter: new CommandFace.Adapter(face) };
|
|
536
|
-
this._commandRegistrations.push(registration);
|
|
537
|
-
return Disposable.disposableThatRuns(function () { return _this._commandRegistrations.remove(registration); });
|
|
538
|
-
};
|
|
539
|
-
CommandContainer.prototype.getDefaultIconPosition = function () {
|
|
540
|
-
return CommandFace.Position.START;
|
|
541
|
-
};
|
|
542
|
-
return CommandContainer;
|
|
543
|
-
}(GarbageCollector));
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
*
|
|
547
|
-
*/
|
|
548
|
-
var CommandBarComponent = /** @class */ (function (_super) {
|
|
549
|
-
__extends(CommandBarComponent, _super);
|
|
550
|
-
function CommandBarComponent() {
|
|
551
|
-
return _super.call(this) || this;
|
|
552
|
-
}
|
|
553
|
-
CommandBarComponent_1 = CommandBarComponent;
|
|
554
|
-
CommandBarComponent.prototype.ngOnInit = function () {
|
|
555
|
-
};
|
|
556
|
-
CommandBarComponent.prototype.getButtonColor = function (registration) {
|
|
557
|
-
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
558
|
-
};
|
|
559
|
-
var CommandBarComponent_1;
|
|
560
|
-
CommandBarComponent = CommandBarComponent_1 = __decorate([
|
|
561
|
-
Component({
|
|
562
|
-
selector: 'aup-command-bar',
|
|
563
|
-
template: "\n <ng-container *ngFor=\"let registration of commandRegistrations.value\">\n <button *ngIf=\"registration.faceAdapter.icon && !registration.faceAdapter.text\"\n mat-icon-button\n [color]=\"getButtonColor(registration)\"\n [pectinCommand]=\"registration.command\"\n [matTooltip]=\"registration.faceAdapter.tooltip\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\"></aup-command-face>\n </button>\n <button *ngIf=\"registration.faceAdapter.text\"\n [color]=\"getButtonColor(registration)\"\n mat-button\n [pectinCommand]=\"registration.command\"\n [matTooltip]=\"registration.tooltip\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\"></aup-command-face>\n </button>\n </ng-container>\n ",
|
|
564
|
-
providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return CommandBarComponent_1; }) }],
|
|
565
|
-
styles: [":host {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n }"]
|
|
566
|
-
}),
|
|
567
|
-
__metadata("design:paramtypes", [])
|
|
568
|
-
], CommandBarComponent);
|
|
569
|
-
return CommandBarComponent;
|
|
570
|
-
}(CommandContainer));
|
|
571
|
-
|
|
572
|
-
/**
|
|
573
|
-
*
|
|
574
|
-
*/
|
|
575
|
-
var CommandFaceComponent = /** @class */ (function (_super) {
|
|
576
|
-
__extends(CommandFaceComponent, _super);
|
|
577
|
-
function CommandFaceComponent(commandContainer) {
|
|
578
|
-
var _this = _super.call(this) || this;
|
|
579
|
-
_this.commandContainer = commandContainer;
|
|
580
|
-
_this.faceModel = new MutableValueModel();
|
|
581
|
-
_this.ignoreIcon = false;
|
|
582
|
-
_this.ignoreText = false;
|
|
583
|
-
_this.includeMissingIconInLayout = false;
|
|
584
|
-
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;
|
|
585
|
-
// overkill /c: when all you have is a hammer...
|
|
586
|
-
var faceAdapter = chain(_this.faceModel).map(function (face) { return new CommandFace.Adapter(face); });
|
|
587
|
-
_this.iconModel = faceAdapter.pluck('icon');
|
|
588
|
-
_this.textModel = faceAdapter.pluck('text');
|
|
589
|
-
_this.positionModel = faceAdapter.pluck('iconPosition');
|
|
590
|
-
_this.destructiveModel = faceAdapter.pluck('destructive');
|
|
591
|
-
return _this;
|
|
592
|
-
}
|
|
593
|
-
Object.defineProperty(CommandFaceComponent.prototype, "requiresMissingIconInLayout", {
|
|
594
|
-
get: function () {
|
|
595
|
-
return this.includeMissingIconInLayout && !this.iconModel.value;
|
|
596
|
-
},
|
|
597
|
-
enumerable: true,
|
|
598
|
-
configurable: true
|
|
599
|
-
});
|
|
600
|
-
CommandFaceComponent.prototype.ngOnInit = function () {
|
|
601
|
-
};
|
|
602
|
-
Object.defineProperty(CommandFaceComponent.prototype, "iconPosition", {
|
|
603
|
-
get: function () {
|
|
604
|
-
var _a, _b, _c;
|
|
605
|
-
return (_c = (_a = this.positionModel.value) !== null && _a !== void 0 ? _a : (_b = this.commandContainer) === null || _b === void 0 ? void 0 : _b.getDefaultIconPosition()) !== null && _c !== void 0 ? _c : CommandFace.Position.START;
|
|
606
|
-
},
|
|
607
|
-
enumerable: true,
|
|
608
|
-
configurable: true
|
|
609
|
-
});
|
|
610
|
-
Object.defineProperty(CommandFaceComponent.prototype, "shouldIncludeIcon", {
|
|
611
|
-
get: function () {
|
|
612
|
-
return (!this.ignoreIcon && this.iconModel.value) || this.includeMissingIconInLayout;
|
|
613
|
-
},
|
|
614
|
-
enumerable: true,
|
|
615
|
-
configurable: true
|
|
616
|
-
});
|
|
617
|
-
Object.defineProperty(CommandFaceComponent.prototype, "iconStart", {
|
|
618
|
-
get: function () {
|
|
619
|
-
return this.shouldIncludeIcon && this.iconPosition === CommandFace.Position.START;
|
|
620
|
-
},
|
|
621
|
-
enumerable: true,
|
|
622
|
-
configurable: true
|
|
623
|
-
});
|
|
624
|
-
Object.defineProperty(CommandFaceComponent.prototype, "iconEnd", {
|
|
625
|
-
get: function () {
|
|
626
|
-
return this.shouldIncludeIcon && this.iconPosition === CommandFace.Position.END;
|
|
627
|
-
},
|
|
628
|
-
enumerable: true,
|
|
629
|
-
configurable: true
|
|
630
|
-
});
|
|
631
|
-
Object.defineProperty(CommandFaceComponent.prototype, "text", {
|
|
632
|
-
get: function () {
|
|
633
|
-
return this.ignoreText ? undefined : this.textModel.value;
|
|
634
|
-
},
|
|
635
|
-
enumerable: true,
|
|
636
|
-
configurable: true
|
|
637
|
-
});
|
|
638
|
-
Object.defineProperty(CommandFaceComponent.prototype, "destructive", {
|
|
639
|
-
get: function () {
|
|
640
|
-
return this.destructiveModel.value;
|
|
641
|
-
},
|
|
642
|
-
enumerable: true,
|
|
643
|
-
configurable: true
|
|
644
|
-
});
|
|
645
|
-
CommandFaceComponent.ctorParameters = function () { return [
|
|
646
|
-
{ type: CommandContainer, decorators: [{ type: Optional }] }
|
|
647
|
-
]; };
|
|
648
|
-
__decorate([
|
|
649
|
-
Input('face'), StoreInValueModel('faceModel'),
|
|
650
|
-
__metadata("design:type", Object)
|
|
651
|
-
], CommandFaceComponent.prototype, "_rawFace", void 0);
|
|
652
|
-
__decorate([
|
|
653
|
-
Input(),
|
|
654
|
-
__metadata("design:type", Object)
|
|
655
|
-
], CommandFaceComponent.prototype, "ignoreIcon", void 0);
|
|
656
|
-
__decorate([
|
|
657
|
-
Input(),
|
|
658
|
-
__metadata("design:type", Object)
|
|
659
|
-
], CommandFaceComponent.prototype, "ignoreText", void 0);
|
|
660
|
-
__decorate([
|
|
661
|
-
Input(),
|
|
662
|
-
__metadata("design:type", Object)
|
|
663
|
-
], CommandFaceComponent.prototype, "includeMissingIconInLayout", void 0);
|
|
664
|
-
__decorate([
|
|
665
|
-
HostBinding('class.hide-icon'),
|
|
666
|
-
__metadata("design:type", Object),
|
|
667
|
-
__metadata("design:paramtypes", [])
|
|
668
|
-
], CommandFaceComponent.prototype, "requiresMissingIconInLayout", null);
|
|
669
|
-
__decorate([
|
|
670
|
-
HostBinding('class.destructive'),
|
|
671
|
-
__metadata("design:type", Boolean),
|
|
672
|
-
__metadata("design:paramtypes", [])
|
|
673
|
-
], CommandFaceComponent.prototype, "destructive", null);
|
|
674
|
-
CommandFaceComponent = __decorate([
|
|
675
|
-
Component({
|
|
676
|
-
selector: 'aup-command-face',
|
|
677
|
-
template: "<aup-icon *ngIf=\"iconStart\" [icon]=\"iconModel.value\"></aup-icon>\n<span *ngIf=\"this.text\">{{this.text}}</span>\n<aup-icon *ngIf=\"iconEnd\" [icon]=\"iconModel.value\"></aup-icon>\n",
|
|
678
|
-
encapsulation: ViewEncapsulation.None,
|
|
679
|
-
styles: ["aup-command-face{--icon-gap:var(--command-face-icon-gap);display:inline-flex;flex-direction:row;align-items:center}aup-command-face *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}"]
|
|
680
|
-
}),
|
|
681
|
-
__param(0, Optional()),
|
|
682
|
-
__metadata("design:paramtypes", [CommandContainer])
|
|
683
|
-
], CommandFaceComponent);
|
|
684
|
-
return CommandFaceComponent;
|
|
685
|
-
}(DisposableComponent));
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
*
|
|
689
|
-
*/
|
|
690
|
-
var CommandComponent = /** @class */ (function (_super) {
|
|
691
|
-
__extends(CommandComponent, _super);
|
|
692
|
-
function CommandComponent(commandContainer) {
|
|
693
|
-
var _this = _super.call(this) || this;
|
|
694
|
-
_this.commandContainer = commandContainer;
|
|
695
|
-
return _this;
|
|
696
|
-
}
|
|
697
|
-
CommandComponent.prototype.ngOnInit = function () {
|
|
698
|
-
this.registerDisposable(this.commandContainer.registerCommand(this.command, this.face));
|
|
699
|
-
};
|
|
700
|
-
CommandComponent.ctorParameters = function () { return [
|
|
701
|
-
{ type: CommandContainer }
|
|
702
|
-
]; };
|
|
703
|
-
__decorate([
|
|
704
|
-
Input(), TrackExternal(),
|
|
705
|
-
__metadata("design:type", Command)
|
|
706
|
-
], CommandComponent.prototype, "command", void 0);
|
|
707
|
-
__decorate([
|
|
708
|
-
Input(),
|
|
709
|
-
__metadata("design:type", Object)
|
|
710
|
-
], CommandComponent.prototype, "face", void 0);
|
|
711
|
-
CommandComponent = __decorate([
|
|
712
|
-
Component({
|
|
713
|
-
selector: 'aup-command',
|
|
714
|
-
template: ""
|
|
715
|
-
}),
|
|
716
|
-
__metadata("design:paramtypes", [CommandContainer])
|
|
717
|
-
], CommandComponent);
|
|
718
|
-
return CommandComponent;
|
|
719
|
-
}(DisposableComponent));
|
|
720
|
-
|
|
721
|
-
/**
|
|
722
|
-
*
|
|
723
|
-
*/
|
|
724
|
-
var PopupMenuRendererComponent = /** @class */ (function (_super) {
|
|
725
|
-
__extends(PopupMenuRendererComponent, _super);
|
|
726
|
-
function PopupMenuRendererComponent() {
|
|
727
|
-
var _this = _super.call(this) || this;
|
|
728
|
-
_this.xPosition = 'after';
|
|
729
|
-
_this.yPosition = 'below';
|
|
730
|
-
_this.commandExecuted = new EventEmitter();
|
|
731
|
-
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;
|
|
732
|
-
var registrations = chain(_this.commandRegistrations);
|
|
733
|
-
var iconCount = registrations.select(function (r) { return !!r.faceAdapter.icon; }).count();
|
|
734
|
-
_this.hasMixedIcons = valueOf.all(iconCount.isGreaterThan(0), iconCount.doesNotEqual(registrations.length)).areTruthy();
|
|
735
|
-
return _this;
|
|
736
|
-
}
|
|
737
|
-
PopupMenuRendererComponent.prototype.ngOnInit = function () {
|
|
738
|
-
};
|
|
739
|
-
PopupMenuRendererComponent.prototype.getPopupMenuCommandFor = function (item) {
|
|
740
|
-
var _this = this;
|
|
741
|
-
var when = Dsl.disposeWith(this).when;
|
|
742
|
-
when(item.command.busy).becomesFalsey(function () {
|
|
743
|
-
_this.commandExecuted.emit();
|
|
744
|
-
});
|
|
745
|
-
return item.command;
|
|
746
|
-
};
|
|
747
|
-
PopupMenuRendererComponent.prototype.getButtonColor = function (registration) {
|
|
748
|
-
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
749
|
-
};
|
|
750
|
-
__decorate([
|
|
751
|
-
Input(), TrackExternal(),
|
|
752
|
-
__metadata("design:type", ListModel)
|
|
753
|
-
], PopupMenuRendererComponent.prototype, "commandRegistrations", void 0);
|
|
754
|
-
__decorate([
|
|
755
|
-
Input(),
|
|
756
|
-
__metadata("design:type", String)
|
|
757
|
-
], PopupMenuRendererComponent.prototype, "xPosition", void 0);
|
|
758
|
-
__decorate([
|
|
759
|
-
Input(),
|
|
760
|
-
__metadata("design:type", String)
|
|
761
|
-
], PopupMenuRendererComponent.prototype, "yPosition", void 0);
|
|
762
|
-
__decorate([
|
|
763
|
-
Output(),
|
|
764
|
-
__metadata("design:type", Object)
|
|
765
|
-
], PopupMenuRendererComponent.prototype, "commandExecuted", void 0);
|
|
766
|
-
__decorate([
|
|
767
|
-
ViewChild(MatMenu),
|
|
768
|
-
__metadata("design:type", MatMenu)
|
|
769
|
-
], PopupMenuRendererComponent.prototype, "matMenu", void 0);
|
|
770
|
-
PopupMenuRendererComponent = __decorate([
|
|
771
|
-
Component({
|
|
772
|
-
selector: 'aup-popup-menu-renderer',
|
|
773
|
-
template: "<mat-menu [xPosition]=\"xPosition\" [yPosition]=\"yPosition\" >\n <button *ngFor=\"let registration of commandRegistrations.value\"\n mat-menu-item\n [pectinCommand]=\"getPopupMenuCommandFor(registration)\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\" [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n</mat-menu>\n",
|
|
774
|
-
styles: [":host{display:inline-flex;flex-direction:row;align-items:center}"]
|
|
775
|
-
}),
|
|
776
|
-
__metadata("design:paramtypes", [])
|
|
777
|
-
], PopupMenuRendererComponent);
|
|
778
|
-
return PopupMenuRendererComponent;
|
|
779
|
-
}(DisposableComponent));
|
|
780
|
-
|
|
781
|
-
/**
|
|
782
|
-
*
|
|
783
|
-
*/
|
|
784
|
-
var AbstractPopupMenuComponent = /** @class */ (function (_super) {
|
|
785
|
-
__extends(AbstractPopupMenuComponent, _super);
|
|
786
|
-
function AbstractPopupMenuComponent() {
|
|
787
|
-
var _this = _super.call(this) || this;
|
|
788
|
-
_this.xPosition = 'after';
|
|
789
|
-
_this.yPosition = 'below';
|
|
790
|
-
return _this;
|
|
791
|
-
}
|
|
792
|
-
Object.defineProperty(AbstractPopupMenuComponent.prototype, "matMenuComponent", {
|
|
793
|
-
get: function () {
|
|
794
|
-
var _a;
|
|
795
|
-
return (_a = this.popupMenu) === null || _a === void 0 ? void 0 : _a.matMenu;
|
|
796
|
-
},
|
|
797
|
-
enumerable: true,
|
|
798
|
-
configurable: true
|
|
799
|
-
});
|
|
800
|
-
AbstractPopupMenuComponent.prototype.closeMenu = function () {
|
|
801
|
-
this.menuTrigger.closeMenu();
|
|
802
|
-
};
|
|
803
|
-
AbstractPopupMenuComponent.prototype.getButtonColor = function (registration) {
|
|
804
|
-
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
805
|
-
};
|
|
806
|
-
__decorate([
|
|
807
|
-
Input(),
|
|
808
|
-
__metadata("design:type", String)
|
|
809
|
-
], AbstractPopupMenuComponent.prototype, "xPosition", void 0);
|
|
810
|
-
__decorate([
|
|
811
|
-
Input(),
|
|
812
|
-
__metadata("design:type", String)
|
|
813
|
-
], AbstractPopupMenuComponent.prototype, "yPosition", void 0);
|
|
814
|
-
__decorate([
|
|
815
|
-
ViewChild(PopupMenuRendererComponent),
|
|
816
|
-
__metadata("design:type", PopupMenuRendererComponent)
|
|
817
|
-
], AbstractPopupMenuComponent.prototype, "popupMenu", void 0);
|
|
818
|
-
__decorate([
|
|
819
|
-
ViewChild(MatMenuTrigger),
|
|
820
|
-
__metadata("design:type", MatMenuTrigger)
|
|
821
|
-
], AbstractPopupMenuComponent.prototype, "menuTrigger", void 0);
|
|
822
|
-
AbstractPopupMenuComponent = __decorate([
|
|
823
|
-
Component({
|
|
824
|
-
selector: 'aup-abstract-popup-menu',
|
|
825
|
-
template: ''
|
|
826
|
-
}),
|
|
827
|
-
__metadata("design:paramtypes", [])
|
|
828
|
-
], AbstractPopupMenuComponent);
|
|
829
|
-
return AbstractPopupMenuComponent;
|
|
830
|
-
}(CommandContainer));
|
|
831
|
-
|
|
832
|
-
/**
|
|
833
|
-
*
|
|
834
|
-
*/
|
|
835
|
-
var PopupMenuComponent = /** @class */ (function (_super) {
|
|
836
|
-
__extends(PopupMenuComponent, _super);
|
|
837
|
-
function PopupMenuComponent() {
|
|
838
|
-
var _this = _super.call(this) || this;
|
|
839
|
-
_this.faceModel = new MutableValueModel();
|
|
840
|
-
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;
|
|
841
|
-
var faceAdapterModel = chain(_this.faceModel).map(function (face) { return new CommandFace.Adapter(face); });
|
|
842
|
-
_this.faceTooltipModel = faceAdapterModel.pluck('tooltip');
|
|
843
|
-
return _this;
|
|
844
|
-
}
|
|
845
|
-
PopupMenuComponent_1 = PopupMenuComponent;
|
|
846
|
-
PopupMenuComponent.prototype.getTooltip = function () {
|
|
847
|
-
return this.faceTooltipModel.value;
|
|
848
|
-
};
|
|
849
|
-
PopupMenuComponent.prototype.ngOnInit = function () {
|
|
850
|
-
};
|
|
851
|
-
var PopupMenuComponent_1;
|
|
852
|
-
__decorate([
|
|
853
|
-
Input(), StoreInValueModel('faceModel'),
|
|
854
|
-
__metadata("design:type", Object)
|
|
855
|
-
], PopupMenuComponent.prototype, "face", void 0);
|
|
856
|
-
PopupMenuComponent = PopupMenuComponent_1 = __decorate([
|
|
857
|
-
Component({
|
|
858
|
-
selector: 'aup-popup-menu',
|
|
859
|
-
template: "\n <!-- we can only render the button after th popup menu has initialised and rendered it's menu component -->\n <button *ngIf=\"matMenuComponent\" mat-icon-button [matMenuTriggerFor]=\"matMenuComponent\" [matTooltip]=\"getTooltip()\">\n <aup-command-face [face]=\"face\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer [commandRegistrations]=\"commandRegistrations\" [yPosition]=\"yPosition\"\n [xPosition]=\"xPosition\"\n (commandExecuted)=\"closeMenu()\"></aup-popup-menu-renderer>\n ",
|
|
860
|
-
providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return PopupMenuComponent_1; }) }]
|
|
861
|
-
}),
|
|
862
|
-
__metadata("design:paramtypes", [])
|
|
863
|
-
], PopupMenuComponent);
|
|
864
|
-
return PopupMenuComponent;
|
|
865
|
-
}(AbstractPopupMenuComponent));
|
|
866
|
-
|
|
867
|
-
/**
|
|
868
|
-
*
|
|
869
|
-
*/
|
|
870
|
-
var MoreMenuComponent = /** @class */ (function (_super) {
|
|
871
|
-
__extends(MoreMenuComponent, _super);
|
|
872
|
-
function MoreMenuComponent() {
|
|
873
|
-
return _super.call(this) || this;
|
|
874
|
-
}
|
|
875
|
-
MoreMenuComponent_1 = MoreMenuComponent;
|
|
876
|
-
var MoreMenuComponent_1;
|
|
877
|
-
__decorate([
|
|
878
|
-
Input(),
|
|
879
|
-
__metadata("design:type", String)
|
|
880
|
-
], MoreMenuComponent.prototype, "tooltip", void 0);
|
|
881
|
-
MoreMenuComponent = MoreMenuComponent_1 = __decorate([
|
|
882
|
-
Component({
|
|
883
|
-
selector: 'aup-more-menu',
|
|
884
|
-
template: "\n <!-- we can only render the button after th popup menu has initialised and rendered it's menu component -->\n <button *ngIf=\"matMenuComponent\" mat-icon-button [matMenuTriggerFor]=\"matMenuComponent\" [matTooltip]=\"tooltip\">\n <mat-icon>more_vert</mat-icon>\n </button>\n <aup-popup-menu-renderer [commandRegistrations]=\"commandRegistrations\"\n [yPosition]=\"yPosition\" [xPosition]=\"xPosition\"\n (commandExecuted)=\"closeMenu()\"></aup-popup-menu-renderer>\n ",
|
|
885
|
-
providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return MoreMenuComponent_1; }) }]
|
|
886
|
-
}),
|
|
887
|
-
__metadata("design:paramtypes", [])
|
|
888
|
-
], MoreMenuComponent);
|
|
889
|
-
return MoreMenuComponent;
|
|
890
|
-
}(AbstractPopupMenuComponent));
|
|
891
|
-
|
|
892
416
|
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
893
417
|
__extends(FocusContainerComponent, _super);
|
|
894
418
|
function FocusContainerComponent(focusManager) {
|
|
@@ -997,7 +521,6 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
997
521
|
__extends(AbstractInputComponent, _super);
|
|
998
522
|
function AbstractInputComponent() {
|
|
999
523
|
var _this = _super.call(this) || this;
|
|
1000
|
-
_this.onValueEditedListeners = new EventListenerList();
|
|
1001
524
|
_this.dense = false;
|
|
1002
525
|
// TODO: fix this.
|
|
1003
526
|
// tslint:disable-next-line:no-output-native
|
|
@@ -1048,7 +571,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1048
571
|
};
|
|
1049
572
|
Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
|
|
1050
573
|
get: function () {
|
|
1051
|
-
return this.
|
|
574
|
+
return this.inputModel.enabled;
|
|
1052
575
|
},
|
|
1053
576
|
enumerable: true,
|
|
1054
577
|
configurable: true
|
|
@@ -1058,7 +581,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1058
581
|
};
|
|
1059
582
|
Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
|
|
1060
583
|
get: function () {
|
|
1061
|
-
return this.
|
|
584
|
+
return this.inputModel.errorList;
|
|
1062
585
|
},
|
|
1063
586
|
enumerable: true,
|
|
1064
587
|
configurable: true
|
|
@@ -1072,7 +595,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1072
595
|
});
|
|
1073
596
|
Object.defineProperty(AbstractInputComponent.prototype, "focusContext", {
|
|
1074
597
|
get: function () {
|
|
1075
|
-
return this.
|
|
598
|
+
return this.inputModel.focusContext;
|
|
1076
599
|
},
|
|
1077
600
|
enumerable: true,
|
|
1078
601
|
configurable: true
|
|
@@ -1091,13 +614,6 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1091
614
|
enumerable: true,
|
|
1092
615
|
configurable: true
|
|
1093
616
|
});
|
|
1094
|
-
/**
|
|
1095
|
-
* Invokes the callback when this components value is changed by a user edit.
|
|
1096
|
-
* @param callback
|
|
1097
|
-
*/
|
|
1098
|
-
AbstractInputComponent.prototype.onValueEdited = function (callback) {
|
|
1099
|
-
return this.onValueEditedListeners.add(callback);
|
|
1100
|
-
};
|
|
1101
617
|
__decorate([
|
|
1102
618
|
Input(),
|
|
1103
619
|
__metadata("design:type", String)
|
|
@@ -1187,7 +703,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1187
703
|
var AbstractListInputComponent = /** @class */ (function (_super) {
|
|
1188
704
|
__extends(AbstractListInputComponent, _super);
|
|
1189
705
|
function AbstractListInputComponent() {
|
|
1190
|
-
var _this = _super.
|
|
706
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1191
707
|
/**
|
|
1192
708
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1193
709
|
*
|
|
@@ -1199,61 +715,11 @@ var AbstractListInputComponent = /** @class */ (function (_super) {
|
|
|
1199
715
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1200
716
|
*/
|
|
1201
717
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1202
|
-
_this.
|
|
1203
|
-
_this.componentListModel = new MutableListModel();
|
|
1204
|
-
_this.setValueIsInProgress = new Guard();
|
|
1205
|
-
_this.valueChange = new EventEmitter();
|
|
1206
|
-
var _a = Dsl.disposeWith(_this), when = _a.when, valueOf = _a.valueOf, chain = _a.chain;
|
|
1207
|
-
var binding = new Binding.Identity(_this.formValueModel, _this.componentListModel).writeRight();
|
|
1208
|
-
var inExternalChange = valueOf.any(_this.setValueIsInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
|
|
1209
|
-
when(_this.componentListModel).changes(function (is, was) {
|
|
1210
|
-
_this.valueChange.emit(is);
|
|
1211
|
-
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
1212
|
-
}, {
|
|
1213
|
-
initialValue: 'ignore',
|
|
1214
|
-
// we never fire events during an external changes to the value. This allows
|
|
1215
|
-
// the component to behave when used in the conventional angular
|
|
1216
|
-
// fashion, i.e. [(value)]="..."
|
|
1217
|
-
unless: inExternalChange
|
|
1218
|
-
});
|
|
1219
|
-
DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
718
|
+
_this.inputModel = _this.registerDisposable(new Form.DelegatingListModel());
|
|
1220
719
|
return _this;
|
|
1221
720
|
}
|
|
1222
|
-
Object.defineProperty(AbstractListInputComponent.prototype, "value", {
|
|
1223
|
-
// We add support for simple direct display of values by allowing components to be used
|
|
1224
|
-
// by `component.value = ...` This use of the component without a value model in tables
|
|
1225
|
-
// and the like.
|
|
1226
|
-
set: function (value) {
|
|
1227
|
-
var _this = this;
|
|
1228
|
-
this.setValueIsInProgress.whileTrue(function () {
|
|
1229
|
-
if (!_this.listHolder) {
|
|
1230
|
-
_this.listHolder = new MutableListModel(value);
|
|
1231
|
-
_this.listModel = _this.listHolder;
|
|
1232
|
-
}
|
|
1233
|
-
else {
|
|
1234
|
-
_this.listHolder.value = value;
|
|
1235
|
-
}
|
|
1236
|
-
});
|
|
1237
|
-
},
|
|
1238
|
-
enumerable: true,
|
|
1239
|
-
configurable: true
|
|
1240
|
-
});
|
|
1241
|
-
__decorate([
|
|
1242
|
-
Input(), TrackExternal({ delegateTo: 'formValueModel' }),
|
|
1243
|
-
__metadata("design:type", Object)
|
|
1244
|
-
], AbstractListInputComponent.prototype, "listModel", void 0);
|
|
1245
|
-
__decorate([
|
|
1246
|
-
Input(),
|
|
1247
|
-
__metadata("design:type", Array),
|
|
1248
|
-
__metadata("design:paramtypes", [Array])
|
|
1249
|
-
], AbstractListInputComponent.prototype, "value", null);
|
|
1250
|
-
__decorate([
|
|
1251
|
-
Output(),
|
|
1252
|
-
__metadata("design:type", Object)
|
|
1253
|
-
], AbstractListInputComponent.prototype, "valueChange", void 0);
|
|
1254
721
|
AbstractListInputComponent = __decorate([
|
|
1255
|
-
Component({ template: '' })
|
|
1256
|
-
__metadata("design:paramtypes", [])
|
|
722
|
+
Component({ template: '' })
|
|
1257
723
|
], AbstractListInputComponent);
|
|
1258
724
|
return AbstractListInputComponent;
|
|
1259
725
|
}(AbstractInputComponent));
|
|
@@ -1273,58 +739,9 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
|
|
|
1273
739
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1274
740
|
*/
|
|
1275
741
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1276
|
-
_this.
|
|
1277
|
-
_this.setValueInProgress = new Guard();
|
|
1278
|
-
_this.componentValueModel = new MutableValueModel();
|
|
1279
|
-
_this.valueChange = new EventEmitter();
|
|
1280
|
-
var _a = Dsl.disposeWith(_this), when = _a.when, chain = _a.chain, valueOf = _a.valueOf;
|
|
1281
|
-
var binding = new Binding.Identity(_this.formValueModel, _this.componentValueModel).writeRight();
|
|
1282
|
-
var inExternalChange = valueOf.any(_this.setValueInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
|
|
1283
|
-
when(_this.componentValueModel).changes(function (is, was) {
|
|
1284
|
-
_this.valueChange.emit(is);
|
|
1285
|
-
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
1286
|
-
}, {
|
|
1287
|
-
initialValue: 'ignore',
|
|
1288
|
-
// we never fire events during an external set value operation. This allows
|
|
1289
|
-
// the component to behave when used in the conventional angular
|
|
1290
|
-
// fashion, i.e. [(value)]="..."
|
|
1291
|
-
unless: inExternalChange
|
|
1292
|
-
});
|
|
1293
|
-
DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
742
|
+
_this.inputModel = _this.registerDisposable(new Form.DelegatingValueModel());
|
|
1294
743
|
return _this;
|
|
1295
744
|
}
|
|
1296
|
-
Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
|
|
1297
|
-
// We add support for simple direct display of values by allowing components to be used
|
|
1298
|
-
// by `component.value = ...` This use of the component without a value model in tables
|
|
1299
|
-
// and the like.
|
|
1300
|
-
set: function (value) {
|
|
1301
|
-
var _this = this;
|
|
1302
|
-
this.setValueInProgress.whileTrue(function () {
|
|
1303
|
-
if (!_this.plainValueHolder) {
|
|
1304
|
-
_this.plainValueHolder = new MutableValueModel(value);
|
|
1305
|
-
_this.valueModel = _this.plainValueHolder;
|
|
1306
|
-
}
|
|
1307
|
-
else {
|
|
1308
|
-
_this.plainValueHolder.value = value;
|
|
1309
|
-
}
|
|
1310
|
-
});
|
|
1311
|
-
},
|
|
1312
|
-
enumerable: true,
|
|
1313
|
-
configurable: true
|
|
1314
|
-
});
|
|
1315
|
-
__decorate([
|
|
1316
|
-
Input(), TrackExternal({ delegateTo: 'formValueModel' }),
|
|
1317
|
-
__metadata("design:type", Object)
|
|
1318
|
-
], AbstractValueInputComponent.prototype, "valueModel", void 0);
|
|
1319
|
-
__decorate([
|
|
1320
|
-
Input(),
|
|
1321
|
-
__metadata("design:type", Object),
|
|
1322
|
-
__metadata("design:paramtypes", [Object])
|
|
1323
|
-
], AbstractValueInputComponent.prototype, "value", null);
|
|
1324
|
-
__decorate([
|
|
1325
|
-
Output(),
|
|
1326
|
-
__metadata("design:type", Object)
|
|
1327
|
-
], AbstractValueInputComponent.prototype, "valueChange", void 0);
|
|
1328
745
|
AbstractValueInputComponent = __decorate([
|
|
1329
746
|
Component({ template: '' }),
|
|
1330
747
|
__metadata("design:paramtypes", [])
|
|
@@ -1332,85 +749,20 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
|
|
|
1332
749
|
return AbstractValueInputComponent;
|
|
1333
750
|
}(AbstractInputComponent));
|
|
1334
751
|
|
|
1335
|
-
/**
|
|
1336
|
-
* Using templates (not only supported for nil values:
|
|
1337
|
-
* <aup-autocomplete-input [valueModel]="myModel" [options]="myOptions">
|
|
1338
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1339
|
-
* </aup-autocomplete-input>
|
|
1340
|
-
*/
|
|
1341
|
-
var AutocompleteInputComponent = /** @class */ (function (_super) {
|
|
1342
|
-
__extends(AutocompleteInputComponent, _super);
|
|
1343
|
-
function AutocompleteInputComponent() {
|
|
1344
|
-
var _this = _super.call(this) || this;
|
|
1345
|
-
_this.filterValue = new MutableValueModel();
|
|
1346
|
-
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
1347
|
-
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;
|
|
1348
|
-
var lowerCaseFilterValue = chain(_this.filterValue)
|
|
1349
|
-
.map(function (v) { return ___default.isString(v) ? v.toLowerCase() : ''; });
|
|
1350
|
-
_this.filteredOptions = chain(_this.optionsModel)
|
|
1351
|
-
.select(function (option) {
|
|
1352
|
-
return ___default.isEmpty(_this.filterValue.value) || _this.optionLabelFormat(option).toString().toLowerCase().includes(lowerCaseFilterValue.value);
|
|
1353
|
-
}, { dependsOn: lowerCaseFilterValue });
|
|
1354
|
-
return _this;
|
|
1355
|
-
}
|
|
1356
|
-
AutocompleteInputComponent.prototype.ngOnInit = function () {
|
|
1357
|
-
};
|
|
1358
|
-
AutocompleteInputComponent.prototype.formatOption = function (option) {
|
|
1359
|
-
return this.optionLabelFormat(option);
|
|
1360
|
-
};
|
|
1361
|
-
AutocompleteInputComponent.prototype.updateFilter = function ($event) {
|
|
1362
|
-
this.filterValue.value = $event;
|
|
1363
|
-
};
|
|
1364
|
-
AutocompleteInputComponent.prototype.onSelect = function ($event) {
|
|
1365
|
-
this.valueModel.value = $event.option.value;
|
|
1366
|
-
};
|
|
1367
|
-
__decorate([
|
|
1368
|
-
Input(), TrackExternal(),
|
|
1369
|
-
__metadata("design:type", ListModel)
|
|
1370
|
-
], AutocompleteInputComponent.prototype, "optionsModel", void 0);
|
|
1371
|
-
__decorate([
|
|
1372
|
-
Input(), StoreInListModel('optionsModel'),
|
|
1373
|
-
__metadata("design:type", Array)
|
|
1374
|
-
], AutocompleteInputComponent.prototype, "options", void 0);
|
|
1375
|
-
__decorate([
|
|
1376
|
-
Input(),
|
|
1377
|
-
__metadata("design:type", Object)
|
|
1378
|
-
], AutocompleteInputComponent.prototype, "optionLabel", void 0);
|
|
1379
|
-
__decorate([
|
|
1380
|
-
Input(),
|
|
1381
|
-
__metadata("design:type", Boolean)
|
|
1382
|
-
], AutocompleteInputComponent.prototype, "allowNil", void 0);
|
|
1383
|
-
__decorate([
|
|
1384
|
-
ContentChild('nilOptionTemplate'),
|
|
1385
|
-
__metadata("design:type", TemplateRef)
|
|
1386
|
-
], AutocompleteInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
1387
|
-
__decorate([
|
|
1388
|
-
Input(),
|
|
1389
|
-
__metadata("design:type", Function)
|
|
1390
|
-
], AutocompleteInputComponent.prototype, "optionLabelFormat", void 0);
|
|
1391
|
-
AutocompleteInputComponent = __decorate([
|
|
1392
|
-
Component({
|
|
1393
|
-
selector: 'aup-autocomplete-input',
|
|
1394
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"string\"\n matInput\n [matAutocomplete]=\"autocomplete\"\n placeholder=\"{{placeholder}}\"\n [ngModel]=\"componentValueModel.value\"\n (ngModelChange)=\"updateFilter($event)\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-autocomplete #autocomplete [displayWith]=\"optionLabelFormat\" [autoActiveFirstOption]=\"true\" (optionSelected)=\"onSelect($event)\">\n <mat-option *ngFor=\"let option of filteredOptions.value; let i = index\"\n [value]=\"option\"\n >{{formatOption(option)}}</mat-option>\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1395
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1396
|
-
}),
|
|
1397
|
-
__metadata("design:paramtypes", [])
|
|
1398
|
-
], AutocompleteInputComponent);
|
|
1399
|
-
return AutocompleteInputComponent;
|
|
1400
|
-
}(AbstractValueInputComponent));
|
|
1401
|
-
|
|
1402
752
|
var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
1403
753
|
__extends(CheckboxInputComponent, _super);
|
|
1404
754
|
function CheckboxInputComponent() {
|
|
1405
755
|
var _this = _super.call(this) || this;
|
|
1406
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1407
|
-
// valueModel: Form.ValueModelBase<boolean> | IMutableValueModel<boolean>;
|
|
1408
756
|
_this.color = 'accent';
|
|
1409
757
|
_this.labelPosition = 'after';
|
|
1410
758
|
return _this;
|
|
1411
759
|
}
|
|
1412
760
|
CheckboxInputComponent.prototype.ngOnInit = function () {
|
|
1413
761
|
};
|
|
762
|
+
__decorate([
|
|
763
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
764
|
+
__metadata("design:type", Object)
|
|
765
|
+
], CheckboxInputComponent.prototype, "valueModel", void 0);
|
|
1414
766
|
__decorate([
|
|
1415
767
|
Input(),
|
|
1416
768
|
__metadata("design:type", String)
|
|
@@ -1422,7 +774,7 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
|
1422
774
|
CheckboxInputComponent = __decorate([
|
|
1423
775
|
Component({
|
|
1424
776
|
selector: 'aup-checkbox-input',
|
|
1425
|
-
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"
|
|
777
|
+
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=\"showHint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
|
|
1426
778
|
styles: [":host{display:inline-flex;flex-direction:column;padding:24px 0 16px}:host.dense{padding:6px 0 2px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]
|
|
1427
779
|
}),
|
|
1428
780
|
__metadata("design:paramtypes", [])
|
|
@@ -1430,65 +782,20 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
|
1430
782
|
return CheckboxInputComponent;
|
|
1431
783
|
}(AbstractValueInputComponent));
|
|
1432
784
|
|
|
1433
|
-
/**
|
|
1434
|
-
* Using templates:
|
|
1435
|
-
* <aup-multiple-select-input [valueModel]="myModel" [options]="myOptions">
|
|
1436
|
-
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1437
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1438
|
-
* </aup-multiple-select_input>
|
|
1439
|
-
*/
|
|
1440
|
-
var MultipleSelectInputComponent = /** @class */ (function (_super) {
|
|
1441
|
-
__extends(MultipleSelectInputComponent, _super);
|
|
1442
|
-
function MultipleSelectInputComponent() {
|
|
1443
|
-
var _this = _super.call(this) || this;
|
|
1444
|
-
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
1445
|
-
return _this;
|
|
1446
|
-
}
|
|
1447
|
-
MultipleSelectInputComponent.prototype.ngOnInit = function () {
|
|
1448
|
-
};
|
|
1449
|
-
__decorate([
|
|
1450
|
-
Input(), TrackExternal(),
|
|
1451
|
-
__metadata("design:type", ListModel)
|
|
1452
|
-
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
1453
|
-
__decorate([
|
|
1454
|
-
Input(), StoreInListModel('optionsModel'),
|
|
1455
|
-
__metadata("design:type", Array)
|
|
1456
|
-
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
1457
|
-
__decorate([
|
|
1458
|
-
Input(),
|
|
1459
|
-
__metadata("design:type", Object)
|
|
1460
|
-
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
1461
|
-
__decorate([
|
|
1462
|
-
ContentChild('optionTemplate'),
|
|
1463
|
-
__metadata("design:type", TemplateRef)
|
|
1464
|
-
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
1465
|
-
__decorate([
|
|
1466
|
-
Input(),
|
|
1467
|
-
__metadata("design:type", Function)
|
|
1468
|
-
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
1469
|
-
MultipleSelectInputComponent = __decorate([
|
|
1470
|
-
Component({
|
|
1471
|
-
selector: 'aup-multiple-select-input',
|
|
1472
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"componentListModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\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=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1473
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1474
|
-
}),
|
|
1475
|
-
__metadata("design:paramtypes", [])
|
|
1476
|
-
], MultipleSelectInputComponent);
|
|
1477
|
-
return MultipleSelectInputComponent;
|
|
1478
|
-
}(AbstractListInputComponent));
|
|
1479
|
-
|
|
1480
785
|
var NumberInputComponent = /** @class */ (function (_super) {
|
|
1481
786
|
__extends(NumberInputComponent, _super);
|
|
1482
787
|
function NumberInputComponent() {
|
|
1483
788
|
var _this = _super.call(this) || this;
|
|
1484
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1485
|
-
// valueModel: Form.ValueModelBase<number> | IMutableValueModel<number>;
|
|
1486
789
|
_this.min = Number.MIN_SAFE_INTEGER;
|
|
1487
790
|
_this.max = Number.MAX_SAFE_INTEGER;
|
|
1488
791
|
return _this;
|
|
1489
792
|
}
|
|
1490
793
|
NumberInputComponent.prototype.ngOnInit = function () {
|
|
1491
794
|
};
|
|
795
|
+
__decorate([
|
|
796
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
797
|
+
__metadata("design:type", Object)
|
|
798
|
+
], NumberInputComponent.prototype, "valueModel", void 0);
|
|
1492
799
|
__decorate([
|
|
1493
800
|
Input(),
|
|
1494
801
|
__metadata("design:type", Object)
|
|
@@ -1500,7 +807,7 @@ var NumberInputComponent = /** @class */ (function (_super) {
|
|
|
1500
807
|
NumberInputComponent = __decorate([
|
|
1501
808
|
Component({
|
|
1502
809
|
selector: 'aup-number-input',
|
|
1503
|
-
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)]=\"
|
|
810
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n >\n <mat-hint *ngIf=\"hint && !dense\" >{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1504
811
|
styles: [""]
|
|
1505
812
|
}),
|
|
1506
813
|
__metadata("design:paramtypes", [])
|
|
@@ -1510,17 +817,19 @@ var NumberInputComponent = /** @class */ (function (_super) {
|
|
|
1510
817
|
|
|
1511
818
|
var PasswordInputComponent = /** @class */ (function (_super) {
|
|
1512
819
|
__extends(PasswordInputComponent, _super);
|
|
1513
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1514
|
-
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
1515
820
|
function PasswordInputComponent() {
|
|
1516
821
|
return _super.call(this) || this;
|
|
1517
822
|
}
|
|
1518
823
|
PasswordInputComponent.prototype.ngOnInit = function () {
|
|
1519
824
|
};
|
|
825
|
+
__decorate([
|
|
826
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
827
|
+
__metadata("design:type", Object)
|
|
828
|
+
], PasswordInputComponent.prototype, "valueModel", void 0);
|
|
1520
829
|
PasswordInputComponent = __decorate([
|
|
1521
830
|
Component({
|
|
1522
831
|
selector: 'aup-password-input',
|
|
1523
|
-
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)]=\"
|
|
832
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
1524
833
|
styles: [""]
|
|
1525
834
|
}),
|
|
1526
835
|
__metadata("design:paramtypes", [])
|
|
@@ -1532,7 +841,6 @@ var PasswordInputComponent = /** @class */ (function (_super) {
|
|
|
1532
841
|
* Using templates:
|
|
1533
842
|
* <aup-select-input [valueModel]="myModel" [options]="myOptions">
|
|
1534
843
|
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1535
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1536
844
|
* </aup-select_input>
|
|
1537
845
|
*/
|
|
1538
846
|
var SelectInputComponent = /** @class */ (function (_super) {
|
|
@@ -1544,6 +852,10 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
1544
852
|
}
|
|
1545
853
|
SelectInputComponent.prototype.ngOnInit = function () {
|
|
1546
854
|
};
|
|
855
|
+
__decorate([
|
|
856
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
857
|
+
__metadata("design:type", Object)
|
|
858
|
+
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
1547
859
|
__decorate([
|
|
1548
860
|
Input(), TrackExternal(),
|
|
1549
861
|
__metadata("design:type", ListModel)
|
|
@@ -1575,7 +887,7 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
1575
887
|
SelectInputComponent = __decorate([
|
|
1576
888
|
Component({
|
|
1577
889
|
selector: 'aup-select-input',
|
|
1578
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
890
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1579
891
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1580
892
|
}),
|
|
1581
893
|
__metadata("design:paramtypes", [])
|
|
@@ -1589,13 +901,17 @@ var StringInputComponent = /** @class */ (function (_super) {
|
|
|
1589
901
|
var _this = _super.call(this) || this;
|
|
1590
902
|
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;
|
|
1591
903
|
_this.clearCommand = Command.create(function () {
|
|
1592
|
-
_this.
|
|
904
|
+
_this.valueModel.value = null;
|
|
1593
905
|
});
|
|
1594
|
-
_this.clearCommand.disableWhile(chain.stringValue(_this.
|
|
906
|
+
_this.clearCommand.disableWhile(chain.stringValue(_this.valueModel).isBlank());
|
|
1595
907
|
return _this;
|
|
1596
908
|
}
|
|
1597
909
|
StringInputComponent.prototype.ngOnInit = function () {
|
|
1598
910
|
};
|
|
911
|
+
__decorate([
|
|
912
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
913
|
+
__metadata("design:type", Object)
|
|
914
|
+
], StringInputComponent.prototype, "valueModel", void 0);
|
|
1599
915
|
__decorate([
|
|
1600
916
|
Input(), TrackExternal({ defaultValue: false }),
|
|
1601
917
|
__metadata("design:type", ValueModel)
|
|
@@ -1607,7 +923,7 @@ var StringInputComponent = /** @class */ (function (_super) {
|
|
|
1607
923
|
StringInputComponent = __decorate([
|
|
1608
924
|
Component({
|
|
1609
925
|
selector: 'aup-string-input',
|
|
1610
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
926
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n",
|
|
1611
927
|
styles: ["button[disabled]{visibility:hidden}"]
|
|
1612
928
|
}),
|
|
1613
929
|
__metadata("design:paramtypes", [])
|
|
@@ -1619,14 +935,16 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
1619
935
|
__extends(TextInputComponent, _super);
|
|
1620
936
|
function TextInputComponent() {
|
|
1621
937
|
var _this = _super.call(this) || this;
|
|
1622
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1623
|
-
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
1624
938
|
_this.rows = 2;
|
|
1625
939
|
return _this;
|
|
1626
940
|
// const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1627
941
|
}
|
|
1628
942
|
TextInputComponent.prototype.ngOnInit = function () {
|
|
1629
943
|
};
|
|
944
|
+
__decorate([
|
|
945
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
946
|
+
__metadata("design:type", Object)
|
|
947
|
+
], TextInputComponent.prototype, "valueModel", void 0);
|
|
1630
948
|
__decorate([
|
|
1631
949
|
Input(),
|
|
1632
950
|
__metadata("design:type", Object)
|
|
@@ -1638,7 +956,7 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
1638
956
|
TextInputComponent = __decorate([
|
|
1639
957
|
Component({
|
|
1640
958
|
selector: 'aup-text-input',
|
|
1641
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
959
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
1642
960
|
styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
1643
961
|
}),
|
|
1644
962
|
__metadata("design:paramtypes", [])
|
|
@@ -1646,59 +964,6 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
1646
964
|
return TextInputComponent;
|
|
1647
965
|
}(AbstractValueInputComponent));
|
|
1648
966
|
|
|
1649
|
-
var IconComponent = /** @class */ (function () {
|
|
1650
|
-
function IconComponent() {
|
|
1651
|
-
this.allowedPrefixes = Enum.values(IconComponent_1.IconPrefix).map(function (p) { return p + ":"; });
|
|
1652
|
-
this.iconPrefix = IconComponent_1.IconPrefix;
|
|
1653
|
-
}
|
|
1654
|
-
IconComponent_1 = IconComponent;
|
|
1655
|
-
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
1656
|
-
get: function () {
|
|
1657
|
-
return this._icon;
|
|
1658
|
-
},
|
|
1659
|
-
set: function (iconName) {
|
|
1660
|
-
this._icon = iconName;
|
|
1661
|
-
if (!iconName) {
|
|
1662
|
-
this.errorMessage = 'icon is nil';
|
|
1663
|
-
this.prefix = undefined;
|
|
1664
|
-
return;
|
|
1665
|
-
}
|
|
1666
|
-
var colonIndex = iconName.indexOf(':');
|
|
1667
|
-
if (colonIndex > 0) {
|
|
1668
|
-
this.prefix = this.icon.slice(0, colonIndex);
|
|
1669
|
-
this.suffix = this.icon.slice(colonIndex + 1);
|
|
1670
|
-
}
|
|
1671
|
-
if (this.prefix) {
|
|
1672
|
-
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
1673
|
-
}
|
|
1674
|
-
this.errorMessage = "Unknown icon prefix, expected one of [" + this.allowedPrefixes.join(',') + "] got \"" + this.prefix + ":\"";
|
|
1675
|
-
},
|
|
1676
|
-
enumerable: true,
|
|
1677
|
-
configurable: true
|
|
1678
|
-
});
|
|
1679
|
-
var IconComponent_1;
|
|
1680
|
-
__decorate([
|
|
1681
|
-
Input(),
|
|
1682
|
-
__metadata("design:type", String),
|
|
1683
|
-
__metadata("design:paramtypes", [String])
|
|
1684
|
-
], IconComponent.prototype, "icon", null);
|
|
1685
|
-
IconComponent = IconComponent_1 = __decorate([
|
|
1686
|
-
Component({
|
|
1687
|
-
selector: 'aup-icon',
|
|
1688
|
-
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"iconPrefix.SVG\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"iconPrefix.MATERIAL\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"iconPrefix.FONT_AWESOME\"\n class=\"faIconWrapper\">\n <fa-icon [icon]=\"suffix\">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n",
|
|
1689
|
-
styles: [":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center;width:24px;height:24px}.svgIcon{width:24px;height:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{width:inherit;height:inherit}"]
|
|
1690
|
-
})
|
|
1691
|
-
], IconComponent);
|
|
1692
|
-
return IconComponent;
|
|
1693
|
-
}());
|
|
1694
|
-
(function (IconComponent) {
|
|
1695
|
-
IconComponent.IconPrefix = Enum({
|
|
1696
|
-
SVG: 'svg',
|
|
1697
|
-
FONT_AWESOME: 'fa',
|
|
1698
|
-
MATERIAL: 'mat'
|
|
1699
|
-
});
|
|
1700
|
-
})(IconComponent || (IconComponent = {}));
|
|
1701
|
-
|
|
1702
967
|
var NoopComponent = /** @class */ (function () {
|
|
1703
968
|
function NoopComponent() {
|
|
1704
969
|
}
|
|
@@ -1909,7 +1174,6 @@ var CellHeaderPortalRef = /** @class */ (function (_super) {
|
|
|
1909
1174
|
assert$1.isTruthy(host);
|
|
1910
1175
|
host[HEADER_CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
1911
1176
|
};
|
|
1912
|
-
// @Trace()
|
|
1913
1177
|
CellHeaderPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
1914
1178
|
this.initialiseHeader(portalComponent, host.column);
|
|
1915
1179
|
};
|
|
@@ -1933,15 +1197,13 @@ var ComponentCellRendererPortalRef = /** @class */ (function (_super) {
|
|
|
1933
1197
|
ComponentCellRendererPortalRef.prototype.initialiseHost = function (host, columnModel) {
|
|
1934
1198
|
host[CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
1935
1199
|
};
|
|
1936
|
-
// @Trace()
|
|
1937
1200
|
ComponentCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
1938
1201
|
host[PORTAL_RENDERER_COMPONENT] = portalComponent;
|
|
1939
|
-
this.updateComponent(portalComponent, host.getRowData()
|
|
1202
|
+
this.updateComponent(portalComponent, host.getRowData());
|
|
1940
1203
|
};
|
|
1941
|
-
// @Trace()
|
|
1942
1204
|
ComponentCellRendererPortalRef.prototype.pushState = function (host) {
|
|
1943
1205
|
if (host[PORTAL_RENDERER_COMPONENT]) {
|
|
1944
|
-
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData()
|
|
1206
|
+
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData());
|
|
1945
1207
|
}
|
|
1946
1208
|
};
|
|
1947
1209
|
return ComponentCellRendererPortalRef;
|
|
@@ -1983,7 +1245,6 @@ var TemplateCellRendererPortalRef = /** @class */ (function (_super) {
|
|
|
1983
1245
|
TemplateCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
1984
1246
|
// don't care
|
|
1985
1247
|
};
|
|
1986
|
-
// @Trace()
|
|
1987
1248
|
TemplateCellRendererPortalRef.prototype.pushState = function (host) {
|
|
1988
1249
|
host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());
|
|
1989
1250
|
host.fillCell = this.fillCell;
|
|
@@ -2175,7 +1436,6 @@ var SelectHeaderCellRendererComponent = /** @class */ (function (_super) {
|
|
|
2175
1436
|
var noop = function () {
|
|
2176
1437
|
};
|
|
2177
1438
|
var ɵ0 = noop;
|
|
2178
|
-
var CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
|
|
2179
1439
|
var ColumnModel = /** @class */ (function () {
|
|
2180
1440
|
function ColumnModel(columnId, defaults) {
|
|
2181
1441
|
this.columnId = columnId;
|
|
@@ -2266,66 +1526,24 @@ var ColumnModel = /** @class */ (function () {
|
|
|
2266
1526
|
}());
|
|
2267
1527
|
var PropertyColumnModel = /** @class */ (function (_super) {
|
|
2268
1528
|
__extends(PropertyColumnModel, _super);
|
|
2269
|
-
function PropertyColumnModel(
|
|
2270
|
-
var _this = _super.call(this,
|
|
1529
|
+
function PropertyColumnModel(property, defaults) {
|
|
1530
|
+
var _this = _super.call(this, property.toString(), defaults) || this;
|
|
2271
1531
|
_this.property = property;
|
|
2272
1532
|
_this._format = function (value) { return value; };
|
|
2273
1533
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
2274
1534
|
return _this;
|
|
2275
1535
|
}
|
|
2276
|
-
PropertyColumnModel.prototype.cellRenderer = function (componentType
|
|
1536
|
+
PropertyColumnModel.prototype.cellRenderer = function (componentType) {
|
|
2277
1537
|
var _this = this;
|
|
2278
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData
|
|
2279
|
-
if (firstTime) {
|
|
2280
|
-
if (___default.isFunction(onComponentInitOrOptions)) {
|
|
2281
|
-
onComponentInitOrOptions(component);
|
|
2282
|
-
}
|
|
2283
|
-
else {
|
|
2284
|
-
if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
2285
|
-
onComponentInitOrOptions.onComponentInit(component);
|
|
2286
|
-
}
|
|
2287
|
-
}
|
|
2288
|
-
}
|
|
1538
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
|
|
2289
1539
|
component.value = _this._format(rowData.row[_this.property]);
|
|
2290
|
-
if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
2291
|
-
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
2292
|
-
}
|
|
2293
1540
|
}));
|
|
2294
1541
|
return this;
|
|
2295
1542
|
};
|
|
2296
|
-
PropertyColumnModel.prototype.
|
|
2297
|
-
var _this = this;
|
|
2298
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
2299
|
-
// keep a local copy most recent row value so it's available to teh
|
|
2300
|
-
// edit callback without having to add/remove subscribers all the time.
|
|
2301
|
-
component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
2302
|
-
var disableEditCallback = false;
|
|
2303
|
-
if (firstTime) {
|
|
2304
|
-
if (___default.isFunction(options === null || options === void 0 ? void 0 : options.onComponentInit)) {
|
|
2305
|
-
options.onComponentInit(component);
|
|
2306
|
-
}
|
|
2307
|
-
// install our edit callback
|
|
2308
|
-
component.onValueEdited(function (is, was) {
|
|
2309
|
-
if (!disableEditCallback) {
|
|
2310
|
-
options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);
|
|
2311
|
-
}
|
|
2312
|
-
});
|
|
2313
|
-
}
|
|
2314
|
-
// now push the value the component and disable the callback just incase the component misbehaves
|
|
2315
|
-
// and fires a value change during the operation.
|
|
2316
|
-
disableEditCallback = true;
|
|
2317
|
-
component.value = rowData.row[_this.property];
|
|
2318
|
-
disableEditCallback = false;
|
|
2319
|
-
if (!___default.isFunction(options) && ___default.isFunction(options === null || options === void 0 ? void 0 : options.onRowUpdate)) {
|
|
2320
|
-
options.onRowUpdate(component, rowData.row);
|
|
2321
|
-
}
|
|
2322
|
-
}));
|
|
2323
|
-
return this;
|
|
2324
|
-
};
|
|
2325
|
-
PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, onComponentInit) {
|
|
1543
|
+
PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, initialiseComponent) {
|
|
2326
1544
|
var _this = this;
|
|
2327
1545
|
var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
2328
|
-
var initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser :
|
|
1546
|
+
var initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
2329
1547
|
this.configureCellEditor(new CellEditorPortalRef(editor, function (component, editSession) {
|
|
2330
1548
|
var formValueModel = editSession.form.pluck(_this.property);
|
|
2331
1549
|
if (validators) {
|
|
@@ -2350,8 +1568,8 @@ var PropertyColumnModel = /** @class */ (function (_super) {
|
|
|
2350
1568
|
}(ColumnModel));
|
|
2351
1569
|
var ListPropertyColumnModel = /** @class */ (function (_super) {
|
|
2352
1570
|
__extends(ListPropertyColumnModel, _super);
|
|
2353
|
-
function ListPropertyColumnModel(
|
|
2354
|
-
var _this = _super.call(this,
|
|
1571
|
+
function ListPropertyColumnModel(property, defaults) {
|
|
1572
|
+
var _this = _super.call(this, property.toString(), defaults) || this;
|
|
2355
1573
|
_this.property = property;
|
|
2356
1574
|
_this._format = function (value) { return value.map(function (v) { return v === null || v === void 0 ? void 0 : v.toString(); }).join(', '); };
|
|
2357
1575
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
@@ -2398,23 +1616,10 @@ var CustomValueColumnModel = /** @class */ (function (_super) {
|
|
|
2398
1616
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
2399
1617
|
return _this;
|
|
2400
1618
|
}
|
|
2401
|
-
CustomValueColumnModel.prototype.cellRenderer = function (componentType
|
|
1619
|
+
CustomValueColumnModel.prototype.cellRenderer = function (componentType) {
|
|
2402
1620
|
var _this = this;
|
|
2403
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData
|
|
2404
|
-
if (firstTime) {
|
|
2405
|
-
if (___default.isFunction(onComponentInitOrOptions)) {
|
|
2406
|
-
onComponentInitOrOptions(component);
|
|
2407
|
-
}
|
|
2408
|
-
else {
|
|
2409
|
-
if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
2410
|
-
onComponentInitOrOptions.onComponentInit(component);
|
|
2411
|
-
}
|
|
2412
|
-
}
|
|
2413
|
-
}
|
|
1621
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
|
|
2414
1622
|
component.value = _this.getValue(rowData.row);
|
|
2415
|
-
if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
2416
|
-
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
2417
|
-
}
|
|
2418
1623
|
}));
|
|
2419
1624
|
return this;
|
|
2420
1625
|
};
|
|
@@ -2587,9 +1792,6 @@ var TableModel = /** @class */ (function () {
|
|
|
2587
1792
|
this._editorSessions = new MutableListModel();
|
|
2588
1793
|
this.rowClassNamePredicates = [];
|
|
2589
1794
|
this._createForm = function (row) { return new DirtyTrackingForm(); };
|
|
2590
|
-
this.trackBy = function (index, item) {
|
|
2591
|
-
return _this.identityOf ? _this.identityOf(item) : index;
|
|
2592
|
-
};
|
|
2593
1795
|
this.identityOf = sourceOfTruth.identityOf;
|
|
2594
1796
|
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;
|
|
2595
1797
|
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
@@ -2601,7 +1803,7 @@ var TableModel = /** @class */ (function () {
|
|
|
2601
1803
|
this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
|
|
2602
1804
|
this.firstEditableColumn = chain(this.columns).select(function (c) { return c.hasEditorPortal(); }).first();
|
|
2603
1805
|
this.hasColumnsWithRowSelectionExplicitlyEnabled = chain(this._columns).findIndex(function (column) { return column.isRowSelectionExplicitlyEnabled(); }).isGreaterThanOrEqualTo(0);
|
|
2604
|
-
this.addRowClass(
|
|
1806
|
+
this.addRowClass("enable-hover", function () { return _this.isRowSelectionEnabled(); });
|
|
2605
1807
|
}
|
|
2606
1808
|
TableModel_1 = TableModel;
|
|
2607
1809
|
TableModel.fromList = function (sourceOfTruth, builder) {
|
|
@@ -2616,6 +1818,12 @@ var TableModel = /** @class */ (function () {
|
|
|
2616
1818
|
enumerable: true,
|
|
2617
1819
|
configurable: true
|
|
2618
1820
|
});
|
|
1821
|
+
TableModel.prototype.getTrackByFunction = function () {
|
|
1822
|
+
var _this = this;
|
|
1823
|
+
return function (index, item) {
|
|
1824
|
+
return _this.identityOf ? _this.identityOf(item) : index;
|
|
1825
|
+
};
|
|
1826
|
+
};
|
|
2619
1827
|
Object.defineProperty(TableModel.prototype, "columns", {
|
|
2620
1828
|
get: function () {
|
|
2621
1829
|
return this._columns.readonly;
|
|
@@ -2623,11 +1831,11 @@ var TableModel = /** @class */ (function () {
|
|
|
2623
1831
|
enumerable: true,
|
|
2624
1832
|
configurable: true
|
|
2625
1833
|
});
|
|
2626
|
-
TableModel.prototype.pluck = function (property
|
|
2627
|
-
return this.addColumn(new PropertyColumnModel(
|
|
1834
|
+
TableModel.prototype.pluck = function (property) {
|
|
1835
|
+
return this.addColumn(new PropertyColumnModel(property, this));
|
|
2628
1836
|
};
|
|
2629
|
-
TableModel.prototype.pluckList = function (property
|
|
2630
|
-
return this.addColumn(new ListPropertyColumnModel(
|
|
1837
|
+
TableModel.prototype.pluckList = function (property) {
|
|
1838
|
+
return this.addColumn(new ListPropertyColumnModel(property, this));
|
|
2631
1839
|
};
|
|
2632
1840
|
TableModel.prototype.addSelectionColumn = function (selectionModel) {
|
|
2633
1841
|
assert.isNil(this.selectionColumnModel);
|
|
@@ -2641,9 +1849,6 @@ var TableModel = /** @class */ (function () {
|
|
|
2641
1849
|
TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
|
|
2642
1850
|
return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
|
|
2643
1851
|
};
|
|
2644
|
-
TableModel.prototype.addComponentColumn = function (columnId, component, onComponentInitOrOptions) {
|
|
2645
|
-
return this.addColumn(new CustomValueColumnModel(columnId, this, function (row) { return row; })).cellRenderer(component, onComponentInitOrOptions);
|
|
2646
|
-
};
|
|
2647
1852
|
TableModel.prototype.addTemplateColumn = function (columnId) {
|
|
2648
1853
|
return this.addColumn(new CustomTemplateColumnModel(columnId, this));
|
|
2649
1854
|
};
|
|
@@ -2795,7 +2000,7 @@ var TableComponent = /** @class */ (function (_super) {
|
|
|
2795
2000
|
TableComponent = __decorate([
|
|
2796
2001
|
Component({
|
|
2797
2002
|
selector: 'aup-table',
|
|
2798
|
-
template: "<table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.
|
|
2003
|
+
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 [attr.column-id]=\"column.columnId\"\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\" (click)=\"onCellClicked(column, row)\" [class.enable-cursor]=\"tableModel.isRowSelectionEnabledFor(column)\">\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\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;\"\n [ngClass]=\"tableModel.getRowClasses(row)\"\n ></tr>\n\n</table>\n",
|
|
2799
2004
|
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{flex:1}"]
|
|
2800
2005
|
}),
|
|
2801
2006
|
__metadata("design:paramtypes", [])
|
|
@@ -2956,86 +2161,27 @@ var TableHeaderCellRendererComponent = /** @class */ (function () {
|
|
|
2956
2161
|
TableHeaderCellRendererComponent.prototype.initialiseHeader = function (instance) {
|
|
2957
2162
|
this.column.onHeaderAttached(this, instance);
|
|
2958
2163
|
};
|
|
2959
|
-
TableHeaderCellRendererComponent.prototype.getPortal = function () {
|
|
2960
|
-
return this[HEADER_CELL_RENDERER_PORTAL];
|
|
2961
|
-
};
|
|
2962
|
-
__decorate([
|
|
2963
|
-
Input(),
|
|
2964
|
-
__metadata("design:type", ColumnModel)
|
|
2965
|
-
], TableHeaderCellRendererComponent.prototype, "column", void 0);
|
|
2966
|
-
__decorate([
|
|
2967
|
-
HostBinding('class'),
|
|
2968
|
-
__metadata("design:type", Object)
|
|
2969
|
-
], TableHeaderCellRendererComponent.prototype, "defaultClassNames", void 0);
|
|
2970
|
-
TableHeaderCellRendererComponent = __decorate([
|
|
2971
|
-
Component({
|
|
2972
|
-
selector: 'aup-table-header-cell-renderer',
|
|
2973
|
-
template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
|
|
2974
|
-
styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]
|
|
2975
|
-
}),
|
|
2976
|
-
__metadata("design:paramtypes", [])
|
|
2977
|
-
], TableHeaderCellRendererComponent);
|
|
2978
|
-
return TableHeaderCellRendererComponent;
|
|
2979
|
-
}());
|
|
2980
|
-
|
|
2981
|
-
var MenuItemData = /** @class */ (function (_super) {
|
|
2982
|
-
__extends(MenuItemData, _super);
|
|
2983
|
-
function MenuItemData(factory, face) {
|
|
2984
|
-
var _this = _super.call(this, face) || this;
|
|
2985
|
-
_this.factory = factory;
|
|
2986
|
-
return _this;
|
|
2987
|
-
}
|
|
2988
|
-
return MenuItemData;
|
|
2989
|
-
}(CommandFace.Adapter));
|
|
2990
|
-
/**
|
|
2991
|
-
*
|
|
2992
|
-
*/
|
|
2993
|
-
var TableRowMenuComponent = /** @class */ (function (_super) {
|
|
2994
|
-
__extends(TableRowMenuComponent, _super);
|
|
2995
|
-
function TableRowMenuComponent() {
|
|
2996
|
-
var _this = _super.call(this) || this;
|
|
2997
|
-
_this.actions = [];
|
|
2998
|
-
_this.moreActions = [];
|
|
2999
|
-
return _this;
|
|
3000
|
-
}
|
|
3001
|
-
TableRowMenuComponent.prototype.registerAction = function (commandFactory, properties) {
|
|
3002
|
-
this.actions.push(new MenuItemData(commandFactory, properties));
|
|
3003
|
-
};
|
|
3004
|
-
TableRowMenuComponent.prototype.registerMoreAction = function (commandFactory, properties) {
|
|
3005
|
-
this.moreActions.push(new MenuItemData(commandFactory, properties));
|
|
3006
|
-
};
|
|
3007
|
-
TableRowMenuComponent.prototype.ngOnInit = function () {
|
|
3008
|
-
};
|
|
3009
|
-
TableRowMenuComponent.prototype.createMoreMenuCommand = function (item, value) {
|
|
3010
|
-
var _this = this;
|
|
3011
|
-
var when = Dsl.disposeWith(this).when;
|
|
3012
|
-
var command = item.factory.create(value);
|
|
3013
|
-
when(command.busy).becomesFalsey(function () {
|
|
3014
|
-
_this.closeMoreMenu();
|
|
3015
|
-
});
|
|
3016
|
-
return command;
|
|
3017
|
-
};
|
|
3018
|
-
TableRowMenuComponent.prototype.closeMoreMenu = function () {
|
|
3019
|
-
this.menu.closeMenu();
|
|
2164
|
+
TableHeaderCellRendererComponent.prototype.getPortal = function () {
|
|
2165
|
+
return this[HEADER_CELL_RENDERER_PORTAL];
|
|
3020
2166
|
};
|
|
3021
2167
|
__decorate([
|
|
3022
2168
|
Input(),
|
|
3023
|
-
__metadata("design:type",
|
|
3024
|
-
],
|
|
2169
|
+
__metadata("design:type", ColumnModel)
|
|
2170
|
+
], TableHeaderCellRendererComponent.prototype, "column", void 0);
|
|
3025
2171
|
__decorate([
|
|
3026
|
-
|
|
3027
|
-
__metadata("design:type",
|
|
3028
|
-
],
|
|
3029
|
-
|
|
2172
|
+
HostBinding('class'),
|
|
2173
|
+
__metadata("design:type", Object)
|
|
2174
|
+
], TableHeaderCellRendererComponent.prototype, "defaultClassNames", void 0);
|
|
2175
|
+
TableHeaderCellRendererComponent = __decorate([
|
|
3030
2176
|
Component({
|
|
3031
|
-
selector: 'aup-table-
|
|
3032
|
-
template: "
|
|
3033
|
-
styles: [":host
|
|
2177
|
+
selector: 'aup-table-header-cell-renderer',
|
|
2178
|
+
template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
|
|
2179
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]
|
|
3034
2180
|
}),
|
|
3035
2181
|
__metadata("design:paramtypes", [])
|
|
3036
|
-
],
|
|
3037
|
-
return
|
|
3038
|
-
}(
|
|
2182
|
+
], TableHeaderCellRendererComponent);
|
|
2183
|
+
return TableHeaderCellRendererComponent;
|
|
2184
|
+
}());
|
|
3039
2185
|
|
|
3040
2186
|
var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
3041
2187
|
__extends(VerticalFocusContainerComponent, _super);
|
|
@@ -3122,6 +2268,100 @@ var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
|
3122
2268
|
return VerticalFocusContainerComponent;
|
|
3123
2269
|
}(FocusContainerComponent));
|
|
3124
2270
|
|
|
2271
|
+
var MultipleSelectInputComponent = /** @class */ (function (_super) {
|
|
2272
|
+
__extends(MultipleSelectInputComponent, _super);
|
|
2273
|
+
function MultipleSelectInputComponent() {
|
|
2274
|
+
var _this = _super.call(this) || this;
|
|
2275
|
+
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
2276
|
+
return _this;
|
|
2277
|
+
}
|
|
2278
|
+
MultipleSelectInputComponent.prototype.ngOnInit = function () {
|
|
2279
|
+
};
|
|
2280
|
+
__decorate([
|
|
2281
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
2282
|
+
__metadata("design:type", Object)
|
|
2283
|
+
], MultipleSelectInputComponent.prototype, "listModel", void 0);
|
|
2284
|
+
__decorate([
|
|
2285
|
+
Input(), TrackExternal(),
|
|
2286
|
+
__metadata("design:type", ListModel)
|
|
2287
|
+
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
2288
|
+
__decorate([
|
|
2289
|
+
Input(), StoreInListModel('optionsModel'),
|
|
2290
|
+
__metadata("design:type", Array)
|
|
2291
|
+
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
2292
|
+
__decorate([
|
|
2293
|
+
Input(),
|
|
2294
|
+
__metadata("design:type", Object)
|
|
2295
|
+
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
2296
|
+
__decorate([
|
|
2297
|
+
Input(),
|
|
2298
|
+
__metadata("design:type", Boolean)
|
|
2299
|
+
], MultipleSelectInputComponent.prototype, "allowNil", void 0);
|
|
2300
|
+
__decorate([
|
|
2301
|
+
ContentChild('optionTemplate'),
|
|
2302
|
+
__metadata("design:type", TemplateRef)
|
|
2303
|
+
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
2304
|
+
__decorate([
|
|
2305
|
+
ContentChild('nilOptionTemplate'),
|
|
2306
|
+
__metadata("design:type", TemplateRef)
|
|
2307
|
+
], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
2308
|
+
__decorate([
|
|
2309
|
+
Input(),
|
|
2310
|
+
__metadata("design:type", Function)
|
|
2311
|
+
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
2312
|
+
MultipleSelectInputComponent = __decorate([
|
|
2313
|
+
Component({
|
|
2314
|
+
selector: 'aup-multiple-select-input',
|
|
2315
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"listModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
2316
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
2317
|
+
}),
|
|
2318
|
+
__metadata("design:paramtypes", [])
|
|
2319
|
+
], MultipleSelectInputComponent);
|
|
2320
|
+
return MultipleSelectInputComponent;
|
|
2321
|
+
}(AbstractListInputComponent));
|
|
2322
|
+
|
|
2323
|
+
var IconComponent = /** @class */ (function () {
|
|
2324
|
+
function IconComponent() {
|
|
2325
|
+
}
|
|
2326
|
+
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
2327
|
+
get: function () {
|
|
2328
|
+
return this._icon;
|
|
2329
|
+
},
|
|
2330
|
+
set: function (iconName) {
|
|
2331
|
+
this._icon = iconName;
|
|
2332
|
+
if (!iconName) {
|
|
2333
|
+
this.errorMessage = 'icon is nil';
|
|
2334
|
+
this.prefix = undefined;
|
|
2335
|
+
return;
|
|
2336
|
+
}
|
|
2337
|
+
var colonIndex = iconName.indexOf(':');
|
|
2338
|
+
if (colonIndex > 0) {
|
|
2339
|
+
this.prefix = this.icon.slice(0, colonIndex);
|
|
2340
|
+
this.suffix = this.icon.slice(colonIndex + 1);
|
|
2341
|
+
}
|
|
2342
|
+
if (this.prefix) {
|
|
2343
|
+
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
2344
|
+
}
|
|
2345
|
+
this.errorMessage = "Unknown icon prefix \"" + this.prefix + "\"";
|
|
2346
|
+
},
|
|
2347
|
+
enumerable: true,
|
|
2348
|
+
configurable: true
|
|
2349
|
+
});
|
|
2350
|
+
__decorate([
|
|
2351
|
+
Input(),
|
|
2352
|
+
__metadata("design:type", String),
|
|
2353
|
+
__metadata("design:paramtypes", [String])
|
|
2354
|
+
], IconComponent.prototype, "icon", null);
|
|
2355
|
+
IconComponent = __decorate([
|
|
2356
|
+
Component({
|
|
2357
|
+
selector: 'aup-icon',
|
|
2358
|
+
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"'svg'\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"'mat'\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"'fab'\"\n class=\"faIconWrapper\">\n <fa-icon [icon]=\"suffix\">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n",
|
|
2359
|
+
styles: [":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center;width:24px;height:24px}.svgIcon{width:24px;height:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{width:inherit;height:inherit}"]
|
|
2360
|
+
})
|
|
2361
|
+
], IconComponent);
|
|
2362
|
+
return IconComponent;
|
|
2363
|
+
}());
|
|
2364
|
+
|
|
3125
2365
|
var ComponentsModule = /** @class */ (function () {
|
|
3126
2366
|
function ComponentsModule(faIconLibrary) {
|
|
3127
2367
|
faIconLibrary.addIconPacks(fas);
|
|
@@ -3140,8 +2380,6 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3140
2380
|
TextInputComponent,
|
|
3141
2381
|
PasswordInputComponent,
|
|
3142
2382
|
SelectInputComponent,
|
|
3143
|
-
MultipleSelectInputComponent,
|
|
3144
|
-
AutocompleteInputComponent,
|
|
3145
2383
|
CheckboxInputComponent,
|
|
3146
2384
|
ScrollContainerComponent,
|
|
3147
2385
|
NoopComponent,
|
|
@@ -3161,16 +2399,9 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3161
2399
|
SelectHeaderCellRendererComponent,
|
|
3162
2400
|
DefaultHeaderCellRendererComponent,
|
|
3163
2401
|
TableHeaderCellRendererComponent,
|
|
2402
|
+
MultipleSelectInputComponent,
|
|
3164
2403
|
IconComponent,
|
|
3165
|
-
SectionHeaderComponent
|
|
3166
|
-
TableRowMenuComponent,
|
|
3167
|
-
CommandBarComponent,
|
|
3168
|
-
CommandComponent,
|
|
3169
|
-
PopupMenuComponent,
|
|
3170
|
-
CommandFaceComponent,
|
|
3171
|
-
AbstractPopupMenuComponent,
|
|
3172
|
-
PopupMenuRendererComponent,
|
|
3173
|
-
MoreMenuComponent
|
|
2404
|
+
SectionHeaderComponent
|
|
3174
2405
|
],
|
|
3175
2406
|
imports: [
|
|
3176
2407
|
CommonModule,
|
|
@@ -3188,10 +2419,7 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3188
2419
|
PortalModule,
|
|
3189
2420
|
CdkScrollableModule,
|
|
3190
2421
|
FontAwesomeModule,
|
|
3191
|
-
MatTooltipModule
|
|
3192
|
-
MatAutocompleteModule,
|
|
3193
|
-
_MatMenuDirectivesModule,
|
|
3194
|
-
MatMenuModule
|
|
2422
|
+
MatTooltipModule
|
|
3195
2423
|
],
|
|
3196
2424
|
exports: [
|
|
3197
2425
|
NumberInputComponent,
|
|
@@ -3200,8 +2428,6 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3200
2428
|
PasswordInputComponent,
|
|
3201
2429
|
CheckboxInputComponent,
|
|
3202
2430
|
SelectInputComponent,
|
|
3203
|
-
MultipleSelectInputComponent,
|
|
3204
|
-
AutocompleteInputComponent,
|
|
3205
2431
|
ScrollContainerComponent,
|
|
3206
2432
|
NoopComponent,
|
|
3207
2433
|
SwitchCaseComponent,
|
|
@@ -3214,31 +2440,12 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3214
2440
|
TableComponent,
|
|
3215
2441
|
EditRowControls,
|
|
3216
2442
|
ColumnTemplateDirective,
|
|
2443
|
+
MultipleSelectInputComponent,
|
|
3217
2444
|
IconComponent,
|
|
3218
|
-
SectionHeaderComponent
|
|
3219
|
-
TableRowMenuComponent,
|
|
3220
|
-
CommandBarComponent,
|
|
3221
|
-
CommandComponent,
|
|
3222
|
-
AbstractPopupMenuComponent,
|
|
3223
|
-
PopupMenuComponent,
|
|
3224
|
-
CommandFaceComponent,
|
|
3225
|
-
PopupMenuRendererComponent,
|
|
3226
|
-
MoreMenuComponent
|
|
2445
|
+
SectionHeaderComponent
|
|
3227
2446
|
],
|
|
3228
2447
|
providers: [
|
|
3229
|
-
FocusBindingFactory
|
|
3230
|
-
// {
|
|
3231
|
-
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
3232
|
-
// type: 'string',
|
|
3233
|
-
// editorClass: StringInputComponent
|
|
3234
|
-
// }, multi: true
|
|
3235
|
-
// },
|
|
3236
|
-
// {
|
|
3237
|
-
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
3238
|
-
// type: 'number',
|
|
3239
|
-
// editorClass: NumberInputComponent
|
|
3240
|
-
// }, multi: true
|
|
3241
|
-
// }
|
|
2448
|
+
FocusBindingFactory,
|
|
3242
2449
|
]
|
|
3243
2450
|
}),
|
|
3244
2451
|
__metadata("design:paramtypes", [FaIconLibrary])
|
|
@@ -3677,7 +2884,6 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3677
2884
|
ActivityContainerComponent.prototype.registerDisposable = function (disposable) {
|
|
3678
2885
|
return this.garbage.registerDisposable(disposable);
|
|
3679
2886
|
};
|
|
3680
|
-
// @Trace()
|
|
3681
2887
|
ActivityContainerComponent.prototype.dispose = function () {
|
|
3682
2888
|
// TODO: think about auto cancelling any outstanding activity on dispose.
|
|
3683
2889
|
// See NavigationState.Navigating for a use-case.
|
|
@@ -3826,6 +3032,12 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3826
3032
|
ViewChildren(ActivityOutletComponent),
|
|
3827
3033
|
__metadata("design:type", QueryList)
|
|
3828
3034
|
], ActivityContainerComponent.prototype, "activityOutlets", void 0);
|
|
3035
|
+
__decorate([
|
|
3036
|
+
Trace(),
|
|
3037
|
+
__metadata("design:type", Function),
|
|
3038
|
+
__metadata("design:paramtypes", []),
|
|
3039
|
+
__metadata("design:returntype", void 0)
|
|
3040
|
+
], ActivityContainerComponent.prototype, "dispose", null);
|
|
3829
3041
|
ActivityContainerComponent = __decorate([
|
|
3830
3042
|
Component({
|
|
3831
3043
|
selector: 'aup-activity-container',
|
|
@@ -4909,7 +4121,7 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
4909
4121
|
assert.isNil(this.visitModel.value);
|
|
4910
4122
|
var when = Dsl.disposeWith(this).when;
|
|
4911
4123
|
this.visitModel.value = visit;
|
|
4912
|
-
DebugContext.
|
|
4124
|
+
DebugContext.get(this.visitModel).tag(this.placeDefinition.component.name + ".visitModel");
|
|
4913
4125
|
this.placeDefinition.getVisitParameterDefs().forEach(function (parameterDef) { return _this.installBinding(parameterDef); });
|
|
4914
4126
|
when.valueOf(this.visitModel).changes(function (current, previous) {
|
|
4915
4127
|
notifyVisitChanged(current, previous);
|
|
@@ -6057,6 +5269,75 @@ var UrlService = /** @class */ (function () {
|
|
|
6057
5269
|
return UrlService;
|
|
6058
5270
|
}());
|
|
6059
5271
|
|
|
5272
|
+
var Visit = /** @class */ (function () {
|
|
5273
|
+
function Visit(placeDefinition, visitParameters) {
|
|
5274
|
+
if (visitParameters === void 0) { visitParameters = {}; }
|
|
5275
|
+
this.placeDefinition = placeDefinition;
|
|
5276
|
+
this.visitParameters = visitParameters;
|
|
5277
|
+
}
|
|
5278
|
+
// @Trace()
|
|
5279
|
+
Visit.prototype.getRouteId = function () {
|
|
5280
|
+
return this.placeDefinition.getRouteIdFrom(this);
|
|
5281
|
+
};
|
|
5282
|
+
// @Trace()
|
|
5283
|
+
Visit.prototype.hasRouteId = function () {
|
|
5284
|
+
return !isNil(this.getRouteId());
|
|
5285
|
+
};
|
|
5286
|
+
/**
|
|
5287
|
+
* Returns the value of the place parameter with the specified name. The parameter
|
|
5288
|
+
* name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
|
|
5289
|
+
* same as the the ValueModel property name.
|
|
5290
|
+
* @param parameterName the field name of the property model or the `as` option if specified.
|
|
5291
|
+
*/
|
|
5292
|
+
Visit.prototype.getParameter = function (parameterName) {
|
|
5293
|
+
return this.visitParameters[parameterName];
|
|
5294
|
+
};
|
|
5295
|
+
// @Trace()
|
|
5296
|
+
Visit.prototype.hasParameter = function (parameterName) {
|
|
5297
|
+
return Object.keys(this.visitParameters).includes(parameterName);
|
|
5298
|
+
};
|
|
5299
|
+
Visit.prototype.replace = function (parameter, value) {
|
|
5300
|
+
var _a;
|
|
5301
|
+
return new Visit(this.placeDefinition, __assign(__assign({}, this.visitParameters), (_a = {}, _a[parameter.name] = value, _a)));
|
|
5302
|
+
};
|
|
5303
|
+
Visit.prototype.mergeRouteParameters = function (routeParams) {
|
|
5304
|
+
var _this = this;
|
|
5305
|
+
// todo: whitelist parameters.
|
|
5306
|
+
var routeParameterKeys = Object.keys(routeParams);
|
|
5307
|
+
var params = {};
|
|
5308
|
+
this.placeDefinition.getVisitParameterDefs().forEach(function (def) {
|
|
5309
|
+
if (def.isRouteId || def.isRouteParameter) {
|
|
5310
|
+
if (routeParameterKeys.includes(def.name)) {
|
|
5311
|
+
params[def.name] = routeParams[def.name];
|
|
5312
|
+
}
|
|
5313
|
+
}
|
|
5314
|
+
else {
|
|
5315
|
+
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
5316
|
+
// defaults and remember sanitisation process.
|
|
5317
|
+
var value = _this.getParameter(def.name);
|
|
5318
|
+
if (_this.hasParameter(def.name)) {
|
|
5319
|
+
params[def.name] = value;
|
|
5320
|
+
}
|
|
5321
|
+
}
|
|
5322
|
+
});
|
|
5323
|
+
return new Visit(this.placeDefinition, params);
|
|
5324
|
+
};
|
|
5325
|
+
Visit.prototype.hasRoutingChangedFrom = function (other) {
|
|
5326
|
+
var samePlace = other.placeDefinition === this.placeDefinition;
|
|
5327
|
+
var sameRouteParameters = isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
5328
|
+
return !samePlace || !sameRouteParameters;
|
|
5329
|
+
};
|
|
5330
|
+
Visit.prototype.hasChangedFrom = function (other) {
|
|
5331
|
+
var sameNonRouteParameters = isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
5332
|
+
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
5333
|
+
};
|
|
5334
|
+
Visit.prototype.toDebugString = function () {
|
|
5335
|
+
var _this = this;
|
|
5336
|
+
return Object.keys(this.visitParameters).map(function (k) { return k + "=" + _this.visitParameters[k]; }).join(",");
|
|
5337
|
+
};
|
|
5338
|
+
return Visit;
|
|
5339
|
+
}());
|
|
5340
|
+
|
|
6060
5341
|
var PlaceRouter = /** @class */ (function (_super) {
|
|
6061
5342
|
__extends(PlaceRouter, _super);
|
|
6062
5343
|
function PlaceRouter(angularRouter, angularLocation, interactionService, urlService, placeHistory) {
|
|
@@ -6252,7 +5533,6 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
6252
5533
|
enumerable: true,
|
|
6253
5534
|
configurable: true
|
|
6254
5535
|
});
|
|
6255
|
-
// @Trace()
|
|
6256
5536
|
PlaceRouter.prototype.pushVisitChangesToRoute = function (previous, next) {
|
|
6257
5537
|
return __awaiter(this, void 0, void 0, function () {
|
|
6258
5538
|
var _this = this;
|
|
@@ -6353,6 +5633,12 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
6353
5633
|
{ type: PlaceHistory }
|
|
6354
5634
|
]; };
|
|
6355
5635
|
PlaceRouter.ɵprov = ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(ɵɵinject(Router), ɵɵinject(Location), ɵɵinject(InteractionService), ɵɵinject(UrlService), ɵɵinject(PlaceHistory)); }, token: PlaceRouter, providedIn: "root" });
|
|
5636
|
+
__decorate([
|
|
5637
|
+
Trace(),
|
|
5638
|
+
__metadata("design:type", Function),
|
|
5639
|
+
__metadata("design:paramtypes", [Visit, Visit]),
|
|
5640
|
+
__metadata("design:returntype", Promise)
|
|
5641
|
+
], PlaceRouter.prototype, "pushVisitChangesToRoute", null);
|
|
6356
5642
|
PlaceRouter = __decorate([
|
|
6357
5643
|
Injectable({
|
|
6358
5644
|
providedIn: 'root'
|
|
@@ -6366,75 +5652,6 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
6366
5652
|
return PlaceRouter;
|
|
6367
5653
|
}(GarbageCollector));
|
|
6368
5654
|
|
|
6369
|
-
var Visit = /** @class */ (function () {
|
|
6370
|
-
function Visit(placeDefinition, visitParameters) {
|
|
6371
|
-
if (visitParameters === void 0) { visitParameters = {}; }
|
|
6372
|
-
this.placeDefinition = placeDefinition;
|
|
6373
|
-
this.visitParameters = visitParameters;
|
|
6374
|
-
}
|
|
6375
|
-
// @Trace()
|
|
6376
|
-
Visit.prototype.getRouteId = function () {
|
|
6377
|
-
return this.placeDefinition.getRouteIdFrom(this);
|
|
6378
|
-
};
|
|
6379
|
-
// @Trace()
|
|
6380
|
-
Visit.prototype.hasRouteId = function () {
|
|
6381
|
-
return !isNil(this.getRouteId());
|
|
6382
|
-
};
|
|
6383
|
-
/**
|
|
6384
|
-
* Returns the value of the place parameter with the specified name. The parameter
|
|
6385
|
-
* name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
|
|
6386
|
-
* same as the the ValueModel property name.
|
|
6387
|
-
* @param parameterName the field name of the property model or the `as` option if specified.
|
|
6388
|
-
*/
|
|
6389
|
-
Visit.prototype.getParameter = function (parameterName) {
|
|
6390
|
-
return this.visitParameters[parameterName];
|
|
6391
|
-
};
|
|
6392
|
-
// @Trace()
|
|
6393
|
-
Visit.prototype.hasParameter = function (parameterName) {
|
|
6394
|
-
return Object.keys(this.visitParameters).includes(parameterName);
|
|
6395
|
-
};
|
|
6396
|
-
Visit.prototype.replace = function (parameter, value) {
|
|
6397
|
-
var _a;
|
|
6398
|
-
return new Visit(this.placeDefinition, __assign(__assign({}, this.visitParameters), (_a = {}, _a[parameter.name] = value, _a)));
|
|
6399
|
-
};
|
|
6400
|
-
Visit.prototype.mergeRouteParameters = function (routeParams) {
|
|
6401
|
-
var _this = this;
|
|
6402
|
-
// todo: whitelist parameters.
|
|
6403
|
-
var routeParameterKeys = Object.keys(routeParams);
|
|
6404
|
-
var params = {};
|
|
6405
|
-
this.placeDefinition.getVisitParameterDefs().forEach(function (def) {
|
|
6406
|
-
if (def.isRouteId || def.isRouteParameter) {
|
|
6407
|
-
if (routeParameterKeys.includes(def.name)) {
|
|
6408
|
-
params[def.name] = routeParams[def.name];
|
|
6409
|
-
}
|
|
6410
|
-
}
|
|
6411
|
-
else {
|
|
6412
|
-
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
6413
|
-
// defaults and remember sanitisation process.
|
|
6414
|
-
var value = _this.getParameter(def.name);
|
|
6415
|
-
if (_this.hasParameter(def.name)) {
|
|
6416
|
-
params[def.name] = value;
|
|
6417
|
-
}
|
|
6418
|
-
}
|
|
6419
|
-
});
|
|
6420
|
-
return new Visit(this.placeDefinition, params);
|
|
6421
|
-
};
|
|
6422
|
-
Visit.prototype.hasRoutingChangedFrom = function (other) {
|
|
6423
|
-
var samePlace = other.placeDefinition === this.placeDefinition;
|
|
6424
|
-
var sameRouteParameters = isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
6425
|
-
return !samePlace || !sameRouteParameters;
|
|
6426
|
-
};
|
|
6427
|
-
Visit.prototype.hasChangedFrom = function (other) {
|
|
6428
|
-
var sameNonRouteParameters = isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
6429
|
-
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
6430
|
-
};
|
|
6431
|
-
Visit.prototype.toDebugString = function () {
|
|
6432
|
-
var _this = this;
|
|
6433
|
-
return Object.keys(this.visitParameters).map(function (k) { return k + "=" + _this.visitParameters[k]; }).join(",");
|
|
6434
|
-
};
|
|
6435
|
-
return Visit;
|
|
6436
|
-
}());
|
|
6437
|
-
|
|
6438
5655
|
var AUP_PLACE_CONFIG = new InjectionToken('AUP_PLACE_CONFIG');
|
|
6439
5656
|
|
|
6440
5657
|
// Freezes the state of the components at the start of the animation.
|
|
@@ -7449,7 +6666,8 @@ function installMechanics(prototype, propertyKey, backingModel, tagPrefix, isEmp
|
|
|
7449
6666
|
binding: null
|
|
7450
6667
|
};
|
|
7451
6668
|
var tag = tagPrefix + "(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
|
|
7452
|
-
DebugContext.
|
|
6669
|
+
DebugContext.get(mechanics.backingModel).tag(tag);
|
|
6670
|
+
Logger.get(mechanics.backingModel).tag(tag);
|
|
7453
6671
|
Object.defineProperty(prototype, propertyKey, {
|
|
7454
6672
|
get: function () {
|
|
7455
6673
|
return mechanics.backingModel;
|
|
@@ -7511,5 +6729,5 @@ function VisitParameterList(options) {
|
|
|
7511
6729
|
* Generated bundle index. Do not edit.
|
|
7512
6730
|
*/
|
|
7513
6731
|
|
|
7514
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation,
|
|
6732
|
+
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandDirective, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, IconComponent, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalInteractionContextFactory, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TemplateCellRendererPortalRef, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0, DirectivesModule as ɵa, CommandDirective as ɵb, EditRowControls as ɵba, ColumnTemplateDirective as ɵbb, DefaultCellRendererComponent as ɵbc, TableCellRendererComponent as ɵbd, SelectCellRendererComponent as ɵbe, SelectHeaderCellRendererComponent as ɵbf, DefaultHeaderCellRendererComponent as ɵbg, TableHeaderCellRendererComponent as ɵbh, MultipleSelectInputComponent as ɵbi, IconComponent as ɵbj, SectionHeaderComponent as ɵbk, PlaceModule as ɵbl, ComponentsModule as ɵbm, EmptyStateComponent as ɵbn, BusyOverlayComponent as ɵbo, PlaceOutletComponent as ɵbp, leftRightPlaceAnimation as ɵbq, LEFT_RIGHT_PLACE_ANIMATION as ɵbr, AUP_PLACE_CONFIG as ɵbs, PlaceRouter as ɵbu, InteractionService as ɵbv, ModalInteractionContextFactory as ɵbw, UrlService as ɵbx, PlaceHistory as ɵby, TabbedPlaceNavigationComponent as ɵbz, FocusBindingDirective as ɵc, AbstractPlaceNavigationComponent as ɵca, ListPlaceNavComponent as ɵcb, SidePlaceNavigationComponent as ɵcc, InteractionModule as ɵcd, ActivityContainerComponent as ɵce, AbstractInteractionContext as ɵcf, ActivityOutletComponent as ɵcg, ConfirmationDialogComponent as ɵch, ACTIVITY_DATA as ɵci, Activity as ɵcj, ConfirmThenDialogComponent as ɵcl, AlertDialogComponent as ɵcm, InPlaceInteractionContextComponent as ɵco, AddItemInteractionContextComponent as ɵcp, ActivityActionsComponent as ɵcq, PopupInteractionContextComponent as ɵcr, StringInputActivity as ɵcs, AbstractInputActivity as ɵct, SelectInputActivity as ɵcu, InteractionContextTriggerFor as ɵcv, DisposableComponent as ɵd, FocusBindingFactory as ɵe, ComponentsModule as ɵf, AbstractInputComponent as ɵg, AbstractValueInputComponent as ɵh, AbstractListInputComponent as ɵi, NumberInputComponent as ɵj, StringInputComponent as ɵk, TextInputComponent as ɵl, PasswordInputComponent as ɵm, SelectInputComponent as ɵn, CheckboxInputComponent as ɵo, ScrollContainerComponent as ɵp, NoopComponent as ɵq, SwitchCaseOption as ɵr, SwitchCaseWhenDirective as ɵs, SwitchCaseDefaultDirective as ɵt, SwitchCaseComponent as ɵu, FocusContainerComponent as ɵv, VerticalFocusContainerComponent as ɵw, FocusableComponent as ɵx, CardContainerComponent as ɵy, TableComponent as ɵz };
|
|
7515
6733
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|