@bizy/core 19.15.0 → 19.15.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/fesm2022/bizy-core.mjs +35 -18
- package/fesm2022/bizy-core.mjs.map +1 -1
- package/lib/modules/popup/full-screen-popup-wrapper/full-screen-popup-wrapper.component.d.ts +1 -0
- package/lib/modules/popup/popup-wrapper/popup-wrapper.component.d.ts +7 -0
- package/lib/modules/popup/popup.service.d.ts +6 -0
- package/package.json +1 -1
package/fesm2022/bizy-core.mjs
CHANGED
|
@@ -3651,14 +3651,22 @@ class BizyPopupWrapperComponent {
|
|
|
3651
3651
|
disabled = false;
|
|
3652
3652
|
disableClose = false;
|
|
3653
3653
|
disableDrag = false;
|
|
3654
|
+
position = null;
|
|
3655
|
+
ngOnInit() {
|
|
3656
|
+
if (this.#data) {
|
|
3657
|
+
if (this.#data.position) {
|
|
3658
|
+
this.position = this.#data.position;
|
|
3659
|
+
}
|
|
3660
|
+
if (this.#data.disableClose) {
|
|
3661
|
+
this.disableClose = this.#data.disableClose;
|
|
3662
|
+
}
|
|
3663
|
+
if (this.#data.disableDrag) {
|
|
3664
|
+
this.disableDrag = this.#data.disableDrag;
|
|
3665
|
+
}
|
|
3666
|
+
}
|
|
3667
|
+
}
|
|
3654
3668
|
ngAfterViewInit() {
|
|
3655
3669
|
this.loadDynamicComponent();
|
|
3656
|
-
if (this.#data && this.#data.disableClose) {
|
|
3657
|
-
this.disableClose = this.#data.disableClose;
|
|
3658
|
-
}
|
|
3659
|
-
if (this.#data && this.#data.disableDrag) {
|
|
3660
|
-
this.disableDrag = this.#data.disableDrag;
|
|
3661
|
-
}
|
|
3662
3670
|
}
|
|
3663
3671
|
loadDynamicComponent = () => {
|
|
3664
3672
|
if (this.#data && this.#data.component) {
|
|
@@ -3672,11 +3680,17 @@ class BizyPopupWrapperComponent {
|
|
|
3672
3680
|
this.#popup.close({ id: this.#dialogRef.id });
|
|
3673
3681
|
}
|
|
3674
3682
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: BizyPopupWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3675
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: BizyPopupWrapperComponent, isStandalone: true, selector: "bizy-popup-wrapper", viewQueries: [{ propertyName: "dynamicComponentContainer", first: true, predicate: ["dynamicComponentContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div class=\"bizy-popup-wrapper\" cdkDrag
|
|
3683
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: BizyPopupWrapperComponent, isStandalone: true, selector: "bizy-popup-wrapper", host: { properties: { "style.top": "position && position.top ? position.top : position ? \"\" : \"50%\"", "style.right": "position && position.right ? position.right : position ? \"\" : \"50%\"", "style.bottom": "position && position.bottom ? position.bottom : position ? \"\" : \"50%\"", "style.left": "position && position.left ? position.left : position ? \"\" : \"50%\"", "style.transform": "position ? \"\" : \"translate(-50%, -50%)\"" } }, viewQueries: [{ propertyName: "dynamicComponentContainer", first: true, predicate: ["dynamicComponentContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div class=\"bizy-popup-wrapper\" cdkDrag *ngIf=\"!disableDrag\">\n\n <button class=\"bizy-popup-wrapper__drag-button\" cdkDragHandle>\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" class=\"bizy-popup-wrapper__drag-button__icon\">\n <path d=\"M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l9.4-9.4V224H109.3l9.4-9.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4H224V402.7l-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-9.4 9.4V288H402.7l-9.4 9.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l9.4 9.4H288V109.3l9.4 9.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-64-64z\"/>\n </svg>\n\n </button>\n\n <button *ngIf=\"!disableClose\" class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\n\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\" class=\"bizy-popup-wrapper__close-button__icon\">\n <path d=\"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z\"/>\n </svg>\n\n </button>\n\n <ng-container #dynamicComponentContainer></ng-container>\n\n</div>\n\n<div class=\"bizy-popup-wrapper\" *ngIf=\"disableDrag\">\n\n <button *ngIf=\"!disableClose\" class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\n\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\" class=\"bizy-popup-wrapper__close-button__icon\">\n <path d=\"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z\"/>\n </svg>\n\n </button>\n\n <ng-container #dynamicComponentContainer></ng-container>\n\n</div>", styles: [":host{font-size:1rem;position:fixed!important;min-height:150px;min-width:150px;width:fit-content;height:fit-content;z-index:10}.bizy-popup-wrapper{position:relative;padding:var(--bizy-popup-padding);background-color:var(--bizy-popup-background-color);min-width:var(--bizy-popup-min-width);width:var(--bizy-popup-width);max-width:var(--bizy-popup-max-width)}.bizy-popup-wrapper__drag-button{position:absolute;left:-.9rem;top:-.9rem;border:var(--bizy-popup-drag-button-border);border-radius:50%;padding:.2rem;place-items:center;display:grid;background-color:var(--bizy-popup-drag-button-background-color);cursor:pointer;transition:transform .2s;z-index:1}.bizy-popup-wrapper__drag-button:hover{transform:scale(1.1)}.bizy-popup-wrapper__drag-button__icon{height:1rem}.bizy-popup-wrapper__drag-button__icon{fill:var(--bizy-popup-drag-button-color)}.bizy-popup-wrapper__close-button{position:absolute;right:-.9rem;top:-.9rem;border:var(--bizy-popup-close-button-border);border-radius:50%;padding:.25rem .35rem;place-items:center;display:grid;background-color:var(--bizy-popup-close-button-background-color);cursor:pointer;transition:transform .2s;z-index:1}.bizy-popup-wrapper__close-button:hover .bizy-popup-wrapper__close-button__icon{transform:scale(1.1)}.bizy-popup-wrapper__close-button:hover .bizy-popup-wrapper__close-button__icon{fill:var(--bizy-popup-close-button-hover-color)}.bizy-popup-wrapper__close-button__icon{height:1rem;transition:fill .2s ease,}.bizy-popup-wrapper__close-button__icon{fill:var(--bizy-popup-close-button-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: DialogModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3676
3684
|
}
|
|
3677
3685
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: BizyPopupWrapperComponent, decorators: [{
|
|
3678
3686
|
type: Component,
|
|
3679
|
-
args: [{ selector: 'bizy-popup-wrapper', imports: [CommonModule, DialogModule, DragDropModule], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3687
|
+
args: [{ selector: 'bizy-popup-wrapper', imports: [CommonModule, DialogModule, DragDropModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
3688
|
+
'[style.top]': 'position && position.top ? position.top : position ? "" : "50%"',
|
|
3689
|
+
'[style.right]': 'position && position.right ? position.right : position ? "" : "50%"',
|
|
3690
|
+
'[style.bottom]': 'position && position.bottom ? position.bottom : position ? "" : "50%"',
|
|
3691
|
+
'[style.left]': 'position && position.left ? position.left : position ? "" : "50%"',
|
|
3692
|
+
'[style.transform]': 'position ? "" : "translate(-50%, -50%)"'
|
|
3693
|
+
}, template: "<div class=\"bizy-popup-wrapper\" cdkDrag *ngIf=\"!disableDrag\">\n\n <button class=\"bizy-popup-wrapper__drag-button\" cdkDragHandle>\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" class=\"bizy-popup-wrapper__drag-button__icon\">\n <path d=\"M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l9.4-9.4V224H109.3l9.4-9.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4H224V402.7l-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-9.4 9.4V288H402.7l-9.4 9.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l9.4 9.4H288V109.3l9.4 9.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-64-64z\"/>\n </svg>\n\n </button>\n\n <button *ngIf=\"!disableClose\" class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\n\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\" class=\"bizy-popup-wrapper__close-button__icon\">\n <path d=\"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z\"/>\n </svg>\n\n </button>\n\n <ng-container #dynamicComponentContainer></ng-container>\n\n</div>\n\n<div class=\"bizy-popup-wrapper\" *ngIf=\"disableDrag\">\n\n <button *ngIf=\"!disableClose\" class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\n\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\" class=\"bizy-popup-wrapper__close-button__icon\">\n <path d=\"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z\"/>\n </svg>\n\n </button>\n\n <ng-container #dynamicComponentContainer></ng-container>\n\n</div>", styles: [":host{font-size:1rem;position:fixed!important;min-height:150px;min-width:150px;width:fit-content;height:fit-content;z-index:10}.bizy-popup-wrapper{position:relative;padding:var(--bizy-popup-padding);background-color:var(--bizy-popup-background-color);min-width:var(--bizy-popup-min-width);width:var(--bizy-popup-width);max-width:var(--bizy-popup-max-width)}.bizy-popup-wrapper__drag-button{position:absolute;left:-.9rem;top:-.9rem;border:var(--bizy-popup-drag-button-border);border-radius:50%;padding:.2rem;place-items:center;display:grid;background-color:var(--bizy-popup-drag-button-background-color);cursor:pointer;transition:transform .2s;z-index:1}.bizy-popup-wrapper__drag-button:hover{transform:scale(1.1)}.bizy-popup-wrapper__drag-button__icon{height:1rem}.bizy-popup-wrapper__drag-button__icon{fill:var(--bizy-popup-drag-button-color)}.bizy-popup-wrapper__close-button{position:absolute;right:-.9rem;top:-.9rem;border:var(--bizy-popup-close-button-border);border-radius:50%;padding:.25rem .35rem;place-items:center;display:grid;background-color:var(--bizy-popup-close-button-background-color);cursor:pointer;transition:transform .2s;z-index:1}.bizy-popup-wrapper__close-button:hover .bizy-popup-wrapper__close-button__icon{transform:scale(1.1)}.bizy-popup-wrapper__close-button:hover .bizy-popup-wrapper__close-button__icon{fill:var(--bizy-popup-close-button-hover-color)}.bizy-popup-wrapper__close-button__icon{height:1rem;transition:fill .2s ease,}.bizy-popup-wrapper__close-button__icon{fill:var(--bizy-popup-close-button-color)}\n"] }]
|
|
3680
3694
|
}], propDecorators: { dynamicComponentContainer: [{
|
|
3681
3695
|
type: ViewChild,
|
|
3682
3696
|
args: ['dynamicComponentContainer', { read: ViewContainerRef }]
|
|
@@ -4865,11 +4879,12 @@ class BizyPopupService {
|
|
|
4865
4879
|
data: {
|
|
4866
4880
|
component: data.component,
|
|
4867
4881
|
disableClose: data.disableCloseButton ?? false,
|
|
4868
|
-
disableDrag: data.disableDragButton ?? false
|
|
4882
|
+
disableDrag: data.disableDragButton ?? false,
|
|
4883
|
+
position: data.position,
|
|
4869
4884
|
},
|
|
4870
4885
|
autoFocus: true,
|
|
4871
4886
|
hasBackdrop: true,
|
|
4872
|
-
disableClose: data.disableBackdropClose ? data.disableBackdropClose : data.disableClose ? data.disableClose : true,
|
|
4887
|
+
disableClose: typeof data.disableBackdropClose !== 'undefined' && data.disableBackdropClose !== null ? data.disableBackdropClose : typeof data.disableClose !== 'undefined' && data.disableClose !== null ? data.disableClose : true,
|
|
4873
4888
|
panelClass: Array.isArray(data.customClass) ? data.customClass : this.#validator.isString(data.customClass) ? [data.customClass] : []
|
|
4874
4889
|
}));
|
|
4875
4890
|
BizyPopupService.dialogs.add(dialogRef);
|
|
@@ -4899,14 +4914,12 @@ class BizyPopupService {
|
|
|
4899
4914
|
dialogRef.close(data ? data.response : null);
|
|
4900
4915
|
BizyPopupService.dialogs.delete(dialogRef);
|
|
4901
4916
|
}
|
|
4902
|
-
this.#data = null;
|
|
4903
4917
|
}
|
|
4904
4918
|
closeAll() {
|
|
4905
4919
|
Array.from(BizyPopupService.dialogs).forEach(_dialogRef => {
|
|
4906
4920
|
_dialogRef.close();
|
|
4907
4921
|
});
|
|
4908
4922
|
BizyPopupService.dialogs.clear();
|
|
4909
|
-
this.#data = null;
|
|
4910
4923
|
}
|
|
4911
4924
|
openedPopups() {
|
|
4912
4925
|
return BizyPopupService.dialogs.size;
|
|
@@ -4927,14 +4940,18 @@ class BizyFullScreenPopupWrapperComponent {
|
|
|
4927
4940
|
disabled = false;
|
|
4928
4941
|
disableClose = false;
|
|
4929
4942
|
disableDrag = false;
|
|
4943
|
+
ngOnInit() {
|
|
4944
|
+
if (this.#data) {
|
|
4945
|
+
if (this.#data.disableClose) {
|
|
4946
|
+
this.disableClose = this.#data.disableClose;
|
|
4947
|
+
}
|
|
4948
|
+
if (this.#data.disableDrag) {
|
|
4949
|
+
this.disableDrag = this.#data.disableDrag;
|
|
4950
|
+
}
|
|
4951
|
+
}
|
|
4952
|
+
}
|
|
4930
4953
|
ngAfterViewInit() {
|
|
4931
4954
|
this.loadDynamicComponent();
|
|
4932
|
-
if (this.#data && this.#data.disableClose) {
|
|
4933
|
-
this.disableClose = this.#data.disableClose;
|
|
4934
|
-
}
|
|
4935
|
-
if (this.#data && this.#data.disableDrag) {
|
|
4936
|
-
this.disableDrag = this.#data.disableDrag;
|
|
4937
|
-
}
|
|
4938
4955
|
}
|
|
4939
4956
|
loadDynamicComponent = () => {
|
|
4940
4957
|
if (this.#data && this.#data.component) {
|