@coolon/angular-ui-powerups 2.0.0-alpha.19 → 2.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -119
- package/assets/form.scss +0 -33
- package/bundles/coolon-angular-ui-powerups.umd.js +323 -537
- 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 -55
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +52 -53
- package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/card-container/card-container.component.js +1 -1
- package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
- package/esm2015/lib/components/components.module.js +12 -29
- 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 +6 -26
- 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 +7 -46
- 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 +7 -4
- 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 +7 -4
- package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +8 -5
- 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 -8
- 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 +8 -4
- package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.js +7 -4
- package/esm2015/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
- package/esm2015/lib/components/index.js +1 -2
- 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 -37
- 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 +5 -8
- 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/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 -53
- package/esm5/coolon-angular-ui-powerups.js.map +1 -1
- package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/card-container/card-container.component.js +1 -1
- package/esm5/lib/components/components.module.js +12 -29
- 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 +6 -34
- 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 +7 -51
- package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +7 -4
- 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 +7 -4
- package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js +8 -5
- 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 -8
- 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 +8 -4
- package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
- package/esm5/lib/components/forms/text-input/text-input.component.js +7 -4
- package/esm5/lib/components/forms/text-input/text-input.component.js.map +1 -1
- package/esm5/lib/components/index.js +1 -2
- 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 -37
- 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 +5 -8
- package/esm5/lib/components/table/table-model.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 +241 -433
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +256 -469
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/forms/abstract-input.component.d.ts +3 -12
- 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 -8
- 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/index.d.ts +1 -2
- 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 +7 -15
- 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 +3 -14
- package/package.json +4 -4
- 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/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/lib/components/forms/autocomplete-input/autocomplete-input.component.d.ts +0 -25
|
@@ -9,19 +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
15
|
import { MatTableModule } from '@angular/material/table';
|
|
17
|
-
import {
|
|
18
|
-
import { FaIconLibrary, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
19
|
-
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
20
|
-
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, FocusManager, EventListenerList, Form, MutableListModel, Guard, Binding, DebugContext, MutableValueModel, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Functions } from '@coolon/pectin';
|
|
21
|
-
import ___default, { isEqual, isNil } from 'lodash';
|
|
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';
|
|
22
17
|
import { assert as assert$1, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
|
|
23
18
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
19
|
+
import ___default, { isEqual, isNil } from 'lodash';
|
|
24
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';
|
|
25
24
|
import { FlexModule, GridModule } from '@angular/flex-layout';
|
|
26
25
|
import { MatDialogModule, MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
|
27
26
|
import { RouterModule, UrlSegment, Router, UrlSerializer, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterOutlet } from '@angular/router';
|
|
@@ -407,7 +406,7 @@ var CardContainerComponent = /** @class */ (function (_super) {
|
|
|
407
406
|
Component({
|
|
408
407
|
selector: 'aup-card-container',
|
|
409
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",
|
|
410
|
-
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}
|
|
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-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}"]
|
|
411
410
|
}),
|
|
412
411
|
__metadata("design:paramtypes", [])
|
|
413
412
|
], CardContainerComponent);
|
|
@@ -522,8 +521,6 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
522
521
|
__extends(AbstractInputComponent, _super);
|
|
523
522
|
function AbstractInputComponent() {
|
|
524
523
|
var _this = _super.call(this) || this;
|
|
525
|
-
_this.onValueEditedListeners = new EventListenerList();
|
|
526
|
-
_this.dense = false;
|
|
527
524
|
// TODO: fix this.
|
|
528
525
|
// tslint:disable-next-line:no-output-native
|
|
529
526
|
_this.focus = new EventEmitter();
|
|
@@ -573,7 +570,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
573
570
|
};
|
|
574
571
|
Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
|
|
575
572
|
get: function () {
|
|
576
|
-
return this.
|
|
573
|
+
return this.inputModel.enabled;
|
|
577
574
|
},
|
|
578
575
|
enumerable: true,
|
|
579
576
|
configurable: true
|
|
@@ -583,7 +580,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
583
580
|
};
|
|
584
581
|
Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
|
|
585
582
|
get: function () {
|
|
586
|
-
return this.
|
|
583
|
+
return this.inputModel.errorList;
|
|
587
584
|
},
|
|
588
585
|
enumerable: true,
|
|
589
586
|
configurable: true
|
|
@@ -597,40 +594,19 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
597
594
|
});
|
|
598
595
|
Object.defineProperty(AbstractInputComponent.prototype, "focusContext", {
|
|
599
596
|
get: function () {
|
|
600
|
-
return this.
|
|
601
|
-
},
|
|
602
|
-
enumerable: true,
|
|
603
|
-
configurable: true
|
|
604
|
-
});
|
|
605
|
-
Object.defineProperty(AbstractInputComponent.prototype, "floatLabel", {
|
|
606
|
-
get: function () {
|
|
607
|
-
return this.dense ? 'never' : this.userFloatLabel;
|
|
608
|
-
},
|
|
609
|
-
enumerable: true,
|
|
610
|
-
configurable: true
|
|
611
|
-
});
|
|
612
|
-
Object.defineProperty(AbstractInputComponent.prototype, "showHint", {
|
|
613
|
-
get: function () {
|
|
614
|
-
return this.dense ? false : !!this.hint;
|
|
597
|
+
return this.inputModel.focusContext;
|
|
615
598
|
},
|
|
616
599
|
enumerable: true,
|
|
617
600
|
configurable: true
|
|
618
601
|
});
|
|
619
|
-
/**
|
|
620
|
-
* Invokes the callback when this components value is changed by a user edit.
|
|
621
|
-
* @param callback
|
|
622
|
-
*/
|
|
623
|
-
AbstractInputComponent.prototype.onValueEdited = function (callback) {
|
|
624
|
-
return this.onValueEditedListeners.add(callback);
|
|
625
|
-
};
|
|
626
602
|
__decorate([
|
|
627
603
|
Input(),
|
|
628
604
|
__metadata("design:type", String)
|
|
629
605
|
], AbstractInputComponent.prototype, "label", void 0);
|
|
630
606
|
__decorate([
|
|
631
|
-
Input(
|
|
607
|
+
Input(),
|
|
632
608
|
__metadata("design:type", String)
|
|
633
|
-
], AbstractInputComponent.prototype, "
|
|
609
|
+
], AbstractInputComponent.prototype, "floatLabel", void 0);
|
|
634
610
|
__decorate([
|
|
635
611
|
Input(),
|
|
636
612
|
__metadata("design:type", String)
|
|
@@ -639,11 +615,6 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
639
615
|
Input(),
|
|
640
616
|
__metadata("design:type", String)
|
|
641
617
|
], AbstractInputComponent.prototype, "placeholder", void 0);
|
|
642
|
-
__decorate([
|
|
643
|
-
HostBinding('class.dense'),
|
|
644
|
-
Input(),
|
|
645
|
-
__metadata("design:type", Object)
|
|
646
|
-
], AbstractInputComponent.prototype, "dense", void 0);
|
|
647
618
|
__decorate([
|
|
648
619
|
Input('command.focus'),
|
|
649
620
|
__metadata("design:type", Command)
|
|
@@ -712,7 +683,7 @@ var AbstractInputComponent = /** @class */ (function (_super) {
|
|
|
712
683
|
var AbstractListInputComponent = /** @class */ (function (_super) {
|
|
713
684
|
__extends(AbstractListInputComponent, _super);
|
|
714
685
|
function AbstractListInputComponent() {
|
|
715
|
-
var _this = _super.
|
|
686
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
716
687
|
/**
|
|
717
688
|
* A backing model for all our @Input() valueModel properties which should be defined as follows.
|
|
718
689
|
*
|
|
@@ -724,61 +695,11 @@ var AbstractListInputComponent = /** @class */ (function (_super) {
|
|
|
724
695
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
725
696
|
*/
|
|
726
697
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
727
|
-
_this.
|
|
728
|
-
_this.componentListModel = new MutableListModel();
|
|
729
|
-
_this.setValueIsInProgress = new Guard();
|
|
730
|
-
_this.valueChange = new EventEmitter();
|
|
731
|
-
var _a = Dsl.disposeWith(_this), when = _a.when, valueOf = _a.valueOf, chain = _a.chain;
|
|
732
|
-
var binding = new Binding.Identity(_this.formValueModel, _this.componentListModel);
|
|
733
|
-
var inExternalChange = valueOf.any(_this.setValueIsInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
|
|
734
|
-
when(_this.componentListModel).changes(function (is, was) {
|
|
735
|
-
_this.valueChange.emit(is);
|
|
736
|
-
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
737
|
-
}, {
|
|
738
|
-
initialValue: 'ignore',
|
|
739
|
-
// we never fire events during an external changes to the value. This allows
|
|
740
|
-
// the component to behave when used in the conventional angular
|
|
741
|
-
// fashion, i.e. [(value)]="..."
|
|
742
|
-
unless: inExternalChange
|
|
743
|
-
});
|
|
744
|
-
DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
698
|
+
_this.inputModel = _this.registerDisposable(new Form.DelegatingListModel());
|
|
745
699
|
return _this;
|
|
746
700
|
}
|
|
747
|
-
Object.defineProperty(AbstractListInputComponent.prototype, "value", {
|
|
748
|
-
// We add support for simple direct display of values by allowing components to be used
|
|
749
|
-
// by `component.value = ...` This use of the component without a value model in tables
|
|
750
|
-
// and the like.
|
|
751
|
-
set: function (value) {
|
|
752
|
-
var _this = this;
|
|
753
|
-
this.setValueIsInProgress.whileTrue(function () {
|
|
754
|
-
if (!_this.listHolder) {
|
|
755
|
-
_this.listHolder = new MutableListModel(value);
|
|
756
|
-
_this.listModel = _this.listHolder;
|
|
757
|
-
}
|
|
758
|
-
else {
|
|
759
|
-
_this.listHolder.value = value;
|
|
760
|
-
}
|
|
761
|
-
});
|
|
762
|
-
},
|
|
763
|
-
enumerable: true,
|
|
764
|
-
configurable: true
|
|
765
|
-
});
|
|
766
|
-
__decorate([
|
|
767
|
-
Input(), TrackExternal({ delegateTo: 'formValueModel' }),
|
|
768
|
-
__metadata("design:type", Object)
|
|
769
|
-
], AbstractListInputComponent.prototype, "listModel", void 0);
|
|
770
|
-
__decorate([
|
|
771
|
-
Input(),
|
|
772
|
-
__metadata("design:type", Array),
|
|
773
|
-
__metadata("design:paramtypes", [Array])
|
|
774
|
-
], AbstractListInputComponent.prototype, "value", null);
|
|
775
|
-
__decorate([
|
|
776
|
-
Output(),
|
|
777
|
-
__metadata("design:type", Object)
|
|
778
|
-
], AbstractListInputComponent.prototype, "valueChange", void 0);
|
|
779
701
|
AbstractListInputComponent = __decorate([
|
|
780
|
-
Component({ template: '' })
|
|
781
|
-
__metadata("design:paramtypes", [])
|
|
702
|
+
Component({ template: '' })
|
|
782
703
|
], AbstractListInputComponent);
|
|
783
704
|
return AbstractListInputComponent;
|
|
784
705
|
}(AbstractInputComponent));
|
|
@@ -798,58 +719,14 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
|
|
|
798
719
|
* gets told it's an Object and can't scan for a base type annotated with @DelegateUsing(..).
|
|
799
720
|
*/
|
|
800
721
|
// We have to register it as a disposable so it ditches any listeners when we're disposed.
|
|
801
|
-
_this.
|
|
802
|
-
_this.
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
var binding = new Binding.Identity(_this.formValueModel, _this.componentValueModel);
|
|
807
|
-
var inExternalChange = valueOf.any(_this.setValueInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
|
|
808
|
-
when(_this.componentValueModel).changes(function (is, was) {
|
|
809
|
-
_this.valueChange.emit(is);
|
|
810
|
-
_this.onValueEditedListeners.fire(function (l) { return l(is, was); });
|
|
811
|
-
}, {
|
|
812
|
-
initialValue: 'ignore',
|
|
813
|
-
// we never fire events during an external set value operation. This allows
|
|
814
|
-
// the component to behave when used in the conventional angular
|
|
815
|
-
// fashion, i.e. [(value)]="..."
|
|
816
|
-
unless: inExternalChange
|
|
722
|
+
_this.inputModel = _this.registerDisposable(new Form.DelegatingValueModel());
|
|
723
|
+
_this.inputModel.onTransactionStart(function (tx) {
|
|
724
|
+
tx.onRootTransactionFinalised(function () {
|
|
725
|
+
console.log({ changed: tx.hasChanged() });
|
|
726
|
+
});
|
|
817
727
|
});
|
|
818
|
-
DebugContext.tag(_this.formValueModel, _this.constructor.name + ".formValueModel");
|
|
819
728
|
return _this;
|
|
820
729
|
}
|
|
821
|
-
Object.defineProperty(AbstractValueInputComponent.prototype, "value", {
|
|
822
|
-
// We add support for simple direct display of values by allowing components to be used
|
|
823
|
-
// by `component.value = ...` This use of the component without a value model in tables
|
|
824
|
-
// and the like.
|
|
825
|
-
set: function (value) {
|
|
826
|
-
var _this = this;
|
|
827
|
-
this.setValueInProgress.whileTrue(function () {
|
|
828
|
-
if (!_this.plainValueHolder) {
|
|
829
|
-
_this.plainValueHolder = new MutableValueModel(value);
|
|
830
|
-
_this.valueModel = _this.plainValueHolder;
|
|
831
|
-
}
|
|
832
|
-
else {
|
|
833
|
-
_this.plainValueHolder.value = value;
|
|
834
|
-
}
|
|
835
|
-
});
|
|
836
|
-
},
|
|
837
|
-
enumerable: true,
|
|
838
|
-
configurable: true
|
|
839
|
-
});
|
|
840
|
-
__decorate([
|
|
841
|
-
Input(), TrackExternal({ delegateTo: 'formValueModel' }),
|
|
842
|
-
__metadata("design:type", Object)
|
|
843
|
-
], AbstractValueInputComponent.prototype, "valueModel", void 0);
|
|
844
|
-
__decorate([
|
|
845
|
-
Input(),
|
|
846
|
-
__metadata("design:type", Object),
|
|
847
|
-
__metadata("design:paramtypes", [Object])
|
|
848
|
-
], AbstractValueInputComponent.prototype, "value", null);
|
|
849
|
-
__decorate([
|
|
850
|
-
Output(),
|
|
851
|
-
__metadata("design:type", Object)
|
|
852
|
-
], AbstractValueInputComponent.prototype, "valueChange", void 0);
|
|
853
730
|
AbstractValueInputComponent = __decorate([
|
|
854
731
|
Component({ template: '' }),
|
|
855
732
|
__metadata("design:paramtypes", [])
|
|
@@ -857,85 +734,20 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
|
|
|
857
734
|
return AbstractValueInputComponent;
|
|
858
735
|
}(AbstractInputComponent));
|
|
859
736
|
|
|
860
|
-
/**
|
|
861
|
-
* Using templates (not only supported for nil values:
|
|
862
|
-
* <aup-autocomplete-input [valueModel]="myModel" [options]="myOptions">
|
|
863
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
864
|
-
* </aup-autocomplete-input>
|
|
865
|
-
*/
|
|
866
|
-
var AutocompleteInputComponent = /** @class */ (function (_super) {
|
|
867
|
-
__extends(AutocompleteInputComponent, _super);
|
|
868
|
-
function AutocompleteInputComponent() {
|
|
869
|
-
var _this = _super.call(this) || this;
|
|
870
|
-
_this.filterValue = new MutableValueModel();
|
|
871
|
-
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
872
|
-
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;
|
|
873
|
-
var lowerCaseFilterValue = chain(_this.filterValue)
|
|
874
|
-
.map(function (v) { return ___default.isString(v) ? v.toLowerCase() : ''; });
|
|
875
|
-
_this.filteredOptions = chain(_this.optionsModel)
|
|
876
|
-
.select(function (option) {
|
|
877
|
-
return ___default.isEmpty(_this.filterValue.value) || _this.optionLabelFormat(option).toString().toLowerCase().includes(lowerCaseFilterValue.value);
|
|
878
|
-
}, { dependsOn: lowerCaseFilterValue });
|
|
879
|
-
return _this;
|
|
880
|
-
}
|
|
881
|
-
AutocompleteInputComponent.prototype.ngOnInit = function () {
|
|
882
|
-
};
|
|
883
|
-
AutocompleteInputComponent.prototype.formatOption = function (option) {
|
|
884
|
-
return this.optionLabelFormat(option);
|
|
885
|
-
};
|
|
886
|
-
AutocompleteInputComponent.prototype.updateFilter = function ($event) {
|
|
887
|
-
this.filterValue.value = $event;
|
|
888
|
-
};
|
|
889
|
-
AutocompleteInputComponent.prototype.onSelect = function ($event) {
|
|
890
|
-
this.valueModel.value = $event.option.value;
|
|
891
|
-
};
|
|
892
|
-
__decorate([
|
|
893
|
-
Input(), TrackExternal(),
|
|
894
|
-
__metadata("design:type", ListModel)
|
|
895
|
-
], AutocompleteInputComponent.prototype, "optionsModel", void 0);
|
|
896
|
-
__decorate([
|
|
897
|
-
Input(), StoreInListModel('optionsModel'),
|
|
898
|
-
__metadata("design:type", Array)
|
|
899
|
-
], AutocompleteInputComponent.prototype, "options", void 0);
|
|
900
|
-
__decorate([
|
|
901
|
-
Input(),
|
|
902
|
-
__metadata("design:type", Object)
|
|
903
|
-
], AutocompleteInputComponent.prototype, "optionLabel", void 0);
|
|
904
|
-
__decorate([
|
|
905
|
-
Input(),
|
|
906
|
-
__metadata("design:type", Boolean)
|
|
907
|
-
], AutocompleteInputComponent.prototype, "allowNil", void 0);
|
|
908
|
-
__decorate([
|
|
909
|
-
ContentChild('nilOptionTemplate'),
|
|
910
|
-
__metadata("design:type", TemplateRef)
|
|
911
|
-
], AutocompleteInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
912
|
-
__decorate([
|
|
913
|
-
Input(),
|
|
914
|
-
__metadata("design:type", Function)
|
|
915
|
-
], AutocompleteInputComponent.prototype, "optionLabelFormat", void 0);
|
|
916
|
-
AutocompleteInputComponent = __decorate([
|
|
917
|
-
Component({
|
|
918
|
-
selector: 'aup-autocomplete-input',
|
|
919
|
-
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",
|
|
920
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
921
|
-
}),
|
|
922
|
-
__metadata("design:paramtypes", [])
|
|
923
|
-
], AutocompleteInputComponent);
|
|
924
|
-
return AutocompleteInputComponent;
|
|
925
|
-
}(AbstractValueInputComponent));
|
|
926
|
-
|
|
927
737
|
var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
928
738
|
__extends(CheckboxInputComponent, _super);
|
|
929
739
|
function CheckboxInputComponent() {
|
|
930
740
|
var _this = _super.call(this) || this;
|
|
931
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
932
|
-
// valueModel: Form.ValueModelBase<boolean> | IMutableValueModel<boolean>;
|
|
933
741
|
_this.color = 'accent';
|
|
934
742
|
_this.labelPosition = 'after';
|
|
935
743
|
return _this;
|
|
936
744
|
}
|
|
937
745
|
CheckboxInputComponent.prototype.ngOnInit = function () {
|
|
938
746
|
};
|
|
747
|
+
__decorate([
|
|
748
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
749
|
+
__metadata("design:type", Object)
|
|
750
|
+
], CheckboxInputComponent.prototype, "valueModel", void 0);
|
|
939
751
|
__decorate([
|
|
940
752
|
Input(),
|
|
941
753
|
__metadata("design:type", String)
|
|
@@ -947,73 +759,28 @@ var CheckboxInputComponent = /** @class */ (function (_super) {
|
|
|
947
759
|
CheckboxInputComponent = __decorate([
|
|
948
760
|
Component({
|
|
949
761
|
selector: 'aup-checkbox-input',
|
|
950
|
-
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"
|
|
951
|
-
styles: [":host{display:inline-flex;flex-direction:column;
|
|
762
|
+
template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"valueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
|
|
763
|
+
styles: [":host{display:inline-flex;flex-direction:column;margin-top:24px;margin-bottom:16px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]
|
|
952
764
|
}),
|
|
953
765
|
__metadata("design:paramtypes", [])
|
|
954
766
|
], CheckboxInputComponent);
|
|
955
767
|
return CheckboxInputComponent;
|
|
956
768
|
}(AbstractValueInputComponent));
|
|
957
769
|
|
|
958
|
-
/**
|
|
959
|
-
* Using templates:
|
|
960
|
-
* <aup-multiple-select-input [valueModel]="myModel" [options]="myOptions">
|
|
961
|
-
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
962
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
963
|
-
* </aup-multiple-select_input>
|
|
964
|
-
*/
|
|
965
|
-
var MultipleSelectInputComponent = /** @class */ (function (_super) {
|
|
966
|
-
__extends(MultipleSelectInputComponent, _super);
|
|
967
|
-
function MultipleSelectInputComponent() {
|
|
968
|
-
var _this = _super.call(this) || this;
|
|
969
|
-
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
970
|
-
return _this;
|
|
971
|
-
}
|
|
972
|
-
MultipleSelectInputComponent.prototype.ngOnInit = function () {
|
|
973
|
-
};
|
|
974
|
-
__decorate([
|
|
975
|
-
Input(), TrackExternal(),
|
|
976
|
-
__metadata("design:type", ListModel)
|
|
977
|
-
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
978
|
-
__decorate([
|
|
979
|
-
Input(), StoreInListModel('optionsModel'),
|
|
980
|
-
__metadata("design:type", Array)
|
|
981
|
-
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
982
|
-
__decorate([
|
|
983
|
-
Input(),
|
|
984
|
-
__metadata("design:type", Object)
|
|
985
|
-
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
986
|
-
__decorate([
|
|
987
|
-
ContentChild('optionTemplate'),
|
|
988
|
-
__metadata("design:type", TemplateRef)
|
|
989
|
-
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
990
|
-
__decorate([
|
|
991
|
-
Input(),
|
|
992
|
-
__metadata("design:type", Function)
|
|
993
|
-
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
994
|
-
MultipleSelectInputComponent = __decorate([
|
|
995
|
-
Component({
|
|
996
|
-
selector: 'aup-multiple-select-input',
|
|
997
|
-
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",
|
|
998
|
-
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
999
|
-
}),
|
|
1000
|
-
__metadata("design:paramtypes", [])
|
|
1001
|
-
], MultipleSelectInputComponent);
|
|
1002
|
-
return MultipleSelectInputComponent;
|
|
1003
|
-
}(AbstractListInputComponent));
|
|
1004
|
-
|
|
1005
770
|
var NumberInputComponent = /** @class */ (function (_super) {
|
|
1006
771
|
__extends(NumberInputComponent, _super);
|
|
1007
772
|
function NumberInputComponent() {
|
|
1008
773
|
var _this = _super.call(this) || this;
|
|
1009
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1010
|
-
// valueModel: Form.ValueModelBase<number> | IMutableValueModel<number>;
|
|
1011
774
|
_this.min = Number.MIN_SAFE_INTEGER;
|
|
1012
775
|
_this.max = Number.MAX_SAFE_INTEGER;
|
|
1013
776
|
return _this;
|
|
1014
777
|
}
|
|
1015
778
|
NumberInputComponent.prototype.ngOnInit = function () {
|
|
1016
779
|
};
|
|
780
|
+
__decorate([
|
|
781
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
782
|
+
__metadata("design:type", Object)
|
|
783
|
+
], NumberInputComponent.prototype, "valueModel", void 0);
|
|
1017
784
|
__decorate([
|
|
1018
785
|
Input(),
|
|
1019
786
|
__metadata("design:type", Object)
|
|
@@ -1025,8 +792,8 @@ var NumberInputComponent = /** @class */ (function (_super) {
|
|
|
1025
792
|
NumberInputComponent = __decorate([
|
|
1026
793
|
Component({
|
|
1027
794
|
selector: 'aup-number-input',
|
|
1028
|
-
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)]=\"
|
|
1029
|
-
styles: [""]
|
|
795
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [min]=\"min\"\n [max]=\"max\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
796
|
+
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}"]
|
|
1030
797
|
}),
|
|
1031
798
|
__metadata("design:paramtypes", [])
|
|
1032
799
|
], NumberInputComponent);
|
|
@@ -1035,31 +802,26 @@ var NumberInputComponent = /** @class */ (function (_super) {
|
|
|
1035
802
|
|
|
1036
803
|
var PasswordInputComponent = /** @class */ (function (_super) {
|
|
1037
804
|
__extends(PasswordInputComponent, _super);
|
|
1038
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1039
|
-
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
1040
805
|
function PasswordInputComponent() {
|
|
1041
806
|
return _super.call(this) || this;
|
|
1042
807
|
}
|
|
1043
808
|
PasswordInputComponent.prototype.ngOnInit = function () {
|
|
1044
809
|
};
|
|
810
|
+
__decorate([
|
|
811
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
812
|
+
__metadata("design:type", Object)
|
|
813
|
+
], PasswordInputComponent.prototype, "valueModel", void 0);
|
|
1045
814
|
PasswordInputComponent = __decorate([
|
|
1046
815
|
Component({
|
|
1047
816
|
selector: 'aup-password-input',
|
|
1048
|
-
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)]=\"
|
|
1049
|
-
styles: [""]
|
|
817
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
818
|
+
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}"]
|
|
1050
819
|
}),
|
|
1051
820
|
__metadata("design:paramtypes", [])
|
|
1052
821
|
], PasswordInputComponent);
|
|
1053
822
|
return PasswordInputComponent;
|
|
1054
823
|
}(AbstractValueInputComponent));
|
|
1055
824
|
|
|
1056
|
-
/**
|
|
1057
|
-
* Using templates:
|
|
1058
|
-
* <aup-select-input [valueModel]="myModel" [options]="myOptions">
|
|
1059
|
-
* <ng-template #optionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1060
|
-
* <ng-template #nilOptionTemplate let-option>{{option.thePropertyYouWant}}</ng-template>
|
|
1061
|
-
* </aup-select_input>
|
|
1062
|
-
*/
|
|
1063
825
|
var SelectInputComponent = /** @class */ (function (_super) {
|
|
1064
826
|
__extends(SelectInputComponent, _super);
|
|
1065
827
|
function SelectInputComponent() {
|
|
@@ -1069,6 +831,10 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
1069
831
|
}
|
|
1070
832
|
SelectInputComponent.prototype.ngOnInit = function () {
|
|
1071
833
|
};
|
|
834
|
+
__decorate([
|
|
835
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
836
|
+
__metadata("design:type", Object)
|
|
837
|
+
], SelectInputComponent.prototype, "valueModel", void 0);
|
|
1072
838
|
__decorate([
|
|
1073
839
|
Input(), TrackExternal(),
|
|
1074
840
|
__metadata("design:type", ListModel)
|
|
@@ -1100,7 +866,7 @@ var SelectInputComponent = /** @class */ (function (_super) {
|
|
|
1100
866
|
SelectInputComponent = __decorate([
|
|
1101
867
|
Component({
|
|
1102
868
|
selector: 'aup-select-input',
|
|
1103
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
869
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
1104
870
|
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
1105
871
|
}),
|
|
1106
872
|
__metadata("design:paramtypes", [])
|
|
@@ -1114,13 +880,17 @@ var StringInputComponent = /** @class */ (function (_super) {
|
|
|
1114
880
|
var _this = _super.call(this) || this;
|
|
1115
881
|
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;
|
|
1116
882
|
_this.clearCommand = Command.create(function () {
|
|
1117
|
-
_this.
|
|
883
|
+
_this.valueModel.value = null;
|
|
1118
884
|
});
|
|
1119
|
-
_this.clearCommand.disableWhile(chain.stringValue(_this.
|
|
885
|
+
_this.clearCommand.disableWhile(chain.stringValue(_this.valueModel).isBlank());
|
|
1120
886
|
return _this;
|
|
1121
887
|
}
|
|
1122
888
|
StringInputComponent.prototype.ngOnInit = function () {
|
|
1123
889
|
};
|
|
890
|
+
__decorate([
|
|
891
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
892
|
+
__metadata("design:type", Object)
|
|
893
|
+
], StringInputComponent.prototype, "valueModel", void 0);
|
|
1124
894
|
__decorate([
|
|
1125
895
|
Input(), TrackExternal({ defaultValue: false }),
|
|
1126
896
|
__metadata("design:type", ValueModel)
|
|
@@ -1132,8 +902,8 @@ var StringInputComponent = /** @class */ (function (_super) {
|
|
|
1132
902
|
StringInputComponent = __decorate([
|
|
1133
903
|
Component({
|
|
1134
904
|
selector: 'aup-string-input',
|
|
1135
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
1136
|
-
styles: ["button[disabled]{visibility:hidden}"]
|
|
905
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <aup-icon icon=\"mat:close\"></aup-icon>\n </button>\n</mat-form-field>\n\n",
|
|
906
|
+
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}button[disabled]{visibility:hidden}"]
|
|
1137
907
|
}),
|
|
1138
908
|
__metadata("design:paramtypes", [])
|
|
1139
909
|
], StringInputComponent);
|
|
@@ -1144,14 +914,16 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
1144
914
|
__extends(TextInputComponent, _super);
|
|
1145
915
|
function TextInputComponent() {
|
|
1146
916
|
var _this = _super.call(this) || this;
|
|
1147
|
-
// @Input() @TrackExternal({ delegateTo: 'inputModel' })
|
|
1148
|
-
// valueModel: Form.ValueModelBase<string> | IMutableValueModel<string>;
|
|
1149
917
|
_this.rows = 2;
|
|
1150
918
|
return _this;
|
|
1151
919
|
// const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1152
920
|
}
|
|
1153
921
|
TextInputComponent.prototype.ngOnInit = function () {
|
|
1154
922
|
};
|
|
923
|
+
__decorate([
|
|
924
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
925
|
+
__metadata("design:type", Object)
|
|
926
|
+
], TextInputComponent.prototype, "valueModel", void 0);
|
|
1155
927
|
__decorate([
|
|
1156
928
|
Input(),
|
|
1157
929
|
__metadata("design:type", Object)
|
|
@@ -1163,56 +935,14 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
1163
935
|
TextInputComponent = __decorate([
|
|
1164
936
|
Component({
|
|
1165
937
|
selector: 'aup-text-input',
|
|
1166
|
-
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"
|
|
1167
|
-
styles: ["button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
938
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <textarea matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n >\n </textarea>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
|
|
939
|
+
styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}:host-context(aup-table-cell-renderer) mat-form-field div.mat-form-field-infix{width:auto}button[disabled]{visibility:hidden}textarea{overflow:auto}"]
|
|
1168
940
|
}),
|
|
1169
941
|
__metadata("design:paramtypes", [])
|
|
1170
942
|
], TextInputComponent);
|
|
1171
943
|
return TextInputComponent;
|
|
1172
944
|
}(AbstractValueInputComponent));
|
|
1173
945
|
|
|
1174
|
-
var IconComponent = /** @class */ (function () {
|
|
1175
|
-
function IconComponent() {
|
|
1176
|
-
}
|
|
1177
|
-
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
1178
|
-
get: function () {
|
|
1179
|
-
return this._icon;
|
|
1180
|
-
},
|
|
1181
|
-
set: function (iconName) {
|
|
1182
|
-
this._icon = iconName;
|
|
1183
|
-
if (!iconName) {
|
|
1184
|
-
this.errorMessage = 'icon is nil';
|
|
1185
|
-
this.prefix = undefined;
|
|
1186
|
-
return;
|
|
1187
|
-
}
|
|
1188
|
-
var colonIndex = iconName.indexOf(':');
|
|
1189
|
-
if (colonIndex > 0) {
|
|
1190
|
-
this.prefix = this.icon.slice(0, colonIndex);
|
|
1191
|
-
this.suffix = this.icon.slice(colonIndex + 1);
|
|
1192
|
-
}
|
|
1193
|
-
if (this.prefix) {
|
|
1194
|
-
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
1195
|
-
}
|
|
1196
|
-
this.errorMessage = "Unknown icon prefix \"" + this.prefix + "\"";
|
|
1197
|
-
},
|
|
1198
|
-
enumerable: true,
|
|
1199
|
-
configurable: true
|
|
1200
|
-
});
|
|
1201
|
-
__decorate([
|
|
1202
|
-
Input(),
|
|
1203
|
-
__metadata("design:type", String),
|
|
1204
|
-
__metadata("design:paramtypes", [String])
|
|
1205
|
-
], IconComponent.prototype, "icon", null);
|
|
1206
|
-
IconComponent = __decorate([
|
|
1207
|
-
Component({
|
|
1208
|
-
selector: 'aup-icon',
|
|
1209
|
-
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",
|
|
1210
|
-
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}"]
|
|
1211
|
-
})
|
|
1212
|
-
], IconComponent);
|
|
1213
|
-
return IconComponent;
|
|
1214
|
-
}());
|
|
1215
|
-
|
|
1216
946
|
var NoopComponent = /** @class */ (function () {
|
|
1217
947
|
function NoopComponent() {
|
|
1218
948
|
}
|
|
@@ -1423,7 +1153,6 @@ var CellHeaderPortalRef = /** @class */ (function (_super) {
|
|
|
1423
1153
|
assert$1.isTruthy(host);
|
|
1424
1154
|
host[HEADER_CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
1425
1155
|
};
|
|
1426
|
-
// @Trace()
|
|
1427
1156
|
CellHeaderPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
1428
1157
|
this.initialiseHeader(portalComponent, host.column);
|
|
1429
1158
|
};
|
|
@@ -1447,15 +1176,13 @@ var ComponentCellRendererPortalRef = /** @class */ (function (_super) {
|
|
|
1447
1176
|
ComponentCellRendererPortalRef.prototype.initialiseHost = function (host, columnModel) {
|
|
1448
1177
|
host[CELL_RENDERER_PORTAL] = new ComponentPortal(this.componentType);
|
|
1449
1178
|
};
|
|
1450
|
-
// @Trace()
|
|
1451
1179
|
ComponentCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
1452
1180
|
host[PORTAL_RENDERER_COMPONENT] = portalComponent;
|
|
1453
|
-
this.updateComponent(portalComponent, host.getRowData()
|
|
1181
|
+
this.updateComponent(portalComponent, host.getRowData());
|
|
1454
1182
|
};
|
|
1455
|
-
// @Trace()
|
|
1456
1183
|
ComponentCellRendererPortalRef.prototype.pushState = function (host) {
|
|
1457
1184
|
if (host[PORTAL_RENDERER_COMPONENT]) {
|
|
1458
|
-
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData()
|
|
1185
|
+
this.updateComponent(host[PORTAL_RENDERER_COMPONENT], host.getRowData());
|
|
1459
1186
|
}
|
|
1460
1187
|
};
|
|
1461
1188
|
return ComponentCellRendererPortalRef;
|
|
@@ -1497,7 +1224,6 @@ var TemplateCellRendererPortalRef = /** @class */ (function (_super) {
|
|
|
1497
1224
|
TemplateCellRendererPortalRef.prototype.onPortalAttached = function (host, portalComponent) {
|
|
1498
1225
|
// don't care
|
|
1499
1226
|
};
|
|
1500
|
-
// @Trace()
|
|
1501
1227
|
TemplateCellRendererPortalRef.prototype.pushState = function (host) {
|
|
1502
1228
|
host[CELL_RENDERER_PORTAL] = this.createPortal(host.getRowData());
|
|
1503
1229
|
host.fillCell = this.fillCell;
|
|
@@ -1779,37 +1505,24 @@ var ColumnModel = /** @class */ (function () {
|
|
|
1779
1505
|
}());
|
|
1780
1506
|
var PropertyColumnModel = /** @class */ (function (_super) {
|
|
1781
1507
|
__extends(PropertyColumnModel, _super);
|
|
1782
|
-
function PropertyColumnModel(
|
|
1783
|
-
var _this = _super.call(this,
|
|
1508
|
+
function PropertyColumnModel(property, defaults) {
|
|
1509
|
+
var _this = _super.call(this, property.toString(), defaults) || this;
|
|
1784
1510
|
_this.property = property;
|
|
1785
1511
|
_this._format = function (value) { return value; };
|
|
1786
1512
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
1787
1513
|
return _this;
|
|
1788
1514
|
}
|
|
1789
|
-
PropertyColumnModel.prototype.cellRenderer = function (componentType
|
|
1515
|
+
PropertyColumnModel.prototype.cellRenderer = function (componentType) {
|
|
1790
1516
|
var _this = this;
|
|
1791
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData
|
|
1792
|
-
if (firstTime) {
|
|
1793
|
-
if (___default.isFunction(onComponentInitOrOptions)) {
|
|
1794
|
-
onComponentInitOrOptions(component);
|
|
1795
|
-
}
|
|
1796
|
-
else {
|
|
1797
|
-
if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
1798
|
-
onComponentInitOrOptions.onComponentInit(component);
|
|
1799
|
-
}
|
|
1800
|
-
}
|
|
1801
|
-
}
|
|
1517
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
|
|
1802
1518
|
component.value = _this._format(rowData.row[_this.property]);
|
|
1803
|
-
if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
1804
|
-
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
1805
|
-
}
|
|
1806
1519
|
}));
|
|
1807
1520
|
return this;
|
|
1808
1521
|
};
|
|
1809
|
-
PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser,
|
|
1522
|
+
PropertyColumnModel.prototype.cellEditor = function (editor, validatorsOrInitialiser, initialiseComponent) {
|
|
1810
1523
|
var _this = this;
|
|
1811
1524
|
var validators = Array.isArray(validatorsOrInitialiser) ? validatorsOrInitialiser : undefined;
|
|
1812
|
-
var initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser :
|
|
1525
|
+
var initialiser = ___default.isFunction(validatorsOrInitialiser) ? validatorsOrInitialiser : initialiseComponent;
|
|
1813
1526
|
this.configureCellEditor(new CellEditorPortalRef(editor, function (component, editSession) {
|
|
1814
1527
|
var formValueModel = editSession.form.pluck(_this.property);
|
|
1815
1528
|
if (validators) {
|
|
@@ -1834,8 +1547,8 @@ var PropertyColumnModel = /** @class */ (function (_super) {
|
|
|
1834
1547
|
}(ColumnModel));
|
|
1835
1548
|
var ListPropertyColumnModel = /** @class */ (function (_super) {
|
|
1836
1549
|
__extends(ListPropertyColumnModel, _super);
|
|
1837
|
-
function ListPropertyColumnModel(
|
|
1838
|
-
var _this = _super.call(this,
|
|
1550
|
+
function ListPropertyColumnModel(property, defaults) {
|
|
1551
|
+
var _this = _super.call(this, property.toString(), defaults) || this;
|
|
1839
1552
|
_this.property = property;
|
|
1840
1553
|
_this._format = function (value) { return value.map(function (v) { return v === null || v === void 0 ? void 0 : v.toString(); }).join(', '); };
|
|
1841
1554
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
@@ -1882,23 +1595,10 @@ var CustomValueColumnModel = /** @class */ (function (_super) {
|
|
|
1882
1595
|
_this.cellRenderer(DefaultCellRendererComponent);
|
|
1883
1596
|
return _this;
|
|
1884
1597
|
}
|
|
1885
|
-
CustomValueColumnModel.prototype.cellRenderer = function (componentType
|
|
1598
|
+
CustomValueColumnModel.prototype.cellRenderer = function (componentType) {
|
|
1886
1599
|
var _this = this;
|
|
1887
|
-
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData
|
|
1888
|
-
if (firstTime) {
|
|
1889
|
-
if (___default.isFunction(onComponentInitOrOptions)) {
|
|
1890
|
-
onComponentInitOrOptions(component);
|
|
1891
|
-
}
|
|
1892
|
-
else {
|
|
1893
|
-
if (___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onComponentInit)) {
|
|
1894
|
-
onComponentInitOrOptions.onComponentInit(component);
|
|
1895
|
-
}
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1600
|
+
this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, function (component, rowData) {
|
|
1898
1601
|
component.value = _this.getValue(rowData.row);
|
|
1899
|
-
if (!___default.isFunction(onComponentInitOrOptions) && ___default.isFunction(onComponentInitOrOptions === null || onComponentInitOrOptions === void 0 ? void 0 : onComponentInitOrOptions.onRowUpdate)) {
|
|
1900
|
-
onComponentInitOrOptions.onRowUpdate(component, rowData.row);
|
|
1901
|
-
}
|
|
1902
1602
|
}));
|
|
1903
1603
|
return this;
|
|
1904
1604
|
};
|
|
@@ -2082,7 +1782,7 @@ var TableModel = /** @class */ (function () {
|
|
|
2082
1782
|
this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
|
|
2083
1783
|
this.firstEditableColumn = chain(this.columns).select(function (c) { return c.hasEditorPortal(); }).first();
|
|
2084
1784
|
this.hasColumnsWithRowSelectionExplicitlyEnabled = chain(this._columns).findIndex(function (column) { return column.isRowSelectionExplicitlyEnabled(); }).isGreaterThanOrEqualTo(0);
|
|
2085
|
-
this.addRowClass(
|
|
1785
|
+
this.addRowClass("enable-hover", function () { return _this.isRowSelectionEnabled(); });
|
|
2086
1786
|
}
|
|
2087
1787
|
TableModel_1 = TableModel;
|
|
2088
1788
|
TableModel.fromList = function (sourceOfTruth, builder) {
|
|
@@ -2110,11 +1810,11 @@ var TableModel = /** @class */ (function () {
|
|
|
2110
1810
|
enumerable: true,
|
|
2111
1811
|
configurable: true
|
|
2112
1812
|
});
|
|
2113
|
-
TableModel.prototype.pluck = function (property
|
|
2114
|
-
return this.addColumn(new PropertyColumnModel(
|
|
1813
|
+
TableModel.prototype.pluck = function (property) {
|
|
1814
|
+
return this.addColumn(new PropertyColumnModel(property, this));
|
|
2115
1815
|
};
|
|
2116
|
-
TableModel.prototype.pluckList = function (property
|
|
2117
|
-
return this.addColumn(new ListPropertyColumnModel(
|
|
1816
|
+
TableModel.prototype.pluckList = function (property) {
|
|
1817
|
+
return this.addColumn(new ListPropertyColumnModel(property, this));
|
|
2118
1818
|
};
|
|
2119
1819
|
TableModel.prototype.addSelectionColumn = function (selectionModel) {
|
|
2120
1820
|
assert.isNil(this.selectionColumnModel);
|
|
@@ -2128,9 +1828,6 @@ var TableModel = /** @class */ (function () {
|
|
|
2128
1828
|
TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
|
|
2129
1829
|
return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
|
|
2130
1830
|
};
|
|
2131
|
-
TableModel.prototype.addComponentColumn = function (columnId, component, onComponentInitOrOptions) {
|
|
2132
|
-
return this.addColumn(new CustomValueColumnModel(columnId, this, function (row) { return row; })).cellRenderer(component, onComponentInitOrOptions);
|
|
2133
|
-
};
|
|
2134
1831
|
TableModel.prototype.addTemplateColumn = function (columnId) {
|
|
2135
1832
|
return this.addColumn(new CustomTemplateColumnModel(columnId, this));
|
|
2136
1833
|
};
|
|
@@ -2550,6 +2247,100 @@ var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
|
2550
2247
|
return VerticalFocusContainerComponent;
|
|
2551
2248
|
}(FocusContainerComponent));
|
|
2552
2249
|
|
|
2250
|
+
var MultipleSelectInputComponent = /** @class */ (function (_super) {
|
|
2251
|
+
__extends(MultipleSelectInputComponent, _super);
|
|
2252
|
+
function MultipleSelectInputComponent() {
|
|
2253
|
+
var _this = _super.call(this) || this;
|
|
2254
|
+
_this.optionLabelFormat = function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; };
|
|
2255
|
+
return _this;
|
|
2256
|
+
}
|
|
2257
|
+
MultipleSelectInputComponent.prototype.ngOnInit = function () {
|
|
2258
|
+
};
|
|
2259
|
+
__decorate([
|
|
2260
|
+
Input(), TrackExternal({ delegateTo: 'inputModel' }),
|
|
2261
|
+
__metadata("design:type", Object)
|
|
2262
|
+
], MultipleSelectInputComponent.prototype, "listModel", void 0);
|
|
2263
|
+
__decorate([
|
|
2264
|
+
Input(), TrackExternal(),
|
|
2265
|
+
__metadata("design:type", ListModel)
|
|
2266
|
+
], MultipleSelectInputComponent.prototype, "optionsModel", void 0);
|
|
2267
|
+
__decorate([
|
|
2268
|
+
Input(), StoreInListModel('optionsModel'),
|
|
2269
|
+
__metadata("design:type", Array)
|
|
2270
|
+
], MultipleSelectInputComponent.prototype, "options", void 0);
|
|
2271
|
+
__decorate([
|
|
2272
|
+
Input(),
|
|
2273
|
+
__metadata("design:type", Object)
|
|
2274
|
+
], MultipleSelectInputComponent.prototype, "optionLabel", void 0);
|
|
2275
|
+
__decorate([
|
|
2276
|
+
Input(),
|
|
2277
|
+
__metadata("design:type", Boolean)
|
|
2278
|
+
], MultipleSelectInputComponent.prototype, "allowNil", void 0);
|
|
2279
|
+
__decorate([
|
|
2280
|
+
ContentChild('optionTemplate'),
|
|
2281
|
+
__metadata("design:type", TemplateRef)
|
|
2282
|
+
], MultipleSelectInputComponent.prototype, "optionTemplateRef", void 0);
|
|
2283
|
+
__decorate([
|
|
2284
|
+
ContentChild('nilOptionTemplate'),
|
|
2285
|
+
__metadata("design:type", TemplateRef)
|
|
2286
|
+
], MultipleSelectInputComponent.prototype, "nilOptionTemplateRef", void 0);
|
|
2287
|
+
__decorate([
|
|
2288
|
+
Input(),
|
|
2289
|
+
__metadata("design:type", Function)
|
|
2290
|
+
], MultipleSelectInputComponent.prototype, "optionLabelFormat", void 0);
|
|
2291
|
+
MultipleSelectInputComponent = __decorate([
|
|
2292
|
+
Component({
|
|
2293
|
+
selector: 'aup-multiple-select-input',
|
|
2294
|
+
template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n multiple\n [(ngModel)]=\"listModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
|
|
2295
|
+
styles: [":host{display:inline-block}mat-form-field{width:100%}"]
|
|
2296
|
+
}),
|
|
2297
|
+
__metadata("design:paramtypes", [])
|
|
2298
|
+
], MultipleSelectInputComponent);
|
|
2299
|
+
return MultipleSelectInputComponent;
|
|
2300
|
+
}(AbstractListInputComponent));
|
|
2301
|
+
|
|
2302
|
+
var IconComponent = /** @class */ (function () {
|
|
2303
|
+
function IconComponent() {
|
|
2304
|
+
}
|
|
2305
|
+
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
2306
|
+
get: function () {
|
|
2307
|
+
return this._icon;
|
|
2308
|
+
},
|
|
2309
|
+
set: function (iconName) {
|
|
2310
|
+
this._icon = iconName;
|
|
2311
|
+
if (!iconName) {
|
|
2312
|
+
this.errorMessage = 'icon is nil';
|
|
2313
|
+
this.prefix = undefined;
|
|
2314
|
+
return;
|
|
2315
|
+
}
|
|
2316
|
+
var colonIndex = iconName.indexOf(':');
|
|
2317
|
+
if (colonIndex > 0) {
|
|
2318
|
+
this.prefix = this.icon.slice(0, colonIndex);
|
|
2319
|
+
this.suffix = this.icon.slice(colonIndex + 1);
|
|
2320
|
+
}
|
|
2321
|
+
if (this.prefix) {
|
|
2322
|
+
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
2323
|
+
}
|
|
2324
|
+
this.errorMessage = "Unknown icon prefix \"" + this.prefix + "\"";
|
|
2325
|
+
},
|
|
2326
|
+
enumerable: true,
|
|
2327
|
+
configurable: true
|
|
2328
|
+
});
|
|
2329
|
+
__decorate([
|
|
2330
|
+
Input(),
|
|
2331
|
+
__metadata("design:type", String),
|
|
2332
|
+
__metadata("design:paramtypes", [String])
|
|
2333
|
+
], IconComponent.prototype, "icon", null);
|
|
2334
|
+
IconComponent = __decorate([
|
|
2335
|
+
Component({
|
|
2336
|
+
selector: 'aup-icon',
|
|
2337
|
+
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",
|
|
2338
|
+
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}"]
|
|
2339
|
+
})
|
|
2340
|
+
], IconComponent);
|
|
2341
|
+
return IconComponent;
|
|
2342
|
+
}());
|
|
2343
|
+
|
|
2553
2344
|
var ComponentsModule = /** @class */ (function () {
|
|
2554
2345
|
function ComponentsModule(faIconLibrary) {
|
|
2555
2346
|
faIconLibrary.addIconPacks(fas);
|
|
@@ -2568,8 +2359,6 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
2568
2359
|
TextInputComponent,
|
|
2569
2360
|
PasswordInputComponent,
|
|
2570
2361
|
SelectInputComponent,
|
|
2571
|
-
MultipleSelectInputComponent,
|
|
2572
|
-
AutocompleteInputComponent,
|
|
2573
2362
|
CheckboxInputComponent,
|
|
2574
2363
|
ScrollContainerComponent,
|
|
2575
2364
|
NoopComponent,
|
|
@@ -2589,6 +2378,7 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
2589
2378
|
SelectHeaderCellRendererComponent,
|
|
2590
2379
|
DefaultHeaderCellRendererComponent,
|
|
2591
2380
|
TableHeaderCellRendererComponent,
|
|
2381
|
+
MultipleSelectInputComponent,
|
|
2592
2382
|
IconComponent,
|
|
2593
2383
|
SectionHeaderComponent
|
|
2594
2384
|
],
|
|
@@ -2608,8 +2398,7 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
2608
2398
|
PortalModule,
|
|
2609
2399
|
CdkScrollableModule,
|
|
2610
2400
|
FontAwesomeModule,
|
|
2611
|
-
MatTooltipModule
|
|
2612
|
-
MatAutocompleteModule
|
|
2401
|
+
MatTooltipModule
|
|
2613
2402
|
],
|
|
2614
2403
|
exports: [
|
|
2615
2404
|
NumberInputComponent,
|
|
@@ -2618,8 +2407,6 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
2618
2407
|
PasswordInputComponent,
|
|
2619
2408
|
CheckboxInputComponent,
|
|
2620
2409
|
SelectInputComponent,
|
|
2621
|
-
MultipleSelectInputComponent,
|
|
2622
|
-
AutocompleteInputComponent,
|
|
2623
2410
|
ScrollContainerComponent,
|
|
2624
2411
|
NoopComponent,
|
|
2625
2412
|
SwitchCaseComponent,
|
|
@@ -2632,23 +2419,12 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
2632
2419
|
TableComponent,
|
|
2633
2420
|
EditRowControls,
|
|
2634
2421
|
ColumnTemplateDirective,
|
|
2422
|
+
MultipleSelectInputComponent,
|
|
2635
2423
|
IconComponent,
|
|
2636
2424
|
SectionHeaderComponent
|
|
2637
2425
|
],
|
|
2638
2426
|
providers: [
|
|
2639
|
-
FocusBindingFactory
|
|
2640
|
-
// {
|
|
2641
|
-
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
2642
|
-
// type: 'string',
|
|
2643
|
-
// editorClass: StringInputComponent
|
|
2644
|
-
// }, multi: true
|
|
2645
|
-
// },
|
|
2646
|
-
// {
|
|
2647
|
-
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
2648
|
-
// type: 'number',
|
|
2649
|
-
// editorClass: NumberInputComponent
|
|
2650
|
-
// }, multi: true
|
|
2651
|
-
// }
|
|
2427
|
+
FocusBindingFactory,
|
|
2652
2428
|
]
|
|
2653
2429
|
}),
|
|
2654
2430
|
__metadata("design:paramtypes", [FaIconLibrary])
|
|
@@ -3087,7 +2863,6 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3087
2863
|
ActivityContainerComponent.prototype.registerDisposable = function (disposable) {
|
|
3088
2864
|
return this.garbage.registerDisposable(disposable);
|
|
3089
2865
|
};
|
|
3090
|
-
// @Trace()
|
|
3091
2866
|
ActivityContainerComponent.prototype.dispose = function () {
|
|
3092
2867
|
// TODO: think about auto cancelling any outstanding activity on dispose.
|
|
3093
2868
|
// See NavigationState.Navigating for a use-case.
|
|
@@ -3236,6 +3011,12 @@ var ActivityContainerComponent = /** @class */ (function (_super) {
|
|
|
3236
3011
|
ViewChildren(ActivityOutletComponent),
|
|
3237
3012
|
__metadata("design:type", QueryList)
|
|
3238
3013
|
], ActivityContainerComponent.prototype, "activityOutlets", void 0);
|
|
3014
|
+
__decorate([
|
|
3015
|
+
Trace(),
|
|
3016
|
+
__metadata("design:type", Function),
|
|
3017
|
+
__metadata("design:paramtypes", []),
|
|
3018
|
+
__metadata("design:returntype", void 0)
|
|
3019
|
+
], ActivityContainerComponent.prototype, "dispose", null);
|
|
3239
3020
|
ActivityContainerComponent = __decorate([
|
|
3240
3021
|
Component({
|
|
3241
3022
|
selector: 'aup-activity-container',
|
|
@@ -4319,7 +4100,7 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
4319
4100
|
assert.isNil(this.visitModel.value);
|
|
4320
4101
|
var when = Dsl.disposeWith(this).when;
|
|
4321
4102
|
this.visitModel.value = visit;
|
|
4322
|
-
DebugContext.
|
|
4103
|
+
DebugContext.get(this.visitModel).tag(this.placeDefinition.component.name + ".visitModel");
|
|
4323
4104
|
this.placeDefinition.getVisitParameterDefs().forEach(function (parameterDef) { return _this.installBinding(parameterDef); });
|
|
4324
4105
|
when.valueOf(this.visitModel).changes(function (current, previous) {
|
|
4325
4106
|
notifyVisitChanged(current, previous);
|
|
@@ -5467,6 +5248,75 @@ var UrlService = /** @class */ (function () {
|
|
|
5467
5248
|
return UrlService;
|
|
5468
5249
|
}());
|
|
5469
5250
|
|
|
5251
|
+
var Visit = /** @class */ (function () {
|
|
5252
|
+
function Visit(placeDefinition, visitParameters) {
|
|
5253
|
+
if (visitParameters === void 0) { visitParameters = {}; }
|
|
5254
|
+
this.placeDefinition = placeDefinition;
|
|
5255
|
+
this.visitParameters = visitParameters;
|
|
5256
|
+
}
|
|
5257
|
+
// @Trace()
|
|
5258
|
+
Visit.prototype.getRouteId = function () {
|
|
5259
|
+
return this.placeDefinition.getRouteIdFrom(this);
|
|
5260
|
+
};
|
|
5261
|
+
// @Trace()
|
|
5262
|
+
Visit.prototype.hasRouteId = function () {
|
|
5263
|
+
return !isNil(this.getRouteId());
|
|
5264
|
+
};
|
|
5265
|
+
/**
|
|
5266
|
+
* Returns the value of the place parameter with the specified name. The parameter
|
|
5267
|
+
* name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
|
|
5268
|
+
* same as the the ValueModel property name.
|
|
5269
|
+
* @param parameterName the field name of the property model or the `as` option if specified.
|
|
5270
|
+
*/
|
|
5271
|
+
Visit.prototype.getParameter = function (parameterName) {
|
|
5272
|
+
return this.visitParameters[parameterName];
|
|
5273
|
+
};
|
|
5274
|
+
// @Trace()
|
|
5275
|
+
Visit.prototype.hasParameter = function (parameterName) {
|
|
5276
|
+
return Object.keys(this.visitParameters).includes(parameterName);
|
|
5277
|
+
};
|
|
5278
|
+
Visit.prototype.replace = function (parameter, value) {
|
|
5279
|
+
var _a;
|
|
5280
|
+
return new Visit(this.placeDefinition, __assign(__assign({}, this.visitParameters), (_a = {}, _a[parameter.name] = value, _a)));
|
|
5281
|
+
};
|
|
5282
|
+
Visit.prototype.mergeRouteParameters = function (routeParams) {
|
|
5283
|
+
var _this = this;
|
|
5284
|
+
// todo: whitelist parameters.
|
|
5285
|
+
var routeParameterKeys = Object.keys(routeParams);
|
|
5286
|
+
var params = {};
|
|
5287
|
+
this.placeDefinition.getVisitParameterDefs().forEach(function (def) {
|
|
5288
|
+
if (def.isRouteId || def.isRouteParameter) {
|
|
5289
|
+
if (routeParameterKeys.includes(def.name)) {
|
|
5290
|
+
params[def.name] = routeParams[def.name];
|
|
5291
|
+
}
|
|
5292
|
+
}
|
|
5293
|
+
else {
|
|
5294
|
+
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
5295
|
+
// defaults and remember sanitisation process.
|
|
5296
|
+
var value = _this.getParameter(def.name);
|
|
5297
|
+
if (_this.hasParameter(def.name)) {
|
|
5298
|
+
params[def.name] = value;
|
|
5299
|
+
}
|
|
5300
|
+
}
|
|
5301
|
+
});
|
|
5302
|
+
return new Visit(this.placeDefinition, params);
|
|
5303
|
+
};
|
|
5304
|
+
Visit.prototype.hasRoutingChangedFrom = function (other) {
|
|
5305
|
+
var samePlace = other.placeDefinition === this.placeDefinition;
|
|
5306
|
+
var sameRouteParameters = isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
5307
|
+
return !samePlace || !sameRouteParameters;
|
|
5308
|
+
};
|
|
5309
|
+
Visit.prototype.hasChangedFrom = function (other) {
|
|
5310
|
+
var sameNonRouteParameters = isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
5311
|
+
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
5312
|
+
};
|
|
5313
|
+
Visit.prototype.toDebugString = function () {
|
|
5314
|
+
var _this = this;
|
|
5315
|
+
return Object.keys(this.visitParameters).map(function (k) { return k + "=" + _this.visitParameters[k]; }).join(",");
|
|
5316
|
+
};
|
|
5317
|
+
return Visit;
|
|
5318
|
+
}());
|
|
5319
|
+
|
|
5470
5320
|
var PlaceRouter = /** @class */ (function (_super) {
|
|
5471
5321
|
__extends(PlaceRouter, _super);
|
|
5472
5322
|
function PlaceRouter(angularRouter, angularLocation, interactionService, urlService, placeHistory) {
|
|
@@ -5662,7 +5512,6 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
5662
5512
|
enumerable: true,
|
|
5663
5513
|
configurable: true
|
|
5664
5514
|
});
|
|
5665
|
-
// @Trace()
|
|
5666
5515
|
PlaceRouter.prototype.pushVisitChangesToRoute = function (previous, next) {
|
|
5667
5516
|
return __awaiter(this, void 0, void 0, function () {
|
|
5668
5517
|
var _this = this;
|
|
@@ -5763,6 +5612,12 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
5763
5612
|
{ type: PlaceHistory }
|
|
5764
5613
|
]; };
|
|
5765
5614
|
PlaceRouter.ɵprov = ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(ɵɵinject(Router), ɵɵinject(Location), ɵɵinject(InteractionService), ɵɵinject(UrlService), ɵɵinject(PlaceHistory)); }, token: PlaceRouter, providedIn: "root" });
|
|
5615
|
+
__decorate([
|
|
5616
|
+
Trace(),
|
|
5617
|
+
__metadata("design:type", Function),
|
|
5618
|
+
__metadata("design:paramtypes", [Visit, Visit]),
|
|
5619
|
+
__metadata("design:returntype", Promise)
|
|
5620
|
+
], PlaceRouter.prototype, "pushVisitChangesToRoute", null);
|
|
5766
5621
|
PlaceRouter = __decorate([
|
|
5767
5622
|
Injectable({
|
|
5768
5623
|
providedIn: 'root'
|
|
@@ -5776,75 +5631,6 @@ var PlaceRouter = /** @class */ (function (_super) {
|
|
|
5776
5631
|
return PlaceRouter;
|
|
5777
5632
|
}(GarbageCollector));
|
|
5778
5633
|
|
|
5779
|
-
var Visit = /** @class */ (function () {
|
|
5780
|
-
function Visit(placeDefinition, visitParameters) {
|
|
5781
|
-
if (visitParameters === void 0) { visitParameters = {}; }
|
|
5782
|
-
this.placeDefinition = placeDefinition;
|
|
5783
|
-
this.visitParameters = visitParameters;
|
|
5784
|
-
}
|
|
5785
|
-
// @Trace()
|
|
5786
|
-
Visit.prototype.getRouteId = function () {
|
|
5787
|
-
return this.placeDefinition.getRouteIdFrom(this);
|
|
5788
|
-
};
|
|
5789
|
-
// @Trace()
|
|
5790
|
-
Visit.prototype.hasRouteId = function () {
|
|
5791
|
-
return !isNil(this.getRouteId());
|
|
5792
|
-
};
|
|
5793
|
-
/**
|
|
5794
|
-
* Returns the value of the place parameter with the specified name. The parameter
|
|
5795
|
-
* name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
|
|
5796
|
-
* same as the the ValueModel property name.
|
|
5797
|
-
* @param parameterName the field name of the property model or the `as` option if specified.
|
|
5798
|
-
*/
|
|
5799
|
-
Visit.prototype.getParameter = function (parameterName) {
|
|
5800
|
-
return this.visitParameters[parameterName];
|
|
5801
|
-
};
|
|
5802
|
-
// @Trace()
|
|
5803
|
-
Visit.prototype.hasParameter = function (parameterName) {
|
|
5804
|
-
return Object.keys(this.visitParameters).includes(parameterName);
|
|
5805
|
-
};
|
|
5806
|
-
Visit.prototype.replace = function (parameter, value) {
|
|
5807
|
-
var _a;
|
|
5808
|
-
return new Visit(this.placeDefinition, __assign(__assign({}, this.visitParameters), (_a = {}, _a[parameter.name] = value, _a)));
|
|
5809
|
-
};
|
|
5810
|
-
Visit.prototype.mergeRouteParameters = function (routeParams) {
|
|
5811
|
-
var _this = this;
|
|
5812
|
-
// todo: whitelist parameters.
|
|
5813
|
-
var routeParameterKeys = Object.keys(routeParams);
|
|
5814
|
-
var params = {};
|
|
5815
|
-
this.placeDefinition.getVisitParameterDefs().forEach(function (def) {
|
|
5816
|
-
if (def.isRouteId || def.isRouteParameter) {
|
|
5817
|
-
if (routeParameterKeys.includes(def.name)) {
|
|
5818
|
-
params[def.name] = routeParams[def.name];
|
|
5819
|
-
}
|
|
5820
|
-
}
|
|
5821
|
-
else {
|
|
5822
|
-
// copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
|
|
5823
|
-
// defaults and remember sanitisation process.
|
|
5824
|
-
var value = _this.getParameter(def.name);
|
|
5825
|
-
if (_this.hasParameter(def.name)) {
|
|
5826
|
-
params[def.name] = value;
|
|
5827
|
-
}
|
|
5828
|
-
}
|
|
5829
|
-
});
|
|
5830
|
-
return new Visit(this.placeDefinition, params);
|
|
5831
|
-
};
|
|
5832
|
-
Visit.prototype.hasRoutingChangedFrom = function (other) {
|
|
5833
|
-
var samePlace = other.placeDefinition === this.placeDefinition;
|
|
5834
|
-
var sameRouteParameters = isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
|
|
5835
|
-
return !samePlace || !sameRouteParameters;
|
|
5836
|
-
};
|
|
5837
|
-
Visit.prototype.hasChangedFrom = function (other) {
|
|
5838
|
-
var sameNonRouteParameters = isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
|
|
5839
|
-
return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
|
|
5840
|
-
};
|
|
5841
|
-
Visit.prototype.toDebugString = function () {
|
|
5842
|
-
var _this = this;
|
|
5843
|
-
return Object.keys(this.visitParameters).map(function (k) { return k + "=" + _this.visitParameters[k]; }).join(",");
|
|
5844
|
-
};
|
|
5845
|
-
return Visit;
|
|
5846
|
-
}());
|
|
5847
|
-
|
|
5848
5634
|
var AUP_PLACE_CONFIG = new InjectionToken('AUP_PLACE_CONFIG');
|
|
5849
5635
|
|
|
5850
5636
|
// Freezes the state of the components at the start of the animation.
|
|
@@ -6859,7 +6645,8 @@ function installMechanics(prototype, propertyKey, backingModel, tagPrefix, isEmp
|
|
|
6859
6645
|
binding: null
|
|
6860
6646
|
};
|
|
6861
6647
|
var tag = tagPrefix + "(" + prototype.constructor.name + "." + propertyKey.toString() + ")";
|
|
6862
|
-
DebugContext.
|
|
6648
|
+
DebugContext.get(mechanics.backingModel).tag(tag);
|
|
6649
|
+
Logger.get(mechanics.backingModel).tag(tag);
|
|
6863
6650
|
Object.defineProperty(prototype, propertyKey, {
|
|
6864
6651
|
get: function () {
|
|
6865
6652
|
return mechanics.backingModel;
|
|
@@ -6921,5 +6708,5 @@ function VisitParameterList(options) {
|
|
|
6921
6708
|
* Generated bundle index. Do not edit.
|
|
6922
6709
|
*/
|
|
6923
6710
|
|
|
6924
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule,
|
|
6711
|
+
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 };
|
|
6925
6712
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|