@coolon/angular-ui-powerups 2.0.0-alpha.26 → 2.0.0-alpha.28
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 +9 -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 +574 -149
- 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 +42 -34
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +40 -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 +51 -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 +20 -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-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.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/commands/popup-menu/abstract-popup-menu.component.js +50 -0
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.js +35 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js +46 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +62 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/components.module.js +23 -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/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 +8 -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 +40 -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 +31 -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 +30 -0
- package/esm5/lib/components/commands/command-container.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.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/commands/popup-menu/abstract-popup-menu.component.js +57 -0
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/more-menu.component.js +30 -0
- package/esm5/lib/components/commands/popup-menu/more-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.js +42 -0
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +66 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/components.module.js +23 -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/icon/icon.component.js +15 -3
- package/esm5/lib/components/icon/icon.component.js.map +1 -1
- package/esm5/lib/components/index.js +8 -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 +459 -75
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +510 -99
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/command-bar.component.d.ts +10 -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.component.d.ts +15 -0
- package/lib/components/commands/popup-menu/abstract-popup-menu.component.d.ts +15 -0
- package/lib/components/commands/popup-menu/more-menu.component.d.ts +8 -0
- package/lib/components/commands/popup-menu/popup-menu.component.d.ts +14 -0
- package/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.d.ts +21 -0
- package/lib/components/icon/icon.component.d.ts +15 -0
- package/lib/components/index.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param, __awaiter } 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, EventEmitter, Output, ViewChild, Self, 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';
|
|
@@ -13,15 +13,16 @@ import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
|
13
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
14
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
15
15
|
import { MatIconModule } from '@angular/material/icon';
|
|
16
|
-
import { MatMenuTrigger, _MatMenuDirectivesModule, MatMenuModule } from '@angular/material/menu';
|
|
16
|
+
import { MatMenu, MatMenuTrigger, _MatMenuDirectivesModule, MatMenuModule } from '@angular/material/menu';
|
|
17
17
|
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 { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, FocusManager, EventListenerList, Form,
|
|
21
|
+
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, MutableListModel, Disposable, MutableValueModel, StoreInValueModel, ListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, 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';
|
|
@@ -371,11 +372,431 @@ CardContainerComponent = __decorate([
|
|
|
371
372
|
Component({
|
|
372
373
|
selector: 'aup-card-container',
|
|
373
374
|
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",
|
|
374
|
-
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}"]
|
|
375
|
+
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}"]
|
|
375
376
|
}),
|
|
376
377
|
__metadata("design:paramtypes", [])
|
|
377
378
|
], CardContainerComponent);
|
|
378
379
|
|
|
380
|
+
var CommandFace;
|
|
381
|
+
(function (CommandFace) {
|
|
382
|
+
let Position;
|
|
383
|
+
(function (Position) {
|
|
384
|
+
Position["START"] = "start";
|
|
385
|
+
Position["END"] = "end";
|
|
386
|
+
})(Position = CommandFace.Position || (CommandFace.Position = {}));
|
|
387
|
+
class Adapter {
|
|
388
|
+
constructor(face) {
|
|
389
|
+
this.face = face;
|
|
390
|
+
}
|
|
391
|
+
get text() {
|
|
392
|
+
return ___default.isFunction(this.face.text) ? this.face.text() : undefined;
|
|
393
|
+
}
|
|
394
|
+
get icon() {
|
|
395
|
+
return ___default.isFunction(this.face.icon) ? this.face.icon() : undefined;
|
|
396
|
+
}
|
|
397
|
+
get iconPosition() {
|
|
398
|
+
return ___default.isFunction(this.face.iconPosition) ? this.face.iconPosition() : undefined;
|
|
399
|
+
}
|
|
400
|
+
get tooltip() {
|
|
401
|
+
return ___default.isFunction(this.face.tooltip) ? this.face.tooltip() : undefined;
|
|
402
|
+
}
|
|
403
|
+
get iconPositionStart() {
|
|
404
|
+
return this.iconPosition === CommandFace.Position.START;
|
|
405
|
+
}
|
|
406
|
+
get iconPositionEnd() {
|
|
407
|
+
return this.iconPosition === CommandFace.Position.END;
|
|
408
|
+
}
|
|
409
|
+
get destructive() {
|
|
410
|
+
return ___default.isFunction(this.face.destructive) ? this.face.destructive() : false;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
__decorate([
|
|
414
|
+
Memoize(),
|
|
415
|
+
__metadata("design:type", Object),
|
|
416
|
+
__metadata("design:paramtypes", [])
|
|
417
|
+
], Adapter.prototype, "text", null);
|
|
418
|
+
__decorate([
|
|
419
|
+
Memoize(),
|
|
420
|
+
__metadata("design:type", Object),
|
|
421
|
+
__metadata("design:paramtypes", [])
|
|
422
|
+
], Adapter.prototype, "icon", null);
|
|
423
|
+
__decorate([
|
|
424
|
+
Memoize(),
|
|
425
|
+
__metadata("design:type", Object),
|
|
426
|
+
__metadata("design:paramtypes", [])
|
|
427
|
+
], Adapter.prototype, "iconPosition", null);
|
|
428
|
+
__decorate([
|
|
429
|
+
Memoize(),
|
|
430
|
+
__metadata("design:type", Object),
|
|
431
|
+
__metadata("design:paramtypes", [])
|
|
432
|
+
], Adapter.prototype, "tooltip", null);
|
|
433
|
+
__decorate([
|
|
434
|
+
Memoize(),
|
|
435
|
+
__metadata("design:type", Boolean),
|
|
436
|
+
__metadata("design:paramtypes", [])
|
|
437
|
+
], Adapter.prototype, "iconPositionStart", null);
|
|
438
|
+
__decorate([
|
|
439
|
+
Memoize(),
|
|
440
|
+
__metadata("design:type", Boolean),
|
|
441
|
+
__metadata("design:paramtypes", [])
|
|
442
|
+
], Adapter.prototype, "iconPositionEnd", null);
|
|
443
|
+
__decorate([
|
|
444
|
+
Memoize(),
|
|
445
|
+
__metadata("design:type", Boolean),
|
|
446
|
+
__metadata("design:paramtypes", [])
|
|
447
|
+
], Adapter.prototype, "destructive", null);
|
|
448
|
+
CommandFace.Adapter = Adapter;
|
|
449
|
+
})(CommandFace || (CommandFace = {}));
|
|
450
|
+
|
|
451
|
+
class CommandContainer extends GarbageCollector {
|
|
452
|
+
constructor() {
|
|
453
|
+
super();
|
|
454
|
+
this._commandRegistrations = new MutableListModel();
|
|
455
|
+
}
|
|
456
|
+
get commandRegistrations() {
|
|
457
|
+
return this._commandRegistrations.readonly;
|
|
458
|
+
}
|
|
459
|
+
registerCommand(command, face) {
|
|
460
|
+
const registration = { command, faceAdapter: new CommandFace.Adapter(face) };
|
|
461
|
+
this._commandRegistrations.push(registration);
|
|
462
|
+
return Disposable.disposableThatRuns(() => this._commandRegistrations.remove(registration));
|
|
463
|
+
}
|
|
464
|
+
getDefaultIconPosition() {
|
|
465
|
+
return CommandFace.Position.START;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
var CommandBarComponent_1;
|
|
470
|
+
/**
|
|
471
|
+
*
|
|
472
|
+
*/
|
|
473
|
+
let CommandBarComponent = CommandBarComponent_1 = class CommandBarComponent extends CommandContainer {
|
|
474
|
+
constructor() {
|
|
475
|
+
super();
|
|
476
|
+
}
|
|
477
|
+
ngOnInit() {
|
|
478
|
+
}
|
|
479
|
+
getButtonColor(registration) {
|
|
480
|
+
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
CommandBarComponent = CommandBarComponent_1 = __decorate([
|
|
484
|
+
Component({
|
|
485
|
+
selector: 'aup-command-bar',
|
|
486
|
+
template: `
|
|
487
|
+
<ng-container *ngFor="let registration of commandRegistrations.value">
|
|
488
|
+
<button *ngIf="registration.faceAdapter.icon && !registration.faceAdapter.text"
|
|
489
|
+
mat-icon-button
|
|
490
|
+
[color]="getButtonColor(registration)"
|
|
491
|
+
[pectinCommand]="registration.command"
|
|
492
|
+
[matTooltip]="registration.faceAdapter.tooltip"
|
|
493
|
+
>
|
|
494
|
+
<aup-command-face [face]="registration.faceAdapter.face"></aup-command-face>
|
|
495
|
+
</button>
|
|
496
|
+
<button *ngIf="registration.faceAdapter.text"
|
|
497
|
+
[color]="getButtonColor(registration)"
|
|
498
|
+
mat-button
|
|
499
|
+
[pectinCommand]="registration.command"
|
|
500
|
+
[matTooltip]="registration.tooltip"
|
|
501
|
+
>
|
|
502
|
+
<aup-command-face [face]="registration.faceAdapter.face"></aup-command-face>
|
|
503
|
+
</button>
|
|
504
|
+
</ng-container>
|
|
505
|
+
`,
|
|
506
|
+
providers: [{ provide: CommandContainer, useExisting: forwardRef(() => CommandBarComponent_1) }],
|
|
507
|
+
styles: [`:host {
|
|
508
|
+
display: inline-flex;
|
|
509
|
+
flex-direction: row;
|
|
510
|
+
align-items: center;
|
|
511
|
+
}`]
|
|
512
|
+
}),
|
|
513
|
+
__metadata("design:paramtypes", [])
|
|
514
|
+
], CommandBarComponent);
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
*
|
|
518
|
+
*/
|
|
519
|
+
let CommandFaceComponent = class CommandFaceComponent extends DisposableComponent {
|
|
520
|
+
constructor(commandContainer) {
|
|
521
|
+
super();
|
|
522
|
+
this.commandContainer = commandContainer;
|
|
523
|
+
this.faceModel = new MutableValueModel();
|
|
524
|
+
this.ignoreIcon = false;
|
|
525
|
+
this.ignoreText = false;
|
|
526
|
+
this.includeMissingIconInLayout = false;
|
|
527
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
528
|
+
// overkill /c: when all you have is a hammer...
|
|
529
|
+
const faceAdapter = chain(this.faceModel).map(face => new CommandFace.Adapter(face));
|
|
530
|
+
this.iconModel = faceAdapter.pluck('icon');
|
|
531
|
+
this.textModel = faceAdapter.pluck('text');
|
|
532
|
+
this.positionModel = faceAdapter.pluck('iconPosition');
|
|
533
|
+
this.destructiveModel = faceAdapter.pluck('destructive');
|
|
534
|
+
}
|
|
535
|
+
get requiresMissingIconInLayout() {
|
|
536
|
+
return this.includeMissingIconInLayout && !this.iconModel.value;
|
|
537
|
+
}
|
|
538
|
+
ngOnInit() {
|
|
539
|
+
}
|
|
540
|
+
get iconPosition() {
|
|
541
|
+
var _a, _b, _c;
|
|
542
|
+
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;
|
|
543
|
+
}
|
|
544
|
+
get shouldIncludeIcon() {
|
|
545
|
+
return (!this.ignoreIcon && this.iconModel.value) || this.includeMissingIconInLayout;
|
|
546
|
+
}
|
|
547
|
+
get iconStart() {
|
|
548
|
+
return this.shouldIncludeIcon && this.iconPosition === CommandFace.Position.START;
|
|
549
|
+
}
|
|
550
|
+
get iconEnd() {
|
|
551
|
+
return this.shouldIncludeIcon && this.iconPosition === CommandFace.Position.END;
|
|
552
|
+
}
|
|
553
|
+
get text() {
|
|
554
|
+
return this.ignoreText ? undefined : this.textModel.value;
|
|
555
|
+
}
|
|
556
|
+
get destructive() {
|
|
557
|
+
return this.destructiveModel.value;
|
|
558
|
+
}
|
|
559
|
+
};
|
|
560
|
+
CommandFaceComponent.ctorParameters = () => [
|
|
561
|
+
{ type: CommandContainer, decorators: [{ type: Optional }] }
|
|
562
|
+
];
|
|
563
|
+
__decorate([
|
|
564
|
+
Input('face'), StoreInValueModel('faceModel'),
|
|
565
|
+
__metadata("design:type", Object)
|
|
566
|
+
], CommandFaceComponent.prototype, "_rawFace", void 0);
|
|
567
|
+
__decorate([
|
|
568
|
+
Input(),
|
|
569
|
+
__metadata("design:type", Object)
|
|
570
|
+
], CommandFaceComponent.prototype, "ignoreIcon", void 0);
|
|
571
|
+
__decorate([
|
|
572
|
+
Input(),
|
|
573
|
+
__metadata("design:type", Object)
|
|
574
|
+
], CommandFaceComponent.prototype, "ignoreText", void 0);
|
|
575
|
+
__decorate([
|
|
576
|
+
Input(),
|
|
577
|
+
__metadata("design:type", Object)
|
|
578
|
+
], CommandFaceComponent.prototype, "includeMissingIconInLayout", void 0);
|
|
579
|
+
__decorate([
|
|
580
|
+
HostBinding('class.hide-icon'),
|
|
581
|
+
__metadata("design:type", Object),
|
|
582
|
+
__metadata("design:paramtypes", [])
|
|
583
|
+
], CommandFaceComponent.prototype, "requiresMissingIconInLayout", null);
|
|
584
|
+
__decorate([
|
|
585
|
+
HostBinding('class.destructive'),
|
|
586
|
+
__metadata("design:type", Boolean),
|
|
587
|
+
__metadata("design:paramtypes", [])
|
|
588
|
+
], CommandFaceComponent.prototype, "destructive", null);
|
|
589
|
+
CommandFaceComponent = __decorate([
|
|
590
|
+
Component({
|
|
591
|
+
selector: 'aup-command-face',
|
|
592
|
+
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",
|
|
593
|
+
encapsulation: ViewEncapsulation.None,
|
|
594
|
+
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}"]
|
|
595
|
+
}),
|
|
596
|
+
__param(0, Optional()),
|
|
597
|
+
__metadata("design:paramtypes", [CommandContainer])
|
|
598
|
+
], CommandFaceComponent);
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
*
|
|
602
|
+
*/
|
|
603
|
+
let CommandComponent = class CommandComponent extends DisposableComponent {
|
|
604
|
+
constructor(commandContainer) {
|
|
605
|
+
super();
|
|
606
|
+
this.commandContainer = commandContainer;
|
|
607
|
+
}
|
|
608
|
+
ngOnInit() {
|
|
609
|
+
this.registerDisposable(this.commandContainer.registerCommand(this.command, this.face));
|
|
610
|
+
}
|
|
611
|
+
};
|
|
612
|
+
CommandComponent.ctorParameters = () => [
|
|
613
|
+
{ type: CommandContainer }
|
|
614
|
+
];
|
|
615
|
+
__decorate([
|
|
616
|
+
Input(), TrackExternal(),
|
|
617
|
+
__metadata("design:type", Command)
|
|
618
|
+
], CommandComponent.prototype, "command", void 0);
|
|
619
|
+
__decorate([
|
|
620
|
+
Input(),
|
|
621
|
+
__metadata("design:type", Object)
|
|
622
|
+
], CommandComponent.prototype, "face", void 0);
|
|
623
|
+
CommandComponent = __decorate([
|
|
624
|
+
Component({
|
|
625
|
+
selector: 'aup-command',
|
|
626
|
+
template: ``
|
|
627
|
+
}),
|
|
628
|
+
__metadata("design:paramtypes", [CommandContainer])
|
|
629
|
+
], CommandComponent);
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
*
|
|
633
|
+
*/
|
|
634
|
+
let PopupMenuRendererComponent = class PopupMenuRendererComponent extends DisposableComponent {
|
|
635
|
+
constructor() {
|
|
636
|
+
super();
|
|
637
|
+
this.xPosition = 'after';
|
|
638
|
+
this.yPosition = 'below';
|
|
639
|
+
this.commandExecuted = new EventEmitter();
|
|
640
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
641
|
+
const registrations = chain(this.commandRegistrations);
|
|
642
|
+
const iconCount = registrations.select(r => !!r.faceAdapter.icon).count();
|
|
643
|
+
this.hasMixedIcons = valueOf.all(iconCount.isGreaterThan(0), iconCount.doesNotEqual(registrations.length)).areTruthy();
|
|
644
|
+
}
|
|
645
|
+
ngOnInit() {
|
|
646
|
+
}
|
|
647
|
+
getPopupMenuCommandFor(item) {
|
|
648
|
+
const { when } = Dsl.disposeWith(this);
|
|
649
|
+
when(item.command.busy).becomesFalsey(() => {
|
|
650
|
+
this.commandExecuted.emit();
|
|
651
|
+
});
|
|
652
|
+
return item.command;
|
|
653
|
+
}
|
|
654
|
+
getButtonColor(registration) {
|
|
655
|
+
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
656
|
+
}
|
|
657
|
+
};
|
|
658
|
+
__decorate([
|
|
659
|
+
Input(), TrackExternal(),
|
|
660
|
+
__metadata("design:type", ListModel)
|
|
661
|
+
], PopupMenuRendererComponent.prototype, "commandRegistrations", void 0);
|
|
662
|
+
__decorate([
|
|
663
|
+
Input(),
|
|
664
|
+
__metadata("design:type", String)
|
|
665
|
+
], PopupMenuRendererComponent.prototype, "xPosition", void 0);
|
|
666
|
+
__decorate([
|
|
667
|
+
Input(),
|
|
668
|
+
__metadata("design:type", String)
|
|
669
|
+
], PopupMenuRendererComponent.prototype, "yPosition", void 0);
|
|
670
|
+
__decorate([
|
|
671
|
+
Output(),
|
|
672
|
+
__metadata("design:type", Object)
|
|
673
|
+
], PopupMenuRendererComponent.prototype, "commandExecuted", void 0);
|
|
674
|
+
__decorate([
|
|
675
|
+
ViewChild(MatMenu),
|
|
676
|
+
__metadata("design:type", MatMenu)
|
|
677
|
+
], PopupMenuRendererComponent.prototype, "matMenu", void 0);
|
|
678
|
+
PopupMenuRendererComponent = __decorate([
|
|
679
|
+
Component({
|
|
680
|
+
selector: 'aup-popup-menu-renderer',
|
|
681
|
+
template: "<mat-menu [xPosition]=\"xPosition\" [yPosition]=\"yPosition\" >\n <button *ngFor=\"let registration of commandRegistrations.value\"\n mat-menu-item\n [pectinCommand]=\"getPopupMenuCommandFor(registration)\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\" [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n</mat-menu>\n",
|
|
682
|
+
styles: [":host{display:inline-flex;flex-direction:row;align-items:center}"]
|
|
683
|
+
}),
|
|
684
|
+
__metadata("design:paramtypes", [])
|
|
685
|
+
], PopupMenuRendererComponent);
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
*
|
|
689
|
+
*/
|
|
690
|
+
let AbstractPopupMenuComponent = class AbstractPopupMenuComponent extends CommandContainer {
|
|
691
|
+
constructor() {
|
|
692
|
+
super();
|
|
693
|
+
this.xPosition = 'after';
|
|
694
|
+
this.yPosition = 'below';
|
|
695
|
+
}
|
|
696
|
+
get matMenuComponent() {
|
|
697
|
+
var _a;
|
|
698
|
+
return (_a = this.popupMenu) === null || _a === void 0 ? void 0 : _a.matMenu;
|
|
699
|
+
}
|
|
700
|
+
closeMenu() {
|
|
701
|
+
this.menuTrigger.closeMenu();
|
|
702
|
+
}
|
|
703
|
+
getButtonColor(registration) {
|
|
704
|
+
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
705
|
+
}
|
|
706
|
+
};
|
|
707
|
+
__decorate([
|
|
708
|
+
Input(),
|
|
709
|
+
__metadata("design:type", String)
|
|
710
|
+
], AbstractPopupMenuComponent.prototype, "xPosition", void 0);
|
|
711
|
+
__decorate([
|
|
712
|
+
Input(),
|
|
713
|
+
__metadata("design:type", String)
|
|
714
|
+
], AbstractPopupMenuComponent.prototype, "yPosition", void 0);
|
|
715
|
+
__decorate([
|
|
716
|
+
ViewChild(PopupMenuRendererComponent),
|
|
717
|
+
__metadata("design:type", PopupMenuRendererComponent)
|
|
718
|
+
], AbstractPopupMenuComponent.prototype, "popupMenu", void 0);
|
|
719
|
+
__decorate([
|
|
720
|
+
ViewChild(MatMenuTrigger),
|
|
721
|
+
__metadata("design:type", MatMenuTrigger)
|
|
722
|
+
], AbstractPopupMenuComponent.prototype, "menuTrigger", void 0);
|
|
723
|
+
AbstractPopupMenuComponent = __decorate([
|
|
724
|
+
Component({
|
|
725
|
+
selector: 'aup-abstract-popup-menu',
|
|
726
|
+
template: ''
|
|
727
|
+
}),
|
|
728
|
+
__metadata("design:paramtypes", [])
|
|
729
|
+
], AbstractPopupMenuComponent);
|
|
730
|
+
|
|
731
|
+
var PopupMenuComponent_1;
|
|
732
|
+
/**
|
|
733
|
+
*
|
|
734
|
+
*/
|
|
735
|
+
let PopupMenuComponent = PopupMenuComponent_1 = class PopupMenuComponent extends AbstractPopupMenuComponent {
|
|
736
|
+
constructor() {
|
|
737
|
+
super();
|
|
738
|
+
this.faceModel = new MutableValueModel();
|
|
739
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
740
|
+
const faceAdapterModel = chain(this.faceModel).map(face => new CommandFace.Adapter(face));
|
|
741
|
+
this.faceTooltipModel = faceAdapterModel.pluck('tooltip');
|
|
742
|
+
}
|
|
743
|
+
getTooltip() {
|
|
744
|
+
return this.faceTooltipModel.value;
|
|
745
|
+
}
|
|
746
|
+
ngOnInit() {
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
__decorate([
|
|
750
|
+
Input(), StoreInValueModel('faceModel'),
|
|
751
|
+
__metadata("design:type", Object)
|
|
752
|
+
], PopupMenuComponent.prototype, "face", void 0);
|
|
753
|
+
PopupMenuComponent = PopupMenuComponent_1 = __decorate([
|
|
754
|
+
Component({
|
|
755
|
+
selector: 'aup-popup-menu',
|
|
756
|
+
template: `
|
|
757
|
+
<!-- we can only render the button after th popup menu has initialised and rendered it's menu component -->
|
|
758
|
+
<button *ngIf="matMenuComponent" mat-icon-button [matMenuTriggerFor]="matMenuComponent" [matTooltip]="getTooltip()">
|
|
759
|
+
<aup-command-face [face]="face"></aup-command-face>
|
|
760
|
+
</button>
|
|
761
|
+
<aup-popup-menu-renderer [commandRegistrations]="commandRegistrations" [yPosition]="yPosition"
|
|
762
|
+
[xPosition]="xPosition"
|
|
763
|
+
(commandExecuted)="closeMenu()"></aup-popup-menu-renderer>
|
|
764
|
+
`,
|
|
765
|
+
providers: [{ provide: CommandContainer, useExisting: forwardRef(() => PopupMenuComponent_1) }]
|
|
766
|
+
}),
|
|
767
|
+
__metadata("design:paramtypes", [])
|
|
768
|
+
], PopupMenuComponent);
|
|
769
|
+
|
|
770
|
+
var MoreMenuComponent_1;
|
|
771
|
+
/**
|
|
772
|
+
*
|
|
773
|
+
*/
|
|
774
|
+
let MoreMenuComponent = MoreMenuComponent_1 = class MoreMenuComponent extends AbstractPopupMenuComponent {
|
|
775
|
+
constructor() {
|
|
776
|
+
super();
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
__decorate([
|
|
780
|
+
Input(),
|
|
781
|
+
__metadata("design:type", String)
|
|
782
|
+
], MoreMenuComponent.prototype, "tooltip", void 0);
|
|
783
|
+
MoreMenuComponent = MoreMenuComponent_1 = __decorate([
|
|
784
|
+
Component({
|
|
785
|
+
selector: 'aup-more-menu',
|
|
786
|
+
template: `
|
|
787
|
+
<!-- we can only render the button after th popup menu has initialised and rendered it's menu component -->
|
|
788
|
+
<button *ngIf="matMenuComponent" mat-icon-button [matMenuTriggerFor]="matMenuComponent" [matTooltip]="tooltip">
|
|
789
|
+
<mat-icon>more_vert</mat-icon>
|
|
790
|
+
</button>
|
|
791
|
+
<aup-popup-menu-renderer [commandRegistrations]="commandRegistrations"
|
|
792
|
+
[yPosition]="yPosition" [xPosition]="xPosition"
|
|
793
|
+
(commandExecuted)="closeMenu()"></aup-popup-menu-renderer>
|
|
794
|
+
`,
|
|
795
|
+
providers: [{ provide: CommandContainer, useExisting: forwardRef(() => MoreMenuComponent_1) }]
|
|
796
|
+
}),
|
|
797
|
+
__metadata("design:paramtypes", [])
|
|
798
|
+
], MoreMenuComponent);
|
|
799
|
+
|
|
379
800
|
let FocusContainerComponent = class FocusContainerComponent extends DisposableComponent {
|
|
380
801
|
constructor(focusManager) {
|
|
381
802
|
super();
|
|
@@ -1053,7 +1474,12 @@ TextInputComponent = __decorate([
|
|
|
1053
1474
|
__metadata("design:paramtypes", [])
|
|
1054
1475
|
], TextInputComponent);
|
|
1055
1476
|
|
|
1056
|
-
|
|
1477
|
+
var IconComponent_1;
|
|
1478
|
+
let IconComponent = IconComponent_1 = class IconComponent {
|
|
1479
|
+
constructor() {
|
|
1480
|
+
this.allowedPrefixes = Enum.values(IconComponent_1.IconPrefix).map(p => `${p}:`);
|
|
1481
|
+
this.iconPrefix = IconComponent_1.IconPrefix;
|
|
1482
|
+
}
|
|
1057
1483
|
set icon(iconName) {
|
|
1058
1484
|
this._icon = iconName;
|
|
1059
1485
|
if (!iconName) {
|
|
@@ -1069,7 +1495,7 @@ let IconComponent = class IconComponent {
|
|
|
1069
1495
|
if (this.prefix) {
|
|
1070
1496
|
this.errorMessage = `Unknown icon "${iconName}"`;
|
|
1071
1497
|
}
|
|
1072
|
-
this.errorMessage = `Unknown icon prefix "${this.prefix}"`;
|
|
1498
|
+
this.errorMessage = `Unknown icon prefix, expected one of [${this.allowedPrefixes.join(',')}] got "${this.prefix}:"`;
|
|
1073
1499
|
}
|
|
1074
1500
|
get icon() {
|
|
1075
1501
|
return this._icon;
|
|
@@ -1080,13 +1506,20 @@ __decorate([
|
|
|
1080
1506
|
__metadata("design:type", String),
|
|
1081
1507
|
__metadata("design:paramtypes", [String])
|
|
1082
1508
|
], IconComponent.prototype, "icon", null);
|
|
1083
|
-
IconComponent = __decorate([
|
|
1509
|
+
IconComponent = IconComponent_1 = __decorate([
|
|
1084
1510
|
Component({
|
|
1085
1511
|
selector: 'aup-icon',
|
|
1086
|
-
template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"
|
|
1512
|
+
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",
|
|
1087
1513
|
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}"]
|
|
1088
1514
|
})
|
|
1089
1515
|
], IconComponent);
|
|
1516
|
+
(function (IconComponent) {
|
|
1517
|
+
IconComponent.IconPrefix = Enum({
|
|
1518
|
+
SVG: 'svg',
|
|
1519
|
+
FONT_AWESOME: 'fa',
|
|
1520
|
+
MATERIAL: 'mat'
|
|
1521
|
+
});
|
|
1522
|
+
})(IconComponent || (IconComponent = {}));
|
|
1090
1523
|
|
|
1091
1524
|
let NoopComponent = class NoopComponent {
|
|
1092
1525
|
constructor() {
|
|
@@ -2258,69 +2691,6 @@ TableHeaderCellRendererComponent = __decorate([
|
|
|
2258
2691
|
__metadata("design:paramtypes", [])
|
|
2259
2692
|
], TableHeaderCellRendererComponent);
|
|
2260
2693
|
|
|
2261
|
-
var CommandFace;
|
|
2262
|
-
(function (CommandFace) {
|
|
2263
|
-
let Position;
|
|
2264
|
-
(function (Position) {
|
|
2265
|
-
Position["START"] = "start";
|
|
2266
|
-
Position["END"] = "end";
|
|
2267
|
-
})(Position = CommandFace.Position || (CommandFace.Position = {}));
|
|
2268
|
-
class Adapter {
|
|
2269
|
-
constructor(face) {
|
|
2270
|
-
this.face = face;
|
|
2271
|
-
}
|
|
2272
|
-
get text() {
|
|
2273
|
-
return ___default.isFunction(this.face.text) ? this.face.text() : undefined;
|
|
2274
|
-
}
|
|
2275
|
-
get icon() {
|
|
2276
|
-
return ___default.isFunction(this.face.icon) ? this.face.icon() : undefined;
|
|
2277
|
-
}
|
|
2278
|
-
get iconPosition() {
|
|
2279
|
-
return ___default.isFunction(this.face.iconPosition) ? this.face.iconPosition() : CommandFace.Position.START;
|
|
2280
|
-
}
|
|
2281
|
-
get tooltip() {
|
|
2282
|
-
return ___default.isFunction(this.face.tooltip) ? this.face.tooltip() : undefined;
|
|
2283
|
-
}
|
|
2284
|
-
get iconPositionStart() {
|
|
2285
|
-
return this.iconPosition === CommandFace.Position.START;
|
|
2286
|
-
}
|
|
2287
|
-
get iconPositionEnd() {
|
|
2288
|
-
return this.iconPosition === CommandFace.Position.END;
|
|
2289
|
-
}
|
|
2290
|
-
}
|
|
2291
|
-
__decorate([
|
|
2292
|
-
Memoize(),
|
|
2293
|
-
__metadata("design:type", Object),
|
|
2294
|
-
__metadata("design:paramtypes", [])
|
|
2295
|
-
], Adapter.prototype, "text", null);
|
|
2296
|
-
__decorate([
|
|
2297
|
-
Memoize(),
|
|
2298
|
-
__metadata("design:type", Object),
|
|
2299
|
-
__metadata("design:paramtypes", [])
|
|
2300
|
-
], Adapter.prototype, "icon", null);
|
|
2301
|
-
__decorate([
|
|
2302
|
-
Memoize(),
|
|
2303
|
-
__metadata("design:type", Object),
|
|
2304
|
-
__metadata("design:paramtypes", [])
|
|
2305
|
-
], Adapter.prototype, "iconPosition", null);
|
|
2306
|
-
__decorate([
|
|
2307
|
-
Memoize(),
|
|
2308
|
-
__metadata("design:type", Object),
|
|
2309
|
-
__metadata("design:paramtypes", [])
|
|
2310
|
-
], Adapter.prototype, "tooltip", null);
|
|
2311
|
-
__decorate([
|
|
2312
|
-
Memoize(),
|
|
2313
|
-
__metadata("design:type", Boolean),
|
|
2314
|
-
__metadata("design:paramtypes", [])
|
|
2315
|
-
], Adapter.prototype, "iconPositionStart", null);
|
|
2316
|
-
__decorate([
|
|
2317
|
-
Memoize(),
|
|
2318
|
-
__metadata("design:type", Boolean),
|
|
2319
|
-
__metadata("design:paramtypes", [])
|
|
2320
|
-
], Adapter.prototype, "iconPositionEnd", null);
|
|
2321
|
-
CommandFace.Adapter = Adapter;
|
|
2322
|
-
})(CommandFace || (CommandFace = {}));
|
|
2323
|
-
|
|
2324
2694
|
class MenuItemData extends CommandFace.Adapter {
|
|
2325
2695
|
constructor(factory, face) {
|
|
2326
2696
|
super(face);
|
|
@@ -2520,7 +2890,14 @@ ComponentsModule = __decorate([
|
|
|
2520
2890
|
TableHeaderCellRendererComponent,
|
|
2521
2891
|
IconComponent,
|
|
2522
2892
|
SectionHeaderComponent,
|
|
2523
|
-
TableRowMenuComponent
|
|
2893
|
+
TableRowMenuComponent,
|
|
2894
|
+
CommandBarComponent,
|
|
2895
|
+
CommandComponent,
|
|
2896
|
+
PopupMenuComponent,
|
|
2897
|
+
CommandFaceComponent,
|
|
2898
|
+
AbstractPopupMenuComponent,
|
|
2899
|
+
PopupMenuRendererComponent,
|
|
2900
|
+
MoreMenuComponent
|
|
2524
2901
|
],
|
|
2525
2902
|
imports: [
|
|
2526
2903
|
CommonModule,
|
|
@@ -2566,7 +2943,14 @@ ComponentsModule = __decorate([
|
|
|
2566
2943
|
ColumnTemplateDirective,
|
|
2567
2944
|
IconComponent,
|
|
2568
2945
|
SectionHeaderComponent,
|
|
2569
|
-
TableRowMenuComponent
|
|
2946
|
+
TableRowMenuComponent,
|
|
2947
|
+
CommandBarComponent,
|
|
2948
|
+
CommandComponent,
|
|
2949
|
+
AbstractPopupMenuComponent,
|
|
2950
|
+
PopupMenuComponent,
|
|
2951
|
+
CommandFaceComponent,
|
|
2952
|
+
PopupMenuRendererComponent,
|
|
2953
|
+
MoreMenuComponent
|
|
2570
2954
|
],
|
|
2571
2955
|
providers: [
|
|
2572
2956
|
FocusBindingFactory
|
|
@@ -6400,5 +6784,5 @@ function VisitParameterList(options) {
|
|
|
6400
6784
|
* Generated bundle index. Do not edit.
|
|
6401
6785
|
*/
|
|
6402
6786
|
|
|
6403
|
-
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,
|
|
6787
|
+
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, 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, 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, MoreMenuComponent, 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, PopupMenuComponent, PopupMenuRendererComponent, 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, PopupMenuComponent as ɵbq, AbstractPopupMenuComponent as ɵbr, PopupMenuRendererComponent as ɵbs, CommandFaceComponent as ɵbt, MoreMenuComponent as ɵbu, PlaceModule as ɵbv, ComponentsModule as ɵbw, EmptyStateComponent as ɵbx, BusyOverlayComponent as ɵby, PlaceOutletComponent as ɵbz, FocusBindingDirective as ɵc, leftRightPlaceAnimation as ɵca, LEFT_RIGHT_PLACE_ANIMATION as ɵcb, AUP_PLACE_CONFIG as ɵcc, PlaceRouter as ɵce, InteractionService as ɵcf, ModalInteractionContextFactory as ɵcg, UrlService as ɵch, PlaceHistory as ɵci, TabbedPlaceNavigationComponent as ɵcj, AbstractPlaceNavigationComponent as ɵck, ListPlaceNavComponent as ɵcl, SidePlaceNavigationComponent as ɵcm, InteractionModule as ɵcn, ActivityContainerComponent as ɵco, AbstractInteractionContext as ɵcp, ActivityOutletComponent as ɵcq, ConfirmationDialogComponent as ɵcr, ACTIVITY_DATA as ɵcs, Activity as ɵct, ConfirmThenDialogComponent as ɵcv, AlertDialogComponent as ɵcw, InPlaceInteractionContextComponent as ɵcy, AddItemInteractionContextComponent as ɵcz, DisposableComponent as ɵd, ActivityActionsComponent as ɵda, PopupInteractionContextComponent as ɵdb, StringInputActivity as ɵdc, AbstractInputActivity as ɵdd, SelectInputActivity as ɵde, InteractionContextTriggerFor as ɵdf, 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 };
|
|
6404
6788
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|