@coolon/angular-ui-powerups 2.0.0-alpha.25 → 2.0.0-alpha.27
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 +14 -0
- package/assets/commands.scss +3 -0
- package/assets/icons.scss +30 -0
- package/assets/styles.scss +2 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +481 -151
- 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 +39 -34
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +37 -32
- 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/commands/command-bar.component.js +55 -0
- package/esm2015/lib/components/commands/command-bar.component.js.map +1 -0
- package/esm2015/lib/components/commands/command-bar.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/command-bar.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/command-container.js +39 -0
- package/esm2015/lib/components/commands/command-container.js.map +1 -0
- package/esm2015/lib/components/commands/command-container.metadata.json +1 -0
- package/esm2015/lib/components/commands/command-container.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.js +91 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.js.map +1 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.scss.ngstyle.js.map +1 -0
- package/esm2015/lib/components/commands/command-face.js +9 -1
- package/esm2015/lib/components/commands/command-face.js.map +1 -1
- package/esm2015/lib/components/commands/command-menu/command-menu.component.js +65 -0
- package/esm2015/lib/components/commands/command-menu/command-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/command-menu/command-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/command-menu/command-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/command-menu/command-menu.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/commands/command.component.js +38 -0
- package/esm2015/lib/components/commands/command.component.js.map +1 -0
- package/esm2015/lib/components/commands/command.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/command.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/components.module.js +17 -2
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.js +1 -1
- package/esm2015/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.js +1 -1
- package/esm2015/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm2015/lib/components/icon/icon.component.js +17 -4
- package/esm2015/lib/components/icon/icon.component.js.map +1 -1
- package/esm2015/lib/components/icon/icon.component.metadata.json +1 -1
- package/esm2015/lib/components/index.js +5 -0
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm5/coolon-angular-ui-powerups.js +37 -32
- 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/commands/command-bar.component.js +35 -0
- package/esm5/lib/components/commands/command-bar.component.js.map +1 -0
- package/esm5/lib/components/commands/command-bar.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/command-container.js +51 -0
- package/esm5/lib/components/commands/command-container.js.map +1 -0
- package/esm5/lib/components/commands/command-container.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/command-face/command-face.component.js +122 -0
- package/esm5/lib/components/commands/command-face/command-face.component.js.map +1 -0
- package/esm5/lib/components/commands/command-face/command-face.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/command-face/command-face.component.scss.ngstyle.js.map +1 -0
- package/esm5/lib/components/commands/command-face.js +13 -1
- package/esm5/lib/components/commands/command-face.js.map +1 -1
- package/esm5/lib/components/commands/command-menu/command-menu.component.js +70 -0
- package/esm5/lib/components/commands/command-menu/command-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/command-menu/command-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/command-menu/command-menu.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/commands/command.component.js +41 -0
- package/esm5/lib/components/commands/command.component.js.map +1 -0
- package/esm5/lib/components/commands/command.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/components.module.js +17 -2
- package/esm5/lib/components/components.module.js.map +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/forms/abstract-list-input.component.js +1 -1
- package/esm5/lib/components/forms/abstract-list-input.component.js.map +1 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js +1 -1
- package/esm5/lib/components/forms/abstract-value-input.component.js.map +1 -1
- package/esm5/lib/components/icon/icon.component.js +15 -3
- package/esm5/lib/components/icon/icon.component.js.map +1 -1
- package/esm5/lib/components/index.js +5 -0
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +365 -76
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +423 -100
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/command-bar.component.d.ts +11 -0
- package/lib/components/commands/command-container.d.ts +15 -0
- package/lib/components/commands/command-face/command-face.component.d.ts +29 -0
- package/lib/components/commands/command-face.d.ts +4 -2
- package/lib/components/commands/command-menu/command-menu.component.d.ts +22 -0
- package/lib/components/commands/command.component.d.ts +15 -0
- package/lib/components/icon/icon.component.d.ts +15 -0
- package/lib/components/index.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __extends, __decorate, __metadata, __param, __assign, __awaiter, __generator, __spread } from 'tslib';
|
|
2
2
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
3
|
-
import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, ContentChild, TemplateRef, Component,
|
|
3
|
+
import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, ContentChild, TemplateRef, Component, forwardRef, Optional, HostBinding, ViewEncapsulation, ViewChild, Self, EventEmitter, Output, ChangeDetectorRef, ContentChildren, QueryList, ViewContainerRef, InjectionToken, Injector, ComponentFactoryResolver, ViewChildren, SkipSelf } from '@angular/core';
|
|
4
4
|
import { FormsModule } from '@angular/forms';
|
|
5
5
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
6
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -18,10 +18,11 @@ import { MatTableModule } from '@angular/material/table';
|
|
|
18
18
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
19
19
|
import { FaIconLibrary, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
20
20
|
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
21
|
-
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, FocusManager, EventListenerList, Form,
|
|
21
|
+
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, MutableListModel, Disposable, MutableValueModel, StoreInValueModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, StoreInListModel, ValueModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Functions } from '@coolon/pectin';
|
|
22
|
+
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
22
23
|
import ___default, { isEqual, isNil } from 'lodash';
|
|
24
|
+
import { Enum } from 'typescript-string-enums';
|
|
23
25
|
import { assert as assert$1, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
|
|
24
|
-
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
25
26
|
import produce from 'immer';
|
|
26
27
|
import { FlexModule, GridModule } from '@angular/flex-layout';
|
|
27
28
|
import { MatDialogModule, MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
|
@@ -408,13 +409,402 @@ var CardContainerComponent = /** @class */ (function (_super) {
|
|
|
408
409
|
Component({
|
|
409
410
|
selector: 'aup-card-container',
|
|
410
411
|
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",
|
|
411
|
-
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}.aup-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{padding-bottom:0;border-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}.aup-input-component.dense mat-form-field.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(0)}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}"]
|
|
412
|
+
styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white;--command-face-icon-gap:8px;--aup-icon-width:24px;--aup-fa-icon-width:18px}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}.aup-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{padding-bottom:0;border-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}.aup-input-component.dense mat-form-field.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(0)}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}aup-icon{--fa-icon-offset:calc((var(--aup-icon-width) - var(--aup-fa-icon-width)) / 2);position:relative}aup-icon fa-icon .svg-inline--fa{position:absolute;top:var(--fa-icon-offset);left:var(--fa-icon-offset);width:var(--aup-fa-icon-width)!important;height:var(--aup-fa-icon-width)!important}.mat-menu-panel aup-icon .svg-inline--fa{opacity:.54}: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}"]
|
|
412
413
|
}),
|
|
413
414
|
__metadata("design:paramtypes", [])
|
|
414
415
|
], CardContainerComponent);
|
|
415
416
|
return CardContainerComponent;
|
|
416
417
|
}(DisposableComponent));
|
|
417
418
|
|
|
419
|
+
var CommandFace;
|
|
420
|
+
(function (CommandFace) {
|
|
421
|
+
var Position;
|
|
422
|
+
(function (Position) {
|
|
423
|
+
Position["START"] = "start";
|
|
424
|
+
Position["END"] = "end";
|
|
425
|
+
})(Position = CommandFace.Position || (CommandFace.Position = {}));
|
|
426
|
+
var Adapter = /** @class */ (function () {
|
|
427
|
+
function Adapter(face) {
|
|
428
|
+
this.face = face;
|
|
429
|
+
}
|
|
430
|
+
Object.defineProperty(Adapter.prototype, "text", {
|
|
431
|
+
get: function () {
|
|
432
|
+
return ___default.isFunction(this.face.text) ? this.face.text() : undefined;
|
|
433
|
+
},
|
|
434
|
+
enumerable: true,
|
|
435
|
+
configurable: true
|
|
436
|
+
});
|
|
437
|
+
Object.defineProperty(Adapter.prototype, "icon", {
|
|
438
|
+
get: function () {
|
|
439
|
+
return ___default.isFunction(this.face.icon) ? this.face.icon() : undefined;
|
|
440
|
+
},
|
|
441
|
+
enumerable: true,
|
|
442
|
+
configurable: true
|
|
443
|
+
});
|
|
444
|
+
Object.defineProperty(Adapter.prototype, "iconPosition", {
|
|
445
|
+
get: function () {
|
|
446
|
+
return ___default.isFunction(this.face.iconPosition) ? this.face.iconPosition() : undefined;
|
|
447
|
+
},
|
|
448
|
+
enumerable: true,
|
|
449
|
+
configurable: true
|
|
450
|
+
});
|
|
451
|
+
Object.defineProperty(Adapter.prototype, "tooltip", {
|
|
452
|
+
get: function () {
|
|
453
|
+
return ___default.isFunction(this.face.tooltip) ? this.face.tooltip() : undefined;
|
|
454
|
+
},
|
|
455
|
+
enumerable: true,
|
|
456
|
+
configurable: true
|
|
457
|
+
});
|
|
458
|
+
Object.defineProperty(Adapter.prototype, "iconPositionStart", {
|
|
459
|
+
get: function () {
|
|
460
|
+
return this.iconPosition === CommandFace.Position.START;
|
|
461
|
+
},
|
|
462
|
+
enumerable: true,
|
|
463
|
+
configurable: true
|
|
464
|
+
});
|
|
465
|
+
Object.defineProperty(Adapter.prototype, "iconPositionEnd", {
|
|
466
|
+
get: function () {
|
|
467
|
+
return this.iconPosition === CommandFace.Position.END;
|
|
468
|
+
},
|
|
469
|
+
enumerable: true,
|
|
470
|
+
configurable: true
|
|
471
|
+
});
|
|
472
|
+
Object.defineProperty(Adapter.prototype, "destructive", {
|
|
473
|
+
get: function () {
|
|
474
|
+
return ___default.isFunction(this.face.destructive) ? this.face.destructive() : false;
|
|
475
|
+
},
|
|
476
|
+
enumerable: true,
|
|
477
|
+
configurable: true
|
|
478
|
+
});
|
|
479
|
+
__decorate([
|
|
480
|
+
Memoize(),
|
|
481
|
+
__metadata("design:type", Object),
|
|
482
|
+
__metadata("design:paramtypes", [])
|
|
483
|
+
], Adapter.prototype, "text", null);
|
|
484
|
+
__decorate([
|
|
485
|
+
Memoize(),
|
|
486
|
+
__metadata("design:type", Object),
|
|
487
|
+
__metadata("design:paramtypes", [])
|
|
488
|
+
], Adapter.prototype, "icon", null);
|
|
489
|
+
__decorate([
|
|
490
|
+
Memoize(),
|
|
491
|
+
__metadata("design:type", Object),
|
|
492
|
+
__metadata("design:paramtypes", [])
|
|
493
|
+
], Adapter.prototype, "iconPosition", null);
|
|
494
|
+
__decorate([
|
|
495
|
+
Memoize(),
|
|
496
|
+
__metadata("design:type", Object),
|
|
497
|
+
__metadata("design:paramtypes", [])
|
|
498
|
+
], Adapter.prototype, "tooltip", null);
|
|
499
|
+
__decorate([
|
|
500
|
+
Memoize(),
|
|
501
|
+
__metadata("design:type", Boolean),
|
|
502
|
+
__metadata("design:paramtypes", [])
|
|
503
|
+
], Adapter.prototype, "iconPositionStart", null);
|
|
504
|
+
__decorate([
|
|
505
|
+
Memoize(),
|
|
506
|
+
__metadata("design:type", Boolean),
|
|
507
|
+
__metadata("design:paramtypes", [])
|
|
508
|
+
], Adapter.prototype, "iconPositionEnd", null);
|
|
509
|
+
__decorate([
|
|
510
|
+
Memoize(),
|
|
511
|
+
__metadata("design:type", Boolean),
|
|
512
|
+
__metadata("design:paramtypes", [])
|
|
513
|
+
], Adapter.prototype, "destructive", null);
|
|
514
|
+
return Adapter;
|
|
515
|
+
}());
|
|
516
|
+
CommandFace.Adapter = Adapter;
|
|
517
|
+
})(CommandFace || (CommandFace = {}));
|
|
518
|
+
|
|
519
|
+
var CommandContainer = /** @class */ (function (_super) {
|
|
520
|
+
__extends(CommandContainer, _super);
|
|
521
|
+
function CommandContainer() {
|
|
522
|
+
var _this = _super.call(this) || this;
|
|
523
|
+
_this._commandRegistrations = new MutableListModel();
|
|
524
|
+
return _this;
|
|
525
|
+
}
|
|
526
|
+
CommandContainer_1 = CommandContainer;
|
|
527
|
+
Object.defineProperty(CommandContainer.prototype, "commandRegistrations", {
|
|
528
|
+
get: function () {
|
|
529
|
+
return this._commandRegistrations.readonly;
|
|
530
|
+
},
|
|
531
|
+
enumerable: true,
|
|
532
|
+
configurable: true
|
|
533
|
+
});
|
|
534
|
+
CommandContainer.prototype.registerCommand = function (command, face) {
|
|
535
|
+
var _this = this;
|
|
536
|
+
var registration = new CommandContainer_1.Registration(command, face);
|
|
537
|
+
this._commandRegistrations.push(registration);
|
|
538
|
+
return Disposable.disposableThatRuns(function () { return _this._commandRegistrations.remove(registration); });
|
|
539
|
+
};
|
|
540
|
+
CommandContainer.prototype.getDefaultIconPosition = function () {
|
|
541
|
+
return CommandFace.Position.START;
|
|
542
|
+
};
|
|
543
|
+
var CommandContainer_1;
|
|
544
|
+
CommandContainer = CommandContainer_1 = __decorate([
|
|
545
|
+
Component({
|
|
546
|
+
template: ''
|
|
547
|
+
}),
|
|
548
|
+
__metadata("design:paramtypes", [])
|
|
549
|
+
], CommandContainer);
|
|
550
|
+
return CommandContainer;
|
|
551
|
+
}(GarbageCollector));
|
|
552
|
+
(function (CommandContainer) {
|
|
553
|
+
var Registration = /** @class */ (function (_super) {
|
|
554
|
+
__extends(Registration, _super);
|
|
555
|
+
function Registration(command, face) {
|
|
556
|
+
var _this = _super.call(this, face) || this;
|
|
557
|
+
_this.command = command;
|
|
558
|
+
return _this;
|
|
559
|
+
}
|
|
560
|
+
return Registration;
|
|
561
|
+
}(CommandFace.Adapter));
|
|
562
|
+
CommandContainer.Registration = Registration;
|
|
563
|
+
})(CommandContainer || (CommandContainer = {}));
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
*
|
|
567
|
+
*/
|
|
568
|
+
var CommandBarComponent = /** @class */ (function (_super) {
|
|
569
|
+
__extends(CommandBarComponent, _super);
|
|
570
|
+
function CommandBarComponent() {
|
|
571
|
+
return _super.call(this) || this;
|
|
572
|
+
}
|
|
573
|
+
CommandBarComponent_1 = CommandBarComponent;
|
|
574
|
+
CommandBarComponent.prototype.ngOnInit = function () {
|
|
575
|
+
};
|
|
576
|
+
CommandBarComponent.prototype.getButtonColor = function (registration) {
|
|
577
|
+
return registration.destructive ? 'warn' : undefined;
|
|
578
|
+
};
|
|
579
|
+
var CommandBarComponent_1;
|
|
580
|
+
__decorate([
|
|
581
|
+
ContentChild('moreMenu'),
|
|
582
|
+
__metadata("design:type", TemplateRef)
|
|
583
|
+
], CommandBarComponent.prototype, "moreMenuTemplateRef", void 0);
|
|
584
|
+
CommandBarComponent = CommandBarComponent_1 = __decorate([
|
|
585
|
+
Component({
|
|
586
|
+
selector: 'aup-command-bar',
|
|
587
|
+
template: "\n <ng-container *ngFor=\"let registration of commandRegistrations.value\">\n <button *ngIf=\"registration.icon && !registration.text\"\n mat-icon-button\n [color]=\"getButtonColor(registration)\"\n [pectinCommand]=\"registration.command\"\n [matTooltip]=\"registration.tooltip\"\n >\n <aup-command-face [face]=\"registration.face\"></aup-command-face>\n </button>\n <button *ngIf=\"registration.text\"\n [color]=\"getButtonColor(registration)\"\n mat-button\n [pectinCommand]=\"registration.command\"\n [matTooltip]=\"registration.tooltip\"\n >\n <aup-command-face [face]=\"registration.face\"></aup-command-face>\n </button>\n </ng-container>\n ",
|
|
588
|
+
providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return CommandBarComponent_1; }) }],
|
|
589
|
+
styles: [":host {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n }"]
|
|
590
|
+
}),
|
|
591
|
+
__metadata("design:paramtypes", [])
|
|
592
|
+
], CommandBarComponent);
|
|
593
|
+
return CommandBarComponent;
|
|
594
|
+
}(CommandContainer));
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
*
|
|
598
|
+
*/
|
|
599
|
+
var CommandFaceComponent = /** @class */ (function (_super) {
|
|
600
|
+
__extends(CommandFaceComponent, _super);
|
|
601
|
+
function CommandFaceComponent(commandContainer) {
|
|
602
|
+
var _this = _super.call(this) || this;
|
|
603
|
+
_this.commandContainer = commandContainer;
|
|
604
|
+
_this.faceModel = new MutableValueModel();
|
|
605
|
+
_this.ignoreIcon = false;
|
|
606
|
+
_this.ignoreText = false;
|
|
607
|
+
_this.includeMissingIconInLayout = false;
|
|
608
|
+
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;
|
|
609
|
+
// overkill /c: when all you have is a hammer...
|
|
610
|
+
var faceAdapter = chain(_this.faceModel).map(function (face) { return new CommandFace.Adapter(face); });
|
|
611
|
+
_this.iconModel = faceAdapter.pluck('icon');
|
|
612
|
+
_this.textModel = faceAdapter.pluck('text');
|
|
613
|
+
_this.positionModel = faceAdapter.pluck('iconPosition');
|
|
614
|
+
_this.destructiveModel = faceAdapter.pluck('destructive');
|
|
615
|
+
return _this;
|
|
616
|
+
}
|
|
617
|
+
Object.defineProperty(CommandFaceComponent.prototype, "requiresMissingIconInLayout", {
|
|
618
|
+
get: function () {
|
|
619
|
+
return this.includeMissingIconInLayout && !this.iconModel.value;
|
|
620
|
+
},
|
|
621
|
+
enumerable: true,
|
|
622
|
+
configurable: true
|
|
623
|
+
});
|
|
624
|
+
CommandFaceComponent.prototype.ngOnInit = function () {
|
|
625
|
+
};
|
|
626
|
+
Object.defineProperty(CommandFaceComponent.prototype, "iconPosition", {
|
|
627
|
+
get: function () {
|
|
628
|
+
var _a, _b, _c;
|
|
629
|
+
return (_c = (_a = this.positionModel.value) !== null && _a !== void 0 ? _a : (_b = this.commandContainer) === null || _b === void 0 ? void 0 : _b.getDefaultIconPosition()) !== null && _c !== void 0 ? _c : CommandFace.Position.START;
|
|
630
|
+
},
|
|
631
|
+
enumerable: true,
|
|
632
|
+
configurable: true
|
|
633
|
+
});
|
|
634
|
+
Object.defineProperty(CommandFaceComponent.prototype, "shouldIncludeIcon", {
|
|
635
|
+
get: function () {
|
|
636
|
+
return (!this.ignoreIcon && this.iconModel.value) || this.includeMissingIconInLayout;
|
|
637
|
+
},
|
|
638
|
+
enumerable: true,
|
|
639
|
+
configurable: true
|
|
640
|
+
});
|
|
641
|
+
Object.defineProperty(CommandFaceComponent.prototype, "iconStart", {
|
|
642
|
+
get: function () {
|
|
643
|
+
return this.shouldIncludeIcon && this.iconPosition === CommandFace.Position.START;
|
|
644
|
+
},
|
|
645
|
+
enumerable: true,
|
|
646
|
+
configurable: true
|
|
647
|
+
});
|
|
648
|
+
Object.defineProperty(CommandFaceComponent.prototype, "iconEnd", {
|
|
649
|
+
get: function () {
|
|
650
|
+
return this.shouldIncludeIcon && this.iconPosition === CommandFace.Position.END;
|
|
651
|
+
},
|
|
652
|
+
enumerable: true,
|
|
653
|
+
configurable: true
|
|
654
|
+
});
|
|
655
|
+
Object.defineProperty(CommandFaceComponent.prototype, "text", {
|
|
656
|
+
get: function () {
|
|
657
|
+
return this.ignoreText ? undefined : this.textModel.value;
|
|
658
|
+
},
|
|
659
|
+
enumerable: true,
|
|
660
|
+
configurable: true
|
|
661
|
+
});
|
|
662
|
+
Object.defineProperty(CommandFaceComponent.prototype, "destructive", {
|
|
663
|
+
get: function () {
|
|
664
|
+
return this.destructiveModel.value;
|
|
665
|
+
},
|
|
666
|
+
enumerable: true,
|
|
667
|
+
configurable: true
|
|
668
|
+
});
|
|
669
|
+
CommandFaceComponent.ctorParameters = function () { return [
|
|
670
|
+
{ type: CommandContainer, decorators: [{ type: Optional }] }
|
|
671
|
+
]; };
|
|
672
|
+
__decorate([
|
|
673
|
+
Input('face'), StoreInValueModel('faceModel'),
|
|
674
|
+
__metadata("design:type", Object)
|
|
675
|
+
], CommandFaceComponent.prototype, "_rawFace", void 0);
|
|
676
|
+
__decorate([
|
|
677
|
+
Input(),
|
|
678
|
+
__metadata("design:type", Object)
|
|
679
|
+
], CommandFaceComponent.prototype, "ignoreIcon", void 0);
|
|
680
|
+
__decorate([
|
|
681
|
+
Input(),
|
|
682
|
+
__metadata("design:type", Object)
|
|
683
|
+
], CommandFaceComponent.prototype, "ignoreText", void 0);
|
|
684
|
+
__decorate([
|
|
685
|
+
Input(),
|
|
686
|
+
__metadata("design:type", Object)
|
|
687
|
+
], CommandFaceComponent.prototype, "includeMissingIconInLayout", void 0);
|
|
688
|
+
__decorate([
|
|
689
|
+
HostBinding('class.hide-icon'),
|
|
690
|
+
__metadata("design:type", Object),
|
|
691
|
+
__metadata("design:paramtypes", [])
|
|
692
|
+
], CommandFaceComponent.prototype, "requiresMissingIconInLayout", null);
|
|
693
|
+
__decorate([
|
|
694
|
+
HostBinding('class.destructive'),
|
|
695
|
+
__metadata("design:type", Boolean),
|
|
696
|
+
__metadata("design:paramtypes", [])
|
|
697
|
+
], CommandFaceComponent.prototype, "destructive", null);
|
|
698
|
+
CommandFaceComponent = __decorate([
|
|
699
|
+
Component({
|
|
700
|
+
selector: 'aup-command-face',
|
|
701
|
+
template: "<aup-icon *ngIf=\"iconStart\" [icon]=\"iconModel.value\"></aup-icon>\n<span *ngIf=\"this.text\">{{this.text}}</span>\n<aup-icon *ngIf=\"iconEnd\" [icon]=\"iconModel.value\"></aup-icon>\n",
|
|
702
|
+
encapsulation: ViewEncapsulation.None,
|
|
703
|
+
styles: ["aup-command-face{--icon-gap:var(--command-face-icon-gap);display:inline-flex;flex-direction:row;align-items:center}aup-command-face *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}"]
|
|
704
|
+
}),
|
|
705
|
+
__param(0, Optional()),
|
|
706
|
+
__metadata("design:paramtypes", [CommandContainer])
|
|
707
|
+
], CommandFaceComponent);
|
|
708
|
+
return CommandFaceComponent;
|
|
709
|
+
}(DisposableComponent));
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
*
|
|
713
|
+
*/
|
|
714
|
+
var CommandComponent = /** @class */ (function (_super) {
|
|
715
|
+
__extends(CommandComponent, _super);
|
|
716
|
+
function CommandComponent(commandContainer) {
|
|
717
|
+
var _this = _super.call(this) || this;
|
|
718
|
+
_this.commandContainer = commandContainer;
|
|
719
|
+
return _this;
|
|
720
|
+
}
|
|
721
|
+
CommandComponent.prototype.ngOnInit = function () {
|
|
722
|
+
this.registerDisposable(this.commandContainer.registerCommand(this.command, this.face));
|
|
723
|
+
};
|
|
724
|
+
CommandComponent.ctorParameters = function () { return [
|
|
725
|
+
{ type: CommandContainer }
|
|
726
|
+
]; };
|
|
727
|
+
__decorate([
|
|
728
|
+
Input(), TrackExternal(),
|
|
729
|
+
__metadata("design:type", Command)
|
|
730
|
+
], CommandComponent.prototype, "command", void 0);
|
|
731
|
+
__decorate([
|
|
732
|
+
Input(),
|
|
733
|
+
__metadata("design:type", Object)
|
|
734
|
+
], CommandComponent.prototype, "face", void 0);
|
|
735
|
+
CommandComponent = __decorate([
|
|
736
|
+
Component({
|
|
737
|
+
selector: 'aup-command',
|
|
738
|
+
template: ""
|
|
739
|
+
}),
|
|
740
|
+
__metadata("design:paramtypes", [CommandContainer])
|
|
741
|
+
], CommandComponent);
|
|
742
|
+
return CommandComponent;
|
|
743
|
+
}(DisposableComponent));
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
*
|
|
747
|
+
*/
|
|
748
|
+
var CommandMenuComponent = /** @class */ (function (_super) {
|
|
749
|
+
__extends(CommandMenuComponent, _super);
|
|
750
|
+
function CommandMenuComponent() {
|
|
751
|
+
var _this = _super.call(this) || this;
|
|
752
|
+
_this.faceModel = new MutableValueModel();
|
|
753
|
+
_this.xPosition = 'after';
|
|
754
|
+
_this.yPosition = 'below';
|
|
755
|
+
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;
|
|
756
|
+
_this.tooltip = chain(_this.faceModel).map(function (face) { return new CommandFace.Adapter(face); }).pluck('tooltip');
|
|
757
|
+
var registrations = chain(_this.commandRegistrations);
|
|
758
|
+
var iconCount = registrations.select(function (r) { return !!r.icon; }).count();
|
|
759
|
+
_this.hasMixedIcons = valueOf.all(iconCount.isGreaterThan(0), iconCount.doesNotEqual(registrations.length)).areTruthy();
|
|
760
|
+
return _this;
|
|
761
|
+
}
|
|
762
|
+
CommandMenuComponent_1 = CommandMenuComponent;
|
|
763
|
+
CommandMenuComponent.prototype.ngOnInit = function () {
|
|
764
|
+
};
|
|
765
|
+
CommandMenuComponent.prototype.createMoreMenuCommand = function (item) {
|
|
766
|
+
var _this = this;
|
|
767
|
+
var when = Dsl.disposeWith(this).when;
|
|
768
|
+
when(item.command.busy).becomesFalsey(function () {
|
|
769
|
+
_this.closeMoreMenu();
|
|
770
|
+
});
|
|
771
|
+
return item.command;
|
|
772
|
+
};
|
|
773
|
+
CommandMenuComponent.prototype.closeMoreMenu = function () {
|
|
774
|
+
this.menu.closeMenu();
|
|
775
|
+
};
|
|
776
|
+
CommandMenuComponent.prototype.getButtonColor = function (registration) {
|
|
777
|
+
return registration.destructive ? 'warn' : undefined;
|
|
778
|
+
};
|
|
779
|
+
var CommandMenuComponent_1;
|
|
780
|
+
__decorate([
|
|
781
|
+
Input(), StoreInValueModel('faceModel'),
|
|
782
|
+
__metadata("design:type", Object)
|
|
783
|
+
], CommandMenuComponent.prototype, "face", void 0);
|
|
784
|
+
__decorate([
|
|
785
|
+
Input(),
|
|
786
|
+
__metadata("design:type", String)
|
|
787
|
+
], CommandMenuComponent.prototype, "xPosition", void 0);
|
|
788
|
+
__decorate([
|
|
789
|
+
Input(),
|
|
790
|
+
__metadata("design:type", String)
|
|
791
|
+
], CommandMenuComponent.prototype, "yPosition", void 0);
|
|
792
|
+
__decorate([
|
|
793
|
+
ViewChild(MatMenuTrigger),
|
|
794
|
+
__metadata("design:type", MatMenuTrigger)
|
|
795
|
+
], CommandMenuComponent.prototype, "menu", void 0);
|
|
796
|
+
CommandMenuComponent = CommandMenuComponent_1 = __decorate([
|
|
797
|
+
Component({
|
|
798
|
+
selector: 'aup-command-menu',
|
|
799
|
+
template: "<button #trigger mat-icon-button [matMenuTriggerFor]=\"menu\" [matTooltip]=\"tooltip.value\">\n <aup-command-face [face]=\"face\"></aup-command-face>\n</button>\n<mat-menu #menu=\"matMenu\" [xPosition]=\"xPosition\" [yPosition]=\"yPosition\">\n <button *ngFor=\"let registration of commandRegistrations.value\"\n mat-menu-item\n [pectinCommand]=\"createMoreMenuCommand(registration)\"\n >\n <aup-command-face [face]=\"registration.face\" [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n</mat-menu>\n",
|
|
800
|
+
providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return CommandMenuComponent_1; }) }],
|
|
801
|
+
styles: [":host{display:inline-flex;flex-direction:row;align-items:center}"]
|
|
802
|
+
}),
|
|
803
|
+
__metadata("design:paramtypes", [])
|
|
804
|
+
], CommandMenuComponent);
|
|
805
|
+
return CommandMenuComponent;
|
|
806
|
+
}(CommandContainer));
|
|
807
|
+
|
|
418
808
|
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
419
809
|
__extends(FocusContainerComponent, _super);
|
|
420
810
|
function FocusContainerComponent(focusManager) {
|
|
@@ -730,7 +1120,7 @@ var AbstractListInputComponent = /** @class */ (function (_super) {
|
|
|
730
1120
|
_this.setValueIsInProgress = new Guard();
|
|
731
1121
|
_this.valueChange = new EventEmitter();
|
|
732
1122
|
var _a = Dsl.disposeWith(_this), when = _a.when, valueOf = _a.valueOf, chain = _a.chain;
|
|
733
|
-
var binding = new Binding.Identity(_this.formValueModel, _this.componentListModel);
|
|
1123
|
+
var binding = new Binding.Identity(_this.formValueModel, _this.componentListModel).writeRight();
|
|
734
1124
|
var inExternalChange = valueOf.any(_this.setValueIsInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
|
|
735
1125
|
when(_this.componentListModel).changes(function (is, was) {
|
|
736
1126
|
_this.valueChange.emit(is);
|
|
@@ -804,7 +1194,7 @@ var AbstractValueInputComponent = /** @class */ (function (_super) {
|
|
|
804
1194
|
_this.componentValueModel = new MutableValueModel();
|
|
805
1195
|
_this.valueChange = new EventEmitter();
|
|
806
1196
|
var _a = Dsl.disposeWith(_this), when = _a.when, chain = _a.chain, valueOf = _a.valueOf;
|
|
807
|
-
var binding = new Binding.Identity(_this.formValueModel, _this.componentValueModel);
|
|
1197
|
+
var binding = new Binding.Identity(_this.formValueModel, _this.componentValueModel).writeRight();
|
|
808
1198
|
var inExternalChange = valueOf.any(_this.setValueInProgress, chain(binding.direction).equals(Binding.Direction.RIGHT)).areTruthy();
|
|
809
1199
|
when(_this.componentValueModel).changes(function (is, was) {
|
|
810
1200
|
_this.valueChange.emit(is);
|
|
@@ -1174,7 +1564,10 @@ var TextInputComponent = /** @class */ (function (_super) {
|
|
|
1174
1564
|
|
|
1175
1565
|
var IconComponent = /** @class */ (function () {
|
|
1176
1566
|
function IconComponent() {
|
|
1567
|
+
this.allowedPrefixes = Enum.values(IconComponent_1.IconPrefix).map(function (p) { return p + ":"; });
|
|
1568
|
+
this.iconPrefix = IconComponent_1.IconPrefix;
|
|
1177
1569
|
}
|
|
1570
|
+
IconComponent_1 = IconComponent;
|
|
1178
1571
|
Object.defineProperty(IconComponent.prototype, "icon", {
|
|
1179
1572
|
get: function () {
|
|
1180
1573
|
return this._icon;
|
|
@@ -1194,25 +1587,33 @@ var IconComponent = /** @class */ (function () {
|
|
|
1194
1587
|
if (this.prefix) {
|
|
1195
1588
|
this.errorMessage = "Unknown icon \"" + iconName + "\"";
|
|
1196
1589
|
}
|
|
1197
|
-
this.errorMessage = "Unknown icon prefix \"" + this.prefix + "
|
|
1590
|
+
this.errorMessage = "Unknown icon prefix, expected one of [" + this.allowedPrefixes.join(',') + "] got \"" + this.prefix + ":\"";
|
|
1198
1591
|
},
|
|
1199
1592
|
enumerable: true,
|
|
1200
1593
|
configurable: true
|
|
1201
1594
|
});
|
|
1595
|
+
var IconComponent_1;
|
|
1202
1596
|
__decorate([
|
|
1203
1597
|
Input(),
|
|
1204
1598
|
__metadata("design:type", String),
|
|
1205
1599
|
__metadata("design:paramtypes", [String])
|
|
1206
1600
|
], IconComponent.prototype, "icon", null);
|
|
1207
|
-
IconComponent = __decorate([
|
|
1601
|
+
IconComponent = IconComponent_1 = __decorate([
|
|
1208
1602
|
Component({
|
|
1209
1603
|
selector: 'aup-icon',
|
|
1210
|
-
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"
|
|
1604
|
+
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"iconPrefix.SVG\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"iconPrefix.MATERIAL\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"iconPrefix.FONT_AWESOME\"\n class=\"faIconWrapper\">\n <fa-icon [icon]=\"suffix\">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n",
|
|
1211
1605
|
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}"]
|
|
1212
1606
|
})
|
|
1213
1607
|
], IconComponent);
|
|
1214
1608
|
return IconComponent;
|
|
1215
1609
|
}());
|
|
1610
|
+
(function (IconComponent) {
|
|
1611
|
+
IconComponent.IconPrefix = Enum({
|
|
1612
|
+
SVG: 'svg',
|
|
1613
|
+
FONT_AWESOME: 'fa',
|
|
1614
|
+
MATERIAL: 'mat'
|
|
1615
|
+
});
|
|
1616
|
+
})(IconComponent || (IconComponent = {}));
|
|
1216
1617
|
|
|
1217
1618
|
var NoopComponent = /** @class */ (function () {
|
|
1218
1619
|
function NoopComponent() {
|
|
@@ -2493,94 +2894,6 @@ var TableHeaderCellRendererComponent = /** @class */ (function () {
|
|
|
2493
2894
|
return TableHeaderCellRendererComponent;
|
|
2494
2895
|
}());
|
|
2495
2896
|
|
|
2496
|
-
var CommandFace;
|
|
2497
|
-
(function (CommandFace) {
|
|
2498
|
-
var Position;
|
|
2499
|
-
(function (Position) {
|
|
2500
|
-
Position["START"] = "start";
|
|
2501
|
-
Position["END"] = "end";
|
|
2502
|
-
})(Position = CommandFace.Position || (CommandFace.Position = {}));
|
|
2503
|
-
var Adapter = /** @class */ (function () {
|
|
2504
|
-
function Adapter(face) {
|
|
2505
|
-
this.face = face;
|
|
2506
|
-
}
|
|
2507
|
-
Object.defineProperty(Adapter.prototype, "text", {
|
|
2508
|
-
get: function () {
|
|
2509
|
-
return ___default.isFunction(this.face.text) ? this.face.text() : undefined;
|
|
2510
|
-
},
|
|
2511
|
-
enumerable: true,
|
|
2512
|
-
configurable: true
|
|
2513
|
-
});
|
|
2514
|
-
Object.defineProperty(Adapter.prototype, "icon", {
|
|
2515
|
-
get: function () {
|
|
2516
|
-
return ___default.isFunction(this.face.icon) ? this.face.icon() : undefined;
|
|
2517
|
-
},
|
|
2518
|
-
enumerable: true,
|
|
2519
|
-
configurable: true
|
|
2520
|
-
});
|
|
2521
|
-
Object.defineProperty(Adapter.prototype, "iconPosition", {
|
|
2522
|
-
get: function () {
|
|
2523
|
-
return ___default.isFunction(this.face.iconPosition) ? this.face.iconPosition() : CommandFace.Position.START;
|
|
2524
|
-
},
|
|
2525
|
-
enumerable: true,
|
|
2526
|
-
configurable: true
|
|
2527
|
-
});
|
|
2528
|
-
Object.defineProperty(Adapter.prototype, "tooltip", {
|
|
2529
|
-
get: function () {
|
|
2530
|
-
return ___default.isFunction(this.face.tooltip) ? this.face.tooltip() : undefined;
|
|
2531
|
-
},
|
|
2532
|
-
enumerable: true,
|
|
2533
|
-
configurable: true
|
|
2534
|
-
});
|
|
2535
|
-
Object.defineProperty(Adapter.prototype, "iconPositionStart", {
|
|
2536
|
-
get: function () {
|
|
2537
|
-
return this.iconPosition === CommandFace.Position.START;
|
|
2538
|
-
},
|
|
2539
|
-
enumerable: true,
|
|
2540
|
-
configurable: true
|
|
2541
|
-
});
|
|
2542
|
-
Object.defineProperty(Adapter.prototype, "iconPositionEnd", {
|
|
2543
|
-
get: function () {
|
|
2544
|
-
return this.iconPosition === CommandFace.Position.END;
|
|
2545
|
-
},
|
|
2546
|
-
enumerable: true,
|
|
2547
|
-
configurable: true
|
|
2548
|
-
});
|
|
2549
|
-
__decorate([
|
|
2550
|
-
Memoize(),
|
|
2551
|
-
__metadata("design:type", Object),
|
|
2552
|
-
__metadata("design:paramtypes", [])
|
|
2553
|
-
], Adapter.prototype, "text", null);
|
|
2554
|
-
__decorate([
|
|
2555
|
-
Memoize(),
|
|
2556
|
-
__metadata("design:type", Object),
|
|
2557
|
-
__metadata("design:paramtypes", [])
|
|
2558
|
-
], Adapter.prototype, "icon", null);
|
|
2559
|
-
__decorate([
|
|
2560
|
-
Memoize(),
|
|
2561
|
-
__metadata("design:type", Object),
|
|
2562
|
-
__metadata("design:paramtypes", [])
|
|
2563
|
-
], Adapter.prototype, "iconPosition", null);
|
|
2564
|
-
__decorate([
|
|
2565
|
-
Memoize(),
|
|
2566
|
-
__metadata("design:type", Object),
|
|
2567
|
-
__metadata("design:paramtypes", [])
|
|
2568
|
-
], Adapter.prototype, "tooltip", null);
|
|
2569
|
-
__decorate([
|
|
2570
|
-
Memoize(),
|
|
2571
|
-
__metadata("design:type", Boolean),
|
|
2572
|
-
__metadata("design:paramtypes", [])
|
|
2573
|
-
], Adapter.prototype, "iconPositionStart", null);
|
|
2574
|
-
__decorate([
|
|
2575
|
-
Memoize(),
|
|
2576
|
-
__metadata("design:type", Boolean),
|
|
2577
|
-
__metadata("design:paramtypes", [])
|
|
2578
|
-
], Adapter.prototype, "iconPositionEnd", null);
|
|
2579
|
-
return Adapter;
|
|
2580
|
-
}());
|
|
2581
|
-
CommandFace.Adapter = Adapter;
|
|
2582
|
-
})(CommandFace || (CommandFace = {}));
|
|
2583
|
-
|
|
2584
2897
|
var MenuItemData = /** @class */ (function (_super) {
|
|
2585
2898
|
__extends(MenuItemData, _super);
|
|
2586
2899
|
function MenuItemData(factory, face) {
|
|
@@ -2766,7 +3079,12 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
2766
3079
|
TableHeaderCellRendererComponent,
|
|
2767
3080
|
IconComponent,
|
|
2768
3081
|
SectionHeaderComponent,
|
|
2769
|
-
TableRowMenuComponent
|
|
3082
|
+
TableRowMenuComponent,
|
|
3083
|
+
CommandBarComponent,
|
|
3084
|
+
CommandComponent,
|
|
3085
|
+
CommandMenuComponent,
|
|
3086
|
+
CommandFaceComponent,
|
|
3087
|
+
CommandContainer
|
|
2770
3088
|
],
|
|
2771
3089
|
imports: [
|
|
2772
3090
|
CommonModule,
|
|
@@ -2812,7 +3130,12 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
2812
3130
|
ColumnTemplateDirective,
|
|
2813
3131
|
IconComponent,
|
|
2814
3132
|
SectionHeaderComponent,
|
|
2815
|
-
TableRowMenuComponent
|
|
3133
|
+
TableRowMenuComponent,
|
|
3134
|
+
CommandBarComponent,
|
|
3135
|
+
CommandComponent,
|
|
3136
|
+
CommandMenuComponent,
|
|
3137
|
+
CommandFaceComponent,
|
|
3138
|
+
CommandContainer
|
|
2816
3139
|
],
|
|
2817
3140
|
providers: [
|
|
2818
3141
|
FocusBindingFactory
|
|
@@ -7100,5 +7423,5 @@ function VisitParameterList(options) {
|
|
|
7100
7423
|
* Generated bundle index. Do not edit.
|
|
7101
7424
|
*/
|
|
7102
7425
|
|
|
7103
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandDirective, CommandFace, 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, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0, DirectivesModule as ɵa, CommandDirective as ɵb, CardContainerComponent as ɵba, TableComponent as ɵbb, EditRowControls as ɵbc, ColumnTemplateDirective as ɵbd, DefaultCellRendererComponent as ɵbe, TableCellRendererComponent as ɵbf, SelectCellRendererComponent as ɵbg, SelectHeaderCellRendererComponent as ɵbh, DefaultHeaderCellRendererComponent as ɵbi, TableHeaderCellRendererComponent as ɵbj, IconComponent as ɵbk, SectionHeaderComponent as ɵbl, TableRowMenuComponent as ɵbm,
|
|
7426
|
+
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandBarComponent, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, CommandMenuComponent, 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, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0, DirectivesModule as ɵa, CommandDirective as ɵb, CardContainerComponent as ɵba, TableComponent as ɵbb, EditRowControls as ɵbc, ColumnTemplateDirective as ɵbd, DefaultCellRendererComponent as ɵbe, TableCellRendererComponent as ɵbf, SelectCellRendererComponent as ɵbg, SelectHeaderCellRendererComponent as ɵbh, DefaultHeaderCellRendererComponent as ɵbi, TableHeaderCellRendererComponent as ɵbj, IconComponent as ɵbk, SectionHeaderComponent as ɵbl, TableRowMenuComponent as ɵbm, CommandBarComponent as ɵbn, CommandContainer as ɵbo, CommandComponent as ɵbp, CommandMenuComponent as ɵbq, CommandFaceComponent as ɵbr, PlaceModule as ɵbs, ComponentsModule as ɵbt, EmptyStateComponent as ɵbu, BusyOverlayComponent as ɵbv, PlaceOutletComponent as ɵbw, leftRightPlaceAnimation as ɵbx, LEFT_RIGHT_PLACE_ANIMATION as ɵby, AUP_PLACE_CONFIG as ɵbz, FocusBindingDirective as ɵc, PlaceRouter as ɵcb, InteractionService as ɵcc, ModalInteractionContextFactory as ɵcd, UrlService as ɵce, PlaceHistory as ɵcf, TabbedPlaceNavigationComponent as ɵcg, AbstractPlaceNavigationComponent as ɵch, ListPlaceNavComponent as ɵci, SidePlaceNavigationComponent as ɵcj, InteractionModule as ɵck, ActivityContainerComponent as ɵcl, AbstractInteractionContext as ɵcm, ActivityOutletComponent as ɵcn, ConfirmationDialogComponent as ɵco, ACTIVITY_DATA as ɵcp, Activity as ɵcq, ConfirmThenDialogComponent as ɵcs, AlertDialogComponent as ɵct, InPlaceInteractionContextComponent as ɵcv, AddItemInteractionContextComponent as ɵcw, ActivityActionsComponent as ɵcx, PopupInteractionContextComponent as ɵcy, StringInputActivity as ɵcz, DisposableComponent as ɵd, AbstractInputActivity as ɵda, SelectInputActivity as ɵdb, InteractionContextTriggerFor as ɵdc, 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, MultipleSelectInputComponent as ɵo, AutocompleteInputComponent as ɵp, CheckboxInputComponent as ɵq, ScrollContainerComponent as ɵr, NoopComponent as ɵs, SwitchCaseOption as ɵt, SwitchCaseWhenDirective as ɵu, SwitchCaseDefaultDirective as ɵv, SwitchCaseComponent as ɵw, FocusContainerComponent as ɵx, VerticalFocusContainerComponent as ɵy, FocusableComponent as ɵz };
|
|
7104
7427
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|