@coolon/angular-ui-powerups 3.7.0-alpha.8 → 3.7.0-alpha.9
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 +8 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +71 -70
- 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/separator.component.js +5 -4
- package/esm2015/lib/components/commands/separator.component.js.map +1 -1
- package/esm2015/lib/components/commands/separator.component.metadata.json +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +64 -63
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/separator.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Component, ElementRef, HostBinding, Optional } from '@angular/core';
|
|
1
|
+
import { Component, ElementRef, HostBinding, Inject, Optional } from '@angular/core';
|
|
2
2
|
import { CommandContainer } from './group/command-container';
|
|
3
3
|
import { PopupAwareComponent } from './group/popup-aware.component';
|
|
4
|
-
import {
|
|
4
|
+
import { POPUP_CONTAINER } from './group/popup-container';
|
|
5
5
|
import { ToolBarComponent } from './group/tool-bar/tool-bar.component';
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
export class SeparatorComponent extends PopupAwareComponent {
|
|
10
|
-
constructor(element, containerParent) {
|
|
11
|
-
super(element,
|
|
10
|
+
constructor(element, popupContainer, containerParent) {
|
|
11
|
+
super(element, popupContainer);
|
|
12
12
|
this.containerParent = containerParent;
|
|
13
13
|
}
|
|
14
14
|
isHorizontalContainer() {
|
|
@@ -33,6 +33,7 @@ SeparatorComponent.decorators = [
|
|
|
33
33
|
];
|
|
34
34
|
SeparatorComponent.ctorParameters = () => [
|
|
35
35
|
{ type: ElementRef },
|
|
36
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [POPUP_CONTAINER,] }] },
|
|
36
37
|
{ type: CommandContainer, decorators: [{ type: Optional }] }
|
|
37
38
|
];
|
|
38
39
|
SeparatorComponent.propDecorators = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.component.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/commands/separator.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAU,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"separator.component.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/commands/separator.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAU,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAkB,MAAM,yBAAyB,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAEvE;;GAEG;AAcH,MAAM,OAAO,kBAAmB,SAAQ,mBAAmB;IAEzD,YAAY,OAAmB,EACkB,cAA6B,EACrC,eAAkC;QACzE,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QADQ,oBAAe,GAAf,eAAe,CAAmB;IAE3E,CAAC;IAGD,qBAAqB;QACnB,OAAO,IAAI,CAAC,eAAe,YAAY,gBAAgB,IAAI,IAAI,CAAC,eAAe,CAAC,WAAW,KAAK,gBAAgB,CAAC,WAAW,CAAC,UAAU,CAAC;IAC1I,CAAC;IAED,QAAQ;IACR,CAAC;;;YA3BF,SAAS,SAAC;gBACT,QAAQ,EAAE,eAAe;gBACzB,QAAQ,EAAE;sEAC0D;yBAC3D;IACP;oBACA;;;;MAIE;aAEL;;;YAvBmB,UAAU;4CA2Bf,QAAQ,YAAI,MAAM,SAAC,eAAe;YAzBxC,gBAAgB,uBA0BV,QAAQ;;;oCAIpB,WAAW,SAAC,4BAA4B","sourcesContent":["import { Component, ElementRef, HostBinding, Inject, OnInit, Optional } from '@angular/core';\nimport { DisposableComponent } from '../disposable-component';\nimport { CommandContainer } from './group/command-container';\nimport { PopupAwareComponent } from './group/popup-aware.component';\nimport { POPUP_CONTAINER, PopupContainer } from './group/popup-container';\nimport { AbstractPopupMenuComponent } from './group/popup-menu/abstract-popup-menu.component';\nimport { ToolBarComponent } from './group/tool-bar/tool-bar.component';\n\n/**\n *\n */\n@Component({\n selector: 'aup-separator',\n template: `\n <mat-divider [vertical]=\"!isHorizontalContainer()\"></mat-divider>`,\n styles: [`:host {\n }`,\n `:host(.horizontal-container) {\n display: inline-flex;\n flex-direction: row;\n align-items: stretch;\n }`\n ]\n})\nexport class SeparatorComponent extends PopupAwareComponent implements OnInit {\n\n constructor(element: ElementRef,\n @Optional() @Inject(POPUP_CONTAINER) popupContainer:PopupContainer,\n @Optional() private readonly containerParent?: CommandContainer) {\n super(element, popupContainer);\n }\n\n @HostBinding('class.horizontal-container')\n isHorizontalContainer() {\n return this.containerParent instanceof ToolBarComponent && this.containerParent.orientation === CommandContainer.Orientation.HORIZONTAL;\n }\n\n ngOnInit() {\n }\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"SeparatorComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./group/popup-aware.component","name":"PopupAwareComponent","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"SeparatorComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./group/popup-aware.component","name":"PopupAwareComponent","line":24,"character":40},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-separator","template":"\n <mat-divider [vertical]=\"!isHorizontalContainer()\"></mat-divider>","styles":[":host {\n }",":host(.horizontal-container) {\n display: inline-flex;\n flex-direction: row;\n align-items: stretch;\n }"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":27,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":27,"character":27},"arguments":[{"__symbolic":"reference","module":"./group/popup-container","name":"POPUP_CONTAINER","line":27,"character":34}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":28,"character":15}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":26,"character":23},{"__symbolic":"reference","module":"./group/popup-container","name":"PopupContainer","line":27,"character":66},{"__symbolic":"reference","module":"./group/command-container","name":"CommandContainer","line":28,"character":61}]}],"isHorizontalContainer":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":32,"character":3},"arguments":["class.horizontal-container"]}]}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
2
|
-
import { Directive, ElementRef, Inject, Host, Optional, Input, HostListener, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, Component, ContentChild, InjectionToken,
|
|
2
|
+
import { Directive, ElementRef, Inject, Host, Optional, Input, HostListener, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, Component, ContentChild, InjectionToken, ViewEncapsulation, HostBinding, ViewChildren, SkipSelf, EventEmitter, ViewChild, Output, Self, TemplateRef, ChangeDetectorRef, ContentChildren, ViewContainerRef, Injector, ComponentFactoryResolver, INJECTOR } from '@angular/core';
|
|
3
3
|
import { FormsModule } from '@angular/forms';
|
|
4
4
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
5
5
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -623,66 +623,6 @@ class CommandContainer extends GarbageCollector {
|
|
|
623
623
|
CommandContainer.Orientation = Enum({ HORIZONTAL: 'horizontal', VERTICAL: 'vertical' });
|
|
624
624
|
})(CommandContainer || (CommandContainer = {}));
|
|
625
625
|
|
|
626
|
-
/**
|
|
627
|
-
*
|
|
628
|
-
*/
|
|
629
|
-
class AbstractPopupMenuComponent extends PopupAwareComponent {
|
|
630
|
-
constructor(element, parent) {
|
|
631
|
-
super(element, parent);
|
|
632
|
-
this._unorderedChildren = new MutableListModel();
|
|
633
|
-
this.faceModelDelegate = new DelegatingValueModel();
|
|
634
|
-
this.xPosition = 'after';
|
|
635
|
-
this.yPosition = 'below';
|
|
636
|
-
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
637
|
-
// group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
|
|
638
|
-
this.faceAdapterModel = chain(this.faceModelDelegate).map(f => new CommandFace.Adapter(f));
|
|
639
|
-
this.children = chain(this._unorderedChildren).sortBy('componentIndex');
|
|
640
|
-
}
|
|
641
|
-
get faceAdapter() {
|
|
642
|
-
return this.faceAdapterModel.value;
|
|
643
|
-
}
|
|
644
|
-
isRoot() {
|
|
645
|
-
return !this.parent;
|
|
646
|
-
}
|
|
647
|
-
register(component) {
|
|
648
|
-
this._unorderedChildren.push(component);
|
|
649
|
-
return Disposable.disposableThatRuns(() => {
|
|
650
|
-
this._unorderedChildren.remove(component);
|
|
651
|
-
});
|
|
652
|
-
}
|
|
653
|
-
onCommandFired() {
|
|
654
|
-
this.triggers.forEach(trigger => {
|
|
655
|
-
if (trigger.menuOpen) {
|
|
656
|
-
trigger.closeMenu();
|
|
657
|
-
}
|
|
658
|
-
});
|
|
659
|
-
}
|
|
660
|
-
getFace() {
|
|
661
|
-
return this.faceAdapter.face;
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
AbstractPopupMenuComponent.decorators = [
|
|
665
|
-
{ type: Component, args: [{
|
|
666
|
-
selector: 'aup-abstract-popup-menu',
|
|
667
|
-
template: ''
|
|
668
|
-
},] }
|
|
669
|
-
];
|
|
670
|
-
AbstractPopupMenuComponent.ctorParameters = () => [
|
|
671
|
-
{ type: ElementRef },
|
|
672
|
-
{ type: undefined, decorators: [{ type: Inject, args: [POPUP_CONTAINER,] }] }
|
|
673
|
-
];
|
|
674
|
-
AbstractPopupMenuComponent.propDecorators = {
|
|
675
|
-
xPosition: [{ type: Input }],
|
|
676
|
-
yPosition: [{ type: Input }],
|
|
677
|
-
triggers: [{ type: ViewChildren, args: [MatMenuTrigger,] }]
|
|
678
|
-
};
|
|
679
|
-
__decorate([
|
|
680
|
-
Trace(),
|
|
681
|
-
__metadata("design:type", Function),
|
|
682
|
-
__metadata("design:paramtypes", [PopupAwareComponent]),
|
|
683
|
-
__metadata("design:returntype", void 0)
|
|
684
|
-
], AbstractPopupMenuComponent.prototype, "register", null);
|
|
685
|
-
|
|
686
626
|
/**
|
|
687
627
|
*
|
|
688
628
|
*/
|
|
@@ -718,8 +658,8 @@ ToolBarComponent.ctorParameters = () => [];
|
|
|
718
658
|
*
|
|
719
659
|
*/
|
|
720
660
|
class SeparatorComponent extends PopupAwareComponent {
|
|
721
|
-
constructor(element, containerParent) {
|
|
722
|
-
super(element,
|
|
661
|
+
constructor(element, popupContainer, containerParent) {
|
|
662
|
+
super(element, popupContainer);
|
|
723
663
|
this.containerParent = containerParent;
|
|
724
664
|
}
|
|
725
665
|
isHorizontalContainer() {
|
|
@@ -744,12 +684,73 @@ SeparatorComponent.decorators = [
|
|
|
744
684
|
];
|
|
745
685
|
SeparatorComponent.ctorParameters = () => [
|
|
746
686
|
{ type: ElementRef },
|
|
687
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [POPUP_CONTAINER,] }] },
|
|
747
688
|
{ type: CommandContainer, decorators: [{ type: Optional }] }
|
|
748
689
|
];
|
|
749
690
|
SeparatorComponent.propDecorators = {
|
|
750
691
|
isHorizontalContainer: [{ type: HostBinding, args: ['class.horizontal-container',] }]
|
|
751
692
|
};
|
|
752
693
|
|
|
694
|
+
/**
|
|
695
|
+
*
|
|
696
|
+
*/
|
|
697
|
+
class AbstractPopupMenuComponent extends PopupAwareComponent {
|
|
698
|
+
constructor(element, parent) {
|
|
699
|
+
super(element, parent);
|
|
700
|
+
this._unorderedChildren = new MutableListModel();
|
|
701
|
+
this.faceModelDelegate = new DelegatingValueModel();
|
|
702
|
+
this.xPosition = 'after';
|
|
703
|
+
this.yPosition = 'below';
|
|
704
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
705
|
+
// group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
|
|
706
|
+
this.faceAdapterModel = chain(this.faceModelDelegate).map(f => new CommandFace.Adapter(f));
|
|
707
|
+
this.children = chain(this._unorderedChildren).sortBy('componentIndex');
|
|
708
|
+
}
|
|
709
|
+
get faceAdapter() {
|
|
710
|
+
return this.faceAdapterModel.value;
|
|
711
|
+
}
|
|
712
|
+
isRoot() {
|
|
713
|
+
return !this.parent;
|
|
714
|
+
}
|
|
715
|
+
register(component) {
|
|
716
|
+
this._unorderedChildren.push(component);
|
|
717
|
+
return Disposable.disposableThatRuns(() => {
|
|
718
|
+
this._unorderedChildren.remove(component);
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
onCommandFired() {
|
|
722
|
+
this.triggers.forEach(trigger => {
|
|
723
|
+
if (trigger.menuOpen) {
|
|
724
|
+
trigger.closeMenu();
|
|
725
|
+
}
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
getFace() {
|
|
729
|
+
return this.faceAdapter.face;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
AbstractPopupMenuComponent.decorators = [
|
|
733
|
+
{ type: Component, args: [{
|
|
734
|
+
selector: 'aup-abstract-popup-menu',
|
|
735
|
+
template: ''
|
|
736
|
+
},] }
|
|
737
|
+
];
|
|
738
|
+
AbstractPopupMenuComponent.ctorParameters = () => [
|
|
739
|
+
{ type: ElementRef },
|
|
740
|
+
{ type: undefined, decorators: [{ type: Inject, args: [POPUP_CONTAINER,] }] }
|
|
741
|
+
];
|
|
742
|
+
AbstractPopupMenuComponent.propDecorators = {
|
|
743
|
+
xPosition: [{ type: Input }],
|
|
744
|
+
yPosition: [{ type: Input }],
|
|
745
|
+
triggers: [{ type: ViewChildren, args: [MatMenuTrigger,] }]
|
|
746
|
+
};
|
|
747
|
+
__decorate([
|
|
748
|
+
Trace(),
|
|
749
|
+
__metadata("design:type", Function),
|
|
750
|
+
__metadata("design:paramtypes", [PopupAwareComponent]),
|
|
751
|
+
__metadata("design:returntype", void 0)
|
|
752
|
+
], AbstractPopupMenuComponent.prototype, "register", null);
|
|
753
|
+
|
|
753
754
|
/**
|
|
754
755
|
*
|
|
755
756
|
*/
|