@coolon/angular-ui-powerups 2.0.0-alpha.35 → 2.0.0-alpha.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +776 -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 +61 -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 +100 -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 +64 -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 +122 -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 +629 -255
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +715 -229
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/command/command.component.d.ts +22 -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 +41 -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,388 @@ var CommandFace;
|
|
|
442
476
|
], Adapter.prototype, "iconPositionEnd", null);
|
|
443
477
|
__decorate([
|
|
444
478
|
Memoize(),
|
|
445
|
-
__metadata("design:type",
|
|
479
|
+
__metadata("design:type", String),
|
|
480
|
+
__metadata("design:paramtypes", [])
|
|
481
|
+
], Adapter.prototype, "color", null);
|
|
482
|
+
__decorate([
|
|
483
|
+
Memoize(),
|
|
484
|
+
__metadata("design:type", String),
|
|
446
485
|
__metadata("design:paramtypes", [])
|
|
447
|
-
], Adapter.prototype, "
|
|
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
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
732
|
+
this.childTemplates = chain(this._rootTemplate).pluckList('children');
|
|
733
|
+
this.initialised = chain(this._rootTemplate).isNotNil();
|
|
476
734
|
}
|
|
477
|
-
|
|
735
|
+
initialise() {
|
|
736
|
+
this.rebuildTemplates();
|
|
737
|
+
}
|
|
738
|
+
get rootTemplate() {
|
|
739
|
+
return this._rootTemplate.readonly;
|
|
740
|
+
}
|
|
741
|
+
get registrations() {
|
|
742
|
+
return this._registrations.readonly;
|
|
743
|
+
}
|
|
744
|
+
notifyChanged() {
|
|
745
|
+
if (this.parent) {
|
|
746
|
+
this.parent.notifyChanged();
|
|
747
|
+
}
|
|
748
|
+
else {
|
|
749
|
+
this.rebuildTemplates();
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
notifyChildFaceChanged(is, was) {
|
|
753
|
+
this.notifyChanged();
|
|
754
|
+
}
|
|
755
|
+
rebuildTemplates() {
|
|
756
|
+
this._rootTemplate.value = new ViewData.GroupData(this.faceModel.value, this.xPosition, this.yPosition, this.registrations.value.map(r => r.toTemplate()));
|
|
757
|
+
}
|
|
758
|
+
get depth() {
|
|
759
|
+
return this.isRoot() ? 0 : this.parent.depth + 1;
|
|
760
|
+
}
|
|
761
|
+
isRoot() {
|
|
762
|
+
return false;
|
|
763
|
+
}
|
|
764
|
+
registerCommand(command, faceModel) {
|
|
765
|
+
return this.register(new Registration.CommandRegistration(faceModel, command));
|
|
766
|
+
}
|
|
767
|
+
registerGroup(group, faceModel) {
|
|
768
|
+
return this.register(new Registration.GroupRegistration(faceModel, group));
|
|
769
|
+
}
|
|
770
|
+
registerFlex(component) {
|
|
771
|
+
return this.register(new Registration.FlexRegistration());
|
|
772
|
+
}
|
|
773
|
+
registerSeparator(component) {
|
|
774
|
+
return this.register(new Registration.SeparatorRegistration());
|
|
775
|
+
}
|
|
776
|
+
register(registration) {
|
|
777
|
+
this._registrations.push(registration);
|
|
778
|
+
if (registration instanceof Registration.FaceRegistration) {
|
|
779
|
+
const { when } = Dsl.disposeWith(registration);
|
|
780
|
+
when(registration.faceModel).changes((is, was) => {
|
|
781
|
+
this.notifyChildFaceChanged(is, was);
|
|
782
|
+
}, { asLongAs: this.initialised });
|
|
783
|
+
}
|
|
784
|
+
registration.onDispose(() => this._registrations.remove(registration));
|
|
785
|
+
return registration;
|
|
478
786
|
}
|
|
479
|
-
|
|
480
|
-
|
|
787
|
+
}
|
|
788
|
+
(function (CommandGroup) {
|
|
789
|
+
class Root extends CommandGroup {
|
|
790
|
+
isRoot() {
|
|
791
|
+
return true;
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
__decorate([
|
|
795
|
+
TrackExternal(),
|
|
796
|
+
__metadata("design:type", ValueModel)
|
|
797
|
+
], Root.prototype, "faceModel", void 0);
|
|
798
|
+
__decorate([
|
|
799
|
+
TrackExternal({ defaultValue: 'after' }),
|
|
800
|
+
__metadata("design:type", ValueModel)
|
|
801
|
+
], Root.prototype, "xPositionModel", void 0);
|
|
802
|
+
__decorate([
|
|
803
|
+
StoreInValueModel('xPositionModel'),
|
|
804
|
+
__metadata("design:type", String)
|
|
805
|
+
], Root.prototype, "xPosition", void 0);
|
|
806
|
+
__decorate([
|
|
807
|
+
TrackExternal({ defaultValue: 'below' }),
|
|
808
|
+
__metadata("design:type", ValueModel)
|
|
809
|
+
], Root.prototype, "yPositionModel", void 0);
|
|
810
|
+
__decorate([
|
|
811
|
+
StoreInValueModel('yPositionModel'),
|
|
812
|
+
__metadata("design:type", String)
|
|
813
|
+
], Root.prototype, "yPosition", void 0);
|
|
814
|
+
CommandGroup.Root = Root;
|
|
815
|
+
function factory() {
|
|
816
|
+
return new Root();
|
|
817
|
+
}
|
|
818
|
+
CommandGroup.factory = factory;
|
|
819
|
+
})(CommandGroup || (CommandGroup = {}));
|
|
820
|
+
|
|
821
|
+
var CommandGroupComponent_1;
|
|
822
|
+
let CommandGroupComponent = CommandGroupComponent_1 = class CommandGroupComponent extends CommandGroup {
|
|
823
|
+
constructor(parent) {
|
|
824
|
+
super(parent);
|
|
825
|
+
this.parent = parent;
|
|
826
|
+
this.xPosition = 'after';
|
|
827
|
+
this.yPosition = 'below';
|
|
828
|
+
this.parent.registerGroup(this, this.faceModel);
|
|
481
829
|
}
|
|
482
830
|
};
|
|
483
|
-
|
|
831
|
+
CommandGroupComponent.ctorParameters = () => [
|
|
832
|
+
{ type: CommandGroup, decorators: [{ type: SkipSelf }] }
|
|
833
|
+
];
|
|
834
|
+
__decorate([
|
|
835
|
+
Input(), TrackExternal(),
|
|
836
|
+
__metadata("design:type", ValueModel)
|
|
837
|
+
], CommandGroupComponent.prototype, "faceModel", void 0);
|
|
838
|
+
__decorate([
|
|
839
|
+
Input(), StoreInValueModel('faceModel'),
|
|
840
|
+
__metadata("design:type", Object)
|
|
841
|
+
], CommandGroupComponent.prototype, "face", void 0);
|
|
842
|
+
__decorate([
|
|
843
|
+
Input(),
|
|
844
|
+
__metadata("design:type", String)
|
|
845
|
+
], CommandGroupComponent.prototype, "xPosition", void 0);
|
|
846
|
+
__decorate([
|
|
847
|
+
Input(),
|
|
848
|
+
__metadata("design:type", String)
|
|
849
|
+
], CommandGroupComponent.prototype, "yPosition", void 0);
|
|
850
|
+
CommandGroupComponent = CommandGroupComponent_1 = __decorate([
|
|
484
851
|
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
|
-
}`]
|
|
852
|
+
selector: 'aup-command-group',
|
|
853
|
+
template: '',
|
|
854
|
+
providers: [
|
|
855
|
+
{ provide: CommandGroup, useExisting: CommandGroupComponent_1 }
|
|
856
|
+
]
|
|
512
857
|
}),
|
|
513
|
-
|
|
514
|
-
|
|
858
|
+
__param(0, SkipSelf()),
|
|
859
|
+
__metadata("design:paramtypes", [CommandGroup])
|
|
860
|
+
], CommandGroupComponent);
|
|
515
861
|
|
|
516
862
|
/**
|
|
517
863
|
* Custom CSS:
|
|
@@ -524,9 +870,8 @@ CommandBarComponent = CommandBarComponent_1 = __decorate([
|
|
|
524
870
|
* }
|
|
525
871
|
*/
|
|
526
872
|
let CommandFaceComponent = class CommandFaceComponent extends DisposableComponent {
|
|
527
|
-
constructor(
|
|
873
|
+
constructor() {
|
|
528
874
|
super();
|
|
529
|
-
this.commandContainer = commandContainer;
|
|
530
875
|
this.faceModel = new MutableValueModel();
|
|
531
876
|
this.ignoreIcon = false;
|
|
532
877
|
this.ignoreText = false;
|
|
@@ -537,7 +882,7 @@ let CommandFaceComponent = class CommandFaceComponent extends DisposableComponen
|
|
|
537
882
|
this.iconModel = faceAdapter.pluck('icon');
|
|
538
883
|
this.textModel = faceAdapter.pluck('text');
|
|
539
884
|
this.positionModel = faceAdapter.pluck('iconPosition');
|
|
540
|
-
this.
|
|
885
|
+
this.colorModel = faceAdapter.pluck('color');
|
|
541
886
|
}
|
|
542
887
|
get requiresMissingIconInLayout() {
|
|
543
888
|
return this.includeMissingIconInLayout && !this.iconModel.value;
|
|
@@ -545,8 +890,8 @@ let CommandFaceComponent = class CommandFaceComponent extends DisposableComponen
|
|
|
545
890
|
ngOnInit() {
|
|
546
891
|
}
|
|
547
892
|
get iconPosition() {
|
|
548
|
-
var _a
|
|
549
|
-
return (
|
|
893
|
+
var _a;
|
|
894
|
+
return (_a = this.positionModel.value) !== null && _a !== void 0 ? _a : CommandFace.Position.START;
|
|
550
895
|
}
|
|
551
896
|
get shouldIncludeIcon() {
|
|
552
897
|
return (!this.ignoreIcon && this.iconModel.value) || this.includeMissingIconInLayout;
|
|
@@ -560,13 +905,10 @@ let CommandFaceComponent = class CommandFaceComponent extends DisposableComponen
|
|
|
560
905
|
get text() {
|
|
561
906
|
return this.ignoreText ? undefined : this.textModel.value;
|
|
562
907
|
}
|
|
563
|
-
get
|
|
564
|
-
return this.
|
|
908
|
+
get color() {
|
|
909
|
+
return this.colorModel.value;
|
|
565
910
|
}
|
|
566
911
|
};
|
|
567
|
-
CommandFaceComponent.ctorParameters = () => [
|
|
568
|
-
{ type: CommandContainer, decorators: [{ type: Optional }] }
|
|
569
|
-
];
|
|
570
912
|
__decorate([
|
|
571
913
|
Input('face'), StoreInValueModel('faceModel'),
|
|
572
914
|
__metadata("design:type", Object)
|
|
@@ -589,10 +931,10 @@ __decorate([
|
|
|
589
931
|
__metadata("design:paramtypes", [])
|
|
590
932
|
], CommandFaceComponent.prototype, "requiresMissingIconInLayout", null);
|
|
591
933
|
__decorate([
|
|
592
|
-
HostBinding('
|
|
593
|
-
__metadata("design:type",
|
|
934
|
+
HostBinding('attr.color'),
|
|
935
|
+
__metadata("design:type", String),
|
|
594
936
|
__metadata("design:paramtypes", [])
|
|
595
|
-
], CommandFaceComponent.prototype, "
|
|
937
|
+
], CommandFaceComponent.prototype, "color", null);
|
|
596
938
|
CommandFaceComponent = __decorate([
|
|
597
939
|
Component({
|
|
598
940
|
selector: 'aup-command-face',
|
|
@@ -600,224 +942,270 @@ CommandFaceComponent = __decorate([
|
|
|
600
942
|
encapsulation: ViewEncapsulation.None,
|
|
601
943
|
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
944
|
}),
|
|
603
|
-
|
|
604
|
-
__metadata("design:paramtypes", [CommandContainer])
|
|
945
|
+
__metadata("design:paramtypes", [])
|
|
605
946
|
], CommandFaceComponent);
|
|
606
947
|
|
|
607
948
|
/**
|
|
608
949
|
*
|
|
609
950
|
*/
|
|
610
951
|
let CommandComponent = class CommandComponent extends DisposableComponent {
|
|
611
|
-
constructor(
|
|
952
|
+
constructor(parent) {
|
|
612
953
|
super();
|
|
613
|
-
this.
|
|
954
|
+
this.parent = parent;
|
|
955
|
+
this.CommandFace = CommandFace;
|
|
956
|
+
const { chain, switchOn } = Dsl.disposeWith(this);
|
|
957
|
+
this.activeFaceModel = switchOn(this.command.busy).toValue(when => {
|
|
958
|
+
when.equalTo(true, this.busyFaceModel);
|
|
959
|
+
when.otherwise(this.faceModel);
|
|
960
|
+
}).otherwise(this.faceModel);
|
|
961
|
+
this.buttonStyle = chain(this.activeFaceModel).map(f => CommandFace.getStyleOf(f));
|
|
962
|
+
this.colorModel = chain(this.activeFaceModel).map(f => CommandFace.getColorOf(f));
|
|
963
|
+
if (parent) {
|
|
964
|
+
this.registerDisposable(this.parent.registerCommand(this.command, this.activeFaceModel));
|
|
965
|
+
}
|
|
614
966
|
}
|
|
615
967
|
ngOnInit() {
|
|
616
|
-
this.registerDisposable(this.commandContainer.registerCommand(this.command, this.face));
|
|
617
968
|
}
|
|
618
969
|
};
|
|
619
970
|
CommandComponent.ctorParameters = () => [
|
|
620
|
-
{ type:
|
|
971
|
+
{ type: CommandGroup, decorators: [{ type: Optional }] }
|
|
621
972
|
];
|
|
622
973
|
__decorate([
|
|
623
974
|
Input(), TrackExternal(),
|
|
624
975
|
__metadata("design:type", Command)
|
|
625
976
|
], CommandComponent.prototype, "command", void 0);
|
|
626
977
|
__decorate([
|
|
627
|
-
Input(),
|
|
978
|
+
Input(), TrackExternal(),
|
|
979
|
+
__metadata("design:type", ValueModel)
|
|
980
|
+
], CommandComponent.prototype, "faceModel", void 0);
|
|
981
|
+
__decorate([
|
|
982
|
+
Input(), StoreInValueModel('faceModel'),
|
|
628
983
|
__metadata("design:type", Object)
|
|
629
984
|
], CommandComponent.prototype, "face", void 0);
|
|
985
|
+
__decorate([
|
|
986
|
+
Input(), TrackExternal(),
|
|
987
|
+
__metadata("design:type", ValueModel)
|
|
988
|
+
], CommandComponent.prototype, "busyFaceModel", void 0);
|
|
989
|
+
__decorate([
|
|
990
|
+
Input(), StoreInValueModel('busyFaceModel'),
|
|
991
|
+
__metadata("design:type", Object)
|
|
992
|
+
], CommandComponent.prototype, "busyFace", void 0);
|
|
630
993
|
CommandComponent = __decorate([
|
|
631
994
|
Component({
|
|
632
995
|
selector: 'aup-command',
|
|
633
|
-
template:
|
|
996
|
+
template: "<ng-container *ngIf=\"!parent\">\n <ng-container [ngSwitch]=\"buttonStyle.value\">\n <button *ngSwitchCase=\"CommandFace.Style.STROKED\" mat-stroked-button [pectinCommand]=\"command\" [color]=\"colorModel.value\">\n <aup-command-face [face]=\"activeFaceModel.value\"></aup-command-face>\n </button>\n <button *ngSwitchCase=\"CommandFace.Style.RAISED\" mat-raised-button [pectinCommand]=\"command\" [color]=\"colorModel.value\">\n <aup-command-face [face]=\"activeFaceModel.value\"></aup-command-face>\n </button>\n <button *ngSwitchDefault mat-button [pectinCommand]=\"command\" [color]=\"colorModel.value\">\n <aup-command-face [face]=\"activeFaceModel.value\"></aup-command-face>\n </button>\n </ng-container>\n</ng-container>\n"
|
|
634
997
|
}),
|
|
635
|
-
|
|
998
|
+
__param(0, Optional()),
|
|
999
|
+
__metadata("design:paramtypes", [CommandGroup])
|
|
636
1000
|
], CommandComponent);
|
|
637
1001
|
|
|
638
1002
|
/**
|
|
639
1003
|
*
|
|
640
1004
|
*/
|
|
641
|
-
let
|
|
642
|
-
constructor() {
|
|
1005
|
+
let FlexComponent = class FlexComponent extends DisposableComponent {
|
|
1006
|
+
constructor(parent) {
|
|
643
1007
|
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();
|
|
1008
|
+
this.parent = parent;
|
|
1009
|
+
if (parent) {
|
|
1010
|
+
parent.registerFlex(this);
|
|
1011
|
+
}
|
|
651
1012
|
}
|
|
652
1013
|
ngOnInit() {
|
|
653
1014
|
}
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
1015
|
+
};
|
|
1016
|
+
FlexComponent.ctorParameters = () => [
|
|
1017
|
+
{ type: CommandGroup }
|
|
1018
|
+
];
|
|
1019
|
+
FlexComponent = __decorate([
|
|
1020
|
+
Component({
|
|
1021
|
+
selector: 'aup-flex',
|
|
1022
|
+
template: ``
|
|
1023
|
+
}),
|
|
1024
|
+
__metadata("design:paramtypes", [CommandGroup])
|
|
1025
|
+
], FlexComponent);
|
|
1026
|
+
|
|
1027
|
+
const ɵ0 = CommandGroup.factory;
|
|
1028
|
+
/**
|
|
1029
|
+
*
|
|
1030
|
+
*/
|
|
1031
|
+
let MoreMenuComponent = class MoreMenuComponent extends DisposableComponent {
|
|
1032
|
+
constructor(group) {
|
|
1033
|
+
super();
|
|
1034
|
+
this.group = group;
|
|
1035
|
+
this.tooltipModel = new MutableValueModel();
|
|
1036
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1037
|
+
group.xPosition = 'before'; // this should be the default unless overridden by the user.
|
|
1038
|
+
group.faceModel = chain(this.tooltipModel).map(tooltip => {
|
|
1039
|
+
return {
|
|
1040
|
+
icon: () => 'mat:more_vert',
|
|
1041
|
+
tooltip() {
|
|
1042
|
+
return tooltip;
|
|
1043
|
+
}
|
|
1044
|
+
};
|
|
1045
|
+
}, { allowNil: true });
|
|
1046
|
+
}
|
|
1047
|
+
ngOnInit() {
|
|
660
1048
|
}
|
|
661
|
-
|
|
662
|
-
|
|
1049
|
+
ngAfterContentInit() {
|
|
1050
|
+
this.group.initialise();
|
|
663
1051
|
}
|
|
664
1052
|
};
|
|
1053
|
+
MoreMenuComponent.ctorParameters = () => [
|
|
1054
|
+
{ type: CommandGroup }
|
|
1055
|
+
];
|
|
665
1056
|
__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(),
|
|
1057
|
+
Input(), StoreInValueModel('tooltipModel'),
|
|
675
1058
|
__metadata("design:type", String)
|
|
676
|
-
],
|
|
677
|
-
__decorate([
|
|
678
|
-
Output(),
|
|
679
|
-
__metadata("design:type", Object)
|
|
680
|
-
], PopupMenuRendererComponent.prototype, "commandExecuted", void 0);
|
|
1059
|
+
], MoreMenuComponent.prototype, "tooltip", void 0);
|
|
681
1060
|
__decorate([
|
|
682
|
-
|
|
683
|
-
__metadata("design:type",
|
|
684
|
-
|
|
685
|
-
|
|
1061
|
+
Trace(),
|
|
1062
|
+
__metadata("design:type", Function),
|
|
1063
|
+
__metadata("design:paramtypes", []),
|
|
1064
|
+
__metadata("design:returntype", void 0)
|
|
1065
|
+
], MoreMenuComponent.prototype, "ngAfterContentInit", null);
|
|
1066
|
+
MoreMenuComponent = __decorate([
|
|
686
1067
|
Component({
|
|
687
|
-
selector: 'aup-
|
|
688
|
-
template:
|
|
689
|
-
|
|
1068
|
+
selector: 'aup-more-menu',
|
|
1069
|
+
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1070
|
+
providers: [{ provide: CommandGroup, useFactory: ɵ0 }]
|
|
690
1071
|
}),
|
|
691
|
-
__metadata("design:paramtypes", [])
|
|
692
|
-
],
|
|
1072
|
+
__metadata("design:paramtypes", [CommandGroup])
|
|
1073
|
+
], MoreMenuComponent);
|
|
693
1074
|
|
|
1075
|
+
const ɵ0$1 = CommandGroup.factory;
|
|
694
1076
|
/**
|
|
695
1077
|
*
|
|
696
1078
|
*/
|
|
697
|
-
let
|
|
698
|
-
constructor(
|
|
1079
|
+
let PopupMenuComponent = class PopupMenuComponent extends DisposableComponent {
|
|
1080
|
+
constructor(group) {
|
|
699
1081
|
super();
|
|
700
|
-
this.
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
}
|
|
704
|
-
ngAfterViewInit() {
|
|
705
|
-
this.cdr.detectChanges();
|
|
1082
|
+
this.group = group;
|
|
1083
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1084
|
+
group.faceModel = this.faceModel;
|
|
706
1085
|
}
|
|
707
|
-
|
|
708
|
-
var _a;
|
|
709
|
-
return (_a = this.popupMenu) === null || _a === void 0 ? void 0 : _a.matMenu;
|
|
1086
|
+
ngOnInit() {
|
|
710
1087
|
}
|
|
711
|
-
|
|
712
|
-
this.
|
|
1088
|
+
ngAfterContentInit() {
|
|
1089
|
+
this.group.initialise();
|
|
713
1090
|
}
|
|
714
|
-
|
|
715
|
-
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
1091
|
+
ngAfterViewInit() {
|
|
716
1092
|
}
|
|
717
1093
|
};
|
|
718
|
-
|
|
719
|
-
{ type:
|
|
1094
|
+
PopupMenuComponent.ctorParameters = () => [
|
|
1095
|
+
{ type: CommandGroup }
|
|
720
1096
|
];
|
|
721
1097
|
__decorate([
|
|
722
|
-
Input(),
|
|
723
|
-
__metadata("design:type",
|
|
724
|
-
],
|
|
1098
|
+
Input(), TrackExternal(),
|
|
1099
|
+
__metadata("design:type", ValueModel)
|
|
1100
|
+
], PopupMenuComponent.prototype, "faceModel", void 0);
|
|
725
1101
|
__decorate([
|
|
726
|
-
Input(),
|
|
727
|
-
__metadata("design:type",
|
|
728
|
-
],
|
|
1102
|
+
Input(), StoreInValueModel('faceModel'),
|
|
1103
|
+
__metadata("design:type", Object)
|
|
1104
|
+
], PopupMenuComponent.prototype, "face", void 0);
|
|
1105
|
+
__decorate([
|
|
1106
|
+
Trace(),
|
|
1107
|
+
__metadata("design:type", Function),
|
|
1108
|
+
__metadata("design:paramtypes", []),
|
|
1109
|
+
__metadata("design:returntype", void 0)
|
|
1110
|
+
], PopupMenuComponent.prototype, "ngOnInit", null);
|
|
729
1111
|
__decorate([
|
|
730
|
-
|
|
731
|
-
__metadata("design:type",
|
|
732
|
-
|
|
1112
|
+
Trace(),
|
|
1113
|
+
__metadata("design:type", Function),
|
|
1114
|
+
__metadata("design:paramtypes", []),
|
|
1115
|
+
__metadata("design:returntype", void 0)
|
|
1116
|
+
], PopupMenuComponent.prototype, "ngAfterContentInit", null);
|
|
733
1117
|
__decorate([
|
|
734
|
-
|
|
735
|
-
__metadata("design:type",
|
|
736
|
-
|
|
737
|
-
|
|
1118
|
+
Trace(),
|
|
1119
|
+
__metadata("design:type", Function),
|
|
1120
|
+
__metadata("design:paramtypes", []),
|
|
1121
|
+
__metadata("design:returntype", void 0)
|
|
1122
|
+
], PopupMenuComponent.prototype, "ngAfterViewInit", null);
|
|
1123
|
+
PopupMenuComponent = __decorate([
|
|
738
1124
|
Component({
|
|
739
|
-
selector: 'aup-
|
|
740
|
-
template: ''
|
|
1125
|
+
selector: 'aup-popup-menu',
|
|
1126
|
+
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1127
|
+
providers: [{ provide: CommandGroup, useFactory: ɵ0$1 }]
|
|
741
1128
|
}),
|
|
742
|
-
__metadata("design:paramtypes", [
|
|
743
|
-
],
|
|
1129
|
+
__metadata("design:paramtypes", [CommandGroup])
|
|
1130
|
+
], PopupMenuComponent);
|
|
744
1131
|
|
|
745
|
-
var PopupMenuComponent_1;
|
|
746
1132
|
/**
|
|
747
1133
|
*
|
|
748
1134
|
*/
|
|
749
|
-
let
|
|
750
|
-
constructor(
|
|
751
|
-
super(
|
|
752
|
-
this.
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
1135
|
+
let SeparatorComponent = class SeparatorComponent extends DisposableComponent {
|
|
1136
|
+
constructor(parent) {
|
|
1137
|
+
super();
|
|
1138
|
+
this.parent = parent;
|
|
1139
|
+
if (parent) {
|
|
1140
|
+
parent.registerSeparator(this);
|
|
1141
|
+
}
|
|
756
1142
|
}
|
|
757
|
-
|
|
758
|
-
return this.
|
|
1143
|
+
isVertical() {
|
|
1144
|
+
return this === null || this === void 0 ? void 0 : this.parent.isRoot();
|
|
759
1145
|
}
|
|
760
1146
|
ngOnInit() {
|
|
761
1147
|
}
|
|
762
1148
|
};
|
|
763
|
-
|
|
764
|
-
{ type:
|
|
1149
|
+
SeparatorComponent.ctorParameters = () => [
|
|
1150
|
+
{ type: CommandGroup, decorators: [{ type: Optional }] }
|
|
765
1151
|
];
|
|
766
|
-
__decorate([
|
|
767
|
-
Input(), StoreInValueModel('faceModel'),
|
|
768
|
-
__metadata("design:type", Object)
|
|
769
|
-
], PopupMenuComponent.prototype, "face", void 0);
|
|
770
|
-
PopupMenuComponent = PopupMenuComponent_1 = __decorate([
|
|
1152
|
+
SeparatorComponent = __decorate([
|
|
771
1153
|
Component({
|
|
772
|
-
selector: 'aup-
|
|
1154
|
+
selector: 'aup-separator',
|
|
773
1155
|
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) }]
|
|
1156
|
+
<mat-divider [vertical]="isVertical()"></mat-divider>`
|
|
783
1157
|
}),
|
|
784
|
-
|
|
785
|
-
|
|
1158
|
+
__param(0, Optional()),
|
|
1159
|
+
__metadata("design:paramtypes", [CommandGroup])
|
|
1160
|
+
], SeparatorComponent);
|
|
786
1161
|
|
|
787
|
-
|
|
1162
|
+
const ɵ0$2 = CommandGroup.factory;
|
|
788
1163
|
/**
|
|
789
1164
|
*
|
|
790
1165
|
*/
|
|
791
|
-
let
|
|
792
|
-
constructor(
|
|
793
|
-
super(
|
|
794
|
-
this.
|
|
1166
|
+
let ToolBarComponent = class ToolBarComponent extends DisposableComponent {
|
|
1167
|
+
constructor(group) {
|
|
1168
|
+
super();
|
|
1169
|
+
this.group = group;
|
|
1170
|
+
}
|
|
1171
|
+
ngOnInit() {
|
|
1172
|
+
}
|
|
1173
|
+
ngAfterContentInit() {
|
|
1174
|
+
this.group.initialise();
|
|
1175
|
+
}
|
|
1176
|
+
ngAfterViewInit() {
|
|
795
1177
|
}
|
|
796
1178
|
};
|
|
797
|
-
|
|
798
|
-
{ type:
|
|
1179
|
+
ToolBarComponent.ctorParameters = () => [
|
|
1180
|
+
{ type: CommandGroup }
|
|
799
1181
|
];
|
|
800
1182
|
__decorate([
|
|
801
|
-
|
|
802
|
-
__metadata("design:type",
|
|
803
|
-
|
|
804
|
-
|
|
1183
|
+
Trace(),
|
|
1184
|
+
__metadata("design:type", Function),
|
|
1185
|
+
__metadata("design:paramtypes", []),
|
|
1186
|
+
__metadata("design:returntype", void 0)
|
|
1187
|
+
], ToolBarComponent.prototype, "ngOnInit", null);
|
|
1188
|
+
__decorate([
|
|
1189
|
+
Trace(),
|
|
1190
|
+
__metadata("design:type", Function),
|
|
1191
|
+
__metadata("design:paramtypes", []),
|
|
1192
|
+
__metadata("design:returntype", void 0)
|
|
1193
|
+
], ToolBarComponent.prototype, "ngAfterContentInit", null);
|
|
1194
|
+
__decorate([
|
|
1195
|
+
Trace(),
|
|
1196
|
+
__metadata("design:type", Function),
|
|
1197
|
+
__metadata("design:paramtypes", []),
|
|
1198
|
+
__metadata("design:returntype", void 0)
|
|
1199
|
+
], ToolBarComponent.prototype, "ngAfterViewInit", null);
|
|
1200
|
+
ToolBarComponent = __decorate([
|
|
805
1201
|
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) }]
|
|
1202
|
+
selector: 'aup-tool-bar',
|
|
1203
|
+
template: '<aup-command-group-renderer [renderRootNode]="false" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1204
|
+
providers: [{ provide: CommandGroup, useFactory: ɵ0$2 }],
|
|
1205
|
+
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
1206
|
}),
|
|
819
|
-
__metadata("design:paramtypes", [
|
|
820
|
-
],
|
|
1207
|
+
__metadata("design:paramtypes", [CommandGroup])
|
|
1208
|
+
], ToolBarComponent);
|
|
821
1209
|
|
|
822
1210
|
let FocusContainerComponent = class FocusContainerComponent extends DisposableComponent {
|
|
823
1211
|
constructor(focusManager) {
|
|
@@ -1956,7 +2344,7 @@ SelectHeaderCellRendererComponent = __decorate([
|
|
|
1956
2344
|
|
|
1957
2345
|
const noop = () => {
|
|
1958
2346
|
};
|
|
1959
|
-
const ɵ0 = noop;
|
|
2347
|
+
const ɵ0$3 = noop;
|
|
1960
2348
|
const CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
|
|
1961
2349
|
class ColumnModel {
|
|
1962
2350
|
constructor(columnId, defaults) {
|
|
@@ -2419,12 +2807,14 @@ let TableModel = TableModel_1 = class TableModel {
|
|
|
2419
2807
|
}
|
|
2420
2808
|
return column;
|
|
2421
2809
|
}
|
|
2810
|
+
// removeColumn(column: ColumnModel<Row>) {
|
|
2811
|
+
//
|
|
2812
|
+
// }
|
|
2422
2813
|
columnTextProperties(columnTextProperties) {
|
|
2423
2814
|
this._columnTextPropertiesLookup = columnTextProperties;
|
|
2424
2815
|
}
|
|
2425
2816
|
getColumnTextProperties(column) {
|
|
2426
|
-
|
|
2427
|
-
return factory ? factory() : undefined;
|
|
2817
|
+
return this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[column.columnId] : undefined;
|
|
2428
2818
|
}
|
|
2429
2819
|
startEditSession(row) {
|
|
2430
2820
|
const rowId = this.identityOf(row);
|
|
@@ -2713,10 +3103,10 @@ TableHeaderCellRendererComponent = __decorate([
|
|
|
2713
3103
|
__metadata("design:paramtypes", [])
|
|
2714
3104
|
], TableHeaderCellRendererComponent);
|
|
2715
3105
|
|
|
2716
|
-
class MenuItemData
|
|
3106
|
+
class MenuItemData {
|
|
2717
3107
|
constructor(factory, face) {
|
|
2718
|
-
super(face);
|
|
2719
3108
|
this.factory = factory;
|
|
3109
|
+
this.face = face;
|
|
2720
3110
|
}
|
|
2721
3111
|
}
|
|
2722
3112
|
/**
|
|
@@ -2760,24 +3150,16 @@ TableRowMenuComponent = __decorate([
|
|
|
2760
3150
|
Component({
|
|
2761
3151
|
selector: 'aup-table-row-menu',
|
|
2762
3152
|
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>
|
|
3153
|
+
<aup-tool-bar>
|
|
3154
|
+
<aup-command *ngFor="let action of actions" [command]="action.factory.create(value)"
|
|
3155
|
+
[face]="action.faceModel"></aup-command>
|
|
3156
|
+
</aup-tool-bar>
|
|
3157
|
+
<ng-container *ngIf="moreActions.length > 0">
|
|
3158
|
+
<aup-more-menu>
|
|
3159
|
+
<aup-command *ngFor="let action of moreActions" [command]="action.factory.create(value)"
|
|
3160
|
+
[face]="action.faceModel"></aup-command>
|
|
3161
|
+
</aup-more-menu>
|
|
3162
|
+
</ng-container>
|
|
2781
3163
|
`,
|
|
2782
3164
|
styles: [`:host {
|
|
2783
3165
|
display: inline-flex;
|
|
@@ -2913,13 +3295,16 @@ ComponentsModule = __decorate([
|
|
|
2913
3295
|
IconComponent,
|
|
2914
3296
|
SectionHeaderComponent,
|
|
2915
3297
|
TableRowMenuComponent,
|
|
2916
|
-
|
|
3298
|
+
ToolBarComponent,
|
|
2917
3299
|
CommandComponent,
|
|
2918
3300
|
PopupMenuComponent,
|
|
3301
|
+
CommandGroupComponent,
|
|
2919
3302
|
CommandFaceComponent,
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
3303
|
+
MoreMenuComponent,
|
|
3304
|
+
SeparatorComponent,
|
|
3305
|
+
FlexComponent,
|
|
3306
|
+
CommandGroupMenuRendererComponent,
|
|
3307
|
+
CommandGroupRendererComponent
|
|
2923
3308
|
],
|
|
2924
3309
|
imports: [
|
|
2925
3310
|
CommonModule,
|
|
@@ -2939,8 +3324,8 @@ ComponentsModule = __decorate([
|
|
|
2939
3324
|
FontAwesomeModule,
|
|
2940
3325
|
MatTooltipModule,
|
|
2941
3326
|
MatAutocompleteModule,
|
|
2942
|
-
|
|
2943
|
-
|
|
3327
|
+
MatMenuModule,
|
|
3328
|
+
MatDividerModule
|
|
2944
3329
|
],
|
|
2945
3330
|
exports: [
|
|
2946
3331
|
NumberInputComponent,
|
|
@@ -2966,28 +3351,17 @@ ComponentsModule = __decorate([
|
|
|
2966
3351
|
IconComponent,
|
|
2967
3352
|
SectionHeaderComponent,
|
|
2968
3353
|
TableRowMenuComponent,
|
|
2969
|
-
|
|
3354
|
+
CommandGroupComponent,
|
|
3355
|
+
ToolBarComponent,
|
|
2970
3356
|
CommandComponent,
|
|
2971
|
-
AbstractPopupMenuComponent,
|
|
2972
3357
|
PopupMenuComponent,
|
|
2973
3358
|
CommandFaceComponent,
|
|
2974
|
-
|
|
2975
|
-
|
|
3359
|
+
MoreMenuComponent,
|
|
3360
|
+
SeparatorComponent,
|
|
3361
|
+
FlexComponent
|
|
2976
3362
|
],
|
|
2977
3363
|
providers: [
|
|
2978
3364
|
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
3365
|
]
|
|
2992
3366
|
}),
|
|
2993
3367
|
__metadata("design:paramtypes", [FaIconLibrary])
|
|
@@ -6328,7 +6702,7 @@ ListPlaceNavComponent = __decorate([
|
|
|
6328
6702
|
* (at)Place({
|
|
6329
6703
|
* path: 'myPlace',
|
|
6330
6704
|
* data: {
|
|
6331
|
-
* nav: I18n.places.myPlace.nav
|
|
6705
|
+
* nav: I18n.places.myPlace.nav
|
|
6332
6706
|
* }
|
|
6333
6707
|
* })
|
|
6334
6708
|
*/
|
|
@@ -6894,5 +7268,5 @@ function VisitParameterList(options) {
|
|
|
6894
7268
|
* Generated bundle index. Do not edit.
|
|
6895
7269
|
*/
|
|
6896
7270
|
|
|
6897
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation,
|
|
7271
|
+
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
7272
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|