@coolon/angular-ui-powerups 2.0.0-alpha.29 → 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 -177
- package/assets/form.scss +4 -5
- package/assets/styles.scss +0 -2
- package/bundles/coolon-angular-ui-powerups.umd.js +339 -1152
- 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 -988
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +269 -1066
- 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 -57
- 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 -40
- 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 -49
- 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 -64
- 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 -35
- 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 -45
- 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 -18
- package/lib/components/commands/popup-menu/more-menu.component.d.ts +0 -9
- 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,501 +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(cdr) {
|
|
787
|
-
var _this = _super.call(this) || this;
|
|
788
|
-
_this.cdr = cdr;
|
|
789
|
-
_this.xPosition = 'after';
|
|
790
|
-
_this.yPosition = 'below';
|
|
791
|
-
return _this;
|
|
792
|
-
}
|
|
793
|
-
AbstractPopupMenuComponent.prototype.ngAfterViewInit = function () {
|
|
794
|
-
this.cdr.detectChanges();
|
|
795
|
-
};
|
|
796
|
-
Object.defineProperty(AbstractPopupMenuComponent.prototype, "matMenuComponent", {
|
|
797
|
-
get: function () {
|
|
798
|
-
var _a;
|
|
799
|
-
return (_a = this.popupMenu) === null || _a === void 0 ? void 0 : _a.matMenu;
|
|
800
|
-
},
|
|
801
|
-
enumerable: true,
|
|
802
|
-
configurable: true
|
|
803
|
-
});
|
|
804
|
-
AbstractPopupMenuComponent.prototype.closeMenu = function () {
|
|
805
|
-
this.menuTrigger.closeMenu();
|
|
806
|
-
};
|
|
807
|
-
AbstractPopupMenuComponent.prototype.getButtonColor = function (registration) {
|
|
808
|
-
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
809
|
-
};
|
|
810
|
-
AbstractPopupMenuComponent.ctorParameters = function () { return [
|
|
811
|
-
{ type: ChangeDetectorRef }
|
|
812
|
-
]; };
|
|
813
|
-
__decorate([
|
|
814
|
-
Input(),
|
|
815
|
-
__metadata("design:type", String)
|
|
816
|
-
], AbstractPopupMenuComponent.prototype, "xPosition", void 0);
|
|
817
|
-
__decorate([
|
|
818
|
-
Input(),
|
|
819
|
-
__metadata("design:type", String)
|
|
820
|
-
], AbstractPopupMenuComponent.prototype, "yPosition", void 0);
|
|
821
|
-
__decorate([
|
|
822
|
-
ViewChild(PopupMenuRendererComponent),
|
|
823
|
-
__metadata("design:type", PopupMenuRendererComponent)
|
|
824
|
-
], AbstractPopupMenuComponent.prototype, "popupMenu", void 0);
|
|
825
|
-
__decorate([
|
|
826
|
-
ViewChild(MatMenuTrigger),
|
|
827
|
-
__metadata("design:type", MatMenuTrigger)
|
|
828
|
-
], AbstractPopupMenuComponent.prototype, "menuTrigger", void 0);
|
|
829
|
-
AbstractPopupMenuComponent = __decorate([
|
|
830
|
-
Component({
|
|
831
|
-
selector: 'aup-abstract-popup-menu',
|
|
832
|
-
template: ''
|
|
833
|
-
}),
|
|
834
|
-
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
835
|
-
], AbstractPopupMenuComponent);
|
|
836
|
-
return AbstractPopupMenuComponent;
|
|
837
|
-
}(CommandContainer));
|
|
838
|
-
|
|
839
|
-
/**
|
|
840
|
-
*
|
|
841
|
-
*/
|
|
842
|
-
var PopupMenuComponent = /** @class */ (function (_super) {
|
|
843
|
-
__extends(PopupMenuComponent, _super);
|
|
844
|
-
function PopupMenuComponent(cdr) {
|
|
845
|
-
var _this = _super.call(this, cdr) || this;
|
|
846
|
-
_this.faceModel = new MutableValueModel();
|
|
847
|
-
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;
|
|
848
|
-
var faceAdapterModel = chain(_this.faceModel).map(function (face) { return new CommandFace.Adapter(face); });
|
|
849
|
-
_this.faceTooltipModel = faceAdapterModel.pluck('tooltip');
|
|
850
|
-
return _this;
|
|
851
|
-
}
|
|
852
|
-
PopupMenuComponent_1 = PopupMenuComponent;
|
|
853
|
-
PopupMenuComponent.prototype.getTooltip = function () {
|
|
854
|
-
return this.faceTooltipModel.value;
|
|
855
|
-
};
|
|
856
|
-
PopupMenuComponent.prototype.ngOnInit = function () {
|
|
857
|
-
};
|
|
858
|
-
var PopupMenuComponent_1;
|
|
859
|
-
PopupMenuComponent.ctorParameters = function () { return [
|
|
860
|
-
{ type: ChangeDetectorRef }
|
|
861
|
-
]; };
|
|
862
|
-
__decorate([
|
|
863
|
-
Input(), StoreInValueModel('faceModel'),
|
|
864
|
-
__metadata("design:type", Object)
|
|
865
|
-
], PopupMenuComponent.prototype, "face", void 0);
|
|
866
|
-
PopupMenuComponent = PopupMenuComponent_1 = __decorate([
|
|
867
|
-
Component({
|
|
868
|
-
selector: 'aup-popup-menu',
|
|
869
|
-
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 ",
|
|
870
|
-
providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return PopupMenuComponent_1; }) }]
|
|
871
|
-
}),
|
|
872
|
-
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
873
|
-
], PopupMenuComponent);
|
|
874
|
-
return PopupMenuComponent;
|
|
875
|
-
}(AbstractPopupMenuComponent));
|
|
876
|
-
|
|
877
|
-
/**
|
|
878
|
-
*
|
|
879
|
-
*/
|
|
880
|
-
var MoreMenuComponent = /** @class */ (function (_super) {
|
|
881
|
-
__extends(MoreMenuComponent, _super);
|
|
882
|
-
function MoreMenuComponent(cdr) {
|
|
883
|
-
var _this = _super.call(this, cdr) || this;
|
|
884
|
-
_this.xPosition = "before"; // this should be the default unless overriden by the user.
|
|
885
|
-
return _this;
|
|
886
|
-
}
|
|
887
|
-
MoreMenuComponent_1 = MoreMenuComponent;
|
|
888
|
-
var MoreMenuComponent_1;
|
|
889
|
-
MoreMenuComponent.ctorParameters = function () { return [
|
|
890
|
-
{ type: ChangeDetectorRef }
|
|
891
|
-
]; };
|
|
892
|
-
__decorate([
|
|
893
|
-
Input(),
|
|
894
|
-
__metadata("design:type", String)
|
|
895
|
-
], MoreMenuComponent.prototype, "tooltip", void 0);
|
|
896
|
-
MoreMenuComponent = MoreMenuComponent_1 = __decorate([
|
|
897
|
-
Component({
|
|
898
|
-
selector: 'aup-more-menu',
|
|
899
|
-
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 [xPosition]=\"xPosition\"\n [yPosition]=\"yPosition\"\n (commandExecuted)=\"closeMenu()\"></aup-popup-menu-renderer>\n ",
|
|
900
|
-
providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return MoreMenuComponent_1; }) }]
|
|
901
|
-
}),
|
|
902
|
-
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
903
|
-
], MoreMenuComponent);
|
|
904
|
-
return MoreMenuComponent;
|
|
905
|
-
}(AbstractPopupMenuComponent));
|
|
906
|
-
|
|
907
416
|
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
908
417
|
__extends(FocusContainerComponent, _super);
|
|
909
418
|
function FocusContainerComponent(focusManager) {
|
|
@@ -1012,7 +521,6 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1012
521
|
__extends(AbstractInputComponent, _super);
|
|
1013
522
|
function AbstractInputComponent() {
|
|
1014
523
|
var _this = _super.call(this) || this;
|
|
1015
|
-
_this.onValueEditedListeners = new EventListenerList();
|
|
1016
524
|
_this.dense = false;
|
|
1017
525
|
// TODO: fix this.
|
|
1018
526
|
// tslint:disable-next-line:no-output-native
|
|
@@ -1063,7 +571,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1063
571
|
};
|
|
1064
572
|
Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
|
|
1065
573
|
get: function () {
|
|
1066
|
-
return this.
|
|
574
|
+
return this.inputModel.enabled;
|
|
1067
575
|
},
|
|
1068
576
|
enumerable: true,
|
|
1069
577
|
configurable: true
|
|
@@ -1073,7 +581,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1073
581
|
};
|
|
1074
582
|
Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
|
|
1075
583
|
get: function () {
|
|
1076
|
-
return this.
|
|
584
|
+
return this.inputModel.errorList;
|
|
1077
585
|
},
|
|
1078
586
|
enumerable: true,
|
|
1079
587
|
configurable: true
|
|
@@ -1087,7 +595,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1087
595
|
});
|
|
1088
596
|
Object.defineProperty(AbstractInputComponent.prototype, "focusContext", {
|
|
1089
597
|
get: function () {
|
|
1090
|
-
return this.
|
|
598
|
+
return this.inputModel.focusContext;
|
|
1091
599
|
},
|
|
1092
600
|
enumerable: true,
|
|
1093
601
|
configurable: true
|
|
@@ -1106,13 +614,6 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1106
614
|
enumerable: true,
|
|
1107
615
|
configurable: true
|
|
1108
616
|
});
|
|
1109
|
-
/**
|
|
1110
|
-
* Invokes the callback when this components value is changed by a user edit.
|
|
1111
|
-
* @param callback
|
|
1112
|
-
*/
|
|
1113
|
-
AbstractInputComponent.prototype.onValueEdited = function (callback) {
|
|
1114
|
-
return this.onValueEditedListeners.add(callback);
|
|
1115
|
-
};
|
|
1116
617
|
__decorate([
|
|
1117
618
|
Input(),
|
|
1118
619
|
__metadata("design:type", String)
|
|
@@ -1202,7 +703,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
1202
703
|
var AbstractListInputComponent = /** @class */ (function (_super) {
|
|
1203
704
|
__extends(AbstractListInputComponent, _super);
|
|
1204
705
|
function AbstractListInputComponent() {
|
|
1205
|
-
var _this = _super.
|
|
706
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1206
707
|
/**
|
|
1207
708
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
1208
709
|
*
|
|
@@ -1214,61 +715,11 @@ var AbstractListInputComponent = /** @class */ (function (_super) {
|
|
|
1214
715
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1215
716
|
*/
|
|
1216
717
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1217
|
-
_this.
|
|
1218
|
-
_this.componentListModel = new MutableListModel();
|
|
1219
|
-
_this.setValueIsInProgress = new Guard();
|
|
1220
|
-
_this.valueChange = new EventEmitter();
|
|
1221
|
-
var _a = Dsl.disposeWith(_this), when = _a.when, valueOf = _a.valueOf, chain = _a.chain;
|
|
1222
|
-
var binding = new Binding.Identity(_this.formValueModel, _this.componentListModel).writeRight();
|
|
1223
|
-
var inExternalChange = valueOf.any(_this.setValueIsInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
|
|
1224
|
-
when(_this.componentListModel).changes(function (is, was) {
|
|
1225
|
-
_this.valueChange.emit(is);
|
|
1226
|
-
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
1227
|
-
}, {
|
|
1228
|
-
initialValue: 'ignore',
|
|
1229
|
-
// we never fire events during an external changes to the value. This allows
|
|
1230
|
-
// the component to behave when used in the conventional angular
|
|
1231
|
-
// fashion, i.e. [(value)]="..."
|
|
1232
|
-
unless: inExternalChange
|
|
1233
|
-
});
|
|
1234
|
-
DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
718
|
+
_this.inputModel = _this.registerDisposable(new Form.DelegatingListModel());
|
|
1235
719
|
return _this;
|
|
1236
720
|
}
|
|
1237
|
-
Object.defineProperty(AbstractListInputComponent.prototype, "value", {
|
|
1238
|
-
// We add support for simple direct display of values by allowing components to be used
|
|
1239
|
-
// by `component.value = ...` This use of the component without a value model in tables
|
|
1240
|
-
// and the like.
|
|
1241
|
-
set: function (value) {
|
|
1242
|
-
var _this = this;
|
|
1243
|
-
this.setValueIsInProgress.whileTrue(function () {
|
|
1244
|
-
if (!_this.listHolder) {
|
|
1245
|
-
_this.listHolder = new MutableListModel(value);
|
|
1246
|
-
_this.listModel = _this.listHolder;
|
|
1247
|
-
}
|
|
1248
|
-
else {
|
|
1249
|
-
_this.listHolder.value = value;
|
|
1250
|
-
}
|
|
1251
|
-
});
|
|
1252
|
-
},
|
|
1253
|
-
enumerable: true,
|
|
1254
|
-
configurable: true
|
|
1255
|
-
});
|
|
1256
|
-
__decorate([
|
|
1257
|
-
Input(), TrackExternal({ delegateTo: 'formValueModel' }),
|
|
1258
|
-
__metadata("design:type", Object)
|
|
1259
|
-
], AbstractListInputComponent.prototype, "listModel", void 0);
|
|
1260
|
-
__decorate([
|
|
1261
|
-
Input(),
|
|
1262
|
-
__metadata("design:type", Array),
|
|
1263
|
-
__metadata("design:paramtypes", [Array])
|
|
1264
|
-
], AbstractListInputComponent.prototype, "value", null);
|
|
1265
|
-
__decorate([
|
|
1266
|
-
Output(),
|
|
1267
|
-
__metadata("design:type", Object)
|
|
1268
|
-
], AbstractListInputComponent.prototype, "valueChange", void 0);
|
|
1269
721
|
AbstractListInputComponent = __decorate([
|
|
1270
|
-
Component({ template: '' })
|
|
1271
|
-
__metadata("design:paramtypes", [])
|
|
722
|
+
Component({ template: '' })
|
|
1272
723
|
], AbstractListInputComponent);
|
|
1273
724
|
return AbstractListInputComponent;
|
|
1274
725
|
}(AbstractInputComponent));
|
|
@@ -1288,58 +739,9 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
|
|
|
1288
739
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
1289
740
|
*/
|
|
1290
741
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
1291
|
-
_this.
|
|
1292
|
-
_this.setValueInProgress = new Guard();
|
|
1293
|
-
_this.componentValueModel = new MutableValueModel();
|
|
1294
|
-
_this.valueChange = new EventEmitter();
|
|
1295
|
-
var _a = Dsl.disposeWith(_this), when = _a.when, chain = _a.chain, valueOf = _a.valueOf;
|
|
1296
|
-
var binding = new Binding.Identity(_this.formValueModel, _this.componentValueModel).writeRight();
|
|
1297
|
-
var inExternalChange = valueOf.any(_this.setValueInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
|
|
1298
|
-
when(_this.componentValueModel).changes(function (is, was) {
|
|
1299
|
-
_this.valueChange.emit(is);
|
|
1300
|
-
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
1301
|
-
}, {
|
|
1302
|
-
initialValue: 'ignore',
|
|
1303
|
-
// we never fire events during an external set value operation. This allows
|
|
1304
|
-
// the component to behave when used in the conventional angular
|
|
1305
|
-
// fashion, i.e. [(value)]="..."
|
|
1306
|
-
unless: inExternalChange
|
|
1307
|
-
});
|
|
1308
|
-
DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
742
|
+
_this.inputModel = _this.registerDisposable(new Form.DelegatingValueModel());
|
|
1309
743
|
return _this;
|
|
1310
744
|
}
|
|
1311
|
-
Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
|
|
1312
|
-
// We add support for simple direct display of values by allowing components to be used
|
|
1313
|
-
// by `component.value = ...` This use of the component without a value model in tables
|
|
1314
|
-
// and the like.
|
|
1315
|
-
set: function (value) {
|
|
1316
|
-
var _this = this;
|
|
1317
|
-
this.setValueInProgress.whileTrue(function () {
|
|
1318
|
-
if (!_this.plainValueHolder) {
|
|
1319
|
-
_this.plainValueHolder = new MutableValueModel(value);
|
|
1320
|
-
_this.valueModel = _this.plainValueHolder;
|
|
1321
|
-
}
|
|
1322
|
-
else {
|
|
1323
|
-
_this.plainValueHolder.value = value;
|
|
1324
|
-
}
|
|
1325
|
-
});
|
|
1326
|
-
},
|
|
1327
|
-
enumerable: true,
|
|
1328
|
-
configurable: true
|
|
1329
|
-
});
|
|
1330
|
-
__decorate([
|
|
1331
|
-
Input(), TrackExternal({ delegateTo: 'formValueModel' }),
|
|
1332
|
-
__metadata("design:type", Object)
|
|
1333
|
-
], AbstractValueInputComponent.prototype, "valueModel", void 0);
|
|
1334
|
-
__decorate([
|
|
1335
|
-
Input(),
|
|
1336
|
-
__metadata("design:type", Object),
|
|
1337
|
-
__metadata("design:paramtypes", [Object])
|
|
1338
|
-
], AbstractValueInputComponent.prototype, "value", null);
|
|
1339
|
-
__decorate([
|
|
1340
|
-
Output(),
|
|
1341
|
-
__metadata("design:type", Object)
|
|
1342
|
-
], AbstractValueInputComponent.prototype, "valueChange", void 0);
|
|
1343
745
|
AbstractValueInputComponent = __decorate([
|
|
1344
746
|
Component({ template: '' }),
|
|
1345
747
|
__metadata("design:paramtypes", [])
|
|
@@ -1347,85 +749,20 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
|
|
|
1347
749
|
return AbstractValueInputComponent;
|
|
1348
750
|
}(AbstractInputComponent));
|
|
1349
751
|
|
|
1350
|
-
/**
|
|
1351
|
-
* Using templates (not only supported for nil values:
|
|
1352
|
-
* <aup-autocomplete-input [valueModel]="myModel" [options]="myOptions">
|
|
1353
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1354
|
-
* </aup-autocomplete-input>
|
|
1355
|
-
*/
|
|
1356
|
-
var AutocompleteInputComponent = /** @class */ (function (_super) {
|
|
1357
|
-
__extends(AutocompleteInputComponent, _super);
|
|
1358
|
-
function AutocompleteInputComponent() {
|
|
1359
|
-
var _this = _super.call(this) || this;
|
|
1360
|
-
_this.filterValue = new MutableValueModel();
|
|
1361
|
-
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
1362
|
-
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;
|
|
1363
|
-
var lowerCaseFilterValue = chain(_this.filterValue)
|
|
1364
|
-
.map(function (v) { return ___default.isString(v) ? v.toLowerCase() : ''; });
|
|
1365
|
-
_this.filteredOptions = chain(_this.optionsModel)
|
|
1366
|
-
.select(function (option) {
|
|
1367
|
-
return ___default.isEmpty(_this.filterValue.value) || _this.optionLabelFormat(option).toString().toLowerCase().includes(lowerCaseFilterValue.value);
|
|
1368
|
-
}, { dependsOn: lowerCaseFilterValue });
|
|
1369
|
-
return _this;
|
|
1370
|
-
}
|
|
1371
|
-
AutocompleteInputComponent.prototype.ngOnInit = function () {
|
|
1372
|
-
};
|
|
1373
|
-
AutocompleteInputComponent.prototype.formatOption = function (option) {
|
|
1374
|
-
return this.optionLabelFormat(option);
|
|
1375
|
-
};
|
|
1376
|
-
AutocompleteInputComponent.prototype.updateFilter = function ($event) {
|
|
1377
|
-
this.filterValue.value = $event;
|
|
1378
|
-
};
|
|
1379
|
-
AutocompleteInputComponent.prototype.onSelect = function ($event) {
|
|
1380
|
-
this.valueModel.value = $event.option.value;
|
|
1381
|
-
};
|
|
1382
|
-
__decorate([
|
|
1383
|
-
Input(), TrackExternal(),
|
|
1384
|
-
__metadata("design:type", ListModel)
|
|
1385
|
-
], AutocompleteInputComponent.prototype, "optionsModel", void 0);
|
|
1386
|
-
__decorate([
|
|
1387
|
-
Input(), StoreInListModel('optionsModel'),
|
|
1388
|
-
__metadata("design:type", Array)
|
|
1389
|
-
], AutocompleteInputComponent.prototype, "options", void 0);
|
|
1390
|
-
__decorate([
|
|
1391
|
-
Input(),
|
|
1392
|
-
__metadata("design:type", Object)
|
|
1393
|
-
], AutocompleteInputComponent.prototype, "optionLabel", void 0);
|
|
1394
|
-
__decorate([
|
|
1395
|
-
Input(),
|
|
1396
|
-
__metadata("design:type", Boolean)
|
|
1397
|
-
], AutocompleteInputComponent.prototype, "allowNil", void 0);
|
|
1398
|
-
__decorate([
|
|
1399
|
-
ContentChild('nilOptionTemplate'),
|
|
1400
|
-
__metadata("design:type", TemplateRef)
|
|
1401
|
-
], AutocompleteInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
1402
|
-
__decorate([
|
|
1403
|
-
Input(),
|
|
1404
|
-
__metadata("design:type", Function)
|
|
1405
|
-
], AutocompleteInputComponent.prototype, "optionLabelFormat", void 0);
|
|
1406
|
-
AutocompleteInputComponent = __decorate([
|
|
1407
|
-
Component({
|
|
1408
|
-
selector: 'aup-autocomplete-input',
|
|
1409
|
-
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",
|
|
1410
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1411
|
-
}),
|
|
1412
|
-
__metadata("design:paramtypes", [])
|
|
1413
|
-
], AutocompleteInputComponent);
|
|
1414
|
-
return AutocompleteInputComponent;
|
|
1415
|
-
}(AbstractValueInputComponent));
|
|
1416
|
-
|
|
1417
752
|
var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
1418
753
|
__extends(CheckboxInputComponent, _super);
|
|
1419
754
|
function CheckboxInputComponent() {
|
|
1420
755
|
var _this = _super.call(this) || this;
|
|
1421
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1422
|
-
// valueModel: Form.ValueModelBase<boolean> | IMutableValueModel<boolean>;
|
|
1423
756
|
_this.color = 'accent';
|
|
1424
757
|
_this.labelPosition = 'after';
|
|
1425
758
|
return _this;
|
|
1426
759
|
}
|
|
1427
760
|
CheckboxInputComponent.prototype.ngOnInit = function () {
|
|
1428
761
|
};
|
|
762
|
+
__decorate([
|
|
763
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
764
|
+
__metadata("design:type", Object)
|
|
765
|
+
], CheckboxInputComponent.prototype, "valueModel", void 0);
|
|
1429
766
|
__decorate([
|
|
1430
767
|
Input(),
|
|
1431
768
|
__metadata("design:type", String)
|
|
@@ -1437,7 +774,7 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
|
1437
774
|
CheckboxInputComponent = __decorate([
|
|
1438
775
|
Component({
|
|
1439
776
|
selector: 'aup-checkbox-input',
|
|
1440
|
-
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",
|
|
1441
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}"]
|
|
1442
779
|
}),
|
|
1443
780
|
__metadata("design:paramtypes", [])
|
|
@@ -1445,65 +782,20 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
|
1445
782
|
return CheckboxInputComponent;
|
|
1446
783
|
}(AbstractValueInputComponent));
|
|
1447
784
|
|
|
1448
|
-
/**
|
|
1449
|
-
* Using templates:
|
|
1450
|
-
* <aup-multiple-select-input [valueModel]="myModel" [options]="myOptions">
|
|
1451
|
-
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1452
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1453
|
-
* </aup-multiple-select_input>
|
|
1454
|
-
*/
|
|
1455
|
-
var MultipleSelectInputComponent = /** @class */ (function (_super) {
|
|
1456
|
-
__extends(MultipleSelectInputComponent, _super);
|
|
1457
|
-
function MultipleSelectInputComponent() {
|
|
1458
|
-
var _this = _super.call(this) || this;
|
|
1459
|
-
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
1460
|
-
return _this;
|
|
1461
|
-
}
|
|
1462
|
-
MultipleSelectInputComponent.prototype.ngOnInit = function () {
|
|
1463
|
-
};
|
|
1464
|
-
__decorate([
|
|
1465
|
-
Input(), TrackExternal(),
|
|
1466
|
-
__metadata("design:type", ListModel)
|
|
1467
|
-
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
1468
|
-
__decorate([
|
|
1469
|
-
Input(), StoreInListModel('optionsModel'),
|
|
1470
|
-
__metadata("design:type", Array)
|
|
1471
|
-
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
1472
|
-
__decorate([
|
|
1473
|
-
Input(),
|
|
1474
|
-
__metadata("design:type", Object)
|
|
1475
|
-
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
1476
|
-
__decorate([
|
|
1477
|
-
ContentChild('optionTemplate'),
|
|
1478
|
-
__metadata("design:type", TemplateRef)
|
|
1479
|
-
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
1480
|
-
__decorate([
|
|
1481
|
-
Input(),
|
|
1482
|
-
__metadata("design:type", Function)
|
|
1483
|
-
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
1484
|
-
MultipleSelectInputComponent = __decorate([
|
|
1485
|
-
Component({
|
|
1486
|
-
selector: 'aup-multiple-select-input',
|
|
1487
|
-
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",
|
|
1488
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1489
|
-
}),
|
|
1490
|
-
__metadata("design:paramtypes", [])
|
|
1491
|
-
], MultipleSelectInputComponent);
|
|
1492
|
-
return MultipleSelectInputComponent;
|
|
1493
|
-
}(AbstractListInputComponent));
|
|
1494
|
-
|
|
1495
785
|
var NumberInputComponent = /** @class */ (function (_super) {
|
|
1496
786
|
__extends(NumberInputComponent, _super);
|
|
1497
787
|
function NumberInputComponent() {
|
|
1498
788
|
var _this = _super.call(this) || this;
|
|
1499
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1500
|
-
// valueModel: Form.ValueModelBase<number> | IMutableValueModel<number>;
|
|
1501
789
|
_this.min = Number.MIN_SAFE_INTEGER;
|
|
1502
790
|
_this.max = Number.MAX_SAFE_INTEGER;
|
|
1503
791
|
return _this;
|
|
1504
792
|
}
|
|
1505
793
|
NumberInputComponent.prototype.ngOnInit = function () {
|
|
1506
794
|
};
|
|
795
|
+
__decorate([
|
|
796
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
797
|
+
__metadata("design:type", Object)
|
|
798
|
+
], NumberInputComponent.prototype, "valueModel", void 0);
|
|
1507
799
|
__decorate([
|
|
1508
800
|
Input(),
|
|
1509
801
|
__metadata("design:type", Object)
|
|
@@ -1515,7 +807,7 @@ var NumberInputComponent = /** @class */ (function (_super) {
|
|
|
1515
807
|
NumberInputComponent = __decorate([
|
|
1516
808
|
Component({
|
|
1517
809
|
selector: 'aup-number-input',
|
|
1518
|
-
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",
|
|
1519
811
|
styles: [""]
|
|
1520
812
|
}),
|
|
1521
813
|
__metadata("design:paramtypes", [])
|
|
@@ -1525,17 +817,19 @@ var NumberInputComponent = /** @class */ (function (_super) {
|
|
|
1525
817
|
|
|
1526
818
|
var PasswordInputComponent = /** @class */ (function (_super) {
|
|
1527
819
|
__extends(PasswordInputComponent, _super);
|
|
1528
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1529
|
-
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
1530
820
|
function PasswordInputComponent() {
|
|
1531
821
|
return _super.call(this) || this;
|
|
1532
822
|
}
|
|
1533
823
|
PasswordInputComponent.prototype.ngOnInit = function () {
|
|
1534
824
|
};
|
|
825
|
+
__decorate([
|
|
826
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
827
|
+
__metadata("design:type", Object)
|
|
828
|
+
], PasswordInputComponent.prototype, "valueModel", void 0);
|
|
1535
829
|
PasswordInputComponent = __decorate([
|
|
1536
830
|
Component({
|
|
1537
831
|
selector: 'aup-password-input',
|
|
1538
|
-
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",
|
|
1539
833
|
styles: [""]
|
|
1540
834
|
}),
|
|
1541
835
|
__metadata("design:paramtypes", [])
|
|
@@ -1547,7 +841,6 @@ var PasswordInputComponent = /** @class */ (function (_super) {
|
|
|
1547
841
|
* Using templates:
|
|
1548
842
|
* <aup-select-input [valueModel]="myModel" [options]="myOptions">
|
|
1549
843
|
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1550
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1551
844
|
* </aup-select_input>
|
|
1552
845
|
*/
|
|
1553
846
|
var SelectInputComponent = /** @class */ (function (_super) {
|
|
@@ -1559,6 +852,10 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
1559
852
|
}
|
|
1560
853
|
SelectInputComponent.prototype.ngOnInit = function () {
|
|
1561
854
|
};
|
|
855
|
+
__decorate([
|
|
856
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
857
|
+
__metadata("design:type", Object)
|
|
858
|
+
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
1562
859
|
__decorate([
|
|
1563
860
|
Input(), TrackExternal(),
|
|
1564
861
|
__metadata("design:type", ListModel)
|
|
@@ -1590,7 +887,7 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
1590
887
|
SelectInputComponent = __decorate([
|
|
1591
888
|
Component({
|
|
1592
889
|
selector: 'aup-select-input',
|
|
1593
|
-
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",
|
|
1594
891
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1595
892
|
}),
|
|
1596
893
|
__metadata("design:paramtypes", [])
|
|
@@ -1604,13 +901,17 @@ var StringInputComponent = /** @class */ (function (_super) {
|
|
|
1604
901
|
var _this = _super.call(this) || this;
|
|
1605
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;
|
|
1606
903
|
_this.clearCommand = Command.create(function () {
|
|
1607
|
-
_this.
|
|
904
|
+
_this.valueModel.value = null;
|
|
1608
905
|
});
|
|
1609
|
-
_this.clearCommand.disableWhile(chain.stringValue(_this.
|
|
906
|
+
_this.clearCommand.disableWhile(chain.stringValue(_this.valueModel).isBlank());
|
|
1610
907
|
return _this;
|
|
1611
908
|
}
|
|
1612
909
|
StringInputComponent.prototype.ngOnInit = function () {
|
|
1613
910
|
};
|
|
911
|
+
__decorate([
|
|
912
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
913
|
+
__metadata("design:type", Object)
|
|
914
|
+
], StringInputComponent.prototype, "valueModel", void 0);
|
|
1614
915
|
__decorate([
|
|
1615
916
|
Input(), TrackExternal({ defaultValue: false }),
|
|
1616
917
|
__metadata("design:type", ValueModel)
|
|
@@ -1622,7 +923,7 @@ var StringInputComponent = /** @class */ (function (_super) {
|
|
|
1622
923
|
StringInputComponent = __decorate([
|
|
1623
924
|
Component({
|
|
1624
925
|
selector: 'aup-string-input',
|
|
1625
|
-
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",
|
|
1626
927
|
styles: ["button[disabled]{visibility:hidden}"]
|
|
1627
928
|
}),
|
|
1628
929
|
__metadata("design:paramtypes", [])
|
|
@@ -1634,14 +935,16 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
1634
935
|
__extends(TextInputComponent, _super);
|
|
1635
936
|
function TextInputComponent() {
|
|
1636
937
|
var _this = _super.call(this) || this;
|
|
1637
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1638
|
-
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
1639
938
|
_this.rows = 2;
|
|
1640
939
|
return _this;
|
|
1641
940
|
// const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1642
941
|
}
|
|
1643
942
|
TextInputComponent.prototype.ngOnInit = function () {
|
|
1644
943
|
};
|
|
944
|
+
__decorate([
|
|
945
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
946
|
+
__metadata("design:type", Object)
|
|
947
|
+
], TextInputComponent.prototype, "valueModel", void 0);
|
|
1645
948
|
__decorate([
|
|
1646
949
|
Input(),
|
|
1647
950
|
__metadata("design:type", Object)
|
|
@@ -1653,7 +956,7 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
1653
956
|
TextInputComponent = __decorate([
|
|
1654
957
|
Component({
|
|
1655
958
|
selector: 'aup-text-input',
|
|
1656
|
-
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",
|
|
1657
960
|
styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
1658
961
|
}),
|
|
1659
962
|
__metadata("design:paramtypes", [])
|
|
@@ -1661,59 +964,6 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
1661
964
|
return TextInputComponent;
|
|
1662
965
|
}(AbstractValueInputComponent));
|
|
1663
966
|
|
|
1664
|
-
var IconComponent = /** @class */ (function () {
|
|
1665
|
-
function IconComponent() {
|
|
1666
|
-
this.allowedPrefixes = Enum.values(IconComponent_1.IconPrefix).map(function (p) { return p + ":"; });
|
|
1667
|
-
this.iconPrefix = IconComponent_1.IconPrefix;
|
|
1668
|
-
}
|
|
1669
|
-
IconComponent_1 = IconComponent;
|
|
1670
|
-
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
1671
|
-
get: function () {
|
|
1672
|
-
return this._icon;
|
|
1673
|
-
},
|
|
1674
|
-
set: function (iconName) {
|
|
1675
|
-
this._icon = iconName;
|
|
1676
|
-
if (!iconName) {
|
|
1677
|
-
this.errorMessage = 'icon is nil';
|
|
1678
|
-
this.prefix = undefined;
|
|
1679
|
-
return;
|
|
1680
|
-
}
|
|
1681
|
-
var colonIndex = iconName.indexOf(':');
|
|
1682
|
-
if (colonIndex > 0) {
|
|
1683
|
-
this.prefix = this.icon.slice(0, colonIndex);
|
|
1684
|
-
this.suffix = this.icon.slice(colonIndex + 1);
|
|
1685
|
-
}
|
|
1686
|
-
if (this.prefix) {
|
|
1687
|
-
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
1688
|
-
}
|
|
1689
|
-
this.errorMessage = "Unknown icon prefix, expected one of [" + this.allowedPrefixes.join(',') + "] got \"" + this.prefix + ":\"";
|
|
1690
|
-
},
|
|
1691
|
-
enumerable: true,
|
|
1692
|
-
configurable: true
|
|
1693
|
-
});
|
|
1694
|
-
var IconComponent_1;
|
|
1695
|
-
__decorate([
|
|
1696
|
-
Input(),
|
|
1697
|
-
__metadata("design:type", String),
|
|
1698
|
-
__metadata("design:paramtypes", [String])
|
|
1699
|
-
], IconComponent.prototype, "icon", null);
|
|
1700
|
-
IconComponent = IconComponent_1 = __decorate([
|
|
1701
|
-
Component({
|
|
1702
|
-
selector: 'aup-icon',
|
|
1703
|
-
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",
|
|
1704
|
-
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}"]
|
|
1705
|
-
})
|
|
1706
|
-
], IconComponent);
|
|
1707
|
-
return IconComponent;
|
|
1708
|
-
}());
|
|
1709
|
-
(function (IconComponent) {
|
|
1710
|
-
IconComponent.IconPrefix = Enum({
|
|
1711
|
-
SVG: 'svg',
|
|
1712
|
-
FONT_AWESOME: 'fa',
|
|
1713
|
-
MATERIAL: 'mat'
|
|
1714
|
-
});
|
|
1715
|
-
})(IconComponent || (IconComponent = {}));
|
|
1716
|
-
|
|
1717
967
|
var NoopComponent = /** @class */ (function () {
|
|
1718
968
|
function NoopComponent() {
|
|
1719
969
|
}
|
|
@@ -1924,7 +1174,6 @@ var CellHeaderPortalRef = /** @class */ (function (_super) {
|
|
|
1924
1174
|
assert$1.isTruthy(host);
|
|
1925
1175
|
host[HEADER_CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
1926
1176
|
};
|
|
1927
|
-
// @Trace()
|
|
1928
1177
|
CellHeaderPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
1929
1178
|
this.initialiseHeader(portalComponent, host.column);
|
|
1930
1179
|
};
|
|
@@ -1948,15 +1197,13 @@ var ComponentCellRendererPortalRef = /** @class */ (function (_super) {
|
|
|
1948
1197
|
ComponentCellRendererPortalRef.prototype.initialiseHost = function (host, columnModel) {
|
|
1949
1198
|
host[CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
1950
1199
|
};
|
|
1951
|
-
// @Trace()
|
|
1952
1200
|
ComponentCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
1953
1201
|
host[PORTAL_RENDERER_COMPONENT] = portalComponent;
|
|
1954
|
-
this.updateComponent(portalComponent, host.getRowData()
|
|
1202
|
+
this.updateComponent(portalComponent, host.getRowData());
|
|
1955
1203
|
};
|
|
1956
|
-
// @Trace()
|
|
1957
1204
|
ComponentCellRendererPortalRef.prototype.pushState = function (host) {
|
|
1958
1205
|
if (host[PORTAL_RENDERER_COMPONENT]) {
|
|
1959
|
-
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData()
|
|
1206
|
+
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData());
|
|
1960
1207
|
}
|
|
1961
1208
|
};
|
|
1962
1209
|
return ComponentCellRendererPortalRef;
|
|
@@ -1998,7 +1245,6 @@ var TemplateCellRendererPortalRef = /** @class */ (function (_super) {
|
|
|
1998
1245
|
TemplateCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
1999
1246
|
// don't care
|
|
2000
1247
|
};
|
|
2001
|
-
// @Trace()
|
|
2002
1248
|
TemplateCellRendererPortalRef.prototype.pushState = function (host) {
|
|
2003
1249
|
host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());
|
|
2004
1250
|
host.fillCell = this.fillCell;
|
|
@@ -2190,7 +1436,6 @@ var SelectHeaderCellRendererComponent = /** @class */ (function (_super) {
|
|
|
2190
1436
|
var noop = function () {
|
|
2191
1437
|
};
|
|
2192
1438
|
var ɵ0 = noop;
|
|
2193
|
-
var CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
|
|
2194
1439
|
var ColumnModel = /** @class */ (function () {
|
|
2195
1440
|
function ColumnModel(columnId, defaults) {
|
|
2196
1441
|
this.columnId = columnId;
|
|
@@ -2281,66 +1526,24 @@ var ColumnModel = /** @class */ (function () {
|
|
|
2281
1526
|
}());
|
|
2282
1527
|
var PropertyColumnModel = /** @class */ (function (_super) {
|
|
2283
1528
|
__extends(PropertyColumnModel, _super);
|
|
2284
|
-
function PropertyColumnModel(
|
|
2285
|
-
var _this = _super.call(this,
|
|
1529
|
+
function PropertyColumnModel(property, defaults) {
|
|
1530
|
+
var _this = _super.call(this, property.toString(), defaults) || this;
|
|
2286
1531
|
_this.property = property;
|
|
2287
1532
|
_this._format = function (value) { return value; };
|
|
2288
1533
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
2289
1534
|
return _this;
|
|
2290
1535
|
}
|
|
2291
|
-
PropertyColumnModel.prototype.cellRenderer = function (componentType
|
|
1536
|
+
PropertyColumnModel.prototype.cellRenderer = function (componentType) {
|
|
2292
1537
|
var _this = this;
|
|
2293
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData
|
|
2294
|
-
if (firstTime) {
|
|
2295
|
-
if (___default.isFunction(onComponentInitOrOptions)) {
|
|
2296
|
-
onComponentInitOrOptions(component);
|
|
2297
|
-
}
|
|
2298
|
-
else {
|
|
2299
|
-
if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
2300
|
-
onComponentInitOrOptions.onComponentInit(component);
|
|
2301
|
-
}
|
|
2302
|
-
}
|
|
2303
|
-
}
|
|
1538
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
|
|
2304
1539
|
component.value = _this._format(rowData.row[_this.property]);
|
|
2305
|
-
if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
2306
|
-
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
2307
|
-
}
|
|
2308
|
-
}));
|
|
2309
|
-
return this;
|
|
2310
|
-
};
|
|
2311
|
-
PropertyColumnModel.prototype.mutableCellRenderer = function (componentType, options) {
|
|
2312
|
-
var _this = this;
|
|
2313
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData, firstTime) {
|
|
2314
|
-
// keep a local copy most recent row value so it's available to teh
|
|
2315
|
-
// edit callback without having to add/remove subscribers all the time.
|
|
2316
|
-
component[CELL_RENDERER_COMPONENT_ROW_CACHE] = rowData.row;
|
|
2317
|
-
var disableEditCallback = false;
|
|
2318
|
-
if (firstTime) {
|
|
2319
|
-
if (___default.isFunction(options === null || options === void 0 ? void 0 : options.onComponentInit)) {
|
|
2320
|
-
options.onComponentInit(component);
|
|
2321
|
-
}
|
|
2322
|
-
// install our edit callback
|
|
2323
|
-
component.onValueEdited(function (is, was) {
|
|
2324
|
-
if (!disableEditCallback) {
|
|
2325
|
-
options.onValueEdit(component[CELL_RENDERER_COMPONENT_ROW_CACHE], is, was);
|
|
2326
|
-
}
|
|
2327
|
-
});
|
|
2328
|
-
}
|
|
2329
|
-
// now push the value the component and disable the callback just incase the component misbehaves
|
|
2330
|
-
// and fires a value change during the operation.
|
|
2331
|
-
disableEditCallback = true;
|
|
2332
|
-
component.value = rowData.row[_this.property];
|
|
2333
|
-
disableEditCallback = false;
|
|
2334
|
-
if (!___default.isFunction(options) && ___default.isFunction(options === null || options === void 0 ? void 0 : options.onRowUpdate)) {
|
|
2335
|
-
options.onRowUpdate(component, rowData.row);
|
|
2336
|
-
}
|
|
2337
1540
|
}));
|
|
2338
1541
|
return this;
|
|
2339
1542
|
};
|
|
2340
|
-
PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser,
|
|
1543
|
+
PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, initialiseComponent) {
|
|
2341
1544
|
var _this = this;
|
|
2342
1545
|
var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
2343
|
-
var initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser :
|
|
1546
|
+
var initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
2344
1547
|
this.configureCellEditor(new CellEditorPortalRef(editor, function (component, editSession) {
|
|
2345
1548
|
var formValueModel = editSession.form.pluck(_this.property);
|
|
2346
1549
|
if (validators) {
|
|
@@ -2365,8 +1568,8 @@ var PropertyColumnModel = /** @class */ (function (_super) {
|
|
|
2365
1568
|
}(ColumnModel));
|
|
2366
1569
|
var ListPropertyColumnModel = /** @class */ (function (_super) {
|
|
2367
1570
|
__extends(ListPropertyColumnModel, _super);
|
|
2368
|
-
function ListPropertyColumnModel(
|
|
2369
|
-
var _this = _super.call(this,
|
|
1571
|
+
function ListPropertyColumnModel(property, defaults) {
|
|
1572
|
+
var _this = _super.call(this, property.toString(), defaults) || this;
|
|
2370
1573
|
_this.property = property;
|
|
2371
1574
|
_this._format = function (value) { return value.map(function (v) { return v === null || v === void 0 ? void 0 : v.toString(); }).join(', '); };
|
|
2372
1575
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
@@ -2413,23 +1616,10 @@ var CustomValueColumnModel = /** @class */ (function (_super) {
|
|
|
2413
1616
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
2414
1617
|
return _this;
|
|
2415
1618
|
}
|
|
2416
|
-
CustomValueColumnModel.prototype.cellRenderer = function (componentType
|
|
1619
|
+
CustomValueColumnModel.prototype.cellRenderer = function (componentType) {
|
|
2417
1620
|
var _this = this;
|
|
2418
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData
|
|
2419
|
-
if (firstTime) {
|
|
2420
|
-
if (___default.isFunction(onComponentInitOrOptions)) {
|
|
2421
|
-
onComponentInitOrOptions(component);
|
|
2422
|
-
}
|
|
2423
|
-
else {
|
|
2424
|
-
if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
2425
|
-
onComponentInitOrOptions.onComponentInit(component);
|
|
2426
|
-
}
|
|
2427
|
-
}
|
|
2428
|
-
}
|
|
1621
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
|
|
2429
1622
|
component.value = _this.getValue(rowData.row);
|
|
2430
|
-
if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
2431
|
-
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
2432
|
-
}
|
|
2433
1623
|
}));
|
|
2434
1624
|
return this;
|
|
2435
1625
|
};
|
|
@@ -2602,9 +1792,6 @@ var TableModel = /** @class */ (function () {
|
|
|
2602
1792
|
this._editorSessions = new MutableListModel();
|
|
2603
1793
|
this.rowClassNamePredicates = [];
|
|
2604
1794
|
this._createForm = function (row) { return new DirtyTrackingForm(); };
|
|
2605
|
-
this.trackBy = function (index, item) {
|
|
2606
|
-
return _this.identityOf ? _this.identityOf(item) : index;
|
|
2607
|
-
};
|
|
2608
1795
|
this.identityOf = sourceOfTruth.identityOf;
|
|
2609
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;
|
|
2610
1797
|
this._columnsById = chain(this._columns).indexBy('columnId');
|
|
@@ -2616,7 +1803,7 @@ var TableModel = /** @class */ (function () {
|
|
|
2616
1803
|
this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
|
|
2617
1804
|
this.firstEditableColumn = chain(this.columns).select(function (c) { return c.hasEditorPortal(); }).first();
|
|
2618
1805
|
this.hasColumnsWithRowSelectionExplicitlyEnabled = chain(this._columns).findIndex(function (column) { return column.isRowSelectionExplicitlyEnabled(); }).isGreaterThanOrEqualTo(0);
|
|
2619
|
-
this.addRowClass(
|
|
1806
|
+
this.addRowClass("enable-hover", function () { return _this.isRowSelectionEnabled(); });
|
|
2620
1807
|
}
|
|
2621
1808
|
TableModel_1 = TableModel;
|
|
2622
1809
|
TableModel.fromList = function (sourceOfTruth, builder) {
|
|
@@ -2631,6 +1818,12 @@ var TableModel = /** @class */ (function () {
|
|
|
2631
1818
|
enumerable: true,
|
|
2632
1819
|
configurable: true
|
|
2633
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
|
+
};
|
|
2634
1827
|
Object.defineProperty(TableModel.prototype, "columns", {
|
|
2635
1828
|
get: function () {
|
|
2636
1829
|
return this._columns.readonly;
|
|
@@ -2638,11 +1831,11 @@ var TableModel = /** @class */ (function () {
|
|
|
2638
1831
|
enumerable: true,
|
|
2639
1832
|
configurable: true
|
|
2640
1833
|
});
|
|
2641
|
-
TableModel.prototype.pluck = function (property
|
|
2642
|
-
return this.addColumn(new PropertyColumnModel(
|
|
1834
|
+
TableModel.prototype.pluck = function (property) {
|
|
1835
|
+
return this.addColumn(new PropertyColumnModel(property, this));
|
|
2643
1836
|
};
|
|
2644
|
-
TableModel.prototype.pluckList = function (property
|
|
2645
|
-
return this.addColumn(new ListPropertyColumnModel(
|
|
1837
|
+
TableModel.prototype.pluckList = function (property) {
|
|
1838
|
+
return this.addColumn(new ListPropertyColumnModel(property, this));
|
|
2646
1839
|
};
|
|
2647
1840
|
TableModel.prototype.addSelectionColumn = function (selectionModel) {
|
|
2648
1841
|
assert.isNil(this.selectionColumnModel);
|
|
@@ -2656,9 +1849,6 @@ var TableModel = /** @class */ (function () {
|
|
|
2656
1849
|
TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
|
|
2657
1850
|
return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
|
|
2658
1851
|
};
|
|
2659
|
-
TableModel.prototype.addComponentColumn = function (columnId, component, onComponentInitOrOptions) {
|
|
2660
|
-
return this.addColumn(new CustomValueColumnModel(columnId, this, function (row) { return row; })).cellRenderer(component, onComponentInitOrOptions);
|
|
2661
|
-
};
|
|
2662
1852
|
TableModel.prototype.addTemplateColumn = function (columnId) {
|
|
2663
1853
|
return this.addColumn(new CustomTemplateColumnModel(columnId, this));
|
|
2664
1854
|
};
|
|
@@ -2810,7 +2000,7 @@ var TableComponent = /** @class */ (function (_super) {
|
|
|
2810
2000
|
TableComponent = __decorate([
|
|
2811
2001
|
Component({
|
|
2812
2002
|
selector: 'aup-table',
|
|
2813
|
-
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",
|
|
2814
2004
|
styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{flex:1}"]
|
|
2815
2005
|
}),
|
|
2816
2006
|
__metadata("design:paramtypes", [])
|
|
@@ -2971,86 +2161,27 @@ var TableHeaderCellRendererComponent = /** @class */ (function () {
|
|
|
2971
2161
|
TableHeaderCellRendererComponent.prototype.initialiseHeader = function (instance) {
|
|
2972
2162
|
this.column.onHeaderAttached(this, instance);
|
|
2973
2163
|
};
|
|
2974
|
-
TableHeaderCellRendererComponent.prototype.getPortal = function () {
|
|
2975
|
-
return this[HEADER_CELL_RENDERER_PORTAL];
|
|
2976
|
-
};
|
|
2977
|
-
__decorate([
|
|
2978
|
-
Input(),
|
|
2979
|
-
__metadata("design:type", ColumnModel)
|
|
2980
|
-
], TableHeaderCellRendererComponent.prototype, "column", void 0);
|
|
2981
|
-
__decorate([
|
|
2982
|
-
HostBinding('class'),
|
|
2983
|
-
__metadata("design:type", Object)
|
|
2984
|
-
], TableHeaderCellRendererComponent.prototype, "defaultClassNames", void 0);
|
|
2985
|
-
TableHeaderCellRendererComponent = __decorate([
|
|
2986
|
-
Component({
|
|
2987
|
-
selector: 'aup-table-header-cell-renderer',
|
|
2988
|
-
template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
|
|
2989
|
-
styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]
|
|
2990
|
-
}),
|
|
2991
|
-
__metadata("design:paramtypes", [])
|
|
2992
|
-
], TableHeaderCellRendererComponent);
|
|
2993
|
-
return TableHeaderCellRendererComponent;
|
|
2994
|
-
}());
|
|
2995
|
-
|
|
2996
|
-
var MenuItemData = /** @class */ (function (_super) {
|
|
2997
|
-
__extends(MenuItemData, _super);
|
|
2998
|
-
function MenuItemData(factory, face) {
|
|
2999
|
-
var _this = _super.call(this, face) || this;
|
|
3000
|
-
_this.factory = factory;
|
|
3001
|
-
return _this;
|
|
3002
|
-
}
|
|
3003
|
-
return MenuItemData;
|
|
3004
|
-
}(CommandFace.Adapter));
|
|
3005
|
-
/**
|
|
3006
|
-
*
|
|
3007
|
-
*/
|
|
3008
|
-
var TableRowMenuComponent = /** @class */ (function (_super) {
|
|
3009
|
-
__extends(TableRowMenuComponent, _super);
|
|
3010
|
-
function TableRowMenuComponent() {
|
|
3011
|
-
var _this = _super.call(this) || this;
|
|
3012
|
-
_this.actions = [];
|
|
3013
|
-
_this.moreActions = [];
|
|
3014
|
-
return _this;
|
|
3015
|
-
}
|
|
3016
|
-
TableRowMenuComponent.prototype.registerAction = function (commandFactory, properties) {
|
|
3017
|
-
this.actions.push(new MenuItemData(commandFactory, properties));
|
|
3018
|
-
};
|
|
3019
|
-
TableRowMenuComponent.prototype.registerMoreAction = function (commandFactory, properties) {
|
|
3020
|
-
this.moreActions.push(new MenuItemData(commandFactory, properties));
|
|
3021
|
-
};
|
|
3022
|
-
TableRowMenuComponent.prototype.ngOnInit = function () {
|
|
3023
|
-
};
|
|
3024
|
-
TableRowMenuComponent.prototype.createMoreMenuCommand = function (item, value) {
|
|
3025
|
-
var _this = this;
|
|
3026
|
-
var when = Dsl.disposeWith(this).when;
|
|
3027
|
-
var command = item.factory.create(value);
|
|
3028
|
-
when(command.busy).becomesFalsey(function () {
|
|
3029
|
-
_this.closeMoreMenu();
|
|
3030
|
-
});
|
|
3031
|
-
return command;
|
|
3032
|
-
};
|
|
3033
|
-
TableRowMenuComponent.prototype.closeMoreMenu = function () {
|
|
3034
|
-
this.menu.closeMenu();
|
|
2164
|
+
TableHeaderCellRendererComponent.prototype.getPortal = function () {
|
|
2165
|
+
return this[HEADER_CELL_RENDERER_PORTAL];
|
|
3035
2166
|
};
|
|
3036
2167
|
__decorate([
|
|
3037
2168
|
Input(),
|
|
3038
|
-
__metadata("design:type",
|
|
3039
|
-
],
|
|
2169
|
+
__metadata("design:type", ColumnModel)
|
|
2170
|
+
], TableHeaderCellRendererComponent.prototype, "column", void 0);
|
|
3040
2171
|
__decorate([
|
|
3041
|
-
|
|
3042
|
-
__metadata("design:type",
|
|
3043
|
-
],
|
|
3044
|
-
|
|
2172
|
+
HostBinding('class'),
|
|
2173
|
+
__metadata("design:type", Object)
|
|
2174
|
+
], TableHeaderCellRendererComponent.prototype, "defaultClassNames", void 0);
|
|
2175
|
+
TableHeaderCellRendererComponent = __decorate([
|
|
3045
2176
|
Component({
|
|
3046
|
-
selector: 'aup-table-
|
|
3047
|
-
template: "
|
|
3048
|
-
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%}"]
|
|
3049
2180
|
}),
|
|
3050
2181
|
__metadata("design:paramtypes", [])
|
|
3051
|
-
],
|
|
3052
|
-
return
|
|
3053
|
-
}(
|
|
2182
|
+
], TableHeaderCellRendererComponent);
|
|
2183
|
+
return TableHeaderCellRendererComponent;
|
|
2184
|
+
}());
|
|
3054
2185
|
|
|
3055
2186
|
var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
3056
2187
|
__extends(VerticalFocusContainerComponent, _super);
|
|
@@ -3137,6 +2268,100 @@ var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
|
3137
2268
|
return VerticalFocusContainerComponent;
|
|
3138
2269
|
}(FocusContainerComponent));
|
|
3139
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
|
+
|
|
3140
2365
|
var ComponentsModule = /** @class */ (function () {
|
|
3141
2366
|
function ComponentsModule(faIconLibrary) {
|
|
3142
2367
|
faIconLibrary.addIconPacks(fas);
|
|
@@ -3155,8 +2380,6 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3155
2380
|
TextInputComponent,
|
|
3156
2381
|
PasswordInputComponent,
|
|
3157
2382
|
SelectInputComponent,
|
|
3158
|
-
MultipleSelectInputComponent,
|
|
3159
|
-
AutocompleteInputComponent,
|
|
3160
2383
|
CheckboxInputComponent,
|
|
3161
2384
|
ScrollContainerComponent,
|
|
3162
2385
|
NoopComponent,
|
|
@@ -3176,16 +2399,9 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3176
2399
|
SelectHeaderCellRendererComponent,
|
|
3177
2400
|
DefaultHeaderCellRendererComponent,
|
|
3178
2401
|
TableHeaderCellRendererComponent,
|
|
2402
|
+
MultipleSelectInputComponent,
|
|
3179
2403
|
IconComponent,
|
|
3180
|
-
SectionHeaderComponent
|
|
3181
|
-
TableRowMenuComponent,
|
|
3182
|
-
CommandBarComponent,
|
|
3183
|
-
CommandComponent,
|
|
3184
|
-
PopupMenuComponent,
|
|
3185
|
-
CommandFaceComponent,
|
|
3186
|
-
AbstractPopupMenuComponent,
|
|
3187
|
-
PopupMenuRendererComponent,
|
|
3188
|
-
MoreMenuComponent
|
|
2404
|
+
SectionHeaderComponent
|
|
3189
2405
|
],
|
|
3190
2406
|
imports: [
|
|
3191
2407
|
CommonModule,
|
|
@@ -3203,10 +2419,7 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3203
2419
|
PortalModule,
|
|
3204
2420
|
CdkScrollableModule,
|
|
3205
2421
|
FontAwesomeModule,
|
|
3206
|
-
MatTooltipModule
|
|
3207
|
-
MatAutocompleteModule,
|
|
3208
|
-
_MatMenuDirectivesModule,
|
|
3209
|
-
MatMenuModule
|
|
2422
|
+
MatTooltipModule
|
|
3210
2423
|
],
|
|
3211
2424
|
exports: [
|
|
3212
2425
|
NumberInputComponent,
|
|
@@ -3215,8 +2428,6 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3215
2428
|
PasswordInputComponent,
|
|
3216
2429
|
CheckboxInputComponent,
|
|
3217
2430
|
SelectInputComponent,
|
|
3218
|
-
MultipleSelectInputComponent,
|
|
3219
|
-
AutocompleteInputComponent,
|
|
3220
2431
|
ScrollContainerComponent,
|
|
3221
2432
|
NoopComponent,
|
|
3222
2433
|
SwitchCaseComponent,
|
|
@@ -3229,31 +2440,12 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3229
2440
|
TableComponent,
|
|
3230
2441
|
EditRowControls,
|
|
3231
2442
|
ColumnTemplateDirective,
|
|
2443
|
+
MultipleSelectInputComponent,
|
|
3232
2444
|
IconComponent,
|
|
3233
|
-
SectionHeaderComponent
|
|
3234
|
-
TableRowMenuComponent,
|
|
3235
|
-
CommandBarComponent,
|
|
3236
|
-
CommandComponent,
|
|
3237
|
-
AbstractPopupMenuComponent,
|
|
3238
|
-
PopupMenuComponent,
|
|
3239
|
-
CommandFaceComponent,
|
|
3240
|
-
PopupMenuRendererComponent,
|
|
3241
|
-
MoreMenuComponent
|
|
2445
|
+
SectionHeaderComponent
|
|
3242
2446
|
],
|
|
3243
2447
|
providers: [
|
|
3244
|
-
FocusBindingFactory
|
|
3245
|
-
// {
|
|
3246
|
-
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
3247
|
-
// type: 'string',
|
|
3248
|
-
// editorClass: StringInputComponent
|
|
3249
|
-
// }, multi: true
|
|
3250
|
-
// },
|
|
3251
|
-
// {
|
|
3252
|
-
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
3253
|
-
// type: 'number',
|
|
3254
|
-
// editorClass: NumberInputComponent
|
|
3255
|
-
// }, multi: true
|
|
3256
|
-
// }
|
|
2448
|
+
FocusBindingFactory,
|
|
3257
2449
|
]
|
|
3258
2450
|
}),
|
|
3259
2451
|
__metadata("design:paramtypes", [FaIconLibrary])
|
|
@@ -3692,7 +2884,6 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3692
2884
|
ActivityContainerComponent.prototype.registerDisposable = function (disposable) {
|
|
3693
2885
|
return this.garbage.registerDisposable(disposable);
|
|
3694
2886
|
};
|
|
3695
|
-
// @Trace()
|
|
3696
2887
|
ActivityContainerComponent.prototype.dispose = function () {
|
|
3697
2888
|
// TODO: think about auto cancelling any outstanding activity on dispose.
|
|
3698
2889
|
// See NavigationState.Navigating for a use-case.
|
|
@@ -3841,6 +3032,12 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3841
3032
|
ViewChildren(ActivityOutletComponent),
|
|
3842
3033
|
__metadata("design:type", QueryList)
|
|
3843
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);
|
|
3844
3041
|
ActivityContainerComponent = __decorate([
|
|
3845
3042
|
Component({
|
|
3846
3043
|
selector: 'aup-activity-container',
|
|
@@ -4924,7 +4121,7 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
4924
4121
|
assert.isNil(this.visitModel.value);
|
|
4925
4122
|
var when = Dsl.disposeWith(this).when;
|
|
4926
4123
|
this.visitModel.value = visit;
|
|
4927
|
-
DebugContext.
|
|
4124
|
+
DebugContext.get(this.visitModel).tag(this.placeDefinition.component.name + ".visitModel");
|
|
4928
4125
|
this.placeDefinition.getVisitParameterDefs().forEach(function (parameterDef) { return _this.installBinding(parameterDef); });
|
|
4929
4126
|
when.valueOf(this.visitModel).changes(function (current, previous) {
|
|
4930
4127
|
notifyVisitChanged(current, previous);
|
|
@@ -6072,6 +5269,75 @@ var UrlService = /** @class */ (function () {
|
|
|
6072
5269
|
return UrlService;
|
|
6073
5270
|
}());
|
|
6074
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
|
+
|
|
6075
5341
|
var PlaceRouter = /** @class */ (function (_super) {
|
|
6076
5342
|
__extends(PlaceRouter, _super);
|
|
6077
5343
|
function PlaceRouter(angularRouter, angularLocation, interactionService, urlService, placeHistory) {
|
|
@@ -6267,7 +5533,6 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
6267
5533
|
enumerable: true,
|
|
6268
5534
|
configurable: true
|
|
6269
5535
|
});
|
|
6270
|
-
// @Trace()
|
|
6271
5536
|
PlaceRouter.prototype.pushVisitChangesToRoute = function (previous, next) {
|
|
6272
5537
|
return __awaiter(this, void 0, void 0, function () {
|
|
6273
5538
|
var _this = this;
|
|
@@ -6368,6 +5633,12 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
6368
5633
|
{ type: PlaceHistory }
|
|
6369
5634
|
]; };
|
|
6370
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);
|
|
6371
5642
|
PlaceRouter = __decorate([
|
|
6372
5643
|
Injectable({
|
|
6373
5644
|
providedIn: 'root'
|
|
@@ -6381,75 +5652,6 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
6381
5652
|
return PlaceRouter;
|
|
6382
5653
|
}(GarbageCollector));
|
|
6383
5654
|
|
|
6384
|
-
var Visit = /** @class */ (function () {
|
|
6385
|
-
function Visit(placeDefinition, visitParameters) {
|
|
6386
|
-
if (visitParameters === void 0) { visitParameters = {}; }
|
|
6387
|
-
this.placeDefinition = placeDefinition;
|
|
6388
|
-
this.visitParameters = visitParameters;
|
|
6389
|
-
}
|
|
6390
|
-
// @Trace()
|
|
6391
|
-
Visit.prototype.getRouteId = function () {
|
|
6392
|
-
return this.placeDefinition.getRouteIdFrom(this);
|
|
6393
|
-
};
|
|
6394
|
-
// @Trace()
|
|
6395
|
-
Visit.prototype.hasRouteId = function () {
|
|
6396
|
-
return !isNil(this.getRouteId());
|
|
6397
|
-
};
|
|
6398
|
-
/**
|
|
6399
|
-
* Returns the value of the place parameter with the specified name. The parameter
|
|
6400
|
-
* name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
|
|
6401
|
-
* same as the the ValueModel property name.
|
|
6402
|
-
* @param parameterName the field name of the property model or the `as` option if specified.
|
|
6403
|
-
*/
|
|
6404
|
-
Visit.prototype.getParameter = function (parameterName) {
|
|
6405
|
-
return this.visitParameters[parameterName];
|
|
6406
|
-
};
|
|
6407
|
-
// @Trace()
|
|
6408
|
-
Visit.prototype.hasParameter = function (parameterName) {
|
|
6409
|
-
return Object.keys(this.visitParameters).includes(parameterName);
|
|
6410
|
-
};
|
|
6411
|
-
Visit.prototype.replace = function (parameter, value) {
|
|
6412
|
-
var _a;
|
|
6413
|
-
return new Visit(this.placeDefinition, __assign(__assign({}, this.visitParameters), (_a = {}, _a[parameter.name] = value, _a)));
|
|
6414
|
-
};
|
|
6415
|
-
Visit.prototype.mergeRouteParameters = function (routeParams) {
|
|
6416
|
-
var _this = this;
|
|
6417
|
-
// todo: whitelist parameters.
|
|
6418
|
-
var routeParameterKeys = Object.keys(routeParams);
|
|
6419
|
-
var params = {};
|
|
6420
|
-
this.placeDefinition.getVisitParameterDefs().forEach(function (def) {
|
|
6421
|
-
if (def.isRouteId || def.isRouteParameter) {
|
|
6422
|
-
if (routeParameterKeys.includes(def.name)) {
|
|
6423
|
-
params[def.name] = routeParams[def.name];
|
|
6424
|
-
}
|
|
6425
|
-
}
|
|
6426
|
-
else {
|
|
6427
|
-
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
6428
|
-
// defaults and remember sanitisation process.
|
|
6429
|
-
var value = _this.getParameter(def.name);
|
|
6430
|
-
if (_this.hasParameter(def.name)) {
|
|
6431
|
-
params[def.name] = value;
|
|
6432
|
-
}
|
|
6433
|
-
}
|
|
6434
|
-
});
|
|
6435
|
-
return new Visit(this.placeDefinition, params);
|
|
6436
|
-
};
|
|
6437
|
-
Visit.prototype.hasRoutingChangedFrom = function (other) {
|
|
6438
|
-
var samePlace = other.placeDefinition === this.placeDefinition;
|
|
6439
|
-
var sameRouteParameters = isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
6440
|
-
return !samePlace || !sameRouteParameters;
|
|
6441
|
-
};
|
|
6442
|
-
Visit.prototype.hasChangedFrom = function (other) {
|
|
6443
|
-
var sameNonRouteParameters = isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
6444
|
-
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
6445
|
-
};
|
|
6446
|
-
Visit.prototype.toDebugString = function () {
|
|
6447
|
-
var _this = this;
|
|
6448
|
-
return Object.keys(this.visitParameters).map(function (k) { return k + "=" + _this.visitParameters[k]; }).join(",");
|
|
6449
|
-
};
|
|
6450
|
-
return Visit;
|
|
6451
|
-
}());
|
|
6452
|
-
|
|
6453
5655
|
var AUP_PLACE_CONFIG = new InjectionToken('AUP_PLACE_CONFIG');
|
|
6454
5656
|
|
|
6455
5657
|
// Freezes the state of the components at the start of the animation.
|
|
@@ -7464,7 +6666,8 @@ function installMechanics(prototype, propertyKey, backingModel, tagPrefix, isEmp
|
|
|
7464
6666
|
binding: null
|
|
7465
6667
|
};
|
|
7466
6668
|
var tag = tagPrefix + "(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
|
|
7467
|
-
DebugContext.
|
|
6669
|
+
DebugContext.get(mechanics.backingModel).tag(tag);
|
|
6670
|
+
Logger.get(mechanics.backingModel).tag(tag);
|
|
7468
6671
|
Object.defineProperty(prototype, propertyKey, {
|
|
7469
6672
|
get: function () {
|
|
7470
6673
|
return mechanics.backingModel;
|
|
@@ -7526,5 +6729,5 @@ function VisitParameterList(options) {
|
|
|
7526
6729
|
* Generated bundle index. Do not edit.
|
|
7527
6730
|
*/
|
|
7528
6731
|
|
|
7529
|
-
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 };
|
|
7530
6733
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|