@coreui/angular 4.2.0 → 4.2.1
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/README.md +2 -1
- package/esm2020/lib/popover/popover/popover.component.mjs +3 -3
- package/esm2020/lib/popover/popover.directive.mjs +9 -15
- package/esm2020/lib/tooltip/tooltip/tooltip.component.mjs +1 -1
- package/esm2020/lib/tooltip/tooltip.directive.mjs +16 -14
- package/fesm2015/coreui-angular.mjs +25 -30
- package/fesm2015/coreui-angular.mjs.map +1 -1
- package/fesm2020/coreui-angular.mjs +25 -29
- package/fesm2020/coreui-angular.mjs.map +1 -1
- package/lib/popover/popover.directive.d.ts +1 -1
- package/package.json +1 -1
|
@@ -6183,10 +6183,10 @@ class PopoverComponent {
|
|
|
6183
6183
|
}
|
|
6184
6184
|
}
|
|
6185
6185
|
PopoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: PopoverComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
6186
|
-
PopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: PopoverComponent, selector: "c-popover", inputs: { content: "content", visible: "visible", id: "id", role: "role" }, host: { properties: { "attr.id": "this.id", "attr.role": "this.role", "class": "this.hostClasses" } }, viewQueries: [{ propertyName: "viewContainerRef", first: true, predicate: ["popoverTemplate"], descendants: true, read: ViewContainerRef }], usesOnChanges: true, ngImport: i0, template: "<ng-container>\n <div [ngClass]=\"{'popover-arrow': !!content}\" data-popper-arrow
|
|
6186
|
+
PopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: PopoverComponent, selector: "c-popover", inputs: { content: "content", visible: "visible", id: "id", role: "role" }, host: { properties: { "attr.id": "this.id", "attr.role": "this.role", "class": "this.hostClasses" } }, viewQueries: [{ propertyName: "viewContainerRef", first: true, predicate: ["popoverTemplate"], descendants: true, read: ViewContainerRef }], usesOnChanges: true, ngImport: i0, template: "<ng-container>\r\n <div [ngClass]=\"{'popover-arrow': !!content}\" data-popper-arrow></div>\r\n <ng-container #popoverTemplate></ng-container>\r\n</ng-container>\r\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
6187
6187
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: PopoverComponent, decorators: [{
|
|
6188
6188
|
type: Component,
|
|
6189
|
-
args: [{ selector: 'c-popover', template: "<ng-container>\n <div [ngClass]=\"{'popover-arrow': !!content}\" data-popper-arrow
|
|
6189
|
+
args: [{ selector: 'c-popover', template: "<ng-container>\r\n <div [ngClass]=\"{'popover-arrow': !!content}\" data-popper-arrow></div>\r\n <ng-container #popoverTemplate></ng-container>\r\n</ng-container>\r\n" }]
|
|
6190
6190
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { content: [{
|
|
6191
6191
|
type: Input
|
|
6192
6192
|
}], visible: [{
|
|
@@ -6237,10 +6237,10 @@ class PopoverDirective {
|
|
|
6237
6237
|
{
|
|
6238
6238
|
name: 'offset',
|
|
6239
6239
|
options: {
|
|
6240
|
-
offset: [0, 8]
|
|
6241
|
-
}
|
|
6242
|
-
}
|
|
6243
|
-
]
|
|
6240
|
+
offset: [0, 8]
|
|
6241
|
+
}
|
|
6242
|
+
}
|
|
6243
|
+
]
|
|
6244
6244
|
};
|
|
6245
6245
|
}
|
|
6246
6246
|
/**
|
|
@@ -6263,20 +6263,19 @@ class PopoverDirective {
|
|
|
6263
6263
|
get visible() {
|
|
6264
6264
|
return this._visible;
|
|
6265
6265
|
}
|
|
6266
|
+
get ariaDescribedBy() {
|
|
6267
|
+
return this.popoverId ? this.popoverId : null;
|
|
6268
|
+
}
|
|
6266
6269
|
ngOnChanges(changes) {
|
|
6267
6270
|
if (changes['visible']) {
|
|
6268
6271
|
changes['visible'].currentValue ? this.addPopoverElement() : this.removePopoverElement();
|
|
6269
6272
|
}
|
|
6270
6273
|
}
|
|
6271
|
-
get ariaDescribedBy() {
|
|
6272
|
-
return this.popoverId ? this.popoverId : null;
|
|
6273
|
-
}
|
|
6274
6274
|
ngOnDestroy() {
|
|
6275
6275
|
this.clearListeners();
|
|
6276
6276
|
this.destroyPopoverElement();
|
|
6277
6277
|
}
|
|
6278
6278
|
ngOnInit() {
|
|
6279
|
-
// this.createPopoverElement();
|
|
6280
6279
|
this.setListeners();
|
|
6281
6280
|
}
|
|
6282
6281
|
setListeners() {
|
|
@@ -6330,7 +6329,6 @@ class PopoverDirective {
|
|
|
6330
6329
|
this.popoverRef.instance.content = this.content;
|
|
6331
6330
|
this.popover = this.popoverRef.location.nativeElement;
|
|
6332
6331
|
this.renderer.addClass(this.popover, 'fade');
|
|
6333
|
-
// this.renderer.setStyle(this.popover, 'visibility', 'hidden')
|
|
6334
6332
|
setTimeout(() => {
|
|
6335
6333
|
this.popperInstance = createPopper(this.hostElement.nativeElement, this.popover, { ...this.popperOptions });
|
|
6336
6334
|
this.viewContainerRef.insert(this.popoverRef.hostView);
|
|
@@ -6338,10 +6336,9 @@ class PopoverDirective {
|
|
|
6338
6336
|
this.popoverId = this.getUID('popover');
|
|
6339
6337
|
this.popoverRef.instance.id = this.popoverId;
|
|
6340
6338
|
this.popoverRef.instance.visible = this.visible;
|
|
6341
|
-
// this.renderer.removeStyle(this.popover, 'visibility');
|
|
6342
6339
|
this.renderer.appendChild(this.document.body, this.popover);
|
|
6343
6340
|
this.popperInstance.forceUpdate();
|
|
6344
|
-
// this.popoverRef.changeDetectorRef.
|
|
6341
|
+
// this.popoverRef.changeDetectorRef.markForCheck();
|
|
6345
6342
|
}, 100);
|
|
6346
6343
|
});
|
|
6347
6344
|
}
|
|
@@ -6350,12 +6347,9 @@ class PopoverDirective {
|
|
|
6350
6347
|
return;
|
|
6351
6348
|
}
|
|
6352
6349
|
this.popoverRef.instance.visible = this.visible;
|
|
6353
|
-
// this.popoverRef.changeDetectorRef?.detectChanges();
|
|
6354
6350
|
this.popoverRef.instance.id = undefined;
|
|
6355
6351
|
setTimeout(() => {
|
|
6356
6352
|
this.viewContainerRef.detach();
|
|
6357
|
-
// this.viewContainerRef.remove();
|
|
6358
|
-
// this.renderer.removeChild(this.document.body, this.popover);
|
|
6359
6353
|
this.popperInstance?.destroy();
|
|
6360
6354
|
this.popoverId = '';
|
|
6361
6355
|
}, 300);
|
|
@@ -8813,10 +8807,10 @@ class TooltipDirective {
|
|
|
8813
8807
|
{
|
|
8814
8808
|
name: 'offset',
|
|
8815
8809
|
options: {
|
|
8816
|
-
offset: [0, 0]
|
|
8817
|
-
}
|
|
8818
|
-
}
|
|
8819
|
-
]
|
|
8810
|
+
offset: [0, 0]
|
|
8811
|
+
}
|
|
8812
|
+
}
|
|
8813
|
+
]
|
|
8820
8814
|
};
|
|
8821
8815
|
}
|
|
8822
8816
|
/**
|
|
@@ -8835,8 +8829,6 @@ class TooltipDirective {
|
|
|
8835
8829
|
*/
|
|
8836
8830
|
set visible(value) {
|
|
8837
8831
|
this._visible = value;
|
|
8838
|
-
value ? this.addTooltipElement() : this.removeTooltipElement();
|
|
8839
|
-
this.tooltipRef?.changeDetectorRef.markForCheck();
|
|
8840
8832
|
}
|
|
8841
8833
|
get visible() {
|
|
8842
8834
|
return this._visible;
|
|
@@ -8854,7 +8846,6 @@ class TooltipDirective {
|
|
|
8854
8846
|
this.destroyTooltipElement();
|
|
8855
8847
|
}
|
|
8856
8848
|
ngOnInit() {
|
|
8857
|
-
// this.createTooltipElement();
|
|
8858
8849
|
this.setListeners();
|
|
8859
8850
|
}
|
|
8860
8851
|
setListeners() {
|
|
@@ -8863,12 +8854,15 @@ class TooltipDirective {
|
|
|
8863
8854
|
trigger: this.trigger,
|
|
8864
8855
|
callbackToggle: () => {
|
|
8865
8856
|
this.visible = !this.visible;
|
|
8857
|
+
this.visible ? this.addTooltipElement() : this.removeTooltipElement();
|
|
8866
8858
|
},
|
|
8867
8859
|
callbackOff: () => {
|
|
8868
8860
|
this.visible = false;
|
|
8861
|
+
this.removeTooltipElement();
|
|
8869
8862
|
},
|
|
8870
8863
|
callbackOn: () => {
|
|
8871
8864
|
this.visible = true;
|
|
8865
|
+
this.addTooltipElement();
|
|
8872
8866
|
}
|
|
8873
8867
|
};
|
|
8874
8868
|
this.listenersService.setListeners(config);
|
|
@@ -8886,7 +8880,9 @@ class TooltipDirective {
|
|
|
8886
8880
|
createTooltipElement() {
|
|
8887
8881
|
if (!this.tooltipRef) {
|
|
8888
8882
|
const tooltipComponent = this.componentFactoryResolver.resolveComponentFactory(TooltipComponent);
|
|
8889
|
-
this.tooltipRef = this.viewContainerRef.
|
|
8883
|
+
this.tooltipRef = tooltipComponent.create(this.viewContainerRef.injector);
|
|
8884
|
+
// this.tooltipRef = this.viewContainerRef.createComponent<TooltipComponent>(TooltipComponent);
|
|
8885
|
+
// this.viewContainerRef.detach();
|
|
8890
8886
|
}
|
|
8891
8887
|
}
|
|
8892
8888
|
destroyTooltipElement() {
|
|
@@ -8904,16 +8900,17 @@ class TooltipDirective {
|
|
|
8904
8900
|
}
|
|
8905
8901
|
this.tooltipRef.instance.content = this.content;
|
|
8906
8902
|
this.tooltip = this.tooltipRef.location.nativeElement;
|
|
8903
|
+
this.renderer.addClass(this.tooltip, 'fade');
|
|
8907
8904
|
setTimeout(() => {
|
|
8908
8905
|
this.popperInstance = createPopper(this.hostElement.nativeElement, this.tooltip, { ...this.popperOptions });
|
|
8906
|
+
this.viewContainerRef.insert(this.tooltipRef.hostView);
|
|
8909
8907
|
setTimeout(() => {
|
|
8910
8908
|
this.tooltipId = this.getUID('tooltip');
|
|
8911
8909
|
this.tooltipRef.instance.id = this.tooltipId;
|
|
8912
8910
|
this.tooltipRef.instance.visible = this.visible;
|
|
8913
8911
|
this.renderer.appendChild(this.document.body, this.tooltip);
|
|
8914
8912
|
this.popperInstance.forceUpdate();
|
|
8915
|
-
this.tooltipRef.changeDetectorRef.markForCheck();
|
|
8916
|
-
// this.tooltipRef.changeDetectorRef.detectChanges();
|
|
8913
|
+
// this.tooltipRef.changeDetectorRef.markForCheck();
|
|
8917
8914
|
}, 100);
|
|
8918
8915
|
});
|
|
8919
8916
|
}
|
|
@@ -8922,10 +8919,9 @@ class TooltipDirective {
|
|
|
8922
8919
|
return;
|
|
8923
8920
|
}
|
|
8924
8921
|
this.tooltipRef.instance.visible = this.visible;
|
|
8922
|
+
this.tooltipRef.instance.id = undefined;
|
|
8925
8923
|
setTimeout(() => {
|
|
8926
|
-
|
|
8927
|
-
this.tooltipRef.instance.id = undefined;
|
|
8928
|
-
this.renderer.removeChild(this.document.body, this.tooltip);
|
|
8924
|
+
this.viewContainerRef.detach();
|
|
8929
8925
|
this.popperInstance?.destroy();
|
|
8930
8926
|
this.tooltipId = '';
|
|
8931
8927
|
}, 300);
|