@coolon/angular-ui-powerups 2.0.0-alpha.35 → 2.0.0-alpha.36
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 +7 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +774 -286
- 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 +45 -42
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +43 -40
- 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/commands/command/command.component.js +48 -0
- package/esm2015/lib/components/commands/command/command.component.js.map +1 -0
- package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/command/command.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/command-face/command-face.component.js +12 -18
- package/esm2015/lib/components/commands/command-face/command-face.component.js.map +1 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/command-face.js +39 -5
- package/esm2015/lib/components/commands/command-face.js.map +1 -1
- package/esm2015/lib/components/commands/flex.component.js +30 -0
- package/esm2015/lib/components/commands/flex.component.js.map +1 -0
- package/esm2015/lib/components/commands/flex.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/flex.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group/command-group.component.js +47 -0
- package/esm2015/lib/components/commands/group/command-group/command-group.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group/command-group.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +55 -0
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +39 -0
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group.js +112 -0
- package/esm2015/lib/components/commands/group/command-group.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/more-menu.component.js +55 -0
- package/esm2015/lib/components/commands/group/more-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/more-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/more-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/popup-menu.component.js +65 -0
- package/esm2015/lib/components/commands/group/popup-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/popup-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/popup-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/registration.js +58 -0
- package/esm2015/lib/components/commands/group/registration.js.map +1 -0
- package/esm2015/lib/components/commands/group/registration.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js +55 -0
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/commands/group/view-data.js +104 -0
- package/esm2015/lib/components/commands/group/view-data.js.map +1 -0
- package/esm2015/lib/components/commands/group/view-data.metadata.json +1 -0
- package/esm2015/lib/components/commands/separator.component.js +35 -0
- package/esm2015/lib/components/commands/separator.component.js.map +1 -0
- package/esm2015/lib/components/commands/separator.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/separator.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/components.module.js +25 -29
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/index.js +13 -7
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/components/table/table-model.js +4 -2
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js +12 -21
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js.map +1 -1
- package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/track-by.js +5 -0
- package/esm2015/lib/components/track-by.js.map +1 -0
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js +1 -1
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm5/coolon-angular-ui-powerups.js +43 -40
- 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/commands/command/command.component.js +51 -0
- package/esm5/lib/components/commands/command/command.component.js.map +1 -0
- package/esm5/lib/components/commands/command/command.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/command-face/command-face.component.js +12 -18
- package/esm5/lib/components/commands/command-face/command-face.component.js.map +1 -1
- package/esm5/lib/components/commands/command-face.js +43 -5
- package/esm5/lib/components/commands/command-face.js.map +1 -1
- package/esm5/lib/components/commands/flex.component.js +33 -0
- package/esm5/lib/components/commands/flex.component.js.map +1 -0
- package/esm5/lib/components/commands/flex.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group/command-group.component.js +51 -0
- package/esm5/lib/components/commands/group/command-group/command-group.component.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +59 -0
- package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +42 -0
- package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/commands/group/command-group.js +134 -0
- package/esm5/lib/components/commands/group/command-group.js.map +1 -0
- package/esm5/lib/components/commands/group/more-menu.component.js +58 -0
- package/esm5/lib/components/commands/group/more-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/group/more-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/group/popup-menu.component.js +68 -0
- package/esm5/lib/components/commands/group/popup-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/group/popup-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/group/registration.js +80 -0
- package/esm5/lib/components/commands/group/registration.js.map +1 -0
- package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.js +58 -0
- package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.js.map +1 -0
- package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/commands/group/view-data.js +131 -0
- package/esm5/lib/components/commands/group/view-data.js.map +1 -0
- package/esm5/lib/components/commands/separator.component.js +37 -0
- package/esm5/lib/components/commands/separator.component.js.map +1 -0
- package/esm5/lib/components/commands/separator.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/components.module.js +25 -29
- package/esm5/lib/components/components.module.js.map +1 -1
- package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm5/lib/components/index.js +13 -7
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/components/table/table-model.js +4 -2
- package/esm5/lib/components/table/table-model.js.map +1 -1
- package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js +5 -8
- package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js.map +1 -1
- package/esm5/lib/components/track-by.js +5 -0
- package/esm5/lib/components/track-by.js.map +1 -0
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/components/side-place-navigation/side-place-navigation.component.js +1 -1
- package/esm5/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
- package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +627 -255
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +713 -229
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/command/command.component.d.ts +18 -0
- package/lib/components/commands/command-face/command-face.component.d.ts +3 -5
- package/lib/components/commands/command-face.d.ts +17 -2
- package/lib/components/commands/flex.component.d.ts +11 -0
- package/lib/components/commands/group/command-group/command-group.component.d.ts +11 -0
- package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +21 -0
- package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +13 -0
- package/lib/components/commands/group/command-group.d.ts +44 -0
- package/lib/components/commands/group/more-menu.component.d.ts +14 -0
- package/lib/components/commands/group/popup-menu.component.d.ts +17 -0
- package/lib/components/commands/group/registration.d.ts +32 -0
- package/lib/components/commands/group/tool-bar/tool-bar.component.d.ts +13 -0
- package/lib/components/commands/group/view-data.d.ts +40 -0
- package/lib/components/commands/separator.component.d.ts +12 -0
- package/lib/components/index.d.ts +13 -7
- package/lib/components/table/table-model.d.ts +1 -1
- package/lib/components/table/table-row-menu/table-row-menu.component.d.ts +2 -1
- package/lib/components/track-by.d.ts +3 -0
- package/lib/place/components/side-place-navigation/side-place-navigation.component.d.ts +1 -1
- package/package.json +1 -1
- package/esm2015/lib/components/commands/command-bar.component.js +0 -51
- package/esm2015/lib/components/commands/command-bar.component.js.map +0 -1
- package/esm2015/lib/components/commands/command-bar.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/command-bar.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/command-container.js +0 -20
- package/esm2015/lib/components/commands/command-container.js.map +0 -1
- package/esm2015/lib/components/commands/command-container.metadata.json +0 -1
- package/esm2015/lib/components/commands/command.component.js +0 -38
- package/esm2015/lib/components/commands/command.component.js.map +0 -1
- package/esm2015/lib/components/commands/command.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/command.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js +0 -57
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.js +0 -40
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js +0 -49
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +0 -62
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +0 -1
- package/esm5/lib/components/commands/command-bar.component.js +0 -31
- package/esm5/lib/components/commands/command-bar.component.js.map +0 -1
- package/esm5/lib/components/commands/command-bar.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/command-container.js +0 -30
- package/esm5/lib/components/commands/command-container.js.map +0 -1
- package/esm5/lib/components/commands/command.component.js +0 -41
- package/esm5/lib/components/commands/command.component.js.map +0 -1
- package/esm5/lib/components/commands/command.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js +0 -64
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu/more-menu.component.js +0 -35
- package/esm5/lib/components/commands/popup-menu/more-menu.component.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.js +0 -45
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +0 -66
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +0 -1
- package/lib/components/commands/command-bar.component.d.ts +0 -10
- package/lib/components/commands/command-container.d.ts +0 -15
- package/lib/components/commands/command.component.d.ts +0 -15
- package/lib/components/commands/popup-menu/abstract-popup-menu.component.d.ts +0 -18
- package/lib/components/commands/popup-menu/more-menu.component.d.ts +0 -9
- package/lib/components/commands/popup-menu/popup-menu.component.d.ts +0 -14
- package/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.d.ts +0 -21
|
@@ -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, EventEmitter, Optional, SkipSelf, ViewChild, Output, ViewChildren, QueryList, HostBinding, ViewEncapsulation, Self, ChangeDetectorRef, ContentChildren, ViewContainerRef, InjectionToken, Injector, ComponentFactoryResolver } 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';
|
|
@@ -12,13 +12,14 @@ import { CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
|
12
12
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
13
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
14
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
15
|
+
import { MatDividerModule } from '@angular/material/divider';
|
|
15
16
|
import { MatIconModule } from '@angular/material/icon';
|
|
16
|
-
import { MatMenu, MatMenuTrigger,
|
|
17
|
+
import { MatMenu, MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
|
|
17
18
|
import { MatTableModule } from '@angular/material/table';
|
|
18
19
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
19
20
|
import { FaIconLibrary, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
20
21
|
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
21
|
-
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command,
|
|
22
|
+
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, MutableValueModel, StoreInValueModel, ValueModel, MutableListModel, Trace, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, StoreInListModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Functions } from '@coolon/pectin';
|
|
22
23
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
23
24
|
import ___default, { isEqual, isNil } from 'lodash';
|
|
24
25
|
import { Enum } from 'typescript-string-enums';
|
|
@@ -377,6 +378,11 @@ CardContainerComponent = __decorate([
|
|
|
377
378
|
__metadata("design:paramtypes", [])
|
|
378
379
|
], CardContainerComponent);
|
|
379
380
|
|
|
381
|
+
var TrackBy;
|
|
382
|
+
(function (TrackBy) {
|
|
383
|
+
TrackBy.byIndex = (data, index) => index;
|
|
384
|
+
})(TrackBy || (TrackBy = {}));
|
|
385
|
+
|
|
380
386
|
var CommandFace;
|
|
381
387
|
(function (CommandFace) {
|
|
382
388
|
let Position;
|
|
@@ -384,6 +390,31 @@ var CommandFace;
|
|
|
384
390
|
Position["START"] = "start";
|
|
385
391
|
Position["END"] = "end";
|
|
386
392
|
})(Position = CommandFace.Position || (CommandFace.Position = {}));
|
|
393
|
+
CommandFace.Style = Enum({
|
|
394
|
+
FLAT: 'flat',
|
|
395
|
+
STROKED: 'stroked',
|
|
396
|
+
RAISED: 'raised'
|
|
397
|
+
});
|
|
398
|
+
function getColorOf(face) {
|
|
399
|
+
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.color) ? face.color() : undefined;
|
|
400
|
+
}
|
|
401
|
+
CommandFace.getColorOf = getColorOf;
|
|
402
|
+
function getStyleOf(face) {
|
|
403
|
+
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.style) ? face.style() : undefined;
|
|
404
|
+
}
|
|
405
|
+
CommandFace.getStyleOf = getStyleOf;
|
|
406
|
+
function getIconOf(face) {
|
|
407
|
+
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.icon) ? face.icon() : undefined;
|
|
408
|
+
}
|
|
409
|
+
CommandFace.getIconOf = getIconOf;
|
|
410
|
+
function getTooltipOf(face) {
|
|
411
|
+
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.tooltip) ? face.tooltip() : undefined;
|
|
412
|
+
}
|
|
413
|
+
CommandFace.getTooltipOf = getTooltipOf;
|
|
414
|
+
function getTextOf(face) {
|
|
415
|
+
return ___default.isFunction(face === null || face === void 0 ? void 0 : face.text) ? face.text() : undefined;
|
|
416
|
+
}
|
|
417
|
+
CommandFace.getTextOf = getTextOf;
|
|
387
418
|
class Adapter {
|
|
388
419
|
constructor(face) {
|
|
389
420
|
this.face = face;
|
|
@@ -392,7 +423,7 @@ var CommandFace;
|
|
|
392
423
|
return ___default.isFunction(this.face.text) ? this.face.text() : undefined;
|
|
393
424
|
}
|
|
394
425
|
get icon() {
|
|
395
|
-
return
|
|
426
|
+
return CommandFace.getIconOf(this.face);
|
|
396
427
|
}
|
|
397
428
|
get iconPosition() {
|
|
398
429
|
return ___default.isFunction(this.face.iconPosition) ? this.face.iconPosition() : undefined;
|
|
@@ -406,8 +437,11 @@ var CommandFace;
|
|
|
406
437
|
get iconPositionEnd() {
|
|
407
438
|
return this.iconPosition === CommandFace.Position.END;
|
|
408
439
|
}
|
|
409
|
-
get
|
|
410
|
-
return
|
|
440
|
+
get color() {
|
|
441
|
+
return CommandFace.getColorOf(this.face);
|
|
442
|
+
}
|
|
443
|
+
get style() {
|
|
444
|
+
return CommandFace.getStyleOf(this.face);
|
|
411
445
|
}
|
|
412
446
|
}
|
|
413
447
|
__decorate([
|
|
@@ -442,76 +476,399 @@ var CommandFace;
|
|
|
442
476
|
], Adapter.prototype, "iconPositionEnd", null);
|
|
443
477
|
__decorate([
|
|
444
478
|
Memoize(),
|
|
445
|
-
__metadata("design:type",
|
|
479
|
+
__metadata("design:type", String),
|
|
446
480
|
__metadata("design:paramtypes", [])
|
|
447
|
-
], Adapter.prototype, "
|
|
481
|
+
], Adapter.prototype, "color", null);
|
|
482
|
+
__decorate([
|
|
483
|
+
Memoize(),
|
|
484
|
+
__metadata("design:type", String),
|
|
485
|
+
__metadata("design:paramtypes", [])
|
|
486
|
+
], Adapter.prototype, "style", null);
|
|
448
487
|
CommandFace.Adapter = Adapter;
|
|
449
488
|
})(CommandFace || (CommandFace = {}));
|
|
450
489
|
|
|
451
|
-
class
|
|
490
|
+
class ViewData {
|
|
491
|
+
}
|
|
492
|
+
(function (ViewData) {
|
|
493
|
+
class FaceData extends ViewData {
|
|
494
|
+
constructor(face) {
|
|
495
|
+
super();
|
|
496
|
+
this.faceAdapter = new CommandFace.Adapter(face);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
ViewData.FaceData = FaceData;
|
|
500
|
+
class GroupData extends FaceData {
|
|
501
|
+
constructor(face, xPosition, yPosition, children) {
|
|
502
|
+
super(face);
|
|
503
|
+
this.xPosition = xPosition;
|
|
504
|
+
this.yPosition = yPosition;
|
|
505
|
+
this.children = children;
|
|
506
|
+
}
|
|
507
|
+
get hasMixedIcons() {
|
|
508
|
+
const hasFaces = this.children.filter(c => ViewData.hasFace(c));
|
|
509
|
+
const iconCount = hasFaces.filter(c => !!c.faceAdapter.icon).length;
|
|
510
|
+
return iconCount > 0 && hasFaces.length !== iconCount;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
__decorate([
|
|
514
|
+
Memoize(),
|
|
515
|
+
__metadata("design:type", Boolean),
|
|
516
|
+
__metadata("design:paramtypes", [])
|
|
517
|
+
], GroupData.prototype, "hasMixedIcons", null);
|
|
518
|
+
ViewData.GroupData = GroupData;
|
|
519
|
+
class CommandData extends FaceData {
|
|
520
|
+
constructor(face, command) {
|
|
521
|
+
super(face);
|
|
522
|
+
this.command = command;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
ViewData.CommandData = CommandData;
|
|
526
|
+
class SeparatorData extends ViewData {
|
|
527
|
+
}
|
|
528
|
+
ViewData.SeparatorData = SeparatorData;
|
|
529
|
+
class FlexData extends ViewData {
|
|
530
|
+
}
|
|
531
|
+
ViewData.FlexData = FlexData;
|
|
532
|
+
function as(type, viewData) {
|
|
533
|
+
return viewData instanceof type ? viewData : lang.illegalState(`expected instance of ${type.name}, got ${viewData.constructor.name}`);
|
|
534
|
+
}
|
|
535
|
+
ViewData.as = as;
|
|
536
|
+
function getCommand(data) {
|
|
537
|
+
return as(CommandData, data).command;
|
|
538
|
+
}
|
|
539
|
+
ViewData.getCommand = getCommand;
|
|
540
|
+
function getTooltip(data) {
|
|
541
|
+
return as(FaceData, data).faceAdapter.tooltip;
|
|
542
|
+
}
|
|
543
|
+
ViewData.getTooltip = getTooltip;
|
|
544
|
+
function getStyle(data) {
|
|
545
|
+
return as(FaceData, data).faceAdapter.style;
|
|
546
|
+
}
|
|
547
|
+
ViewData.getStyle = getStyle;
|
|
548
|
+
function getColor(data) {
|
|
549
|
+
return as(FaceData, data).faceAdapter.color;
|
|
550
|
+
}
|
|
551
|
+
ViewData.getColor = getColor;
|
|
552
|
+
function hasText(data) {
|
|
553
|
+
return !!as(FaceData, data).faceAdapter.text;
|
|
554
|
+
}
|
|
555
|
+
ViewData.hasText = hasText;
|
|
556
|
+
function getFace(data) {
|
|
557
|
+
return as(FaceData, data).faceAdapter.face;
|
|
558
|
+
}
|
|
559
|
+
ViewData.getFace = getFace;
|
|
560
|
+
function asGroup(viewData) {
|
|
561
|
+
return as(GroupData, viewData);
|
|
562
|
+
}
|
|
563
|
+
ViewData.asGroup = asGroup;
|
|
564
|
+
function hasMixedIcons(data) {
|
|
565
|
+
return as(GroupData, data).hasMixedIcons;
|
|
566
|
+
}
|
|
567
|
+
ViewData.hasMixedIcons = hasMixedIcons;
|
|
568
|
+
function isGroup(data) {
|
|
569
|
+
return data instanceof GroupData;
|
|
570
|
+
}
|
|
571
|
+
ViewData.isGroup = isGroup;
|
|
572
|
+
function hasFace(data) {
|
|
573
|
+
return data instanceof FaceData;
|
|
574
|
+
}
|
|
575
|
+
ViewData.hasFace = hasFace;
|
|
576
|
+
function isCommand(data) {
|
|
577
|
+
return data instanceof CommandData;
|
|
578
|
+
}
|
|
579
|
+
ViewData.isCommand = isCommand;
|
|
580
|
+
function isSeparator(data) {
|
|
581
|
+
return data instanceof SeparatorData;
|
|
582
|
+
}
|
|
583
|
+
ViewData.isSeparator = isSeparator;
|
|
584
|
+
function isFlex(data) {
|
|
585
|
+
return data instanceof FlexData;
|
|
586
|
+
}
|
|
587
|
+
ViewData.isFlex = isFlex;
|
|
588
|
+
})(ViewData || (ViewData = {}));
|
|
589
|
+
|
|
590
|
+
let CommandGroupMenuRendererComponent = class CommandGroupMenuRendererComponent extends DisposableComponent {
|
|
591
|
+
constructor(parent) {
|
|
592
|
+
super();
|
|
593
|
+
this.parent = parent;
|
|
594
|
+
this.groupViewDataModel = new MutableValueModel();
|
|
595
|
+
this.commandFired = new EventEmitter();
|
|
596
|
+
this.ViewData = ViewData;
|
|
597
|
+
this.TrackBy = TrackBy;
|
|
598
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
599
|
+
this.children = chain(this.groupViewDataModel).pluckList('children');
|
|
600
|
+
this.hasMixedIcons = chain(this.groupViewDataModel).pluck('hasMixedIcons');
|
|
601
|
+
}
|
|
602
|
+
getCommand(data) {
|
|
603
|
+
const command = ViewData.getCommand(data);
|
|
604
|
+
const { when } = Dsl.disposeWith(this);
|
|
605
|
+
when(command.busy).becomesFalsey(() => this.commandFired.emit());
|
|
606
|
+
return command;
|
|
607
|
+
}
|
|
608
|
+
};
|
|
609
|
+
CommandGroupMenuRendererComponent.ctorParameters = () => [
|
|
610
|
+
{ type: CommandGroupMenuRendererComponent, decorators: [{ type: Optional }, { type: SkipSelf }] }
|
|
611
|
+
];
|
|
612
|
+
__decorate([
|
|
613
|
+
ViewChild('menu', { static: true }),
|
|
614
|
+
__metadata("design:type", MatMenu)
|
|
615
|
+
], CommandGroupMenuRendererComponent.prototype, "menuComponent", void 0);
|
|
616
|
+
__decorate([
|
|
617
|
+
Input(), StoreInValueModel('groupViewDataModel'),
|
|
618
|
+
__metadata("design:type", ViewData.GroupData)
|
|
619
|
+
], CommandGroupMenuRendererComponent.prototype, "groupViewData", void 0);
|
|
620
|
+
__decorate([
|
|
621
|
+
Output(),
|
|
622
|
+
__metadata("design:type", Object)
|
|
623
|
+
], CommandGroupMenuRendererComponent.prototype, "commandFired", void 0);
|
|
624
|
+
__decorate([
|
|
625
|
+
ViewChildren(MatMenuTrigger),
|
|
626
|
+
__metadata("design:type", QueryList)
|
|
627
|
+
], CommandGroupMenuRendererComponent.prototype, "triggers", void 0);
|
|
628
|
+
CommandGroupMenuRendererComponent = __decorate([
|
|
629
|
+
Component({
|
|
630
|
+
selector: 'aup-command-group-menu',
|
|
631
|
+
template: "<mat-menu #menu [xPosition]=\"groupViewData.xPosition\" [yPosition]=\"groupViewData.yPosition\">\n <ng-container *ngFor=\"let data of children.value; trackBy: TrackBy.byIndex\" >\n <button *ngIf=\"ViewData.isCommand(data)\"\n [pectinCommand]=\"getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n mat-menu-item>\n <aup-command-face [face]=\"ViewData.getFace(data)\"\n [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n\n <ng-container *ngIf=\"ViewData.isGroup(data)\">\n <button mat-menu-item\n #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"innerPanel.menuComponent\"\n >\n <aup-command-face [face]=\"ViewData.getFace(data)\"\n [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n <aup-command-group-menu #innerPanel\n [groupViewData]=\"ViewData.asGroup(data)\"\n (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n <mat-divider *ngIf=\"ViewData.isSeparator(data)\"></mat-divider>\n\n </ng-container>\n</mat-menu>\n"
|
|
632
|
+
}),
|
|
633
|
+
__param(0, Optional()), __param(0, SkipSelf()),
|
|
634
|
+
__metadata("design:paramtypes", [CommandGroupMenuRendererComponent])
|
|
635
|
+
], CommandGroupMenuRendererComponent);
|
|
636
|
+
|
|
637
|
+
let CommandGroupRendererComponent = class CommandGroupRendererComponent extends DisposableComponent {
|
|
452
638
|
constructor() {
|
|
453
639
|
super();
|
|
454
|
-
this.
|
|
640
|
+
this.renderRootNode = true;
|
|
641
|
+
this.ViewData = ViewData;
|
|
642
|
+
this.TrackBy = TrackBy;
|
|
643
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
644
|
+
this.childViewDataModels = chain(this.groupViewDataModel).pluckList('children');
|
|
645
|
+
}
|
|
646
|
+
};
|
|
647
|
+
__decorate([
|
|
648
|
+
Input(), TrackExternal(),
|
|
649
|
+
__metadata("design:type", ValueModel)
|
|
650
|
+
], CommandGroupRendererComponent.prototype, "groupViewDataModel", void 0);
|
|
651
|
+
__decorate([
|
|
652
|
+
Input(), StoreInValueModel('groupViewDataModel'),
|
|
653
|
+
__metadata("design:type", ViewData.GroupData)
|
|
654
|
+
], CommandGroupRendererComponent.prototype, "groupViewData", void 0);
|
|
655
|
+
__decorate([
|
|
656
|
+
Input(),
|
|
657
|
+
HostBinding('class.render-root'),
|
|
658
|
+
__metadata("design:type", Object)
|
|
659
|
+
], CommandGroupRendererComponent.prototype, "renderRootNode", void 0);
|
|
660
|
+
CommandGroupRendererComponent = __decorate([
|
|
661
|
+
Component({
|
|
662
|
+
selector: 'aup-command-group-renderer',
|
|
663
|
+
template: "<ng-template #groupTemplate let-group>\n\n <ng-container *ngIf=\"ViewData.hasText(group)\" [ngSwitch]=\"ViewData.getStyle(group)\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n mat-stroked-button>\n <aup-command-face [face]=\"ViewData.getFace(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'raised'\">\n <button #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n mat-raised-button>\n <aup-command-face [face]=\"ViewData.getFace(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n mat-button>\n <aup-command-face [face]=\"ViewData.getFace(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!ViewData.hasText(group)\">\n <button #trigger=\"matMenuTrigger\"\n mat-icon-button\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n >\n <aup-command-face [face]=\"ViewData.getFace(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n</ng-template>\n\n\n<ng-template #commandTemplate let-data>\n\n <ng-container *ngIf=\"ViewData.hasText(data)\" [ngSwitch]=\"ViewData.getStyle(data)\">\n <button *ngSwitchCase=\"'raised'\"\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-raised-button>\n <aup-command-face [face]=\"ViewData.getFace(data)\"></aup-command-face>\n </button>\n <button *ngSwitchCase=\"'stroked'\"\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-stroked-button>\n <aup-command-face [face]=\"ViewData.getFace(data)\"></aup-command-face>\n </button>\n <button *ngSwitchDefault\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-button>\n <aup-command-face [face]=\"ViewData.getFace(data)\"></aup-command-face>\n </button>\n </ng-container>\n\n <button *ngIf=\"!ViewData.hasText(data)\"\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-icon-button>\n <aup-command-face [face]=\"ViewData.getFace(data)\"></aup-command-face>\n </button>\n\n</ng-template>\n\n\n<ng-template *ngIf=\"renderRootNode\"\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: groupViewDataModel.value }\">\n</ng-template>\n\n<ng-container *ngIf=\"!renderRootNode\">\n <ng-container *ngFor=\"let data of this.childViewDataModels.value; trackBy: TrackBy.byIndex\">\n <ng-template *ngIf=\"ViewData.isGroup(data)\"\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: data }\">\n </ng-template>\n <ng-template *ngIf=\"ViewData.isCommand(data)\"\n [ngTemplateOutlet]=\"commandTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: data }\">\n </ng-template>\n\n <mat-divider *ngIf=\"ViewData.isSeparator(data)\" [vertical]=\"true\"></mat-divider>\n </ng-container>\n\n</ng-container>\n",
|
|
664
|
+
styles: [":host{display:inline-flex;flex-direction:row;align-items:center}:host:not(.render-root) mat-divider{-ms-grid-row-align:stretch;align-self:stretch;margin:4px 0}:host:not(.render-root)>*+*{margin-left:8px}:host span.flex{flex:1}"]
|
|
665
|
+
}),
|
|
666
|
+
__metadata("design:paramtypes", [])
|
|
667
|
+
], CommandGroupRendererComponent);
|
|
668
|
+
|
|
669
|
+
class Registration extends GarbageCollector {
|
|
670
|
+
}
|
|
671
|
+
(function (Registration) {
|
|
672
|
+
class FaceRegistration extends Registration {
|
|
673
|
+
constructor(faceModel) {
|
|
674
|
+
super();
|
|
675
|
+
this.faceModel = faceModel;
|
|
676
|
+
}
|
|
455
677
|
}
|
|
456
|
-
|
|
457
|
-
|
|
678
|
+
Registration.FaceRegistration = FaceRegistration;
|
|
679
|
+
class CommandRegistration extends FaceRegistration {
|
|
680
|
+
constructor(faceModel, command) {
|
|
681
|
+
super(faceModel);
|
|
682
|
+
this.command = command;
|
|
683
|
+
}
|
|
684
|
+
toTemplate() {
|
|
685
|
+
return new ViewData.CommandData(this.faceModel.value, this.command);
|
|
686
|
+
}
|
|
458
687
|
}
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
688
|
+
Registration.CommandRegistration = CommandRegistration;
|
|
689
|
+
class GroupRegistration extends FaceRegistration {
|
|
690
|
+
constructor(faceModel, group) {
|
|
691
|
+
super(faceModel);
|
|
692
|
+
this.group = group;
|
|
693
|
+
}
|
|
694
|
+
toTemplate() {
|
|
695
|
+
return new ViewData.GroupData(this.faceModel.value, this.group.xPosition, this.group.yPosition, this.group.registrations.value.map(r => r.toTemplate()));
|
|
696
|
+
}
|
|
463
697
|
}
|
|
464
|
-
|
|
465
|
-
|
|
698
|
+
Registration.GroupRegistration = GroupRegistration;
|
|
699
|
+
class SeparatorRegistration extends Registration {
|
|
700
|
+
constructor() {
|
|
701
|
+
super(...arguments);
|
|
702
|
+
this.template = new ViewData.SeparatorData();
|
|
703
|
+
}
|
|
704
|
+
toTemplate() {
|
|
705
|
+
return this.template;
|
|
706
|
+
}
|
|
466
707
|
}
|
|
467
|
-
|
|
708
|
+
Registration.SeparatorRegistration = SeparatorRegistration;
|
|
709
|
+
class FlexRegistration extends Registration {
|
|
710
|
+
constructor() {
|
|
711
|
+
super(...arguments);
|
|
712
|
+
this.template = new ViewData.FlexData();
|
|
713
|
+
}
|
|
714
|
+
toTemplate() {
|
|
715
|
+
return this.template;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
Registration.FlexRegistration = FlexRegistration;
|
|
719
|
+
function hasFace(entry) {
|
|
720
|
+
return entry instanceof CommandRegistration || entry instanceof GroupRegistration;
|
|
721
|
+
}
|
|
722
|
+
Registration.hasFace = hasFace;
|
|
723
|
+
})(Registration || (Registration = {}));
|
|
468
724
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
*
|
|
472
|
-
*/
|
|
473
|
-
let CommandBarComponent = CommandBarComponent_1 = class CommandBarComponent extends CommandContainer {
|
|
474
|
-
constructor() {
|
|
725
|
+
class CommandGroup extends GarbageCollector {
|
|
726
|
+
constructor(parent) {
|
|
475
727
|
super();
|
|
728
|
+
this.parent = parent;
|
|
729
|
+
this._rootTemplate = new MutableValueModel();
|
|
730
|
+
this._registrations = new MutableListModel();
|
|
731
|
+
this._childFaceModels = new MutableListModel();
|
|
732
|
+
this._faceChangeCount = new MutableValueModel(0);
|
|
733
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
734
|
+
const childFaces = chain(this._childFaceModels)
|
|
735
|
+
.map(m => m.value, { dependsOn: this._faceChangeCount })
|
|
736
|
+
.rejectNil();
|
|
737
|
+
const iconCount = childFaces
|
|
738
|
+
.select(face => !!CommandFace.getIconOf(face))
|
|
739
|
+
.count();
|
|
740
|
+
this.hasMixedIcons = valueOf.all(iconCount.isGreaterThan(0), iconCount.doesNotEqual(childFaces.length)).areTruthy();
|
|
741
|
+
this.childTemplates = chain(this._rootTemplate).pluckList('children');
|
|
742
|
+
this.initialised = chain(this._rootTemplate).isNotNil();
|
|
743
|
+
}
|
|
744
|
+
initialise() {
|
|
745
|
+
this.rebuildTemplates();
|
|
746
|
+
}
|
|
747
|
+
get rootTemplate() {
|
|
748
|
+
return this._rootTemplate.readonly;
|
|
749
|
+
}
|
|
750
|
+
get registrations() {
|
|
751
|
+
return this._registrations.readonly;
|
|
752
|
+
}
|
|
753
|
+
notifyChanged() {
|
|
754
|
+
if (this.parent) {
|
|
755
|
+
this.parent.notifyChanged();
|
|
756
|
+
}
|
|
757
|
+
else {
|
|
758
|
+
this.rebuildTemplates();
|
|
759
|
+
}
|
|
476
760
|
}
|
|
477
|
-
|
|
761
|
+
notifyChildFaceChanged(is, was) {
|
|
762
|
+
this.notifyChanged();
|
|
763
|
+
}
|
|
764
|
+
rebuildTemplates() {
|
|
765
|
+
this._rootTemplate.value = new ViewData.GroupData(this.faceModel.value, this.xPosition, this.yPosition, this.registrations.value.map(r => r.toTemplate()));
|
|
766
|
+
}
|
|
767
|
+
get depth() {
|
|
768
|
+
return this.isRoot() ? 0 : this.parent.depth + 1;
|
|
769
|
+
}
|
|
770
|
+
isRoot() {
|
|
771
|
+
return false;
|
|
772
|
+
}
|
|
773
|
+
registerCommand(command, faceModel) {
|
|
774
|
+
return this.register(new Registration.CommandRegistration(faceModel, command));
|
|
775
|
+
}
|
|
776
|
+
registerGroup(group, faceModel) {
|
|
777
|
+
return this.register(new Registration.GroupRegistration(faceModel, group));
|
|
778
|
+
}
|
|
779
|
+
registerFlex(component) {
|
|
780
|
+
return this.register(new Registration.FlexRegistration());
|
|
781
|
+
}
|
|
782
|
+
registerSeparator(component) {
|
|
783
|
+
return this.register(new Registration.SeparatorRegistration());
|
|
784
|
+
}
|
|
785
|
+
register(registration) {
|
|
786
|
+
this._registrations.push(registration);
|
|
787
|
+
if (registration instanceof Registration.FaceRegistration) {
|
|
788
|
+
this._childFaceModels.push(registration.faceModel);
|
|
789
|
+
const { when } = Dsl.disposeWith(registration);
|
|
790
|
+
when(registration.faceModel).changes((is, was) => {
|
|
791
|
+
this.notifyChildFaceChanged(new CommandFace.Adapter(is), new CommandFace.Adapter(was));
|
|
792
|
+
}, { asLongAs: this.initialised });
|
|
793
|
+
registration.onDispose(() => this._childFaceModels.remove(registration.faceModel));
|
|
794
|
+
}
|
|
795
|
+
registration.onDispose(() => this._registrations.remove(registration));
|
|
796
|
+
return registration;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
(function (CommandGroup) {
|
|
800
|
+
class Root extends CommandGroup {
|
|
801
|
+
isRoot() {
|
|
802
|
+
return true;
|
|
803
|
+
}
|
|
478
804
|
}
|
|
479
|
-
|
|
480
|
-
|
|
805
|
+
__decorate([
|
|
806
|
+
TrackExternal(),
|
|
807
|
+
__metadata("design:type", ValueModel)
|
|
808
|
+
], Root.prototype, "faceModel", void 0);
|
|
809
|
+
__decorate([
|
|
810
|
+
TrackExternal({ defaultValue: 'after' }),
|
|
811
|
+
__metadata("design:type", ValueModel)
|
|
812
|
+
], Root.prototype, "xPositionModel", void 0);
|
|
813
|
+
__decorate([
|
|
814
|
+
StoreInValueModel('xPositionModel'),
|
|
815
|
+
__metadata("design:type", String)
|
|
816
|
+
], Root.prototype, "xPosition", void 0);
|
|
817
|
+
__decorate([
|
|
818
|
+
TrackExternal({ defaultValue: 'below' }),
|
|
819
|
+
__metadata("design:type", ValueModel)
|
|
820
|
+
], Root.prototype, "yPositionModel", void 0);
|
|
821
|
+
__decorate([
|
|
822
|
+
StoreInValueModel('yPositionModel'),
|
|
823
|
+
__metadata("design:type", String)
|
|
824
|
+
], Root.prototype, "yPosition", void 0);
|
|
825
|
+
CommandGroup.Root = Root;
|
|
826
|
+
function factory() {
|
|
827
|
+
return new Root();
|
|
828
|
+
}
|
|
829
|
+
CommandGroup.factory = factory;
|
|
830
|
+
})(CommandGroup || (CommandGroup = {}));
|
|
831
|
+
|
|
832
|
+
var CommandGroupComponent_1;
|
|
833
|
+
let CommandGroupComponent = CommandGroupComponent_1 = class CommandGroupComponent extends CommandGroup {
|
|
834
|
+
constructor(parent) {
|
|
835
|
+
super(parent);
|
|
836
|
+
this.parent = parent;
|
|
837
|
+
this.xPosition = 'after';
|
|
838
|
+
this.yPosition = 'below';
|
|
839
|
+
this.parent.registerGroup(this, this.faceModel);
|
|
481
840
|
}
|
|
482
841
|
};
|
|
483
|
-
|
|
842
|
+
CommandGroupComponent.ctorParameters = () => [
|
|
843
|
+
{ type: CommandGroup, decorators: [{ type: SkipSelf }] }
|
|
844
|
+
];
|
|
845
|
+
__decorate([
|
|
846
|
+
Input(), TrackExternal(),
|
|
847
|
+
__metadata("design:type", ValueModel)
|
|
848
|
+
], CommandGroupComponent.prototype, "faceModel", void 0);
|
|
849
|
+
__decorate([
|
|
850
|
+
Input(), StoreInValueModel('faceModel'),
|
|
851
|
+
__metadata("design:type", Object)
|
|
852
|
+
], CommandGroupComponent.prototype, "face", void 0);
|
|
853
|
+
__decorate([
|
|
854
|
+
Input(),
|
|
855
|
+
__metadata("design:type", String)
|
|
856
|
+
], CommandGroupComponent.prototype, "xPosition", void 0);
|
|
857
|
+
__decorate([
|
|
858
|
+
Input(),
|
|
859
|
+
__metadata("design:type", String)
|
|
860
|
+
], CommandGroupComponent.prototype, "yPosition", void 0);
|
|
861
|
+
CommandGroupComponent = CommandGroupComponent_1 = __decorate([
|
|
484
862
|
Component({
|
|
485
|
-
selector: 'aup-command-
|
|
486
|
-
template:
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
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
|
-
}`]
|
|
863
|
+
selector: 'aup-command-group',
|
|
864
|
+
template: '',
|
|
865
|
+
providers: [
|
|
866
|
+
{ provide: CommandGroup, useExisting: CommandGroupComponent_1 }
|
|
867
|
+
]
|
|
512
868
|
}),
|
|
513
|
-
|
|
514
|
-
|
|
869
|
+
__param(0, SkipSelf()),
|
|
870
|
+
__metadata("design:paramtypes", [CommandGroup])
|
|
871
|
+
], CommandGroupComponent);
|
|
515
872
|
|
|
516
873
|
/**
|
|
517
874
|
* Custom CSS:
|
|
@@ -524,9 +881,8 @@ CommandBarComponent = CommandBarComponent_1 = __decorate([
|
|
|
524
881
|
* }
|
|
525
882
|
*/
|
|
526
883
|
let CommandFaceComponent = class CommandFaceComponent extends DisposableComponent {
|
|
527
|
-
constructor(
|
|
884
|
+
constructor() {
|
|
528
885
|
super();
|
|
529
|
-
this.commandContainer = commandContainer;
|
|
530
886
|
this.faceModel = new MutableValueModel();
|
|
531
887
|
this.ignoreIcon = false;
|
|
532
888
|
this.ignoreText = false;
|
|
@@ -537,7 +893,7 @@ let CommandFaceComponent = class CommandFaceComponent extends DisposableComponen
|
|
|
537
893
|
this.iconModel = faceAdapter.pluck('icon');
|
|
538
894
|
this.textModel = faceAdapter.pluck('text');
|
|
539
895
|
this.positionModel = faceAdapter.pluck('iconPosition');
|
|
540
|
-
this.
|
|
896
|
+
this.colorModel = faceAdapter.pluck('color');
|
|
541
897
|
}
|
|
542
898
|
get requiresMissingIconInLayout() {
|
|
543
899
|
return this.includeMissingIconInLayout && !this.iconModel.value;
|
|
@@ -545,8 +901,8 @@ let CommandFaceComponent = class CommandFaceComponent extends DisposableComponen
|
|
|
545
901
|
ngOnInit() {
|
|
546
902
|
}
|
|
547
903
|
get iconPosition() {
|
|
548
|
-
var _a
|
|
549
|
-
return (
|
|
904
|
+
var _a;
|
|
905
|
+
return (_a = this.positionModel.value) !== null && _a !== void 0 ? _a : CommandFace.Position.START;
|
|
550
906
|
}
|
|
551
907
|
get shouldIncludeIcon() {
|
|
552
908
|
return (!this.ignoreIcon && this.iconModel.value) || this.includeMissingIconInLayout;
|
|
@@ -560,13 +916,10 @@ let CommandFaceComponent = class CommandFaceComponent extends DisposableComponen
|
|
|
560
916
|
get text() {
|
|
561
917
|
return this.ignoreText ? undefined : this.textModel.value;
|
|
562
918
|
}
|
|
563
|
-
get
|
|
564
|
-
return this.
|
|
919
|
+
get color() {
|
|
920
|
+
return this.colorModel.value;
|
|
565
921
|
}
|
|
566
922
|
};
|
|
567
|
-
CommandFaceComponent.ctorParameters = () => [
|
|
568
|
-
{ type: CommandContainer, decorators: [{ type: Optional }] }
|
|
569
|
-
];
|
|
570
923
|
__decorate([
|
|
571
924
|
Input('face'), StoreInValueModel('faceModel'),
|
|
572
925
|
__metadata("design:type", Object)
|
|
@@ -589,10 +942,10 @@ __decorate([
|
|
|
589
942
|
__metadata("design:paramtypes", [])
|
|
590
943
|
], CommandFaceComponent.prototype, "requiresMissingIconInLayout", null);
|
|
591
944
|
__decorate([
|
|
592
|
-
HostBinding('
|
|
593
|
-
__metadata("design:type",
|
|
945
|
+
HostBinding('attr.color'),
|
|
946
|
+
__metadata("design:type", String),
|
|
594
947
|
__metadata("design:paramtypes", [])
|
|
595
|
-
], CommandFaceComponent.prototype, "
|
|
948
|
+
], CommandFaceComponent.prototype, "color", null);
|
|
596
949
|
CommandFaceComponent = __decorate([
|
|
597
950
|
Component({
|
|
598
951
|
selector: 'aup-command-face',
|
|
@@ -600,224 +953,257 @@ CommandFaceComponent = __decorate([
|
|
|
600
953
|
encapsulation: ViewEncapsulation.None,
|
|
601
954
|
styles: ["aup-command-face{--icon-gap:var(--aup-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}"]
|
|
602
955
|
}),
|
|
603
|
-
|
|
604
|
-
__metadata("design:paramtypes", [CommandContainer])
|
|
956
|
+
__metadata("design:paramtypes", [])
|
|
605
957
|
], CommandFaceComponent);
|
|
606
958
|
|
|
607
959
|
/**
|
|
608
960
|
*
|
|
609
961
|
*/
|
|
610
962
|
let CommandComponent = class CommandComponent extends DisposableComponent {
|
|
611
|
-
constructor(
|
|
963
|
+
constructor(parent) {
|
|
612
964
|
super();
|
|
613
|
-
this.
|
|
965
|
+
this.parent = parent;
|
|
966
|
+
this.CommandFace = CommandFace;
|
|
967
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
968
|
+
this.buttonStyle = chain(this.faceModel).map(f => CommandFace.getStyleOf(f));
|
|
969
|
+
if (parent) {
|
|
970
|
+
this.registerDisposable(this.parent.registerCommand(this.command, this.faceModel));
|
|
971
|
+
}
|
|
614
972
|
}
|
|
615
973
|
ngOnInit() {
|
|
616
|
-
this.registerDisposable(this.commandContainer.registerCommand(this.command, this.face));
|
|
617
974
|
}
|
|
618
975
|
};
|
|
619
976
|
CommandComponent.ctorParameters = () => [
|
|
620
|
-
{ type:
|
|
977
|
+
{ type: CommandGroup, decorators: [{ type: Optional }] }
|
|
621
978
|
];
|
|
622
979
|
__decorate([
|
|
623
980
|
Input(), TrackExternal(),
|
|
624
981
|
__metadata("design:type", Command)
|
|
625
982
|
], CommandComponent.prototype, "command", void 0);
|
|
626
983
|
__decorate([
|
|
627
|
-
Input(),
|
|
984
|
+
Input(), TrackExternal(),
|
|
985
|
+
__metadata("design:type", ValueModel)
|
|
986
|
+
], CommandComponent.prototype, "faceModel", void 0);
|
|
987
|
+
__decorate([
|
|
988
|
+
Input(), StoreInValueModel('faceModel'),
|
|
628
989
|
__metadata("design:type", Object)
|
|
629
990
|
], CommandComponent.prototype, "face", void 0);
|
|
630
991
|
CommandComponent = __decorate([
|
|
631
992
|
Component({
|
|
632
993
|
selector: 'aup-command',
|
|
633
|
-
template:
|
|
994
|
+
template: "<ng-container *ngIf=\"!parent\">\n <ng-container [ngSwitch]=\"buttonStyle.value\">\n <button *ngSwitchCase=\"CommandFace.Style.STROKED\" mat-stroked-button [pectinCommand]=\"command\" [color]=\"CommandFace.getColorOf(face)\">\n <aup-command-face [face]=\"face\"></aup-command-face>\n </button>\n <button *ngSwitchCase=\"CommandFace.Style.RAISED\" mat-raised-button [pectinCommand]=\"command\" [color]=\"CommandFace.getColorOf(face)\">\n <aup-command-face [face]=\"face\"></aup-command-face>\n </button>\n <button *ngSwitchDefault mat-button [pectinCommand]=\"command\" [color]=\"CommandFace.getColorOf(face)\">\n <aup-command-face [face]=\"face\"></aup-command-face>\n </button>\n </ng-container>\n</ng-container>\n"
|
|
634
995
|
}),
|
|
635
|
-
|
|
996
|
+
__param(0, Optional()),
|
|
997
|
+
__metadata("design:paramtypes", [CommandGroup])
|
|
636
998
|
], CommandComponent);
|
|
637
999
|
|
|
638
1000
|
/**
|
|
639
1001
|
*
|
|
640
1002
|
*/
|
|
641
|
-
let
|
|
642
|
-
constructor() {
|
|
1003
|
+
let FlexComponent = class FlexComponent extends DisposableComponent {
|
|
1004
|
+
constructor(parent) {
|
|
643
1005
|
super();
|
|
644
|
-
this.
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
const registrations = chain(this.commandRegistrations);
|
|
649
|
-
const iconCount = registrations.select(r => !!r.faceAdapter.icon).count();
|
|
650
|
-
this.hasMixedIcons = valueOf.all(iconCount.isGreaterThan(0), iconCount.doesNotEqual(registrations.length)).areTruthy();
|
|
1006
|
+
this.parent = parent;
|
|
1007
|
+
if (parent) {
|
|
1008
|
+
parent.registerFlex(this);
|
|
1009
|
+
}
|
|
651
1010
|
}
|
|
652
1011
|
ngOnInit() {
|
|
653
1012
|
}
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
1013
|
+
};
|
|
1014
|
+
FlexComponent.ctorParameters = () => [
|
|
1015
|
+
{ type: CommandGroup }
|
|
1016
|
+
];
|
|
1017
|
+
FlexComponent = __decorate([
|
|
1018
|
+
Component({
|
|
1019
|
+
selector: 'aup-flex',
|
|
1020
|
+
template: ``
|
|
1021
|
+
}),
|
|
1022
|
+
__metadata("design:paramtypes", [CommandGroup])
|
|
1023
|
+
], FlexComponent);
|
|
1024
|
+
|
|
1025
|
+
const ɵ0 = CommandGroup.factory;
|
|
1026
|
+
/**
|
|
1027
|
+
*
|
|
1028
|
+
*/
|
|
1029
|
+
let MoreMenuComponent = class MoreMenuComponent extends DisposableComponent {
|
|
1030
|
+
constructor(group) {
|
|
1031
|
+
super();
|
|
1032
|
+
this.group = group;
|
|
1033
|
+
this.tooltipModel = new MutableValueModel();
|
|
1034
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1035
|
+
group.xPosition = 'before'; // this should be the default unless overridden by the user.
|
|
1036
|
+
group.faceModel = chain(this.tooltipModel).map(tooltip => {
|
|
1037
|
+
return {
|
|
1038
|
+
icon: () => 'mat:more_vert',
|
|
1039
|
+
tooltip() {
|
|
1040
|
+
return tooltip;
|
|
1041
|
+
}
|
|
1042
|
+
};
|
|
1043
|
+
}, { allowNil: true });
|
|
660
1044
|
}
|
|
661
|
-
|
|
662
|
-
|
|
1045
|
+
ngOnInit() {
|
|
1046
|
+
}
|
|
1047
|
+
ngAfterContentInit() {
|
|
1048
|
+
this.group.initialise();
|
|
663
1049
|
}
|
|
664
1050
|
};
|
|
1051
|
+
MoreMenuComponent.ctorParameters = () => [
|
|
1052
|
+
{ type: CommandGroup }
|
|
1053
|
+
];
|
|
665
1054
|
__decorate([
|
|
666
|
-
Input(),
|
|
667
|
-
__metadata("design:type", ListModel)
|
|
668
|
-
], PopupMenuRendererComponent.prototype, "commandRegistrations", void 0);
|
|
669
|
-
__decorate([
|
|
670
|
-
Input(),
|
|
671
|
-
__metadata("design:type", String)
|
|
672
|
-
], PopupMenuRendererComponent.prototype, "xPosition", void 0);
|
|
673
|
-
__decorate([
|
|
674
|
-
Input(),
|
|
1055
|
+
Input(), StoreInValueModel('tooltipModel'),
|
|
675
1056
|
__metadata("design:type", String)
|
|
676
|
-
],
|
|
677
|
-
__decorate([
|
|
678
|
-
Output(),
|
|
679
|
-
__metadata("design:type", Object)
|
|
680
|
-
], PopupMenuRendererComponent.prototype, "commandExecuted", void 0);
|
|
1057
|
+
], MoreMenuComponent.prototype, "tooltip", void 0);
|
|
681
1058
|
__decorate([
|
|
682
|
-
|
|
683
|
-
__metadata("design:type",
|
|
684
|
-
|
|
685
|
-
|
|
1059
|
+
Trace(),
|
|
1060
|
+
__metadata("design:type", Function),
|
|
1061
|
+
__metadata("design:paramtypes", []),
|
|
1062
|
+
__metadata("design:returntype", void 0)
|
|
1063
|
+
], MoreMenuComponent.prototype, "ngAfterContentInit", null);
|
|
1064
|
+
MoreMenuComponent = __decorate([
|
|
686
1065
|
Component({
|
|
687
|
-
selector: 'aup-
|
|
688
|
-
template:
|
|
689
|
-
|
|
1066
|
+
selector: 'aup-more-menu',
|
|
1067
|
+
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1068
|
+
providers: [{ provide: CommandGroup, useFactory: ɵ0 }]
|
|
690
1069
|
}),
|
|
691
|
-
__metadata("design:paramtypes", [])
|
|
692
|
-
],
|
|
1070
|
+
__metadata("design:paramtypes", [CommandGroup])
|
|
1071
|
+
], MoreMenuComponent);
|
|
693
1072
|
|
|
1073
|
+
const ɵ0$1 = CommandGroup.factory;
|
|
694
1074
|
/**
|
|
695
1075
|
*
|
|
696
1076
|
*/
|
|
697
|
-
let
|
|
698
|
-
constructor(
|
|
1077
|
+
let PopupMenuComponent = class PopupMenuComponent extends DisposableComponent {
|
|
1078
|
+
constructor(group) {
|
|
699
1079
|
super();
|
|
700
|
-
this.
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
}
|
|
704
|
-
ngAfterViewInit() {
|
|
705
|
-
this.cdr.detectChanges();
|
|
1080
|
+
this.group = group;
|
|
1081
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1082
|
+
group.faceModel = this.faceModel;
|
|
706
1083
|
}
|
|
707
|
-
|
|
708
|
-
var _a;
|
|
709
|
-
return (_a = this.popupMenu) === null || _a === void 0 ? void 0 : _a.matMenu;
|
|
1084
|
+
ngOnInit() {
|
|
710
1085
|
}
|
|
711
|
-
|
|
712
|
-
this.
|
|
1086
|
+
ngAfterContentInit() {
|
|
1087
|
+
this.group.initialise();
|
|
713
1088
|
}
|
|
714
|
-
|
|
715
|
-
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
1089
|
+
ngAfterViewInit() {
|
|
716
1090
|
}
|
|
717
1091
|
};
|
|
718
|
-
|
|
719
|
-
{ type:
|
|
1092
|
+
PopupMenuComponent.ctorParameters = () => [
|
|
1093
|
+
{ type: CommandGroup }
|
|
720
1094
|
];
|
|
721
1095
|
__decorate([
|
|
722
|
-
Input(),
|
|
723
|
-
__metadata("design:type",
|
|
724
|
-
],
|
|
1096
|
+
Input(), TrackExternal(),
|
|
1097
|
+
__metadata("design:type", ValueModel)
|
|
1098
|
+
], PopupMenuComponent.prototype, "faceModel", void 0);
|
|
725
1099
|
__decorate([
|
|
726
|
-
Input(),
|
|
727
|
-
__metadata("design:type",
|
|
728
|
-
],
|
|
1100
|
+
Input(), StoreInValueModel('faceModel'),
|
|
1101
|
+
__metadata("design:type", Object)
|
|
1102
|
+
], PopupMenuComponent.prototype, "face", void 0);
|
|
729
1103
|
__decorate([
|
|
730
|
-
|
|
731
|
-
__metadata("design:type",
|
|
732
|
-
|
|
1104
|
+
Trace(),
|
|
1105
|
+
__metadata("design:type", Function),
|
|
1106
|
+
__metadata("design:paramtypes", []),
|
|
1107
|
+
__metadata("design:returntype", void 0)
|
|
1108
|
+
], PopupMenuComponent.prototype, "ngOnInit", null);
|
|
733
1109
|
__decorate([
|
|
734
|
-
|
|
735
|
-
__metadata("design:type",
|
|
736
|
-
|
|
737
|
-
|
|
1110
|
+
Trace(),
|
|
1111
|
+
__metadata("design:type", Function),
|
|
1112
|
+
__metadata("design:paramtypes", []),
|
|
1113
|
+
__metadata("design:returntype", void 0)
|
|
1114
|
+
], PopupMenuComponent.prototype, "ngAfterContentInit", null);
|
|
1115
|
+
__decorate([
|
|
1116
|
+
Trace(),
|
|
1117
|
+
__metadata("design:type", Function),
|
|
1118
|
+
__metadata("design:paramtypes", []),
|
|
1119
|
+
__metadata("design:returntype", void 0)
|
|
1120
|
+
], PopupMenuComponent.prototype, "ngAfterViewInit", null);
|
|
1121
|
+
PopupMenuComponent = __decorate([
|
|
738
1122
|
Component({
|
|
739
|
-
selector: 'aup-
|
|
740
|
-
template: ''
|
|
1123
|
+
selector: 'aup-popup-menu',
|
|
1124
|
+
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1125
|
+
providers: [{ provide: CommandGroup, useFactory: ɵ0$1 }]
|
|
741
1126
|
}),
|
|
742
|
-
__metadata("design:paramtypes", [
|
|
743
|
-
],
|
|
1127
|
+
__metadata("design:paramtypes", [CommandGroup])
|
|
1128
|
+
], PopupMenuComponent);
|
|
744
1129
|
|
|
745
|
-
var PopupMenuComponent_1;
|
|
746
1130
|
/**
|
|
747
1131
|
*
|
|
748
1132
|
*/
|
|
749
|
-
let
|
|
750
|
-
constructor(
|
|
751
|
-
super(
|
|
752
|
-
this.
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
1133
|
+
let SeparatorComponent = class SeparatorComponent extends DisposableComponent {
|
|
1134
|
+
constructor(parent) {
|
|
1135
|
+
super();
|
|
1136
|
+
this.parent = parent;
|
|
1137
|
+
if (parent) {
|
|
1138
|
+
parent.registerSeparator(this);
|
|
1139
|
+
}
|
|
756
1140
|
}
|
|
757
|
-
|
|
758
|
-
return this.
|
|
1141
|
+
isVertical() {
|
|
1142
|
+
return this === null || this === void 0 ? void 0 : this.parent.isRoot();
|
|
759
1143
|
}
|
|
760
1144
|
ngOnInit() {
|
|
761
1145
|
}
|
|
762
1146
|
};
|
|
763
|
-
|
|
764
|
-
{ type:
|
|
1147
|
+
SeparatorComponent.ctorParameters = () => [
|
|
1148
|
+
{ type: CommandGroup, decorators: [{ type: Optional }] }
|
|
765
1149
|
];
|
|
766
|
-
__decorate([
|
|
767
|
-
Input(), StoreInValueModel('faceModel'),
|
|
768
|
-
__metadata("design:type", Object)
|
|
769
|
-
], PopupMenuComponent.prototype, "face", void 0);
|
|
770
|
-
PopupMenuComponent = PopupMenuComponent_1 = __decorate([
|
|
1150
|
+
SeparatorComponent = __decorate([
|
|
771
1151
|
Component({
|
|
772
|
-
selector: 'aup-
|
|
1152
|
+
selector: 'aup-separator',
|
|
773
1153
|
template: `
|
|
774
|
-
|
|
775
|
-
<button *ngIf="matMenuComponent" mat-icon-button [matMenuTriggerFor]="matMenuComponent" [matTooltip]="getTooltip()">
|
|
776
|
-
<aup-command-face [face]="face"></aup-command-face>
|
|
777
|
-
</button>
|
|
778
|
-
<aup-popup-menu-renderer [commandRegistrations]="commandRegistrations" [yPosition]="yPosition"
|
|
779
|
-
[xPosition]="xPosition"
|
|
780
|
-
(commandExecuted)="closeMenu()"></aup-popup-menu-renderer>
|
|
781
|
-
`,
|
|
782
|
-
providers: [{ provide: CommandContainer, useExisting: forwardRef(() => PopupMenuComponent_1) }]
|
|
1154
|
+
<mat-divider [vertical]="isVertical()"></mat-divider>`
|
|
783
1155
|
}),
|
|
784
|
-
|
|
785
|
-
|
|
1156
|
+
__param(0, Optional()),
|
|
1157
|
+
__metadata("design:paramtypes", [CommandGroup])
|
|
1158
|
+
], SeparatorComponent);
|
|
786
1159
|
|
|
787
|
-
|
|
1160
|
+
const ɵ0$2 = CommandGroup.factory;
|
|
788
1161
|
/**
|
|
789
1162
|
*
|
|
790
1163
|
*/
|
|
791
|
-
let
|
|
792
|
-
constructor(
|
|
793
|
-
super(
|
|
794
|
-
this.
|
|
1164
|
+
let ToolBarComponent = class ToolBarComponent extends DisposableComponent {
|
|
1165
|
+
constructor(group) {
|
|
1166
|
+
super();
|
|
1167
|
+
this.group = group;
|
|
1168
|
+
}
|
|
1169
|
+
ngOnInit() {
|
|
1170
|
+
}
|
|
1171
|
+
ngAfterContentInit() {
|
|
1172
|
+
this.group.initialise();
|
|
1173
|
+
}
|
|
1174
|
+
ngAfterViewInit() {
|
|
795
1175
|
}
|
|
796
1176
|
};
|
|
797
|
-
|
|
798
|
-
{ type:
|
|
1177
|
+
ToolBarComponent.ctorParameters = () => [
|
|
1178
|
+
{ type: CommandGroup }
|
|
799
1179
|
];
|
|
800
1180
|
__decorate([
|
|
801
|
-
|
|
802
|
-
__metadata("design:type",
|
|
803
|
-
|
|
804
|
-
|
|
1181
|
+
Trace(),
|
|
1182
|
+
__metadata("design:type", Function),
|
|
1183
|
+
__metadata("design:paramtypes", []),
|
|
1184
|
+
__metadata("design:returntype", void 0)
|
|
1185
|
+
], ToolBarComponent.prototype, "ngOnInit", null);
|
|
1186
|
+
__decorate([
|
|
1187
|
+
Trace(),
|
|
1188
|
+
__metadata("design:type", Function),
|
|
1189
|
+
__metadata("design:paramtypes", []),
|
|
1190
|
+
__metadata("design:returntype", void 0)
|
|
1191
|
+
], ToolBarComponent.prototype, "ngAfterContentInit", null);
|
|
1192
|
+
__decorate([
|
|
1193
|
+
Trace(),
|
|
1194
|
+
__metadata("design:type", Function),
|
|
1195
|
+
__metadata("design:paramtypes", []),
|
|
1196
|
+
__metadata("design:returntype", void 0)
|
|
1197
|
+
], ToolBarComponent.prototype, "ngAfterViewInit", null);
|
|
1198
|
+
ToolBarComponent = __decorate([
|
|
805
1199
|
Component({
|
|
806
|
-
selector: 'aup-
|
|
807
|
-
template:
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
<mat-icon>more_vert</mat-icon>
|
|
811
|
-
</button>
|
|
812
|
-
<aup-popup-menu-renderer [commandRegistrations]="commandRegistrations"
|
|
813
|
-
[xPosition]="xPosition"
|
|
814
|
-
[yPosition]="yPosition"
|
|
815
|
-
(commandExecuted)="closeMenu()"></aup-popup-menu-renderer>
|
|
816
|
-
`,
|
|
817
|
-
providers: [{ provide: CommandContainer, useExisting: forwardRef(() => MoreMenuComponent_1) }]
|
|
1200
|
+
selector: 'aup-tool-bar',
|
|
1201
|
+
template: '<aup-command-group-renderer [renderRootNode]="false" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1202
|
+
providers: [{ provide: CommandGroup, useFactory: ɵ0$2 }],
|
|
1203
|
+
styles: [":host{display:inline-flex;flex-direction:row;align-items:center}:host mat-divider{-ms-grid-row-align:stretch;align-self:stretch;margin:4px 0}:host span.flex{flex:1}:host>*+*{margin-left:8px}"]
|
|
818
1204
|
}),
|
|
819
|
-
__metadata("design:paramtypes", [
|
|
820
|
-
],
|
|
1205
|
+
__metadata("design:paramtypes", [CommandGroup])
|
|
1206
|
+
], ToolBarComponent);
|
|
821
1207
|
|
|
822
1208
|
let FocusContainerComponent = class FocusContainerComponent extends DisposableComponent {
|
|
823
1209
|
constructor(focusManager) {
|
|
@@ -1956,7 +2342,7 @@ SelectHeaderCellRendererComponent = __decorate([
|
|
|
1956
2342
|
|
|
1957
2343
|
const noop = () => {
|
|
1958
2344
|
};
|
|
1959
|
-
const ɵ0 = noop;
|
|
2345
|
+
const ɵ0$3 = noop;
|
|
1960
2346
|
const CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
|
|
1961
2347
|
class ColumnModel {
|
|
1962
2348
|
constructor(columnId, defaults) {
|
|
@@ -2419,12 +2805,14 @@ let TableModel = TableModel_1 = class TableModel {
|
|
|
2419
2805
|
}
|
|
2420
2806
|
return column;
|
|
2421
2807
|
}
|
|
2808
|
+
// removeColumn(column: ColumnModel<Row>) {
|
|
2809
|
+
//
|
|
2810
|
+
// }
|
|
2422
2811
|
columnTextProperties(columnTextProperties) {
|
|
2423
2812
|
this._columnTextPropertiesLookup = columnTextProperties;
|
|
2424
2813
|
}
|
|
2425
2814
|
getColumnTextProperties(column) {
|
|
2426
|
-
|
|
2427
|
-
return factory ? factory() : undefined;
|
|
2815
|
+
return this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[column.columnId] : undefined;
|
|
2428
2816
|
}
|
|
2429
2817
|
startEditSession(row) {
|
|
2430
2818
|
const rowId = this.identityOf(row);
|
|
@@ -2713,10 +3101,10 @@ TableHeaderCellRendererComponent = __decorate([
|
|
|
2713
3101
|
__metadata("design:paramtypes", [])
|
|
2714
3102
|
], TableHeaderCellRendererComponent);
|
|
2715
3103
|
|
|
2716
|
-
class MenuItemData
|
|
3104
|
+
class MenuItemData {
|
|
2717
3105
|
constructor(factory, face) {
|
|
2718
|
-
super(face);
|
|
2719
3106
|
this.factory = factory;
|
|
3107
|
+
this.face = face;
|
|
2720
3108
|
}
|
|
2721
3109
|
}
|
|
2722
3110
|
/**
|
|
@@ -2760,24 +3148,16 @@ TableRowMenuComponent = __decorate([
|
|
|
2760
3148
|
Component({
|
|
2761
3149
|
selector: 'aup-table-row-menu',
|
|
2762
3150
|
template: `
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
<
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
[pectinCommand]="createMoreMenuCommand(action, value)"
|
|
2774
|
-
>
|
|
2775
|
-
<aup-icon *ngIf="action.icon && action.iconPositionStart" [icon]="action.icon"></aup-icon>
|
|
2776
|
-
{{action.text}}
|
|
2777
|
-
<aup-icon *ngIf="action.icon && action.iconPositionEnd" [icon]="action.icon"></aup-icon>
|
|
2778
|
-
</button>
|
|
2779
|
-
</mat-menu>
|
|
2780
|
-
</ng-container>
|
|
3151
|
+
<aup-tool-bar>
|
|
3152
|
+
<aup-command *ngFor="let action of actions" [command]="action.factory.create(value)"
|
|
3153
|
+
[face]="action.faceModel"></aup-command>
|
|
3154
|
+
</aup-tool-bar>
|
|
3155
|
+
<ng-container *ngIf="moreActions.length > 0">
|
|
3156
|
+
<aup-more-menu>
|
|
3157
|
+
<aup-command *ngFor="let action of moreActions" [command]="action.factory.create(value)"
|
|
3158
|
+
[face]="action.faceModel"></aup-command>
|
|
3159
|
+
</aup-more-menu>
|
|
3160
|
+
</ng-container>
|
|
2781
3161
|
`,
|
|
2782
3162
|
styles: [`:host {
|
|
2783
3163
|
display: inline-flex;
|
|
@@ -2913,13 +3293,16 @@ ComponentsModule = __decorate([
|
|
|
2913
3293
|
IconComponent,
|
|
2914
3294
|
SectionHeaderComponent,
|
|
2915
3295
|
TableRowMenuComponent,
|
|
2916
|
-
|
|
3296
|
+
ToolBarComponent,
|
|
2917
3297
|
CommandComponent,
|
|
2918
3298
|
PopupMenuComponent,
|
|
3299
|
+
CommandGroupComponent,
|
|
2919
3300
|
CommandFaceComponent,
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
3301
|
+
MoreMenuComponent,
|
|
3302
|
+
SeparatorComponent,
|
|
3303
|
+
FlexComponent,
|
|
3304
|
+
CommandGroupMenuRendererComponent,
|
|
3305
|
+
CommandGroupRendererComponent
|
|
2923
3306
|
],
|
|
2924
3307
|
imports: [
|
|
2925
3308
|
CommonModule,
|
|
@@ -2939,8 +3322,8 @@ ComponentsModule = __decorate([
|
|
|
2939
3322
|
FontAwesomeModule,
|
|
2940
3323
|
MatTooltipModule,
|
|
2941
3324
|
MatAutocompleteModule,
|
|
2942
|
-
|
|
2943
|
-
|
|
3325
|
+
MatMenuModule,
|
|
3326
|
+
MatDividerModule
|
|
2944
3327
|
],
|
|
2945
3328
|
exports: [
|
|
2946
3329
|
NumberInputComponent,
|
|
@@ -2966,28 +3349,17 @@ ComponentsModule = __decorate([
|
|
|
2966
3349
|
IconComponent,
|
|
2967
3350
|
SectionHeaderComponent,
|
|
2968
3351
|
TableRowMenuComponent,
|
|
2969
|
-
|
|
3352
|
+
CommandGroupComponent,
|
|
3353
|
+
ToolBarComponent,
|
|
2970
3354
|
CommandComponent,
|
|
2971
|
-
AbstractPopupMenuComponent,
|
|
2972
3355
|
PopupMenuComponent,
|
|
2973
3356
|
CommandFaceComponent,
|
|
2974
|
-
|
|
2975
|
-
|
|
3357
|
+
MoreMenuComponent,
|
|
3358
|
+
SeparatorComponent,
|
|
3359
|
+
FlexComponent
|
|
2976
3360
|
],
|
|
2977
3361
|
providers: [
|
|
2978
3362
|
FocusBindingFactory
|
|
2979
|
-
// {
|
|
2980
|
-
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
2981
|
-
// type: 'string',
|
|
2982
|
-
// editorClass: StringInputComponent
|
|
2983
|
-
// }, multi: true
|
|
2984
|
-
// },
|
|
2985
|
-
// {
|
|
2986
|
-
// provide: CELL_EDITOR_REGISTRATION, useValue: {
|
|
2987
|
-
// type: 'number',
|
|
2988
|
-
// editorClass: NumberInputComponent
|
|
2989
|
-
// }, multi: true
|
|
2990
|
-
// }
|
|
2991
3363
|
]
|
|
2992
3364
|
}),
|
|
2993
3365
|
__metadata("design:paramtypes", [FaIconLibrary])
|
|
@@ -6328,7 +6700,7 @@ ListPlaceNavComponent = __decorate([
|
|
|
6328
6700
|
* (at)Place({
|
|
6329
6701
|
* path: 'myPlace',
|
|
6330
6702
|
* data: {
|
|
6331
|
-
* nav: I18n.places.myPlace.nav
|
|
6703
|
+
* nav: I18n.places.myPlace.nav
|
|
6332
6704
|
* }
|
|
6333
6705
|
* })
|
|
6334
6706
|
*/
|
|
@@ -6894,5 +7266,5 @@ function VisitParameterList(options) {
|
|
|
6894
7266
|
* Generated bundle index. Do not edit.
|
|
6895
7267
|
*/
|
|
6896
7268
|
|
|
6897
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation,
|
|
7269
|
+
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, CommandComponent, CommandDirective, CommandFace, CommandFaceComponent, CommandGroup, CommandGroupComponent, CommandGroupMenuRendererComponent, CommandGroupRendererComponent, 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, FlexComponent, 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, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, Registration, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, UrlService, UrlSnapshot, VerticalFocusContainerComponent, ViewData, 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, ToolBarComponent as ɵbn, CommandGroup as ɵbo, CommandComponent as ɵbp, PopupMenuComponent as ɵbq, CommandGroupComponent as ɵbr, CommandFaceComponent as ɵbs, MoreMenuComponent as ɵbt, SeparatorComponent as ɵbu, FlexComponent as ɵbv, CommandGroupMenuRendererComponent as ɵbw, CommandGroupRendererComponent as ɵbx, PlaceModule as ɵby, ComponentsModule as ɵbz, FocusBindingDirective as ɵc, EmptyStateComponent as ɵca, BusyOverlayComponent as ɵcb, PlaceOutletComponent as ɵcc, leftRightPlaceAnimation as ɵcd, LEFT_RIGHT_PLACE_ANIMATION as ɵce, AUP_PLACE_CONFIG as ɵcf, PlaceRouter as ɵch, InteractionService as ɵci, ModalInteractionContextFactory as ɵcj, UrlService as ɵck, PlaceHistory as ɵcl, TabbedPlaceNavigationComponent as ɵcm, AbstractPlaceNavigationComponent as ɵcn, ListPlaceNavComponent as ɵco, SidePlaceNavigationComponent as ɵcp, InteractionModule as ɵcq, ActivityContainerComponent as ɵcr, AbstractInteractionContext as ɵcs, ActivityOutletComponent as ɵct, ConfirmationDialogComponent as ɵcu, ACTIVITY_DATA as ɵcv, Activity as ɵcw, ConfirmThenDialogComponent as ɵcy, AlertDialogComponent as ɵcz, DisposableComponent as ɵd, InPlaceInteractionContextComponent as ɵdb, AddItemInteractionContextComponent as ɵdc, ActivityActionsComponent as ɵdd, PopupInteractionContextComponent as ɵde, StringInputActivity as ɵdf, AbstractInputActivity as ɵdg, SelectInputActivity as ɵdh, InteractionContextTriggerFor as ɵdi, 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 };
|
|
6898
7270
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|