@coolon/angular-ui-powerups 2.0.0-alpha.27 → 2.0.0-alpha.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +212 -117
- 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 +50 -0
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.js +35 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js +46 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +62 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/components/components.module.js +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 +57 -0
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/more-menu.component.js +30 -0
- package/esm5/lib/components/commands/popup-menu/more-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.js +42 -0
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +66 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +1 -0
- package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +1 -0
- package/esm5/lib/components/components.module.js +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 +154 -59
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +151 -63
- 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 +15 -0
- package/lib/components/commands/popup-menu/more-menu.component.d.ts +8 -0
- package/lib/components/commands/popup-menu/popup-menu.component.d.ts +14 -0
- package/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.d.ts +21 -0
- package/lib/components/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,10 +1,9 @@
|
|
|
1
|
-
import { OnInit
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
2
|
import { CommandContainer } from './command-container';
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
6
|
export declare class CommandBarComponent extends CommandContainer implements OnInit {
|
|
7
|
-
moreMenuTemplateRef: TemplateRef<any>;
|
|
8
7
|
constructor();
|
|
9
8
|
ngOnInit(): void;
|
|
10
9
|
getButtonColor(registration: CommandContainer.Registration): string;
|
|
@@ -8,8 +8,8 @@ export declare class CommandContainer extends GarbageCollector {
|
|
|
8
8
|
getDefaultIconPosition(): CommandFace.Position;
|
|
9
9
|
}
|
|
10
10
|
export declare namespace CommandContainer {
|
|
11
|
-
|
|
11
|
+
interface Registration {
|
|
12
12
|
readonly command: Command<unknown>;
|
|
13
|
-
|
|
13
|
+
readonly faceAdapter: CommandFace.Adapter;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MatMenu, MatMenuTrigger } from '@angular/material/menu';
|
|
2
|
+
import { CommandContainer } from '../command-container';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
export declare class AbstractPopupMenuComponent extends CommandContainer {
|
|
7
|
+
xPosition: 'before' | 'after';
|
|
8
|
+
yPosition: 'above' | 'below';
|
|
9
|
+
private popupMenu;
|
|
10
|
+
menuTrigger: MatMenuTrigger;
|
|
11
|
+
constructor();
|
|
12
|
+
get matMenuComponent(): MatMenu;
|
|
13
|
+
closeMenu(): void;
|
|
14
|
+
getButtonColor(registration: CommandContainer.Registration): string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { CommandFace } from '../command-face';
|
|
3
|
+
import { AbstractPopupMenuComponent } from './abstract-popup-menu.component';
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export declare class PopupMenuComponent extends AbstractPopupMenuComponent implements OnInit {
|
|
8
|
+
private readonly faceModel;
|
|
9
|
+
face: CommandFace;
|
|
10
|
+
private faceTooltipModel;
|
|
11
|
+
constructor();
|
|
12
|
+
getTooltip(): string;
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { MatMenu } from '@angular/material/menu';
|
|
3
|
+
import { BooleanValueModelChain, Command, ListModel, ValueModelChain } from '@coolon/pectin';
|
|
4
|
+
import { DisposableComponent } from '../../disposable-component';
|
|
5
|
+
import { CommandContainer } from '../command-container';
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export declare class PopupMenuRendererComponent extends DisposableComponent implements OnInit {
|
|
10
|
+
commandRegistrations: ListModel<CommandContainer.Registration>;
|
|
11
|
+
xPosition: 'before' | 'after';
|
|
12
|
+
yPosition: 'above' | 'below';
|
|
13
|
+
commandExecuted: EventEmitter<any>;
|
|
14
|
+
readonly tooltip: ValueModelChain<string>;
|
|
15
|
+
readonly hasMixedIcons: BooleanValueModelChain;
|
|
16
|
+
matMenu: MatMenu;
|
|
17
|
+
constructor();
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
getPopupMenuCommandFor(item: CommandContainer.Registration): Command<unknown>;
|
|
20
|
+
getButtonColor(registration: CommandContainer.Registration): string;
|
|
21
|
+
}
|
|
@@ -11,7 +11,10 @@ export * from "./commands/command-container";
|
|
|
11
11
|
export * from "./commands/command-face";
|
|
12
12
|
export * from "./commands/command.component";
|
|
13
13
|
export * from "./commands/command-face/command-face.component";
|
|
14
|
-
export * from "./commands/
|
|
14
|
+
export * from "./commands/popup-menu/abstract-popup-menu.component";
|
|
15
|
+
export * from "./commands/popup-menu/more-menu.component";
|
|
16
|
+
export * from "./commands/popup-menu/popup-menu.component";
|
|
17
|
+
export * from "./commands/popup-menu-renderer/popup-menu-renderer.component";
|
|
15
18
|
export * from "./focus-container/focus-container.component";
|
|
16
19
|
export * from "./forms/abstract-input.component";
|
|
17
20
|
export * from "./forms/abstract-list-input.component";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-container.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/command-container.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
var CommandMenuComponent_1;
|
|
2
|
-
import { __decorate, __metadata } from "tslib";
|
|
3
|
-
import { Component, forwardRef, Input, ViewChild } from '@angular/core';
|
|
4
|
-
import { MatMenuTrigger } from '@angular/material/menu';
|
|
5
|
-
import { Dsl, MutableValueModel, StoreInValueModel } from '@coolon/pectin';
|
|
6
|
-
import { CommandContainer } from '../command-container';
|
|
7
|
-
import { CommandFace } from '../command-face';
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
let CommandMenuComponent = CommandMenuComponent_1 = class CommandMenuComponent extends CommandContainer {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
this.faceModel = new MutableValueModel();
|
|
15
|
-
this.xPosition = 'after';
|
|
16
|
-
this.yPosition = 'below';
|
|
17
|
-
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
18
|
-
this.tooltip = chain(this.faceModel).map(face => new CommandFace.Adapter(face)).pluck('tooltip');
|
|
19
|
-
const registrations = chain(this.commandRegistrations);
|
|
20
|
-
const iconCount = registrations.select(r => !!r.icon).count();
|
|
21
|
-
this.hasMixedIcons = valueOf.all(iconCount.isGreaterThan(0), iconCount.doesNotEqual(registrations.length)).areTruthy();
|
|
22
|
-
}
|
|
23
|
-
ngOnInit() {
|
|
24
|
-
}
|
|
25
|
-
createMoreMenuCommand(item) {
|
|
26
|
-
const { when } = Dsl.disposeWith(this);
|
|
27
|
-
when(item.command.busy).becomesFalsey(() => {
|
|
28
|
-
this.closeMoreMenu();
|
|
29
|
-
});
|
|
30
|
-
return item.command;
|
|
31
|
-
}
|
|
32
|
-
closeMoreMenu() {
|
|
33
|
-
this.menu.closeMenu();
|
|
34
|
-
}
|
|
35
|
-
getButtonColor(registration) {
|
|
36
|
-
return registration.destructive ? 'warn' : undefined;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
__decorate([
|
|
40
|
-
Input(), StoreInValueModel('faceModel'),
|
|
41
|
-
__metadata("design:type", Object)
|
|
42
|
-
], CommandMenuComponent.prototype, "face", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
Input(),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], CommandMenuComponent.prototype, "xPosition", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
Input(),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], CommandMenuComponent.prototype, "yPosition", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
ViewChild(MatMenuTrigger),
|
|
53
|
-
__metadata("design:type", MatMenuTrigger)
|
|
54
|
-
], CommandMenuComponent.prototype, "menu", void 0);
|
|
55
|
-
CommandMenuComponent = CommandMenuComponent_1 = __decorate([
|
|
56
|
-
Component({
|
|
57
|
-
selector: 'aup-command-menu',
|
|
58
|
-
template: "<button #trigger mat-icon-button [matMenuTriggerFor]=\"menu\" [matTooltip]=\"tooltip.value\">\n <aup-command-face [face]=\"face\"></aup-command-face>\n</button>\n<mat-menu #menu=\"matMenu\" [xPosition]=\"xPosition\" [yPosition]=\"yPosition\">\n <button *ngFor=\"let registration of commandRegistrations.value\"\n mat-menu-item\n [pectinCommand]=\"createMoreMenuCommand(registration)\"\n >\n <aup-command-face [face]=\"registration.face\" [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n</mat-menu>\n",
|
|
59
|
-
providers: [{ provide: CommandContainer, useExisting: forwardRef(() => CommandMenuComponent_1) }],
|
|
60
|
-
styles: [":host{display:inline-flex;flex-direction:row;align-items:center}"]
|
|
61
|
-
}),
|
|
62
|
-
__metadata("design:paramtypes", [])
|
|
63
|
-
], CommandMenuComponent);
|
|
64
|
-
export { CommandMenuComponent };
|
|
65
|
-
//# sourceMappingURL=command-menu.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-menu.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/command-menu/command-menu.component.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAU,SAAS,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAGL,GAAG,EACH,iBAAiB,EACjB,iBAAiB,EAElB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C;;GAEG;AAOH,IAAa,oBAAoB,4BAAjC,MAAa,oBAAqB,SAAQ,gBAAgB;IAmBxD;QACE,KAAK,EAAE,CAAC;QAlBO,cAAS,GAAG,IAAI,iBAAiB,EAAe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AAO,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IACvD,CAAC;CAEF,CAAA;AA9CC;IADC,KAAK,EAAE,EAAE,iBAAiB,CAAC,WAAW,CAAC;;kDACtB;AAGlB;IADC,KAAK,EAAE;;uDACgC;AAGxC;IADC,KAAK,EAAE;;uDAC+B;AAGvC;IADC,SAAS,CAAC,cAAc,CAAC;8BACpB,cAAc;kDAAC;AAdV,oBAAoB;IANhC,SAAS,CAAC;QACT,QAAQ,EAAE,kBAAkB;QAC5B,8jBAA4C;QAE5C,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,sBAAoB,CAAC,EAAE,CAAC;;KAChG,CAAC;;GACW,oBAAoB,CAmDhC;SAnDY,oBAAoB","sourcesContent":["import { Component, forwardRef, Input, OnInit, ViewChild } from '@angular/core';\nimport { MatMenuTrigger } from '@angular/material/menu';\n\nimport {\n BooleanValueModelChain,\n Command,\n Dsl,\n MutableValueModel,\n StoreInValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport { CommandContainer } from '../command-container';\nimport { CommandFace } from '../command-face';\n\n\n/**\n *\n */\n@Component({\n selector: 'aup-command-menu',\n templateUrl: './command-menu.component.html',\n styleUrls: ['./command-menu.component.scss'],\n providers: [{ provide: CommandContainer, useExisting: forwardRef(() => CommandMenuComponent) }]\n})\nexport class CommandMenuComponent extends CommandContainer implements OnInit {\n\n private readonly faceModel = new MutableValueModel<CommandFace>();\n\n @Input() @StoreInValueModel('faceModel')\n face: CommandFace;\n\n @Input()\n xPosition: 'before' | 'after' = 'after';\n\n @Input()\n yPosition: 'above' | 'below' = 'below';\n\n @ViewChild(MatMenuTrigger)\n menu: MatMenuTrigger;\n\n readonly tooltip: ValueModelChain<string>;\n readonly hasMixedIcons: BooleanValueModelChain;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.tooltip = chain(this.faceModel).map(face => new CommandFace.Adapter(face)).pluck('tooltip');\n\n const registrations = chain(this.commandRegistrations);\n const iconCount = registrations.select(r => !!r.icon).count();\n this.hasMixedIcons = valueOf.all(\n iconCount.isGreaterThan(0),\n iconCount.doesNotEqual(registrations.length)\n ).areTruthy()\n }\n\n ngOnInit() {\n }\n\n createMoreMenuCommand(item: CommandContainer.Registration): Command<unknown> {\n const { when } = Dsl.disposeWith(this);\n when(item.command.busy).becomesFalsey(() => {\n this.closeMoreMenu();\n });\n return item.command;\n }\n\n private closeMoreMenu() {\n this.menu.closeMenu();\n }\n\n getButtonColor(registration: CommandContainer.Registration) {\n return registration.destructive ? 'warn' : undefined;\n }\n\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"CommandMenuComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../command-container","name":"CommandContainer","line":24,"character":42},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":18,"character":1},"arguments":[{"selector":"aup-command-menu","providers":[{"provide":{"__symbolic":"reference","module":"../command-container","name":"CommandContainer","line":22,"character":25},"useExisting":{"__symbolic":"reference","name":"CommandMenuComponent"}}],"template":"<button #trigger mat-icon-button [matMenuTriggerFor]=\"menu\" [matTooltip]=\"tooltip.value\">\n <aup-command-face [face]=\"face\"></aup-command-face>\n</button>\n<mat-menu #menu=\"matMenu\" [xPosition]=\"xPosition\" [yPosition]=\"yPosition\">\n <button *ngFor=\"let registration of commandRegistrations.value\"\n mat-menu-item\n [pectinCommand]=\"createMoreMenuCommand(registration)\"\n >\n <aup-command-face [face]=\"registration.face\" [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n</mat-menu>\n","styles":[":host{display:inline-flex;flex-direction:row;align-items:center}"]}]}],"members":{"face":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":28,"character":12},"arguments":["faceModel"]}]}],"xPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":3}}]}],"yPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"menu":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":37,"character":3},"arguments":[{"__symbolic":"reference","module":"@angular/material/menu","name":"MatMenuTrigger","line":37,"character":13}]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"createMoreMenuCommand":[{"__symbolic":"method"}],"closeMoreMenu":[{"__symbolic":"method"}],"getButtonColor":[{"__symbolic":"method"}]}}}}]
|
package/esm2015/lib/components/commands/command-menu/command-menu.component.ngfactory.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-menu.component.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/command-menu/command-menu.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
package/esm2015/lib/components/commands/command-menu/command-menu.component.scss.shim.ngstyle.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-menu.component.scss.shim.ngstyle.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/command-menu/command-menu.component.scss.shim.ngstyle.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-container.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/command-container.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { __decorate, __extends, __metadata } from "tslib";
|
|
2
|
-
import { Component, forwardRef, Input, ViewChild } from '@angular/core';
|
|
3
|
-
import { MatMenuTrigger } from '@angular/material/menu';
|
|
4
|
-
import { Dsl, MutableValueModel, StoreInValueModel } from '@coolon/pectin';
|
|
5
|
-
import { CommandContainer } from '../command-container';
|
|
6
|
-
import { CommandFace } from '../command-face';
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var CommandMenuComponent = /** @class */ (function (_super) {
|
|
11
|
-
__extends(CommandMenuComponent, _super);
|
|
12
|
-
function CommandMenuComponent() {
|
|
13
|
-
var _this = _super.call(this) || this;
|
|
14
|
-
_this.faceModel = new MutableValueModel();
|
|
15
|
-
_this.xPosition = 'after';
|
|
16
|
-
_this.yPosition = 'below';
|
|
17
|
-
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;
|
|
18
|
-
_this.tooltip = chain(_this.faceModel).map(function (face) { return new CommandFace.Adapter(face); }).pluck('tooltip');
|
|
19
|
-
var registrations = chain(_this.commandRegistrations);
|
|
20
|
-
var iconCount = registrations.select(function (r) { return !!r.icon; }).count();
|
|
21
|
-
_this.hasMixedIcons = valueOf.all(iconCount.isGreaterThan(0), iconCount.doesNotEqual(registrations.length)).areTruthy();
|
|
22
|
-
return _this;
|
|
23
|
-
}
|
|
24
|
-
CommandMenuComponent_1 = CommandMenuComponent;
|
|
25
|
-
CommandMenuComponent.prototype.ngOnInit = function () {
|
|
26
|
-
};
|
|
27
|
-
CommandMenuComponent.prototype.createMoreMenuCommand = function (item) {
|
|
28
|
-
var _this = this;
|
|
29
|
-
var when = Dsl.disposeWith(this).when;
|
|
30
|
-
when(item.command.busy).becomesFalsey(function () {
|
|
31
|
-
_this.closeMoreMenu();
|
|
32
|
-
});
|
|
33
|
-
return item.command;
|
|
34
|
-
};
|
|
35
|
-
CommandMenuComponent.prototype.closeMoreMenu = function () {
|
|
36
|
-
this.menu.closeMenu();
|
|
37
|
-
};
|
|
38
|
-
CommandMenuComponent.prototype.getButtonColor = function (registration) {
|
|
39
|
-
return registration.destructive ? 'warn' : undefined;
|
|
40
|
-
};
|
|
41
|
-
var CommandMenuComponent_1;
|
|
42
|
-
__decorate([
|
|
43
|
-
Input(), StoreInValueModel('faceModel'),
|
|
44
|
-
__metadata("design:type", Object)
|
|
45
|
-
], CommandMenuComponent.prototype, "face", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
Input(),
|
|
48
|
-
__metadata("design:type", String)
|
|
49
|
-
], CommandMenuComponent.prototype, "xPosition", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
Input(),
|
|
52
|
-
__metadata("design:type", String)
|
|
53
|
-
], CommandMenuComponent.prototype, "yPosition", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
ViewChild(MatMenuTrigger),
|
|
56
|
-
__metadata("design:type", MatMenuTrigger)
|
|
57
|
-
], CommandMenuComponent.prototype, "menu", void 0);
|
|
58
|
-
CommandMenuComponent = CommandMenuComponent_1 = __decorate([
|
|
59
|
-
Component({
|
|
60
|
-
selector: 'aup-command-menu',
|
|
61
|
-
template: "<button #trigger mat-icon-button [matMenuTriggerFor]=\"menu\" [matTooltip]=\"tooltip.value\">\n <aup-command-face [face]=\"face\"></aup-command-face>\n</button>\n<mat-menu #menu=\"matMenu\" [xPosition]=\"xPosition\" [yPosition]=\"yPosition\">\n <button *ngFor=\"let registration of commandRegistrations.value\"\n mat-menu-item\n [pectinCommand]=\"createMoreMenuCommand(registration)\"\n >\n <aup-command-face [face]=\"registration.face\" [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n</mat-menu>\n",
|
|
62
|
-
providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return CommandMenuComponent_1; }) }],
|
|
63
|
-
styles: [":host{display:inline-flex;flex-direction:row;align-items:center}"]
|
|
64
|
-
}),
|
|
65
|
-
__metadata("design:paramtypes", [])
|
|
66
|
-
], CommandMenuComponent);
|
|
67
|
-
return CommandMenuComponent;
|
|
68
|
-
}(CommandContainer));
|
|
69
|
-
export { CommandMenuComponent };
|
|
70
|
-
//# sourceMappingURL=command-menu.component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-menu.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/command-menu/command-menu.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAU,SAAS,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAGL,GAAG,EACH,iBAAiB,EACjB,iBAAiB,EAElB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C;;GAEG;AAOH;IAA0C,wCAAgB;IAmBxD;QAAA,YACE,iBAAO,SAUR;QA5BgB,eAAS,GAAG,IAAI,iBAAiB,EAAe,CAAC;QAMlE,eAAS,GAAuB,OAAO,CAAC;QAGxC,eAAS,GAAsB,OAAO,CAAC;QAU/B,IAAA,2BAAkF,EAAhF,gBAAK,EAAE,oBAAO,EAAE,kBAAM,EAAE,cAAI,EAAE,gBAAK,EAAE,oBAAO,EAAE,sBAAkC,CAAC;QACzF,KAAI,CAAC,OAAO,GAAG,KAAK,CAAC,KAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAA7B,CAA6B,C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S,EAAE,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,sBAAoB,EAApB,CAAoB,CAAC,EAAE,CAAC;;SAChG,CAAC;;OACW,oBAAoB,CAmDhC;IAAD,2BAAC;CAAA,AAnDD,CAA0C,gBAAgB,GAmDzD;SAnDY,oBAAoB","sourcesContent":["import { Component, forwardRef, Input, OnInit, ViewChild } from '@angular/core';\nimport { MatMenuTrigger } from '@angular/material/menu';\n\nimport {\n BooleanValueModelChain,\n Command,\n Dsl,\n MutableValueModel,\n StoreInValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport { CommandContainer } from '../command-container';\nimport { CommandFace } from '../command-face';\n\n\n/**\n *\n */\n@Component({\n selector: 'aup-command-menu',\n templateUrl: './command-menu.component.html',\n styleUrls: ['./command-menu.component.scss'],\n providers: [{ provide: CommandContainer, useExisting: forwardRef(() => CommandMenuComponent) }]\n})\nexport class CommandMenuComponent extends CommandContainer implements OnInit {\n\n private readonly faceModel = new MutableValueModel<CommandFace>();\n\n @Input() @StoreInValueModel('faceModel')\n face: CommandFace;\n\n @Input()\n xPosition: 'before' | 'after' = 'after';\n\n @Input()\n yPosition: 'above' | 'below' = 'below';\n\n @ViewChild(MatMenuTrigger)\n menu: MatMenuTrigger;\n\n readonly tooltip: ValueModelChain<string>;\n readonly hasMixedIcons: BooleanValueModelChain;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.tooltip = chain(this.faceModel).map(face => new CommandFace.Adapter(face)).pluck('tooltip');\n\n const registrations = chain(this.commandRegistrations);\n const iconCount = registrations.select(r => !!r.icon).count();\n this.hasMixedIcons = valueOf.all(\n iconCount.isGreaterThan(0),\n iconCount.doesNotEqual(registrations.length)\n ).areTruthy()\n }\n\n ngOnInit() {\n }\n\n createMoreMenuCommand(item: CommandContainer.Registration): Command<unknown> {\n const { when } = Dsl.disposeWith(this);\n when(item.command.busy).becomesFalsey(() => {\n this.closeMoreMenu();\n });\n return item.command;\n }\n\n private closeMoreMenu() {\n this.menu.closeMenu();\n }\n\n getButtonColor(registration: CommandContainer.Registration) {\n return registration.destructive ? 'warn' : undefined;\n }\n\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-menu.component.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/command-menu/command-menu.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
package/esm5/lib/components/commands/command-menu/command-menu.component.scss.shim.ngstyle.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-menu.component.scss.shim.ngstyle.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/command-menu/command-menu.component.scss.shim.ngstyle.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { MatMenuTrigger } from '@angular/material/menu';
|
|
3
|
-
import { BooleanValueModelChain, Command, ValueModelChain } from '@coolon/pectin';
|
|
4
|
-
import { CommandContainer } from '../command-container';
|
|
5
|
-
import { CommandFace } from '../command-face';
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
export declare class CommandMenuComponent extends CommandContainer implements OnInit {
|
|
10
|
-
private readonly faceModel;
|
|
11
|
-
face: CommandFace;
|
|
12
|
-
xPosition: 'before' | 'after';
|
|
13
|
-
yPosition: 'above' | 'below';
|
|
14
|
-
menu: MatMenuTrigger;
|
|
15
|
-
readonly tooltip: ValueModelChain<string>;
|
|
16
|
-
readonly hasMixedIcons: BooleanValueModelChain;
|
|
17
|
-
constructor();
|
|
18
|
-
ngOnInit(): void;
|
|
19
|
-
createMoreMenuCommand(item: CommandContainer.Registration): Command<unknown>;
|
|
20
|
-
private closeMoreMenu;
|
|
21
|
-
getButtonColor(registration: CommandContainer.Registration): string;
|
|
22
|
-
}
|