@coolon/angular-ui-powerups 2.0.0-alpha.27 → 2.0.0-alpha.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +228 -118
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.d.ts +39 -36
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +37 -34
- 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-bar.component.js +7 -11
- package/esm2015/lib/components/commands/command-bar.component.js.map +1 -1
- package/esm2015/lib/components/commands/command-bar.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/command-container.js +3 -22
- package/esm2015/lib/components/commands/command-container.js.map +1 -1
- package/esm2015/lib/components/commands/command-container.metadata.json +1 -1
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js +57 -0
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.js +40 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js +49 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +62 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/components.module.js +12 -6
- 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 +4 -1
- package/esm2015/lib/components/index.js.map +1 -1
- package/esm2015/lib/components/index.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm5/coolon-angular-ui-powerups.js +37 -34
- 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-bar.component.js +3 -7
- package/esm5/lib/components/commands/command-bar.component.js.map +1 -1
- package/esm5/lib/components/commands/command-container.js +2 -23
- package/esm5/lib/components/commands/command-container.js.map +1 -1
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js +64 -0
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/more-menu.component.js +35 -0
- package/esm5/lib/components/commands/popup-menu/more-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.js +45 -0
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +66 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/components.module.js +12 -6
- 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 +4 -1
- package/esm5/lib/components/index.js.map +1 -1
- package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +170 -60
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +167 -64
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/command-bar.component.d.ts +1 -2
- package/lib/components/commands/command-container.d.ts +2 -2
- package/lib/components/commands/popup-menu/abstract-popup-menu.component.d.ts +18 -0
- package/lib/components/commands/popup-menu/more-menu.component.d.ts +9 -0
- package/lib/components/commands/popup-menu/popup-menu.component.d.ts +14 -0
- package/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.d.ts +21 -0
- package/lib/components/index.d.ts +4 -1
- package/package.json +1 -1
- package/esm2015/lib/components/commands/command-container.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/command-menu/command-menu.component.js +0 -65
- package/esm2015/lib/components/commands/command-menu/command-menu.component.js.map +0 -1
- package/esm2015/lib/components/commands/command-menu/command-menu.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/command-menu/command-menu.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/command-menu/command-menu.component.scss.shim.ngstyle.js.map +0 -1
- package/esm5/lib/components/commands/command-container.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/command-menu/command-menu.component.js +0 -70
- package/esm5/lib/components/commands/command-menu/command-menu.component.js.map +0 -1
- package/esm5/lib/components/commands/command-menu/command-menu.component.ngfactory.js.map +0 -1
- package/esm5/lib/components/commands/command-menu/command-menu.component.scss.shim.ngstyle.js.map +0 -1
- package/lib/components/commands/command-menu/command-menu.component.d.ts +0 -22
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __extends, __decorate, __metadata, __param, __assign, __awaiter, __generator, __spread } from 'tslib';
|
|
2
2
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
3
|
-
import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, ContentChild, TemplateRef, Component, forwardRef, Optional, HostBinding, ViewEncapsulation,
|
|
3
|
+
import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, ContentChild, TemplateRef, Component, forwardRef, Optional, HostBinding, ViewEncapsulation, EventEmitter, Output, ViewChild, ChangeDetectorRef, Self, ContentChildren, QueryList, ViewContainerRef, InjectionToken, Injector, ComponentFactoryResolver, ViewChildren, SkipSelf } from '@angular/core';
|
|
4
4
|
import { FormsModule } from '@angular/forms';
|
|
5
5
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
6
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -13,12 +13,12 @@ import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
|
13
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
14
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
15
15
|
import { MatIconModule } from '@angular/material/icon';
|
|
16
|
-
import { MatMenuTrigger, _MatMenuDirectivesModule, MatMenuModule } from '@angular/material/menu';
|
|
16
|
+
import { MatMenu, MatMenuTrigger, _MatMenuDirectivesModule, MatMenuModule } from '@angular/material/menu';
|
|
17
17
|
import { MatTableModule } from '@angular/material/table';
|
|
18
18
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
19
19
|
import { FaIconLibrary, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
20
20
|
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
21
|
-
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, MutableListModel, Disposable, MutableValueModel, StoreInValueModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext,
|
|
21
|
+
import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, MutableListModel, Disposable, MutableValueModel, StoreInValueModel, ListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, StoreInListModel, ValueModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Functions } from '@coolon/pectin';
|
|
22
22
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
23
23
|
import ___default, { isEqual, isNil } from 'lodash';
|
|
24
24
|
import { Enum } from 'typescript-string-enums';
|
|
@@ -523,7 +523,6 @@ var CommandContainer = /** @class */ (function (_super) {
|
|
|
523
523
|
_this._commandRegistrations = new MutableListModel();
|
|
524
524
|
return _this;
|
|
525
525
|
}
|
|
526
|
-
CommandContainer_1 = CommandContainer;
|
|
527
526
|
Object.defineProperty(CommandContainer.prototype, "commandRegistrations", {
|
|
528
527
|
get: function () {
|
|
529
528
|
return this._commandRegistrations.readonly;
|
|
@@ -533,34 +532,15 @@ var CommandContainer = /** @class */ (function (_super) {
|
|
|
533
532
|
});
|
|
534
533
|
CommandContainer.prototype.registerCommand = function (command, face) {
|
|
535
534
|
var _this = this;
|
|
536
|
-
var registration = new
|
|
535
|
+
var registration = { command: command, faceAdapter: new CommandFace.Adapter(face) };
|
|
537
536
|
this._commandRegistrations.push(registration);
|
|
538
537
|
return Disposable.disposableThatRuns(function () { return _this._commandRegistrations.remove(registration); });
|
|
539
538
|
};
|
|
540
539
|
CommandContainer.prototype.getDefaultIconPosition = function () {
|
|
541
540
|
return CommandFace.Position.START;
|
|
542
541
|
};
|
|
543
|
-
var CommandContainer_1;
|
|
544
|
-
CommandContainer = CommandContainer_1 = __decorate([
|
|
545
|
-
Component({
|
|
546
|
-
template: ''
|
|
547
|
-
}),
|
|
548
|
-
__metadata("design:paramtypes", [])
|
|
549
|
-
], CommandContainer);
|
|
550
542
|
return CommandContainer;
|
|
551
543
|
}(GarbageCollector));
|
|
552
|
-
(function (CommandContainer) {
|
|
553
|
-
var Registration = /** @class */ (function (_super) {
|
|
554
|
-
__extends(Registration, _super);
|
|
555
|
-
function Registration(command, face) {
|
|
556
|
-
var _this = _super.call(this, face) || this;
|
|
557
|
-
_this.command = command;
|
|
558
|
-
return _this;
|
|
559
|
-
}
|
|
560
|
-
return Registration;
|
|
561
|
-
}(CommandFace.Adapter));
|
|
562
|
-
CommandContainer.Registration = Registration;
|
|
563
|
-
})(CommandContainer || (CommandContainer = {}));
|
|
564
544
|
|
|
565
545
|
/**
|
|
566
546
|
*
|
|
@@ -574,17 +554,13 @@ var CommandBarComponent = /** @class */ (function (_super) {
|
|
|
574
554
|
CommandBarComponent.prototype.ngOnInit = function () {
|
|
575
555
|
};
|
|
576
556
|
CommandBarComponent.prototype.getButtonColor = function (registration) {
|
|
577
|
-
return registration.destructive ? 'warn' : undefined;
|
|
557
|
+
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
578
558
|
};
|
|
579
559
|
var CommandBarComponent_1;
|
|
580
|
-
__decorate([
|
|
581
|
-
ContentChild('moreMenu'),
|
|
582
|
-
__metadata("design:type", TemplateRef)
|
|
583
|
-
], CommandBarComponent.prototype, "moreMenuTemplateRef", void 0);
|
|
584
560
|
CommandBarComponent = CommandBarComponent_1 = __decorate([
|
|
585
561
|
Component({
|
|
586
562
|
selector: 'aup-command-bar',
|
|
587
|
-
template: "\n <ng-container *ngFor=\"let registration of commandRegistrations.value\">\n <button *ngIf=\"registration.icon && !registration.text\"\n mat-icon-button\n [color]=\"getButtonColor(registration)\"\n [pectinCommand]=\"registration.command\"\n [matTooltip]=\"registration.tooltip\"\n >\n <aup-command-face [face]=\"registration.face\"></aup-command-face>\n </button>\n <button *ngIf=\"registration.text\"\n [color]=\"getButtonColor(registration)\"\n mat-button\n [pectinCommand]=\"registration.command\"\n [matTooltip]=\"registration.tooltip\"\n >\n <aup-command-face [face]=\"registration.face\"></aup-command-face>\n </button>\n </ng-container>\n ",
|
|
563
|
+
template: "\n <ng-container *ngFor=\"let registration of commandRegistrations.value\">\n <button *ngIf=\"registration.faceAdapter.icon && !registration.faceAdapter.text\"\n mat-icon-button\n [color]=\"getButtonColor(registration)\"\n [pectinCommand]=\"registration.command\"\n [matTooltip]=\"registration.faceAdapter.tooltip\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\"></aup-command-face>\n </button>\n <button *ngIf=\"registration.faceAdapter.text\"\n [color]=\"getButtonColor(registration)\"\n mat-button\n [pectinCommand]=\"registration.command\"\n [matTooltip]=\"registration.tooltip\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\"></aup-command-face>\n </button>\n </ng-container>\n ",
|
|
588
564
|
providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return CommandBarComponent_1; }) }],
|
|
589
565
|
styles: [":host {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n }"]
|
|
590
566
|
}),
|
|
@@ -745,66 +721,189 @@ var CommandComponent = /** @class */ (function (_super) {
|
|
|
745
721
|
/**
|
|
746
722
|
*
|
|
747
723
|
*/
|
|
748
|
-
var
|
|
749
|
-
__extends(
|
|
750
|
-
function
|
|
724
|
+
var PopupMenuRendererComponent = /** @class */ (function (_super) {
|
|
725
|
+
__extends(PopupMenuRendererComponent, _super);
|
|
726
|
+
function PopupMenuRendererComponent() {
|
|
751
727
|
var _this = _super.call(this) || this;
|
|
752
|
-
_this.faceModel = new MutableValueModel();
|
|
753
728
|
_this.xPosition = 'after';
|
|
754
729
|
_this.yPosition = 'below';
|
|
730
|
+
_this.commandExecuted = new EventEmitter();
|
|
755
731
|
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
756
|
-
_this.tooltip = chain(_this.faceModel).map(function (face) { return new CommandFace.Adapter(face); }).pluck('tooltip');
|
|
757
732
|
var registrations = chain(_this.commandRegistrations);
|
|
758
|
-
var iconCount = registrations.select(function (r) { return !!r.icon; }).count();
|
|
733
|
+
var iconCount = registrations.select(function (r) { return !!r.faceAdapter.icon; }).count();
|
|
759
734
|
_this.hasMixedIcons = valueOf.all(iconCount.isGreaterThan(0), iconCount.doesNotEqual(registrations.length)).areTruthy();
|
|
760
735
|
return _this;
|
|
761
736
|
}
|
|
762
|
-
|
|
763
|
-
CommandMenuComponent.prototype.ngOnInit = function () {
|
|
737
|
+
PopupMenuRendererComponent.prototype.ngOnInit = function () {
|
|
764
738
|
};
|
|
765
|
-
|
|
739
|
+
PopupMenuRendererComponent.prototype.getPopupMenuCommandFor = function (item) {
|
|
766
740
|
var _this = this;
|
|
767
741
|
var when = Dsl.disposeWith(this).when;
|
|
768
742
|
when(item.command.busy).becomesFalsey(function () {
|
|
769
|
-
_this.
|
|
743
|
+
_this.commandExecuted.emit();
|
|
770
744
|
});
|
|
771
745
|
return item.command;
|
|
772
746
|
};
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
};
|
|
776
|
-
CommandMenuComponent.prototype.getButtonColor = function (registration) {
|
|
777
|
-
return registration.destructive ? 'warn' : undefined;
|
|
747
|
+
PopupMenuRendererComponent.prototype.getButtonColor = function (registration) {
|
|
748
|
+
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
778
749
|
};
|
|
779
|
-
var CommandMenuComponent_1;
|
|
780
750
|
__decorate([
|
|
781
|
-
Input(),
|
|
751
|
+
Input(), TrackExternal(),
|
|
752
|
+
__metadata("design:type", ListModel)
|
|
753
|
+
], PopupMenuRendererComponent.prototype, "commandRegistrations", void 0);
|
|
754
|
+
__decorate([
|
|
755
|
+
Input(),
|
|
756
|
+
__metadata("design:type", String)
|
|
757
|
+
], PopupMenuRendererComponent.prototype, "xPosition", void 0);
|
|
758
|
+
__decorate([
|
|
759
|
+
Input(),
|
|
760
|
+
__metadata("design:type", String)
|
|
761
|
+
], PopupMenuRendererComponent.prototype, "yPosition", void 0);
|
|
762
|
+
__decorate([
|
|
763
|
+
Output(),
|
|
782
764
|
__metadata("design:type", Object)
|
|
783
|
-
],
|
|
765
|
+
], PopupMenuRendererComponent.prototype, "commandExecuted", void 0);
|
|
766
|
+
__decorate([
|
|
767
|
+
ViewChild(MatMenu),
|
|
768
|
+
__metadata("design:type", MatMenu)
|
|
769
|
+
], PopupMenuRendererComponent.prototype, "matMenu", void 0);
|
|
770
|
+
PopupMenuRendererComponent = __decorate([
|
|
771
|
+
Component({
|
|
772
|
+
selector: 'aup-popup-menu-renderer',
|
|
773
|
+
template: "<mat-menu [xPosition]=\"xPosition\" [yPosition]=\"yPosition\" >\n <button *ngFor=\"let registration of commandRegistrations.value\"\n mat-menu-item\n [pectinCommand]=\"getPopupMenuCommandFor(registration)\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\" [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n</mat-menu>\n",
|
|
774
|
+
styles: [":host{display:inline-flex;flex-direction:row;align-items:center}"]
|
|
775
|
+
}),
|
|
776
|
+
__metadata("design:paramtypes", [])
|
|
777
|
+
], PopupMenuRendererComponent);
|
|
778
|
+
return PopupMenuRendererComponent;
|
|
779
|
+
}(DisposableComponent));
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
*
|
|
783
|
+
*/
|
|
784
|
+
var AbstractPopupMenuComponent = /** @class */ (function (_super) {
|
|
785
|
+
__extends(AbstractPopupMenuComponent, _super);
|
|
786
|
+
function AbstractPopupMenuComponent(cdr) {
|
|
787
|
+
var _this = _super.call(this) || this;
|
|
788
|
+
_this.cdr = cdr;
|
|
789
|
+
_this.xPosition = 'after';
|
|
790
|
+
_this.yPosition = 'below';
|
|
791
|
+
return _this;
|
|
792
|
+
}
|
|
793
|
+
AbstractPopupMenuComponent.prototype.ngAfterViewInit = function () {
|
|
794
|
+
this.cdr.detectChanges();
|
|
795
|
+
};
|
|
796
|
+
Object.defineProperty(AbstractPopupMenuComponent.prototype, "matMenuComponent", {
|
|
797
|
+
get: function () {
|
|
798
|
+
var _a;
|
|
799
|
+
return (_a = this.popupMenu) === null || _a === void 0 ? void 0 : _a.matMenu;
|
|
800
|
+
},
|
|
801
|
+
enumerable: true,
|
|
802
|
+
configurable: true
|
|
803
|
+
});
|
|
804
|
+
AbstractPopupMenuComponent.prototype.closeMenu = function () {
|
|
805
|
+
this.menuTrigger.closeMenu();
|
|
806
|
+
};
|
|
807
|
+
AbstractPopupMenuComponent.prototype.getButtonColor = function (registration) {
|
|
808
|
+
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
809
|
+
};
|
|
810
|
+
AbstractPopupMenuComponent.ctorParameters = function () { return [
|
|
811
|
+
{ type: ChangeDetectorRef }
|
|
812
|
+
]; };
|
|
784
813
|
__decorate([
|
|
785
814
|
Input(),
|
|
786
815
|
__metadata("design:type", String)
|
|
787
|
-
],
|
|
816
|
+
], AbstractPopupMenuComponent.prototype, "xPosition", void 0);
|
|
788
817
|
__decorate([
|
|
789
818
|
Input(),
|
|
790
819
|
__metadata("design:type", String)
|
|
791
|
-
],
|
|
820
|
+
], AbstractPopupMenuComponent.prototype, "yPosition", void 0);
|
|
821
|
+
__decorate([
|
|
822
|
+
ViewChild(PopupMenuRendererComponent),
|
|
823
|
+
__metadata("design:type", PopupMenuRendererComponent)
|
|
824
|
+
], AbstractPopupMenuComponent.prototype, "popupMenu", void 0);
|
|
792
825
|
__decorate([
|
|
793
826
|
ViewChild(MatMenuTrigger),
|
|
794
827
|
__metadata("design:type", MatMenuTrigger)
|
|
795
|
-
],
|
|
796
|
-
|
|
828
|
+
], AbstractPopupMenuComponent.prototype, "menuTrigger", void 0);
|
|
829
|
+
AbstractPopupMenuComponent = __decorate([
|
|
797
830
|
Component({
|
|
798
|
-
selector: 'aup-
|
|
799
|
-
template:
|
|
800
|
-
providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return CommandMenuComponent_1; }) }],
|
|
801
|
-
styles: [":host{display:inline-flex;flex-direction:row;align-items:center}"]
|
|
831
|
+
selector: 'aup-abstract-popup-menu',
|
|
832
|
+
template: ''
|
|
802
833
|
}),
|
|
803
|
-
__metadata("design:paramtypes", [])
|
|
804
|
-
],
|
|
805
|
-
return
|
|
834
|
+
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
835
|
+
], AbstractPopupMenuComponent);
|
|
836
|
+
return AbstractPopupMenuComponent;
|
|
806
837
|
}(CommandContainer));
|
|
807
838
|
|
|
839
|
+
/**
|
|
840
|
+
*
|
|
841
|
+
*/
|
|
842
|
+
var PopupMenuComponent = /** @class */ (function (_super) {
|
|
843
|
+
__extends(PopupMenuComponent, _super);
|
|
844
|
+
function PopupMenuComponent(cdr) {
|
|
845
|
+
var _this = _super.call(this, cdr) || this;
|
|
846
|
+
_this.faceModel = new MutableValueModel();
|
|
847
|
+
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
848
|
+
var faceAdapterModel = chain(_this.faceModel).map(function (face) { return new CommandFace.Adapter(face); });
|
|
849
|
+
_this.faceTooltipModel = faceAdapterModel.pluck('tooltip');
|
|
850
|
+
return _this;
|
|
851
|
+
}
|
|
852
|
+
PopupMenuComponent_1 = PopupMenuComponent;
|
|
853
|
+
PopupMenuComponent.prototype.getTooltip = function () {
|
|
854
|
+
return this.faceTooltipModel.value;
|
|
855
|
+
};
|
|
856
|
+
PopupMenuComponent.prototype.ngOnInit = function () {
|
|
857
|
+
};
|
|
858
|
+
var PopupMenuComponent_1;
|
|
859
|
+
PopupMenuComponent.ctorParameters = function () { return [
|
|
860
|
+
{ type: ChangeDetectorRef }
|
|
861
|
+
]; };
|
|
862
|
+
__decorate([
|
|
863
|
+
Input(), StoreInValueModel('faceModel'),
|
|
864
|
+
__metadata("design:type", Object)
|
|
865
|
+
], PopupMenuComponent.prototype, "face", void 0);
|
|
866
|
+
PopupMenuComponent = PopupMenuComponent_1 = __decorate([
|
|
867
|
+
Component({
|
|
868
|
+
selector: 'aup-popup-menu',
|
|
869
|
+
template: "\n <!-- we can only render the button after th popup menu has initialised and rendered it's menu component -->\n <button *ngIf=\"matMenuComponent\" mat-icon-button [matMenuTriggerFor]=\"matMenuComponent\" [matTooltip]=\"getTooltip()\">\n <aup-command-face [face]=\"face\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer [commandRegistrations]=\"commandRegistrations\" [yPosition]=\"yPosition\"\n [xPosition]=\"xPosition\"\n (commandExecuted)=\"closeMenu()\"></aup-popup-menu-renderer>\n ",
|
|
870
|
+
providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return PopupMenuComponent_1; }) }]
|
|
871
|
+
}),
|
|
872
|
+
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
873
|
+
], PopupMenuComponent);
|
|
874
|
+
return PopupMenuComponent;
|
|
875
|
+
}(AbstractPopupMenuComponent));
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
*
|
|
879
|
+
*/
|
|
880
|
+
var MoreMenuComponent = /** @class */ (function (_super) {
|
|
881
|
+
__extends(MoreMenuComponent, _super);
|
|
882
|
+
function MoreMenuComponent(cdr) {
|
|
883
|
+
var _this = _super.call(this, cdr) || this;
|
|
884
|
+
_this.xPosition = "before"; // this should be the default unless overriden by the user.
|
|
885
|
+
return _this;
|
|
886
|
+
}
|
|
887
|
+
MoreMenuComponent_1 = MoreMenuComponent;
|
|
888
|
+
var MoreMenuComponent_1;
|
|
889
|
+
MoreMenuComponent.ctorParameters = function () { return [
|
|
890
|
+
{ type: ChangeDetectorRef }
|
|
891
|
+
]; };
|
|
892
|
+
__decorate([
|
|
893
|
+
Input(),
|
|
894
|
+
__metadata("design:type", String)
|
|
895
|
+
], MoreMenuComponent.prototype, "tooltip", void 0);
|
|
896
|
+
MoreMenuComponent = MoreMenuComponent_1 = __decorate([
|
|
897
|
+
Component({
|
|
898
|
+
selector: 'aup-more-menu',
|
|
899
|
+
template: "\n <!-- we can only render the button after th popup menu has initialised and rendered it's menu component -->\n <button *ngIf=\"matMenuComponent\" mat-icon-button [matMenuTriggerFor]=\"matMenuComponent\" [matTooltip]=\"tooltip\">\n <mat-icon>more_vert</mat-icon>\n </button>\n <aup-popup-menu-renderer [commandRegistrations]=\"commandRegistrations\"\n [xPosition]=\"xPosition\"\n [yPosition]=\"yPosition\"\n (commandExecuted)=\"closeMenu()\"></aup-popup-menu-renderer>\n ",
|
|
900
|
+
providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return MoreMenuComponent_1; }) }]
|
|
901
|
+
}),
|
|
902
|
+
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
903
|
+
], MoreMenuComponent);
|
|
904
|
+
return MoreMenuComponent;
|
|
905
|
+
}(AbstractPopupMenuComponent));
|
|
906
|
+
|
|
808
907
|
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
809
908
|
__extends(FocusContainerComponent, _super);
|
|
810
909
|
function FocusContainerComponent(focusManager) {
|
|
@@ -3082,9 +3181,11 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3082
3181
|
TableRowMenuComponent,
|
|
3083
3182
|
CommandBarComponent,
|
|
3084
3183
|
CommandComponent,
|
|
3085
|
-
|
|
3184
|
+
PopupMenuComponent,
|
|
3086
3185
|
CommandFaceComponent,
|
|
3087
|
-
|
|
3186
|
+
AbstractPopupMenuComponent,
|
|
3187
|
+
PopupMenuRendererComponent,
|
|
3188
|
+
MoreMenuComponent
|
|
3088
3189
|
],
|
|
3089
3190
|
imports: [
|
|
3090
3191
|
CommonModule,
|
|
@@ -3133,9 +3234,11 @@ var ComponentsModule = /** @class */ (function () {
|
|
|
3133
3234
|
TableRowMenuComponent,
|
|
3134
3235
|
CommandBarComponent,
|
|
3135
3236
|
CommandComponent,
|
|
3136
|
-
|
|
3237
|
+
AbstractPopupMenuComponent,
|
|
3238
|
+
PopupMenuComponent,
|
|
3137
3239
|
CommandFaceComponent,
|
|
3138
|
-
|
|
3240
|
+
PopupMenuRendererComponent,
|
|
3241
|
+
MoreMenuComponent
|
|
3139
3242
|
],
|
|
3140
3243
|
providers: [
|
|
3141
3244
|
FocusBindingFactory
|
|
@@ -7423,5 +7526,5 @@ function VisitParameterList(options) {
|
|
|
7423
7526
|
* Generated bundle index. Do not edit.
|
|
7424
7527
|
*/
|
|
7425
7528
|
|
|
7426
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandBarComponent, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent,
|
|
7529
|
+
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandBarComponent, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, IconComponent, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0, DirectivesModule as ɵa, CommandDirective as ɵb, CardContainerComponent as ɵba, TableComponent as ɵbb, EditRowControls as ɵbc, ColumnTemplateDirective as ɵbd, DefaultCellRendererComponent as ɵbe, TableCellRendererComponent as ɵbf, SelectCellRendererComponent as ɵbg, SelectHeaderCellRendererComponent as ɵbh, DefaultHeaderCellRendererComponent as ɵbi, TableHeaderCellRendererComponent as ɵbj, IconComponent as ɵbk, SectionHeaderComponent as ɵbl, TableRowMenuComponent as ɵbm, CommandBarComponent as ɵbn, CommandContainer as ɵbo, CommandComponent as ɵbp, PopupMenuComponent as ɵbq, AbstractPopupMenuComponent as ɵbr, PopupMenuRendererComponent as ɵbs, CommandFaceComponent as ɵbt, MoreMenuComponent as ɵbu, PlaceModule as ɵbv, ComponentsModule as ɵbw, EmptyStateComponent as ɵbx, BusyOverlayComponent as ɵby, PlaceOutletComponent as ɵbz, FocusBindingDirective as ɵc, leftRightPlaceAnimation as ɵca, LEFT_RIGHT_PLACE_ANIMATION as ɵcb, AUP_PLACE_CONFIG as ɵcc, PlaceRouter as ɵce, InteractionService as ɵcf, ModalInteractionContextFactory as ɵcg, UrlService as ɵch, PlaceHistory as ɵci, TabbedPlaceNavigationComponent as ɵcj, AbstractPlaceNavigationComponent as ɵck, ListPlaceNavComponent as ɵcl, SidePlaceNavigationComponent as ɵcm, InteractionModule as ɵcn, ActivityContainerComponent as ɵco, AbstractInteractionContext as ɵcp, ActivityOutletComponent as ɵcq, ConfirmationDialogComponent as ɵcr, ACTIVITY_DATA as ɵcs, Activity as ɵct, ConfirmThenDialogComponent as ɵcv, AlertDialogComponent as ɵcw, InPlaceInteractionContextComponent as ɵcy, AddItemInteractionContextComponent as ɵcz, DisposableComponent as ɵd, ActivityActionsComponent as ɵda, PopupInteractionContextComponent as ɵdb, StringInputActivity as ɵdc, AbstractInputActivity as ɵdd, SelectInputActivity as ɵde, InteractionContextTriggerFor as ɵdf, FocusBindingFactory as ɵe, ComponentsModule as ɵf, AbstractInputComponent as ɵg, AbstractValueInputComponent as ɵh, AbstractListInputComponent as ɵi, NumberInputComponent as ɵj, StringInputComponent as ɵk, TextInputComponent as ɵl, PasswordInputComponent as ɵm, SelectInputComponent as ɵn, MultipleSelectInputComponent as ɵo, AutocompleteInputComponent as ɵp, CheckboxInputComponent as ɵq, ScrollContainerComponent as ɵr, NoopComponent as ɵs, SwitchCaseOption as ɵt, SwitchCaseWhenDirective as ɵu, SwitchCaseDefaultDirective as ɵv, SwitchCaseComponent as ɵw, FocusContainerComponent as ɵx, VerticalFocusContainerComponent as ɵy, FocusableComponent as ɵz };
|
|
7427
7530
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|