@coolon/angular-ui-powerups 2.0.0-alpha.28 → 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 +7 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +24 -9
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js +10 -3
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.js +10 -5
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/popup-menu/more-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js +7 -4
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/popup-menu/popup-menu.component.metadata.json +1 -1
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js +10 -3
- package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +1 -1
- package/esm5/lib/components/commands/popup-menu/more-menu.component.js +10 -5
- package/esm5/lib/components/commands/popup-menu/more-menu.component.js.map +1 -1
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.js +7 -4
- package/esm5/lib/components/commands/popup-menu/popup-menu.component.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +25 -10
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +25 -10
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/popup-menu/abstract-popup-menu.component.d.ts +5 -2
- package/lib/components/commands/popup-menu/more-menu.component.d.ts +2 -1
- package/lib/components/commands/popup-menu/popup-menu.component.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { Component, Input, ViewChild } from '@angular/core';
|
|
2
|
+
import { AfterViewInit, ChangeDetectorRef, Component, forwardRef, Input, OnInit, ViewChild } from '@angular/core';
|
|
3
3
|
import { MatMenuTrigger } from '@angular/material/menu';
|
|
4
4
|
import { CommandContainer } from '../command-container';
|
|
5
5
|
import { PopupMenuRendererComponent } from '../popup-menu-renderer/popup-menu-renderer.component';
|
|
@@ -7,11 +7,15 @@ import { PopupMenuRendererComponent } from '../popup-menu-renderer/popup-menu-re
|
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
let AbstractPopupMenuComponent = class AbstractPopupMenuComponent extends CommandContainer {
|
|
10
|
-
constructor() {
|
|
10
|
+
constructor(cdr) {
|
|
11
11
|
super();
|
|
12
|
+
this.cdr = cdr;
|
|
12
13
|
this.xPosition = 'after';
|
|
13
14
|
this.yPosition = 'below';
|
|
14
15
|
}
|
|
16
|
+
ngAfterViewInit() {
|
|
17
|
+
this.cdr.detectChanges();
|
|
18
|
+
}
|
|
15
19
|
get matMenuComponent() {
|
|
16
20
|
var _a;
|
|
17
21
|
return (_a = this.popupMenu) === null || _a === void 0 ? void 0 : _a.matMenu;
|
|
@@ -23,6 +27,9 @@ let AbstractPopupMenuComponent = class AbstractPopupMenuComponent extends Comman
|
|
|
23
27
|
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
24
28
|
}
|
|
25
29
|
};
|
|
30
|
+
AbstractPopupMenuComponent.ctorParameters = () => [
|
|
31
|
+
{ type: ChangeDetectorRef }
|
|
32
|
+
];
|
|
26
33
|
__decorate([
|
|
27
34
|
Input(),
|
|
28
35
|
__metadata("design:type", String)
|
|
@@ -44,7 +51,7 @@ AbstractPopupMenuComponent = __decorate([
|
|
|
44
51
|
selector: 'aup-abstract-popup-menu',
|
|
45
52
|
template: ''
|
|
46
53
|
}),
|
|
47
|
-
__metadata("design:paramtypes", [])
|
|
54
|
+
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
48
55
|
], AbstractPopupMenuComponent);
|
|
49
56
|
export { AbstractPopupMenuComponent };
|
|
50
57
|
//# sourceMappingURL=abstract-popup-menu.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-popup-menu.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/popup-menu/abstract-popup-menu.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"abstract-popup-menu.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/popup-menu/abstract-popup-menu.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAClH,OAAO,EAAW,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;AAElG;;GAEG;AAKH,IAAa,0BAA0B,GAAvC,MAAa,0BAA2B,SAAQ,gBAAgB;IAc9D,YAA6B,GAAsB;QACjD,KAAK,EAAE,CAAC;QADmB,QAAG,GAAH,GAAG,CAAmB;QAXnD,cAAS,GAAuB,OAAO,CAAC;QAGxC,cAAS,GAAsB,OAAO,CAAC;IAUvC,CAAC;IAED,eAAe;QACb,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAA;IAC1B,CAAC;IAGD,IAAI,gBAAgB;;QAClB,aAAO,IAAI,CAAC,SAAS,0CAAE,OAAO,CAAC;IACjC,CAAC;IAED,SAAS;QACP,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;IAC/B,CAAC;IAED,cAAc,CAAC,YAA2C;QACxD,OAAO,YAAY,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,CAAC;CAEF,CAAA;;YArBmC,iBAAiB;;AAXnD;IADC,KAAK,EAAE;;6DACgC;AAGxC;IADC,KAAK,EAAE;;6DAC+B;AAGvC;IADC,SAAS,CAAC,0BAA0B,CAAC;8BACnB,0BAA0B;6DAAC;AAG9C;IADC,SAAS,CAAC,cAAc,CAAC;8BACb,cAAc;+DAAC;AAZjB,0BAA0B;IAJtC,SAAS,CAAC;QACT,QAAQ,EAAE,yBAAyB;QACnC,QAAQ,EAAE,EAAE;KACb,CAAC;qCAekC,iBAAiB;GAdxC,0BAA0B,CAmCtC;SAnCY,0BAA0B","sourcesContent":["import { AfterViewInit, ChangeDetectorRef, Component, forwardRef, Input, OnInit, ViewChild } from '@angular/core';\nimport { MatMenu, MatMenuTrigger } from '@angular/material/menu';\n\nimport { Dsl, MutableValueModel, StoreInValueModel, ValueModelChain } from '@coolon/pectin';\nimport { CommandContainer } from '../command-container';\nimport { CommandFace } from '../command-face';\nimport { PopupMenuRendererComponent } from '../popup-menu-renderer/popup-menu-renderer.component';\n\n/**\n *\n */\n@Component({\n selector: 'aup-abstract-popup-menu',\n template: '',\n})\nexport class AbstractPopupMenuComponent extends CommandContainer implements AfterViewInit {\n\n @Input()\n xPosition: 'before' | 'after' = 'after';\n\n @Input()\n yPosition: 'above' | 'below' = 'below';\n\n @ViewChild(PopupMenuRendererComponent)\n private popupMenu: PopupMenuRendererComponent;\n\n @ViewChild(MatMenuTrigger)\n menuTrigger: MatMenuTrigger;\n\n constructor(private readonly cdr: ChangeDetectorRef) {\n super();\n }\n\n ngAfterViewInit(): void {\n this.cdr.detectChanges()\n }\n\n\n get matMenuComponent(): MatMenu {\n return this.popupMenu?.matMenu;\n }\n\n closeMenu() {\n this.menuTrigger.closeMenu();\n }\n\n getButtonColor(registration: CommandContainer.Registration) {\n return registration.faceAdapter.destructive ? 'warn' : undefined;\n }\n\n}\n"]}
|
package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.metadata.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"AbstractPopupMenuComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../command-container","name":"CommandContainer","line":15,"character":48},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-abstract-popup-menu","template":""}]}],"members":{"xPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"yPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}}]}],"popupMenu":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":23,"character":3},"arguments":[{"__symbolic":"reference","module":"../popup-menu-renderer/popup-menu-renderer.component","name":"PopupMenuRendererComponent","line":23,"character":13}]}]}],"menuTrigger":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":26,"character":3},"arguments":[{"__symbolic":"reference","module":"@angular/material/menu","name":"MatMenuTrigger","line":26,"character":13}]}]}],"__ctor__":[{"__symbolic":"constructor"}],"closeMenu":[{"__symbolic":"method"}],"getButtonColor":[{"__symbolic":"method"}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"AbstractPopupMenuComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../command-container","name":"CommandContainer","line":15,"character":48},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-abstract-popup-menu","template":""}]}],"members":{"xPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"yPosition":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}}]}],"popupMenu":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":23,"character":3},"arguments":[{"__symbolic":"reference","module":"../popup-menu-renderer/popup-menu-renderer.component","name":"PopupMenuRendererComponent","line":23,"character":13}]}]}],"menuTrigger":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":26,"character":3},"arguments":[{"__symbolic":"reference","module":"@angular/material/menu","name":"MatMenuTrigger","line":26,"character":13}]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":29,"character":36}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"closeMenu":[{"__symbolic":"method"}],"getButtonColor":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
var MoreMenuComponent_1;
|
|
2
2
|
import { __decorate, __metadata } from "tslib";
|
|
3
|
-
import { Component, forwardRef, Input } from '@angular/core';
|
|
3
|
+
import { ChangeDetectorRef, Component, forwardRef, Input } from '@angular/core';
|
|
4
4
|
import { CommandContainer } from '../command-container';
|
|
5
5
|
import { AbstractPopupMenuComponent } from './abstract-popup-menu.component';
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
let MoreMenuComponent = MoreMenuComponent_1 = class MoreMenuComponent extends AbstractPopupMenuComponent {
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
10
|
+
constructor(cdr) {
|
|
11
|
+
super(cdr);
|
|
12
|
+
this.xPosition = "before"; // this should be the default unless overriden by the user.
|
|
12
13
|
}
|
|
13
14
|
};
|
|
15
|
+
MoreMenuComponent.ctorParameters = () => [
|
|
16
|
+
{ type: ChangeDetectorRef }
|
|
17
|
+
];
|
|
14
18
|
__decorate([
|
|
15
19
|
Input(),
|
|
16
20
|
__metadata("design:type", String)
|
|
@@ -24,12 +28,13 @@ MoreMenuComponent = MoreMenuComponent_1 = __decorate([
|
|
|
24
28
|
<mat-icon>more_vert</mat-icon>
|
|
25
29
|
</button>
|
|
26
30
|
<aup-popup-menu-renderer [commandRegistrations]="commandRegistrations"
|
|
27
|
-
[
|
|
31
|
+
[xPosition]="xPosition"
|
|
32
|
+
[yPosition]="yPosition"
|
|
28
33
|
(commandExecuted)="closeMenu()"></aup-popup-menu-renderer>
|
|
29
34
|
`,
|
|
30
35
|
providers: [{ provide: CommandContainer, useExisting: forwardRef(() => MoreMenuComponent_1) }]
|
|
31
36
|
}),
|
|
32
|
-
__metadata("design:paramtypes", [])
|
|
37
|
+
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
33
38
|
], MoreMenuComponent);
|
|
34
39
|
export { MoreMenuComponent };
|
|
35
40
|
//# sourceMappingURL=more-menu.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"more-menu.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/popup-menu/more-menu.component.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"more-menu.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/popup-menu/more-menu.component.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E;;GAEG;AAeH,IAAa,iBAAiB,yBAA9B,MAAa,iBAAkB,SAAQ,0BAA0B;IAK/D,YAAY,GAAsB;QAChC,KAAK,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,CAAC,2DAA2D;IACxF,CAAC;CAEF,CAAA;;YALkB,iBAAiB;;AAFlC;IADC,KAAK,EAAE;;kDACQ;AAHL,iBAAiB;IAd7B,SAAS,CAAC;QACT,QAAQ,EAAE,eAAe;QACzB,QAAQ,EAAE;;;;;;;;;GAST;QACD,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,mBAAiB,CAAC,EAAE,CAAC;KAC7F,CAAC;qCAMiB,iBAAiB;GALvB,iBAAiB,CAU7B;SAVY,iBAAiB","sourcesContent":["import { ChangeDetectorRef, Component, forwardRef, Input } from '@angular/core';\nimport { CommandContainer } from '../command-container';\nimport { AbstractPopupMenuComponent } from './abstract-popup-menu.component';\n\n/**\n *\n */\n@Component({\n selector: 'aup-more-menu',\n 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 `,\n providers: [{ provide: CommandContainer, useExisting: forwardRef(() => MoreMenuComponent) }]\n})\nexport class MoreMenuComponent extends AbstractPopupMenuComponent {\n\n @Input()\n tooltip: string;\n\n constructor(cdr: ChangeDetectorRef) {\n super(cdr);\n this.xPosition = \"before\"; // this should be the default unless overriden by the user.\n }\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"MoreMenuComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./abstract-popup-menu.component","name":"AbstractPopupMenuComponent","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"MoreMenuComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./abstract-popup-menu.component","name":"AbstractPopupMenuComponent","line":21,"character":39},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":7,"character":1},"arguments":[{"selector":"aup-more-menu","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 ","providers":[{"provide":{"__symbolic":"reference","module":"../command-container","name":"CommandContainer","line":19,"character":25},"useExisting":{"__symbolic":"reference","name":"MoreMenuComponent"}}]}]}],"members":{"tooltip":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":26,"character":19}]}]}}}}]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var PopupMenuComponent_1;
|
|
2
2
|
import { __decorate, __metadata } from "tslib";
|
|
3
|
-
import { Component, forwardRef, Input } from '@angular/core';
|
|
3
|
+
import { ChangeDetectorRef, Component, forwardRef, Input, OnInit } from '@angular/core';
|
|
4
4
|
import { Dsl, MutableValueModel, StoreInValueModel } from '@coolon/pectin';
|
|
5
5
|
import { CommandContainer } from '../command-container';
|
|
6
6
|
import { CommandFace } from '../command-face';
|
|
@@ -9,8 +9,8 @@ import { AbstractPopupMenuComponent } from './abstract-popup-menu.component';
|
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
11
|
let PopupMenuComponent = PopupMenuComponent_1 = class PopupMenuComponent extends AbstractPopupMenuComponent {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
12
|
+
constructor(cdr) {
|
|
13
|
+
super(cdr);
|
|
14
14
|
this.faceModel = new MutableValueModel();
|
|
15
15
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
16
16
|
const faceAdapterModel = chain(this.faceModel).map(face => new CommandFace.Adapter(face));
|
|
@@ -22,6 +22,9 @@ let PopupMenuComponent = PopupMenuComponent_1 = class PopupMenuComponent extends
|
|
|
22
22
|
ngOnInit() {
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
+
PopupMenuComponent.ctorParameters = () => [
|
|
26
|
+
{ type: ChangeDetectorRef }
|
|
27
|
+
];
|
|
25
28
|
__decorate([
|
|
26
29
|
Input(), StoreInValueModel('faceModel'),
|
|
27
30
|
__metadata("design:type", Object)
|
|
@@ -40,7 +43,7 @@ PopupMenuComponent = PopupMenuComponent_1 = __decorate([
|
|
|
40
43
|
`,
|
|
41
44
|
providers: [{ provide: CommandContainer, useExisting: forwardRef(() => PopupMenuComponent_1) }]
|
|
42
45
|
}),
|
|
43
|
-
__metadata("design:paramtypes", [])
|
|
46
|
+
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
44
47
|
], PopupMenuComponent);
|
|
45
48
|
export { PopupMenuComponent };
|
|
46
49
|
//# sourceMappingURL=popup-menu.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popup-menu.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/popup-menu/popup-menu.component.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"popup-menu.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/popup-menu/popup-menu.component.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAExF,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,iBAAiB,EAAmB,MAAM,gBAAgB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E;;GAEG;AAeH,IAAa,kBAAkB,0BAA/B,MAAa,kBAAmB,SAAQ,0BAA0B;IAShE,YAAY,GAAsB;QAChC,KAAK,CAAC,GAAG,CAAC,CAAC;QARI,cAAS,GAAG,IAAI,iBAAiB,EAAe,CAAC;QAShE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzF,MAAM,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1F,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC5D,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC;IACrC,CAAC;IAED,QAAQ;IACR,CAAC;CAEF,CAAA;;YAdkB,iBAAiB;;AAJlC;IADC,KAAK,EAAE,EAAE,iBAAiB,CAAC,WAAW,CAAC;;gDACtB;AALP,kBAAkB;IAd9B,SAAS,CAAC;QACT,QAAQ,EAAE,gBAAgB;QAC1B,QAAQ,EAAE;;;;;;;;GAQT;QAED,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,oBAAkB,CAAC,EAAE,CAAC;KAC9F,CAAC;qCAUiB,iBAAiB;GATvB,kBAAkB,CAuB9B;SAvBY,kBAAkB","sourcesContent":["import { ChangeDetectorRef, Component, forwardRef, Input, OnInit } from '@angular/core';\n\nimport { Dsl, MutableValueModel, StoreInValueModel, ValueModelChain } from '@coolon/pectin';\nimport { CommandContainer } from '../command-container';\nimport { CommandFace } from '../command-face';\nimport { AbstractPopupMenuComponent } from './abstract-popup-menu.component';\n\n/**\n *\n */\n@Component({\n selector: 'aup-popup-menu',\n 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 `,\n styleUrls: [],\n providers: [{ provide: CommandContainer, useExisting: forwardRef(() => PopupMenuComponent) }]\n})\nexport class PopupMenuComponent extends AbstractPopupMenuComponent implements OnInit {\n\n private readonly faceModel = new MutableValueModel<CommandFace>();\n\n @Input() @StoreInValueModel('faceModel')\n face: CommandFace;\n\n private faceTooltipModel: ValueModelChain<string>;\n\n constructor(cdr: ChangeDetectorRef) {\n super(cdr);\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n const faceAdapterModel = chain(this.faceModel).map(face => new CommandFace.Adapter(face));\n this.faceTooltipModel = faceAdapterModel.pluck('tooltip');\n }\n\n getTooltip() {\n return this.faceTooltipModel.value;\n }\n\n ngOnInit() {\n }\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"PopupMenuComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./abstract-popup-menu.component","name":"AbstractPopupMenuComponent","line":24,"character":40},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"aup-popup-menu","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 ","styleUrls":[],"providers":[{"provide":{"__symbolic":"reference","module":"../command-container","name":"CommandContainer","line":22,"character":25},"useExisting":{"__symbolic":"reference","name":"PopupMenuComponent"}}]}]}],"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"]}]}],"__ctor__":[{"__symbolic":"constructor"}],"getTooltip":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"PopupMenuComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./abstract-popup-menu.component","name":"AbstractPopupMenuComponent","line":24,"character":40},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"aup-popup-menu","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 ","styleUrls":[],"providers":[{"provide":{"__symbolic":"reference","module":"../command-container","name":"CommandContainer","line":22,"character":25},"useExisting":{"__symbolic":"reference","name":"PopupMenuComponent"}}]}]}],"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"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":33,"character":19}]}],"getTooltip":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __extends, __metadata } from "tslib";
|
|
2
|
-
import { Component, Input, ViewChild } from '@angular/core';
|
|
2
|
+
import { AfterViewInit, ChangeDetectorRef, Component, forwardRef, Input, OnInit, ViewChild } from '@angular/core';
|
|
3
3
|
import { MatMenuTrigger } from '@angular/material/menu';
|
|
4
4
|
import { CommandContainer } from '../command-container';
|
|
5
5
|
import { PopupMenuRendererComponent } from '../popup-menu-renderer/popup-menu-renderer.component';
|
|
@@ -8,12 +8,16 @@ import { PopupMenuRendererComponent } from '../popup-menu-renderer/popup-menu-re
|
|
|
8
8
|
*/
|
|
9
9
|
var AbstractPopupMenuComponent = /** @class */ (function (_super) {
|
|
10
10
|
__extends(AbstractPopupMenuComponent, _super);
|
|
11
|
-
function AbstractPopupMenuComponent() {
|
|
11
|
+
function AbstractPopupMenuComponent(cdr) {
|
|
12
12
|
var _this = _super.call(this) || this;
|
|
13
|
+
_this.cdr = cdr;
|
|
13
14
|
_this.xPosition = 'after';
|
|
14
15
|
_this.yPosition = 'below';
|
|
15
16
|
return _this;
|
|
16
17
|
}
|
|
18
|
+
AbstractPopupMenuComponent.prototype.ngAfterViewInit = function () {
|
|
19
|
+
this.cdr.detectChanges();
|
|
20
|
+
};
|
|
17
21
|
Object.defineProperty(AbstractPopupMenuComponent.prototype, "matMenuComponent", {
|
|
18
22
|
get: function () {
|
|
19
23
|
var _a;
|
|
@@ -28,6 +32,9 @@ var AbstractPopupMenuComponent = /** @class */ (function (_super) {
|
|
|
28
32
|
AbstractPopupMenuComponent.prototype.getButtonColor = function (registration) {
|
|
29
33
|
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
30
34
|
};
|
|
35
|
+
AbstractPopupMenuComponent.ctorParameters = function () { return [
|
|
36
|
+
{ type: ChangeDetectorRef }
|
|
37
|
+
]; };
|
|
31
38
|
__decorate([
|
|
32
39
|
Input(),
|
|
33
40
|
__metadata("design:type", String)
|
|
@@ -49,7 +56,7 @@ var AbstractPopupMenuComponent = /** @class */ (function (_super) {
|
|
|
49
56
|
selector: 'aup-abstract-popup-menu',
|
|
50
57
|
template: ''
|
|
51
58
|
}),
|
|
52
|
-
__metadata("design:paramtypes", [])
|
|
59
|
+
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
53
60
|
], AbstractPopupMenuComponent);
|
|
54
61
|
return AbstractPopupMenuComponent;
|
|
55
62
|
}(CommandContainer));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-popup-menu.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/popup-menu/abstract-popup-menu.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"abstract-popup-menu.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/popup-menu/abstract-popup-menu.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAClH,OAAO,EAAW,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;AAElG;;GAEG;AAKH;IAAgD,8CAAgB;IAc9D,oCAA6B,GAAsB;QAAnD,YACE,iBAAO,SACR;QAF4B,SAAG,GAAH,GAAG,CAAmB;QAXnD,eAAS,GAAuB,OAAO,CAAC;QAGxC,eAAS,GAAsB,OAAO,CAAC;;IAUvC,CAAC;IAED,oDAAe,GAAf;QACE,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAA;IAC1B,CAAC;IAGD,sBAAI,wDAAgB;aAApB;;YACE,aAAO,IAAI,CAAC,SAAS,0CAAE,OAAO,CAAC;QACjC,CAAC;;;OAAA;IAED,8CAAS,GAAT;QACE,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;IAC/B,CAAC;IAED,mDAAc,GAAd,UAAe,YAA2C;QACxD,OAAO,YAAY,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,CAAC;;gBAnBiC,iBAAiB;;IAXnD;QADC,KAAK,EAAE;;iEACgC;IAGxC;QADC,KAAK,EAAE;;iEAC+B;IAGvC;QADC,SAAS,CAAC,0BAA0B,CAAC;kCACnB,0BAA0B;iEAAC;IAG9C;QADC,SAAS,CAAC,cAAc,CAAC;kCACb,cAAc;mEAAC;IAZjB,0BAA0B;QAJtC,SAAS,CAAC;YACT,QAAQ,EAAE,yBAAyB;YACnC,QAAQ,EAAE,EAAE;SACb,CAAC;yCAekC,iBAAiB;OAdxC,0BAA0B,CAmCtC;IAAD,iCAAC;CAAA,AAnCD,CAAgD,gBAAgB,GAmC/D;SAnCY,0BAA0B","sourcesContent":["import { AfterViewInit, ChangeDetectorRef, Component, forwardRef, Input, OnInit, ViewChild } from '@angular/core';\nimport { MatMenu, MatMenuTrigger } from '@angular/material/menu';\n\nimport { Dsl, MutableValueModel, StoreInValueModel, ValueModelChain } from '@coolon/pectin';\nimport { CommandContainer } from '../command-container';\nimport { CommandFace } from '../command-face';\nimport { PopupMenuRendererComponent } from '../popup-menu-renderer/popup-menu-renderer.component';\n\n/**\n *\n */\n@Component({\n selector: 'aup-abstract-popup-menu',\n template: '',\n})\nexport class AbstractPopupMenuComponent extends CommandContainer implements AfterViewInit {\n\n @Input()\n xPosition: 'before' | 'after' = 'after';\n\n @Input()\n yPosition: 'above' | 'below' = 'below';\n\n @ViewChild(PopupMenuRendererComponent)\n private popupMenu: PopupMenuRendererComponent;\n\n @ViewChild(MatMenuTrigger)\n menuTrigger: MatMenuTrigger;\n\n constructor(private readonly cdr: ChangeDetectorRef) {\n super();\n }\n\n ngAfterViewInit(): void {\n this.cdr.detectChanges()\n }\n\n\n get matMenuComponent(): MatMenu {\n return this.popupMenu?.matMenu;\n }\n\n closeMenu() {\n this.menuTrigger.closeMenu();\n }\n\n getButtonColor(registration: CommandContainer.Registration) {\n return registration.faceAdapter.destructive ? 'warn' : undefined;\n }\n\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __extends, __metadata } from "tslib";
|
|
2
|
-
import { Component, forwardRef, Input } from '@angular/core';
|
|
2
|
+
import { ChangeDetectorRef, Component, forwardRef, Input } from '@angular/core';
|
|
3
3
|
import { CommandContainer } from '../command-container';
|
|
4
4
|
import { AbstractPopupMenuComponent } from './abstract-popup-menu.component';
|
|
5
5
|
/**
|
|
@@ -7,11 +7,16 @@ import { AbstractPopupMenuComponent } from './abstract-popup-menu.component';
|
|
|
7
7
|
*/
|
|
8
8
|
var MoreMenuComponent = /** @class */ (function (_super) {
|
|
9
9
|
__extends(MoreMenuComponent, _super);
|
|
10
|
-
function MoreMenuComponent() {
|
|
11
|
-
|
|
10
|
+
function MoreMenuComponent(cdr) {
|
|
11
|
+
var _this = _super.call(this, cdr) || this;
|
|
12
|
+
_this.xPosition = "before"; // this should be the default unless overriden by the user.
|
|
13
|
+
return _this;
|
|
12
14
|
}
|
|
13
15
|
MoreMenuComponent_1 = MoreMenuComponent;
|
|
14
16
|
var MoreMenuComponent_1;
|
|
17
|
+
MoreMenuComponent.ctorParameters = function () { return [
|
|
18
|
+
{ type: ChangeDetectorRef }
|
|
19
|
+
]; };
|
|
15
20
|
__decorate([
|
|
16
21
|
Input(),
|
|
17
22
|
__metadata("design:type", String)
|
|
@@ -19,10 +24,10 @@ var MoreMenuComponent = /** @class */ (function (_super) {
|
|
|
19
24
|
MoreMenuComponent = MoreMenuComponent_1 = __decorate([
|
|
20
25
|
Component({
|
|
21
26
|
selector: 'aup-more-menu',
|
|
22
|
-
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 [
|
|
27
|
+
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 ",
|
|
23
28
|
providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return MoreMenuComponent_1; }) }]
|
|
24
29
|
}),
|
|
25
|
-
__metadata("design:paramtypes", [])
|
|
30
|
+
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
26
31
|
], MoreMenuComponent);
|
|
27
32
|
return MoreMenuComponent;
|
|
28
33
|
}(AbstractPopupMenuComponent));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"more-menu.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/popup-menu/more-menu.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"more-menu.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/popup-menu/more-menu.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E;;GAEG;AAeH;IAAuC,qCAA0B;IAK/D,2BAAY,GAAsB;QAAlC,YACE,kBAAM,GAAG,CAAC,SAEX;QADC,KAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,CAAC,2DAA2D;;IACxF,CAAC;0BARU,iBAAiB;;;gBAKX,iBAAiB;;IAFlC;QADC,KAAK,EAAE;;sDACQ;IAHL,iBAAiB;QAd7B,SAAS,CAAC;YACT,QAAQ,EAAE,eAAe;YACzB,QAAQ,EAAE,gkBAST;YACD,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,mBAAiB,EAAjB,CAAiB,CAAC,EAAE,CAAC;SAC7F,CAAC;yCAMiB,iBAAiB;OALvB,iBAAiB,CAU7B;IAAD,wBAAC;CAAA,AAVD,CAAuC,0BAA0B,GAUhE;SAVY,iBAAiB","sourcesContent":["import { ChangeDetectorRef, Component, forwardRef, Input } from '@angular/core';\nimport { CommandContainer } from '../command-container';\nimport { AbstractPopupMenuComponent } from './abstract-popup-menu.component';\n\n/**\n *\n */\n@Component({\n selector: 'aup-more-menu',\n 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 `,\n providers: [{ provide: CommandContainer, useExisting: forwardRef(() => MoreMenuComponent) }]\n})\nexport class MoreMenuComponent extends AbstractPopupMenuComponent {\n\n @Input()\n tooltip: string;\n\n constructor(cdr: ChangeDetectorRef) {\n super(cdr);\n this.xPosition = \"before\"; // this should be the default unless overriden by the user.\n }\n\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __extends, __metadata } from "tslib";
|
|
2
|
-
import { Component, forwardRef, Input } from '@angular/core';
|
|
2
|
+
import { ChangeDetectorRef, Component, forwardRef, Input, OnInit } from '@angular/core';
|
|
3
3
|
import { Dsl, MutableValueModel, StoreInValueModel } from '@coolon/pectin';
|
|
4
4
|
import { CommandContainer } from '../command-container';
|
|
5
5
|
import { CommandFace } from '../command-face';
|
|
@@ -9,8 +9,8 @@ import { AbstractPopupMenuComponent } from './abstract-popup-menu.component';
|
|
|
9
9
|
*/
|
|
10
10
|
var PopupMenuComponent = /** @class */ (function (_super) {
|
|
11
11
|
__extends(PopupMenuComponent, _super);
|
|
12
|
-
function PopupMenuComponent() {
|
|
13
|
-
var _this = _super.call(this) || this;
|
|
12
|
+
function PopupMenuComponent(cdr) {
|
|
13
|
+
var _this = _super.call(this, cdr) || this;
|
|
14
14
|
_this.faceModel = new MutableValueModel();
|
|
15
15
|
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;
|
|
16
16
|
var faceAdapterModel = chain(_this.faceModel).map(function (face) { return new CommandFace.Adapter(face); });
|
|
@@ -24,6 +24,9 @@ var PopupMenuComponent = /** @class */ (function (_super) {
|
|
|
24
24
|
PopupMenuComponent.prototype.ngOnInit = function () {
|
|
25
25
|
};
|
|
26
26
|
var PopupMenuComponent_1;
|
|
27
|
+
PopupMenuComponent.ctorParameters = function () { return [
|
|
28
|
+
{ type: ChangeDetectorRef }
|
|
29
|
+
]; };
|
|
27
30
|
__decorate([
|
|
28
31
|
Input(), StoreInValueModel('faceModel'),
|
|
29
32
|
__metadata("design:type", Object)
|
|
@@ -34,7 +37,7 @@ var PopupMenuComponent = /** @class */ (function (_super) {
|
|
|
34
37
|
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 ",
|
|
35
38
|
providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return PopupMenuComponent_1; }) }]
|
|
36
39
|
}),
|
|
37
|
-
__metadata("design:paramtypes", [])
|
|
40
|
+
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
38
41
|
], PopupMenuComponent);
|
|
39
42
|
return PopupMenuComponent;
|
|
40
43
|
}(AbstractPopupMenuComponent));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popup-menu.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/popup-menu/popup-menu.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"popup-menu.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/popup-menu/popup-menu.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAExF,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,iBAAiB,EAAmB,MAAM,gBAAgB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E;;GAEG;AAeH;IAAwC,sCAA0B;IAShE,4BAAY,GAAsB;QAAlC,YACE,kBAAM,GAAG,CAAC,SAIX;QAZgB,eAAS,GAAG,IAAI,iBAAiB,EAAe,CAAC;QAS1D,IAAA,2BAAkF,EAAhF,gBAAK,EAAE,oBAAO,EAAE,kBAAM,EAAE,cAAI,EAAE,gBAAK,EAAE,oBAAO,EAAE,sBAAkC,CAAC;QACzF,IAAM,gBAAgB,GAAG,KAAK,CAAC,KAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAA7B,CAA6B,CAAC,CAAC;QAC1F,KAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;;IAC5D,CAAC;2BAdU,kBAAkB;IAgB7B,uCAAU,GAAV;QACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC;IACrC,CAAC;IAED,qCAAQ,GAAR;IACA,CAAC;;;gBAZgB,iBAAiB;;IAJlC;QADC,KAAK,EAAE,EAAE,iBAAiB,CAAC,WAAW,CAAC;;oDACtB;IALP,kBAAkB;QAd9B,SAAS,CAAC;YACT,QAAQ,EAAE,gBAAgB;YAC1B,QAAQ,EAAE,8jBAQT;YAED,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,CAAC,cAAM,OAAA,oBAAkB,EAAlB,CAAkB,CAAC,EAAE,CAAC;SAC9F,CAAC;yCAUiB,iBAAiB;OATvB,kBAAkB,CAuB9B;IAAD,yBAAC;CAAA,AAvBD,CAAwC,0BAA0B,GAuBjE;SAvBY,kBAAkB","sourcesContent":["import { ChangeDetectorRef, Component, forwardRef, Input, OnInit } from '@angular/core';\n\nimport { Dsl, MutableValueModel, StoreInValueModel, ValueModelChain } from '@coolon/pectin';\nimport { CommandContainer } from '../command-container';\nimport { CommandFace } from '../command-face';\nimport { AbstractPopupMenuComponent } from './abstract-popup-menu.component';\n\n/**\n *\n */\n@Component({\n selector: 'aup-popup-menu',\n 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 `,\n styleUrls: [],\n providers: [{ provide: CommandContainer, useExisting: forwardRef(() => PopupMenuComponent) }]\n})\nexport class PopupMenuComponent extends AbstractPopupMenuComponent implements OnInit {\n\n private readonly faceModel = new MutableValueModel<CommandFace>();\n\n @Input() @StoreInValueModel('faceModel')\n face: CommandFace;\n\n private faceTooltipModel: ValueModelChain<string>;\n\n constructor(cdr: ChangeDetectorRef) {\n super(cdr);\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n const faceAdapterModel = chain(this.faceModel).map(face => new CommandFace.Adapter(face));\n this.faceTooltipModel = faceAdapterModel.pluck('tooltip');\n }\n\n getTooltip() {\n return this.faceTooltipModel.value;\n }\n\n ngOnInit() {\n }\n\n}\n"]}
|
|
@@ -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, forwardRef, Optional, HostBinding, ViewEncapsulation, EventEmitter, Output, ViewChild,
|
|
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';
|
|
@@ -688,11 +688,15 @@ PopupMenuRendererComponent = __decorate([
|
|
|
688
688
|
*
|
|
689
689
|
*/
|
|
690
690
|
let AbstractPopupMenuComponent = class AbstractPopupMenuComponent extends CommandContainer {
|
|
691
|
-
constructor() {
|
|
691
|
+
constructor(cdr) {
|
|
692
692
|
super();
|
|
693
|
+
this.cdr = cdr;
|
|
693
694
|
this.xPosition = 'after';
|
|
694
695
|
this.yPosition = 'below';
|
|
695
696
|
}
|
|
697
|
+
ngAfterViewInit() {
|
|
698
|
+
this.cdr.detectChanges();
|
|
699
|
+
}
|
|
696
700
|
get matMenuComponent() {
|
|
697
701
|
var _a;
|
|
698
702
|
return (_a = this.popupMenu) === null || _a === void 0 ? void 0 : _a.matMenu;
|
|
@@ -704,6 +708,9 @@ let AbstractPopupMenuComponent = class AbstractPopupMenuComponent extends Comman
|
|
|
704
708
|
return registration.faceAdapter.destructive ? 'warn' : undefined;
|
|
705
709
|
}
|
|
706
710
|
};
|
|
711
|
+
AbstractPopupMenuComponent.ctorParameters = () => [
|
|
712
|
+
{ type: ChangeDetectorRef }
|
|
713
|
+
];
|
|
707
714
|
__decorate([
|
|
708
715
|
Input(),
|
|
709
716
|
__metadata("design:type", String)
|
|
@@ -725,7 +732,7 @@ AbstractPopupMenuComponent = __decorate([
|
|
|
725
732
|
selector: 'aup-abstract-popup-menu',
|
|
726
733
|
template: ''
|
|
727
734
|
}),
|
|
728
|
-
__metadata("design:paramtypes", [])
|
|
735
|
+
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
729
736
|
], AbstractPopupMenuComponent);
|
|
730
737
|
|
|
731
738
|
var PopupMenuComponent_1;
|
|
@@ -733,8 +740,8 @@ var PopupMenuComponent_1;
|
|
|
733
740
|
*
|
|
734
741
|
*/
|
|
735
742
|
let PopupMenuComponent = PopupMenuComponent_1 = class PopupMenuComponent extends AbstractPopupMenuComponent {
|
|
736
|
-
constructor() {
|
|
737
|
-
super();
|
|
743
|
+
constructor(cdr) {
|
|
744
|
+
super(cdr);
|
|
738
745
|
this.faceModel = new MutableValueModel();
|
|
739
746
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
740
747
|
const faceAdapterModel = chain(this.faceModel).map(face => new CommandFace.Adapter(face));
|
|
@@ -746,6 +753,9 @@ let PopupMenuComponent = PopupMenuComponent_1 = class PopupMenuComponent extends
|
|
|
746
753
|
ngOnInit() {
|
|
747
754
|
}
|
|
748
755
|
};
|
|
756
|
+
PopupMenuComponent.ctorParameters = () => [
|
|
757
|
+
{ type: ChangeDetectorRef }
|
|
758
|
+
];
|
|
749
759
|
__decorate([
|
|
750
760
|
Input(), StoreInValueModel('faceModel'),
|
|
751
761
|
__metadata("design:type", Object)
|
|
@@ -764,7 +774,7 @@ PopupMenuComponent = PopupMenuComponent_1 = __decorate([
|
|
|
764
774
|
`,
|
|
765
775
|
providers: [{ provide: CommandContainer, useExisting: forwardRef(() => PopupMenuComponent_1) }]
|
|
766
776
|
}),
|
|
767
|
-
__metadata("design:paramtypes", [])
|
|
777
|
+
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
768
778
|
], PopupMenuComponent);
|
|
769
779
|
|
|
770
780
|
var MoreMenuComponent_1;
|
|
@@ -772,10 +782,14 @@ var MoreMenuComponent_1;
|
|
|
772
782
|
*
|
|
773
783
|
*/
|
|
774
784
|
let MoreMenuComponent = MoreMenuComponent_1 = class MoreMenuComponent extends AbstractPopupMenuComponent {
|
|
775
|
-
constructor() {
|
|
776
|
-
super();
|
|
785
|
+
constructor(cdr) {
|
|
786
|
+
super(cdr);
|
|
787
|
+
this.xPosition = "before"; // this should be the default unless overriden by the user.
|
|
777
788
|
}
|
|
778
789
|
};
|
|
790
|
+
MoreMenuComponent.ctorParameters = () => [
|
|
791
|
+
{ type: ChangeDetectorRef }
|
|
792
|
+
];
|
|
779
793
|
__decorate([
|
|
780
794
|
Input(),
|
|
781
795
|
__metadata("design:type", String)
|
|
@@ -789,12 +803,13 @@ MoreMenuComponent = MoreMenuComponent_1 = __decorate([
|
|
|
789
803
|
<mat-icon>more_vert</mat-icon>
|
|
790
804
|
</button>
|
|
791
805
|
<aup-popup-menu-renderer [commandRegistrations]="commandRegistrations"
|
|
792
|
-
[
|
|
806
|
+
[xPosition]="xPosition"
|
|
807
|
+
[yPosition]="yPosition"
|
|
793
808
|
(commandExecuted)="closeMenu()"></aup-popup-menu-renderer>
|
|
794
809
|
`,
|
|
795
810
|
providers: [{ provide: CommandContainer, useExisting: forwardRef(() => MoreMenuComponent_1) }]
|
|
796
811
|
}),
|
|
797
|
-
__metadata("design:paramtypes", [])
|
|
812
|
+
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
798
813
|
], MoreMenuComponent);
|
|
799
814
|
|
|
800
815
|
let FocusContainerComponent = class FocusContainerComponent extends DisposableComponent {
|