@bizy/core 21.9.0 → 21.9.2
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 +174 -118
- package/fesm2022/bizy-core.mjs.map +1 -1
- package/package.json +1 -2
- package/styles/normalize.css +7 -4
- package/types/bizy-core.d.ts +9 -6
package/fesm2022/bizy-core.mjs
CHANGED
|
@@ -20,17 +20,8 @@ import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
|
|
|
20
20
|
import localeEs from '@angular/common/locales/es';
|
|
21
21
|
import * as i2$1 from '@angular/forms';
|
|
22
22
|
import { FormsModule, FormBuilder, Validators } from '@angular/forms';
|
|
23
|
-
import flatpickr from 'flatpickr';
|
|
24
|
-
import monthSelectPlugin from 'flatpickr/dist/plugins/monthSelect/index.js';
|
|
25
|
-
import { Spanish } from 'flatpickr/dist/l10n/es.js';
|
|
26
23
|
import * as i2$2 from '@angular/cdk/overlay';
|
|
27
24
|
import { OverlayModule, CdkConnectedOverlay } from '@angular/cdk/overlay';
|
|
28
|
-
import AutoNumeric from 'autonumeric';
|
|
29
|
-
import Uppy from '@uppy/core';
|
|
30
|
-
import es_ES from '@uppy/locales/lib/es_ES';
|
|
31
|
-
import en_US from '@uppy/locales/lib/en_US';
|
|
32
|
-
import Dashboard from '@uppy/dashboard';
|
|
33
|
-
import XHRUpload from '@uppy/xhr-upload';
|
|
34
25
|
import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
35
26
|
import { ScrollingModule, CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
|
36
27
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
@@ -8833,7 +8824,7 @@ class BizyPopupWrapperComponent {
|
|
|
8833
8824
|
this.#popup.close({ id: this.#dialogRef.id });
|
|
8834
8825
|
}
|
|
8835
8826
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyPopupWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8836
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: BizyPopupWrapperComponent, isStandalone: true, selector: "bizy-popup-wrapper", host: { properties: { "style.top": "position.top", "style.right": "position.right", "style.bottom": "position.bottom", "style.left": "position.left", "style.transform": "position.transform" } }, viewQueries: [{ propertyName: "dynamicComponentContainer", first: true, predicate: ["dynamicComponentContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "@if (!disableDrag) {\n <div class=\"bizy-popup-wrapper\" cdkDrag>\n <button class=\"bizy-popup-wrapper__drag-button\" cdkDragHandle>\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 </button>\n @if (!disableClose) {\n <button class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\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 </button>\n }\n <ng-container #dynamicComponentContainer></ng-container>\n </div>\n}\n\n@if (disableDrag) {\n <div class=\"bizy-popup-wrapper\">\n @if (!disableClose) {\n <button class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\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 </button>\n }\n <ng-container #dynamicComponentContainer></ng-container>\n </div>\n}", styles: [":host{font-size:1rem;position:fixed!important;display:flex;height:var(--bizy-popup-height);min-height:var(--bizy-popup-min-height);max-height:var(--bizy-popup-max-height);width:var(--bizy-popup-width);min-width:var(--bizy-popup-min-width);max-width:var(--bizy-popup-max-width);
|
|
8827
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: BizyPopupWrapperComponent, isStandalone: true, selector: "bizy-popup-wrapper", host: { properties: { "style.top": "position.top", "style.right": "position.right", "style.bottom": "position.bottom", "style.left": "position.left", "style.transform": "position.transform" } }, viewQueries: [{ propertyName: "dynamicComponentContainer", first: true, predicate: ["dynamicComponentContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "@if (!disableDrag) {\n <div class=\"bizy-popup-wrapper\" cdkDrag>\n <button class=\"bizy-popup-wrapper__drag-button\" cdkDragHandle>\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 </button>\n @if (!disableClose) {\n <button class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\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 </button>\n }\n <ng-container #dynamicComponentContainer></ng-container>\n </div>\n}\n\n@if (disableDrag) {\n <div class=\"bizy-popup-wrapper\">\n @if (!disableClose) {\n <button class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\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 </button>\n }\n <ng-container #dynamicComponentContainer></ng-container>\n </div>\n}", styles: [":host{font-size:1rem;position:fixed!important;display:flex;height:var(--bizy-popup-height);min-height:var(--bizy-popup-min-height);max-height:var(--bizy-popup-max-height);width:var(--bizy-popup-width);min-width:var(--bizy-popup-min-width);max-width:var(--bizy-popup-max-width);z-index:10}.bizy-popup-wrapper{flex:1;position:relative;padding:var(--bizy-popup-padding);background-color:var(--bizy-popup-background-color);border-radius:var(--bizy-popup-border-radius)}.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: DialogModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.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: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8837
8828
|
}
|
|
8838
8829
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyPopupWrapperComponent, decorators: [{
|
|
8839
8830
|
type: Component,
|
|
@@ -8843,7 +8834,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImpor
|
|
|
8843
8834
|
'[style.bottom]': 'position.bottom',
|
|
8844
8835
|
'[style.left]': 'position.left',
|
|
8845
8836
|
'[style.transform]': 'position.transform'
|
|
8846
|
-
}, template: "@if (!disableDrag) {\n <div class=\"bizy-popup-wrapper\" cdkDrag>\n <button class=\"bizy-popup-wrapper__drag-button\" cdkDragHandle>\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 </button>\n @if (!disableClose) {\n <button class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\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 </button>\n }\n <ng-container #dynamicComponentContainer></ng-container>\n </div>\n}\n\n@if (disableDrag) {\n <div class=\"bizy-popup-wrapper\">\n @if (!disableClose) {\n <button class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\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 </button>\n }\n <ng-container #dynamicComponentContainer></ng-container>\n </div>\n}", styles: [":host{font-size:1rem;position:fixed!important;display:flex;height:var(--bizy-popup-height);min-height:var(--bizy-popup-min-height);max-height:var(--bizy-popup-max-height);width:var(--bizy-popup-width);min-width:var(--bizy-popup-min-width);max-width:var(--bizy-popup-max-width);
|
|
8837
|
+
}, template: "@if (!disableDrag) {\n <div class=\"bizy-popup-wrapper\" cdkDrag>\n <button class=\"bizy-popup-wrapper__drag-button\" cdkDragHandle>\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 </button>\n @if (!disableClose) {\n <button class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\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 </button>\n }\n <ng-container #dynamicComponentContainer></ng-container>\n </div>\n}\n\n@if (disableDrag) {\n <div class=\"bizy-popup-wrapper\">\n @if (!disableClose) {\n <button class=\"bizy-popup-wrapper__close-button\" (click)=\"close()\" (keyup.enter)=\"close()\">\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 </button>\n }\n <ng-container #dynamicComponentContainer></ng-container>\n </div>\n}", styles: [":host{font-size:1rem;position:fixed!important;display:flex;height:var(--bizy-popup-height);min-height:var(--bizy-popup-min-height);max-height:var(--bizy-popup-max-height);width:var(--bizy-popup-width);min-width:var(--bizy-popup-min-width);max-width:var(--bizy-popup-max-width);z-index:10}.bizy-popup-wrapper{flex:1;position:relative;padding:var(--bizy-popup-padding);background-color:var(--bizy-popup-background-color);border-radius:var(--bizy-popup-border-radius)}.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"] }]
|
|
8847
8838
|
}], propDecorators: { dynamicComponentContainer: [{
|
|
8848
8839
|
type: ViewChild,
|
|
8849
8840
|
args: ['dynamicComponentContainer', { read: ViewContainerRef }]
|
|
@@ -9086,6 +9077,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImpor
|
|
|
9086
9077
|
args: [RendererFactory2]
|
|
9087
9078
|
}] }] });
|
|
9088
9079
|
|
|
9080
|
+
var _a$1;
|
|
9089
9081
|
class BizyRouterService {
|
|
9090
9082
|
router;
|
|
9091
9083
|
static backPath = '';
|
|
@@ -9098,11 +9090,13 @@ class BizyRouterService {
|
|
|
9098
9090
|
this.router = router;
|
|
9099
9091
|
this.transitionsEnd$ = this.router.events.pipe(filter(event => event instanceof NavigationEnd), map((event) => event.id), distinctUntilChanged$1(), map(() => this.router.routerState.snapshot.root));
|
|
9100
9092
|
this.transitionsStart$ = this.router.events.pipe(filter(event => event instanceof NavigationStart), map((event) => event.id), distinctUntilChanged$1(), map(() => this.router.routerState.snapshot.root));
|
|
9093
|
+
this.#updateData(this.router.routerState.snapshot.root);
|
|
9094
|
+
this.transitionsEnd$.subscribe(snapshot => this.#updateData(snapshot));
|
|
9101
9095
|
this.popStateEvent$ = fromEvent(window, 'popstate');
|
|
9102
9096
|
this.routeChange$ = merge(this.transitionsEnd$, this.popStateEvent$).pipe(map(() => void 0));
|
|
9103
9097
|
}
|
|
9104
9098
|
getURL = () => window.location.pathname;
|
|
9105
|
-
getBackPath = () =>
|
|
9099
|
+
getBackPath = () => _a$1.backPath;
|
|
9106
9100
|
getId = (activatedRoute, param) => activatedRoute.snapshot.paramMap.get(param);
|
|
9107
9101
|
getQueryParam = (activatedRoute, param) => activatedRoute.snapshot.queryParamMap.get(param);
|
|
9108
9102
|
getAllQueryParam() {
|
|
@@ -9113,21 +9107,13 @@ class BizyRouterService {
|
|
|
9113
9107
|
}
|
|
9114
9108
|
return queryParams;
|
|
9115
9109
|
}
|
|
9116
|
-
getData = () =>
|
|
9110
|
+
getData = () => _a$1.data;
|
|
9117
9111
|
goTo(data) {
|
|
9118
9112
|
if (data.replace) {
|
|
9119
|
-
|
|
9113
|
+
_a$1.backPath = '';
|
|
9120
9114
|
}
|
|
9121
9115
|
else {
|
|
9122
|
-
|
|
9123
|
-
}
|
|
9124
|
-
if (this.router.routerState && this.router.routerState.snapshot && this.router.routerState.snapshot.root) {
|
|
9125
|
-
const root = this.router.routerState.snapshot.root;
|
|
9126
|
-
let route = root;
|
|
9127
|
-
while (route.firstChild) {
|
|
9128
|
-
route = route.firstChild;
|
|
9129
|
-
}
|
|
9130
|
-
BizyRouterService.data = route && route.data ? route.data : {};
|
|
9116
|
+
_a$1.backPath = this.getURL();
|
|
9131
9117
|
}
|
|
9132
9118
|
if (data.path[0] === '/') {
|
|
9133
9119
|
this.router.navigateByUrl(`${data.path}${this.#serialize(data.params)}`, { replaceUrl: data.replace ?? false, skipLocationChange: data.skip ?? false });
|
|
@@ -9139,9 +9125,9 @@ class BizyRouterService {
|
|
|
9139
9125
|
this.router.navigateByUrl(`${url}/${data.path}${this.#serialize(data.params)}`, { replaceUrl: data.replace ?? false, skipLocationChange: data.skip ?? false });
|
|
9140
9126
|
}
|
|
9141
9127
|
goBack(data) {
|
|
9142
|
-
if (
|
|
9128
|
+
if (_a$1.backPath) {
|
|
9143
9129
|
history.back();
|
|
9144
|
-
|
|
9130
|
+
_a$1.backPath = '';
|
|
9145
9131
|
}
|
|
9146
9132
|
else if (data && data.path) {
|
|
9147
9133
|
this.router.navigateByUrl(data.path, { replaceUrl: true });
|
|
@@ -9164,6 +9150,13 @@ class BizyRouterService {
|
|
|
9164
9150
|
}, 1);
|
|
9165
9151
|
}
|
|
9166
9152
|
}
|
|
9153
|
+
#updateData(root) {
|
|
9154
|
+
let route = root;
|
|
9155
|
+
while (route.firstChild) {
|
|
9156
|
+
route = route.firstChild;
|
|
9157
|
+
}
|
|
9158
|
+
_a$1.data = route.data ?? {};
|
|
9159
|
+
}
|
|
9167
9160
|
#serialize(params) {
|
|
9168
9161
|
if (!params) {
|
|
9169
9162
|
return '';
|
|
@@ -9180,6 +9173,7 @@ class BizyRouterService {
|
|
|
9180
9173
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyRouterService, deps: [{ token: Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9181
9174
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyRouterService, providedIn: 'root' });
|
|
9182
9175
|
}
|
|
9176
|
+
_a$1 = BizyRouterService;
|
|
9183
9177
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyRouterService, decorators: [{
|
|
9184
9178
|
type: Injectable,
|
|
9185
9179
|
args: [{ providedIn: 'root' }]
|
|
@@ -10181,10 +10175,11 @@ class BizyPopupService {
|
|
|
10181
10175
|
return BizyPopupService.dialogs.size;
|
|
10182
10176
|
}
|
|
10183
10177
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyPopupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10184
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyPopupService });
|
|
10178
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyPopupService, providedIn: 'root' });
|
|
10185
10179
|
}
|
|
10186
10180
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyPopupService, decorators: [{
|
|
10187
|
-
type: Injectable
|
|
10181
|
+
type: Injectable,
|
|
10182
|
+
args: [{ providedIn: 'root' }]
|
|
10188
10183
|
}] });
|
|
10189
10184
|
|
|
10190
10185
|
class BizyFullScreenPopupWrapperComponent {
|
|
@@ -10267,14 +10262,13 @@ class BizyPopupModule {
|
|
|
10267
10262
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.5", ngImport: i0, type: BizyPopupModule, imports: [BizyPopupWrapperComponent,
|
|
10268
10263
|
BizyFullScreenPopupWrapperComponent], exports: [BizyPopupWrapperComponent,
|
|
10269
10264
|
BizyFullScreenPopupWrapperComponent] });
|
|
10270
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyPopupModule,
|
|
10265
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyPopupModule, imports: [COMPONENTS$y] });
|
|
10271
10266
|
}
|
|
10272
10267
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyPopupModule, decorators: [{
|
|
10273
10268
|
type: NgModule,
|
|
10274
10269
|
args: [{
|
|
10275
10270
|
imports: COMPONENTS$y,
|
|
10276
|
-
exports: COMPONENTS$y
|
|
10277
|
-
providers: [BizyPopupService]
|
|
10271
|
+
exports: COMPONENTS$y
|
|
10278
10272
|
}]
|
|
10279
10273
|
}] });
|
|
10280
10274
|
|
|
@@ -11557,28 +11551,34 @@ class BizyCurrencyFormatDirective {
|
|
|
11557
11551
|
elementRef;
|
|
11558
11552
|
bizyCurrencyFormat = false;
|
|
11559
11553
|
options = {};
|
|
11560
|
-
#autoNumericInstance;
|
|
11554
|
+
#autoNumericInstance = null;
|
|
11555
|
+
#destroyed = false;
|
|
11561
11556
|
constructor(elementRef) {
|
|
11562
11557
|
this.elementRef = elementRef;
|
|
11563
11558
|
}
|
|
11564
|
-
ngOnInit() {
|
|
11559
|
+
async ngOnInit() {
|
|
11565
11560
|
if (typeof this.bizyCurrencyFormat === 'undefined' || this.bizyCurrencyFormat === null || this.bizyCurrencyFormat === false) {
|
|
11566
11561
|
return;
|
|
11567
11562
|
}
|
|
11568
|
-
|
|
11563
|
+
const { default: AutoNumericConstructor } = await import('autonumeric');
|
|
11564
|
+
if (this.#destroyed) {
|
|
11565
|
+
return;
|
|
11566
|
+
}
|
|
11567
|
+
this.#autoNumericInstance = new AutoNumericConstructor(this.elementRef.nativeElement, this.options);
|
|
11569
11568
|
this.elementRef.nativeElement.getValue = this.getValue;
|
|
11570
11569
|
this.elementRef.nativeElement.setValue = this.setValue;
|
|
11571
11570
|
}
|
|
11572
11571
|
ngOnDestroy() {
|
|
11572
|
+
this.#destroyed = true;
|
|
11573
11573
|
if (this.#autoNumericInstance) {
|
|
11574
11574
|
this.#autoNumericInstance.remove();
|
|
11575
11575
|
}
|
|
11576
11576
|
}
|
|
11577
11577
|
getValue = () => {
|
|
11578
|
-
return this.#autoNumericInstance
|
|
11578
|
+
return this.#autoNumericInstance?.getNumber() ?? 0;
|
|
11579
11579
|
};
|
|
11580
11580
|
setValue = (value) => {
|
|
11581
|
-
this.#autoNumericInstance
|
|
11581
|
+
this.#autoNumericInstance?.set(value);
|
|
11582
11582
|
};
|
|
11583
11583
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyCurrencyFormatDirective, deps: [{ token: ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
11584
11584
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.5", type: BizyCurrencyFormatDirective, isStandalone: true, selector: "[bizyCurrencyFormat]", inputs: { bizyCurrencyFormat: "bizyCurrencyFormat", options: ["bizyCurrencyOptions", "options"] }, ngImport: i0 });
|
|
@@ -11640,10 +11640,15 @@ class BizyInputComponent {
|
|
|
11640
11640
|
this.#subscription.add(fromEvent(this.#input.nativeElement, 'focus').subscribe(this.#focus));
|
|
11641
11641
|
this.#subscription.add(fromEvent(this.#input.nativeElement, 'blur').subscribe(this.#blur));
|
|
11642
11642
|
this.#subscription.add(fromEvent(this.#input.nativeElement, 'paste').subscribe(this.#paste));
|
|
11643
|
-
this
|
|
11643
|
+
this.#applyAutofocus();
|
|
11644
11644
|
}, 0);
|
|
11645
11645
|
}
|
|
11646
11646
|
}
|
|
11647
|
+
ngOnChanges(changes) {
|
|
11648
|
+
if (changes['autofocus']) {
|
|
11649
|
+
this.#applyAutofocus();
|
|
11650
|
+
}
|
|
11651
|
+
}
|
|
11647
11652
|
set value(value) {
|
|
11648
11653
|
if (typeof value === 'undefined') {
|
|
11649
11654
|
return;
|
|
@@ -11761,6 +11766,12 @@ class BizyInputComponent {
|
|
|
11761
11766
|
}
|
|
11762
11767
|
this.#ref.detectChanges();
|
|
11763
11768
|
};
|
|
11769
|
+
#applyAutofocus = () => {
|
|
11770
|
+
if (this.disabled || this.readonly) {
|
|
11771
|
+
return;
|
|
11772
|
+
}
|
|
11773
|
+
this.setFocus(this.autofocus);
|
|
11774
|
+
};
|
|
11764
11775
|
close = (event, button) => {
|
|
11765
11776
|
if (button && event && event.target && event.target === button) {
|
|
11766
11777
|
return;
|
|
@@ -11773,7 +11784,7 @@ class BizyInputComponent {
|
|
|
11773
11784
|
this.#optionSubscription.unsubscribe();
|
|
11774
11785
|
}
|
|
11775
11786
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11776
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: BizyInputComponent, isStandalone: true, selector: "bizy-input", inputs: { id: "id", name: "name", customClass: "customClass", placeholder: "placeholder", debounceTime: "debounceTime", rows: "rows", type: "type", maxLength: "maxLength", autofocus: "autofocus", disabled: "disabled", readonly: "readonly", value: "value" }, outputs: { valueChange: "valueChange", onChange: "onChange", onEnter: "onEnter", onKey: "onKey", onBackspace: "onBackspace", onSelect: "onSelect", onBlur: "onBlur", onFocus: "onFocus", onPaste: "onPaste" }, queries: [{ propertyName: "options", predicate: BizyInputOptionComponent }], viewQueries: [{ propertyName: "bizyInputWrapper", first: true, predicate: ["bizyInputWrapper"], descendants: true }, { propertyName: "bizyInput", first: true, predicate: ["bizyInput"], descendants: true }], ngImport: i0, template: "<button\n #bizyInputWrapper\n type=\"button\"\n (click)=\"_onClick($event)\"\n (keyup)=\"_onClick($event)\"\n class=\"bizy-input {{customClass}}\"\n (focus)=\"setFocus(true)\"\n cdkOverlayOrigin\n #bizyInputTrigger=\"cdkOverlayOrigin\"\n [ngClass]=\"{'bizy-input--disabled': disabled, 'bizy-input--negative': type === 'currency' && _currencyValue < 0}\">\n\n <span class=\"bizy-input__header\">\n <ng-content select=\"[slot=header]\"></ng-content>\n </span>\n\n <span class=\"bizy-input__content\" [ngClass]=\"{'bizy-input__content--readonly': readonly}\">\n\n <span class=\"bizy-input__content__prefix\">\n <ng-content select=\"[slot=prefix]\"></ng-content>\n </span>\n\n @if (type !== 'textarea') {\n <input\n #bizyInput\n [id]=\"id\"\n class=\"bizy-input__content__input\"\n [type]=\"type === 'currency' ? 'tel' : type\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [maxlength]=\"maxLength\"\n [bizyCurrencyFormat]=\"type === 'currency'\"\n [bizyCurrencyOptions]=\"currencyOptions\"\n [bizyOnlyPhoneDigits]=\"type === 'tel'\"\n (keydown)=\"_onKeyDown($event)\"\n (keyup.enter)=\"_onEnter($event)\"\n (keyup.backspace)=\"_onBackspace($event)\"\n [ngModel]=\"_value\"\n (ngModelChange)=\"_onchange($event)\"/>\n }\n\n @if (type === 'textarea') {\n <textarea\n #bizyInput\n [id]=\"id\"\n [rows]=\"rows\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [maxlength]=\"maxLength\"\n class=\"bizy-input__content__input\"\n (keydown)=\"_onKeyDown($event)\"\n (keyup.enter)=\"_onEnter($event)\"\n (keyup.backspace)=\"_onBackspace($event)\"\n [ngModel]=\"_value\"\n (ngModelChange)=\"_onchange($event)\">\n </textarea>\n }\n\n <span class=\"bizy-input__content__suffix\">\n <ng-content select=\"[slot=suffix]\"></ng-content>\n </span>\n\n </span>\n\n <span class=\"bizy-input__bottom-line\" [ngClass]=\"{'bizy-input__bottom-line--visible': focused}\"></span>\n\n</button>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayMinWidth]=\"bizyInputWrapper?.offsetWidth\"\n [cdkConnectedOverlayOrigin]=\"bizyInputTrigger\"\n (overlayOutsideClick)=\"close($event, bizyInputWrapper)\"\n [cdkConnectedOverlayOpen]=\"opened\">\n\n <span class=\"bizy-input__options\">\n\n <ng-content select=\"bizy-input-option\"></ng-content>\n\n </span>\n\n</ng-template>\n\n@if (touched) {\n <span class=\"bizy-input__errors\">\n <ng-content select=\"[slot=error]\"></ng-content>\n </span>\n}\n", styles: [":host{width:var(--bizy-input-width);min-width:var(--bizy-input-min-width);max-width:var(--bizy-input-max-width);display:flex;flex-direction:column;row-gap:.3rem}:host:has(>.bizy-input__errors:not(:empty)) .bizy-input__bottom-line{background-color:var(--bizy-input-invalid-color)!important;visibility:visible!important}:host:has(>.bizy-input__errors:not(:empty)) .bizy-input__content__input{color:var(--bizy-input-invalid-color)!important}.bizy-input{width:100%;background-color:var(--bizy-input-background-color);border:none;border-top-left-radius:var(--bizy-input-border-top-left-radius, var(--bizy-input-border-radius, .3rem));border-top-right-radius:var(--bizy-input-border-top-right-radius, var(--bizy-input-border-radius, .3rem));border-bottom-right-radius:var(--bizy-input-border-bottom-right-radius, var(--bizy-input-border-radius, none));border-bottom-left-radius:var(--bizy-input-border-bottom-left-radius, var(--bizy-input-border-radius, none));display:flex;padding:.3rem .3rem 0;flex-direction:column;cursor:var(--bizy-input-cursor)}.bizy-input--negative,.bizy-input--negative .bizy-input__header,.bizy-input--negative .bizy-input__content,.bizy-input--negative .bizy-input__content__input{background-color:var(--bizy-input-negative-background-color)}.bizy-input--disabled{opacity:.5;pointer-events:none;cursor:not-allowed!important}.bizy-input__header{background-color:var(--bizy-input-background-color);width:100%;display:flex;align-items:center;column-gap:.5rem;padding-bottom:.1rem}.bizy-input__header:empty{display:none!important}.bizy-input__content{background-color:var(--bizy-input-background-color);width:100%;display:flex;align-items:center;column-gap:.3rem}.bizy-input__content--readonly{pointer-events:none;cursor:default!important}.bizy-input__content__prefix{display:flex;align-items:center;column-gap:.3rem}.bizy-input__content__prefix:empty{display:none!important}.bizy-input__content__suffix{display:flex;align-items:center;column-gap:.3rem}.bizy-input__content__suffix:empty{display:none!important}.bizy-input__content__input{width:100%;background-color:var(--bizy-input-background-color);color:var(--bizy-input-color);flex:1;border:none;padding-block:0;padding-inline:0;padding:0 0 .2rem;font-size:var(--bizy-input-font-size);resize:var(--bizy-input-resize)}.bizy-input__content__input:focus{outline:none;border:none}.bizy-input__content__input::placeholder{color:var(--bizy-input-placeholder-color)}.bizy-input__content input[type=number]::-webkit-inner-spin-button,.bizy-input__content input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.bizy-input__bottom-line{width:calc(100% + .6rem);position:relative;right:.3rem;height:.1rem;visibility:hidden;pointer-events:none;background-color:var(--bizy-input-focus-color)}.bizy-input__bottom-line--visible{visibility:visible;animation-name:zoomIn;animation-duration:.2s;animation-fill-mode:both}.bizy-input__options{background-color:var(--bizy-input-background-color);display:flex;min-width:fit-content;width:100%;flex-direction:column;box-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;max-height:var(--bizy-input-options-height);overflow-y:auto;overflow-x:hidden;position:relative}.bizy-input__errors:empty{display:none!important}::ng-deep .bizy-input__errors *{color:var(--bizy-input-invalid-color)!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i2$2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2$2.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: BizyCurrencyFormatDirective, selector: "[bizyCurrencyFormat]", inputs: ["bizyCurrencyFormat", "bizyCurrencyOptions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11787
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.5", type: BizyInputComponent, isStandalone: true, selector: "bizy-input", inputs: { id: "id", name: "name", customClass: "customClass", placeholder: "placeholder", debounceTime: "debounceTime", rows: "rows", type: "type", maxLength: "maxLength", autofocus: "autofocus", disabled: "disabled", readonly: "readonly", value: "value" }, outputs: { valueChange: "valueChange", onChange: "onChange", onEnter: "onEnter", onKey: "onKey", onBackspace: "onBackspace", onSelect: "onSelect", onBlur: "onBlur", onFocus: "onFocus", onPaste: "onPaste" }, queries: [{ propertyName: "options", predicate: BizyInputOptionComponent }], viewQueries: [{ propertyName: "bizyInputWrapper", first: true, predicate: ["bizyInputWrapper"], descendants: true }, { propertyName: "bizyInput", first: true, predicate: ["bizyInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<button\n #bizyInputWrapper\n type=\"button\"\n (click)=\"_onClick($event)\"\n (keyup)=\"_onClick($event)\"\n class=\"bizy-input {{customClass}}\"\n (focus)=\"setFocus(true)\"\n cdkOverlayOrigin\n #bizyInputTrigger=\"cdkOverlayOrigin\"\n [ngClass]=\"{'bizy-input--disabled': disabled, 'bizy-input--negative': type === 'currency' && _currencyValue < 0}\">\n\n <span class=\"bizy-input__header\">\n <ng-content select=\"[slot=header]\"></ng-content>\n </span>\n\n <span class=\"bizy-input__content\" [ngClass]=\"{'bizy-input__content--readonly': readonly}\">\n\n <span class=\"bizy-input__content__prefix\">\n <ng-content select=\"[slot=prefix]\"></ng-content>\n </span>\n\n @if (type !== 'textarea') {\n <input\n #bizyInput\n [id]=\"id\"\n class=\"bizy-input__content__input\"\n [type]=\"type === 'currency' ? 'tel' : type\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [maxlength]=\"maxLength\"\n [bizyCurrencyFormat]=\"type === 'currency'\"\n [bizyCurrencyOptions]=\"currencyOptions\"\n [bizyOnlyPhoneDigits]=\"type === 'tel'\"\n (keydown)=\"_onKeyDown($event)\"\n (keyup.enter)=\"_onEnter($event)\"\n (keyup.backspace)=\"_onBackspace($event)\"\n [ngModel]=\"_value\"\n (ngModelChange)=\"_onchange($event)\"/>\n }\n\n @if (type === 'textarea') {\n <textarea\n #bizyInput\n [id]=\"id\"\n [rows]=\"rows\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [maxlength]=\"maxLength\"\n class=\"bizy-input__content__input\"\n (keydown)=\"_onKeyDown($event)\"\n (keyup.enter)=\"_onEnter($event)\"\n (keyup.backspace)=\"_onBackspace($event)\"\n [ngModel]=\"_value\"\n (ngModelChange)=\"_onchange($event)\">\n </textarea>\n }\n\n <span class=\"bizy-input__content__suffix\">\n <ng-content select=\"[slot=suffix]\"></ng-content>\n </span>\n\n </span>\n\n <span class=\"bizy-input__bottom-line\" [ngClass]=\"{'bizy-input__bottom-line--visible': focused}\"></span>\n\n</button>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayMinWidth]=\"bizyInputWrapper?.offsetWidth\"\n [cdkConnectedOverlayOrigin]=\"bizyInputTrigger\"\n (overlayOutsideClick)=\"close($event, bizyInputWrapper)\"\n [cdkConnectedOverlayOpen]=\"opened\">\n\n <span class=\"bizy-input__options\">\n\n <ng-content select=\"bizy-input-option\"></ng-content>\n\n </span>\n\n</ng-template>\n\n@if (touched) {\n <span class=\"bizy-input__errors\">\n <ng-content select=\"[slot=error]\"></ng-content>\n </span>\n}\n", styles: [":host{width:var(--bizy-input-width);min-width:var(--bizy-input-min-width);max-width:var(--bizy-input-max-width);display:flex;flex-direction:column;row-gap:.3rem}:host:has(>.bizy-input__errors:not(:empty)) .bizy-input__bottom-line{background-color:var(--bizy-input-invalid-color)!important;visibility:visible!important}:host:has(>.bizy-input__errors:not(:empty)) .bizy-input__content__input{color:var(--bizy-input-invalid-color)!important}.bizy-input{width:100%;background-color:var(--bizy-input-background-color);border:none;border-top-left-radius:var(--bizy-input-border-top-left-radius, var(--bizy-input-border-radius, .3rem));border-top-right-radius:var(--bizy-input-border-top-right-radius, var(--bizy-input-border-radius, .3rem));border-bottom-right-radius:var(--bizy-input-border-bottom-right-radius, var(--bizy-input-border-radius, none));border-bottom-left-radius:var(--bizy-input-border-bottom-left-radius, var(--bizy-input-border-radius, none));display:flex;padding:.3rem .3rem 0;flex-direction:column;cursor:var(--bizy-input-cursor)}.bizy-input--negative,.bizy-input--negative .bizy-input__header,.bizy-input--negative .bizy-input__content,.bizy-input--negative .bizy-input__content__input{background-color:var(--bizy-input-negative-background-color)}.bizy-input--disabled{opacity:.5;pointer-events:none;cursor:not-allowed!important}.bizy-input__header{background-color:var(--bizy-input-background-color);width:100%;display:flex;align-items:center;column-gap:.5rem;padding-bottom:.1rem}.bizy-input__header:empty{display:none!important}.bizy-input__content{background-color:var(--bizy-input-background-color);width:100%;display:flex;align-items:center;column-gap:.3rem}.bizy-input__content--readonly{pointer-events:none;cursor:default!important}.bizy-input__content__prefix{display:flex;align-items:center;column-gap:.3rem}.bizy-input__content__prefix:empty{display:none!important}.bizy-input__content__suffix{display:flex;align-items:center;column-gap:.3rem}.bizy-input__content__suffix:empty{display:none!important}.bizy-input__content__input{width:100%;background-color:var(--bizy-input-background-color);color:var(--bizy-input-color);flex:1;border:none;padding-block:0;padding-inline:0;padding:0 0 .2rem;font-size:var(--bizy-input-font-size);resize:var(--bizy-input-resize)}.bizy-input__content__input:focus{outline:none;border:none}.bizy-input__content__input::placeholder{color:var(--bizy-input-placeholder-color)}.bizy-input__content input[type=number]::-webkit-inner-spin-button,.bizy-input__content input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.bizy-input__bottom-line{width:calc(100% + .6rem);position:relative;right:.3rem;height:.1rem;visibility:hidden;pointer-events:none;background-color:var(--bizy-input-focus-color)}.bizy-input__bottom-line--visible{visibility:visible;animation-name:zoomIn;animation-duration:.2s;animation-fill-mode:both}.bizy-input__options{background-color:var(--bizy-input-background-color);display:flex;min-width:fit-content;width:100%;flex-direction:column;box-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;max-height:var(--bizy-input-options-height);overflow-y:auto;overflow-x:hidden;position:relative}.bizy-input__errors:empty{display:none!important}::ng-deep .bizy-input__errors *{color:var(--bizy-input-invalid-color)!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i2$2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2$2.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: BizyCurrencyFormatDirective, selector: "[bizyCurrencyFormat]", inputs: ["bizyCurrencyFormat", "bizyCurrencyOptions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11777
11788
|
}
|
|
11778
11789
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyInputComponent, decorators: [{
|
|
11779
11790
|
type: Component,
|
|
@@ -11857,6 +11868,9 @@ class BizyDatePickerComponent {
|
|
|
11857
11868
|
mode = 'single';
|
|
11858
11869
|
dates = [Date.now()];
|
|
11859
11870
|
time = Date.now();
|
|
11871
|
+
#instance = null;
|
|
11872
|
+
#starting = null;
|
|
11873
|
+
#destroyed = false;
|
|
11860
11874
|
get touched() {
|
|
11861
11875
|
return this.bizyDatePicker ? this.bizyDatePicker.touched : false;
|
|
11862
11876
|
}
|
|
@@ -11869,7 +11883,7 @@ class BizyDatePickerComponent {
|
|
|
11869
11883
|
this.time = date;
|
|
11870
11884
|
this.value = this.#datePipe.transform(date, this.datePipeFormat, undefined, 'es-AR');
|
|
11871
11885
|
if (!this.enableTime || !this.started) {
|
|
11872
|
-
this.#start();
|
|
11886
|
+
void this.#start();
|
|
11873
11887
|
}
|
|
11874
11888
|
}
|
|
11875
11889
|
set range(range) {
|
|
@@ -11880,7 +11894,7 @@ class BizyDatePickerComponent {
|
|
|
11880
11894
|
this.dates = [range.from, range.to];
|
|
11881
11895
|
this.time = range.from;
|
|
11882
11896
|
this.value = `${this.#datePipe.transform(range.from, this.datePipeFormat, undefined, 'es-AR')} - ${this.#datePipe.transform(range.to, this.datePipeFormat, undefined, 'es-AR')}`;
|
|
11883
|
-
this.#start();
|
|
11897
|
+
void this.#start();
|
|
11884
11898
|
}
|
|
11885
11899
|
value = '';
|
|
11886
11900
|
set type(type) {
|
|
@@ -11920,64 +11934,89 @@ class BizyDatePickerComponent {
|
|
|
11920
11934
|
}
|
|
11921
11935
|
}
|
|
11922
11936
|
ngAfterViewInit() {
|
|
11923
|
-
this.#start();
|
|
11937
|
+
void this.#start();
|
|
11938
|
+
}
|
|
11939
|
+
ngOnDestroy() {
|
|
11940
|
+
this.#destroyed = true;
|
|
11941
|
+
this.#instance?.destroy();
|
|
11942
|
+
this.#instance = null;
|
|
11924
11943
|
}
|
|
11925
|
-
#start() {
|
|
11944
|
+
async #start() {
|
|
11945
|
+
if (this.started || this.#starting) {
|
|
11946
|
+
return this.#starting ?? Promise.resolve();
|
|
11947
|
+
}
|
|
11926
11948
|
if (this.bizyDatePicker && this.bizyDatePicker.bizyInputWrapper && this.bizyDatePicker.bizyInputWrapper.nativeElement) {
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
shorthand: true
|
|
11931
|
-
}));
|
|
11949
|
+
this.#starting = this.#initialize();
|
|
11950
|
+
try {
|
|
11951
|
+
await this.#starting;
|
|
11932
11952
|
}
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
|
|
11940
|
-
|
|
11941
|
-
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11949
|
-
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
defaultMinute: this.#getMinute(this.time),
|
|
11953
|
-
onChange: (selectedDates) => {
|
|
11954
|
-
if (this.mode === 'single' && selectedDates[0]) {
|
|
11955
|
-
const date = new Date(selectedDates[0]);
|
|
11956
|
-
this.dateChange.emit(date.getTime());
|
|
11957
|
-
this.onChange.emit(date.getTime());
|
|
11958
|
-
}
|
|
11959
|
-
else if (selectedDates[0] && selectedDates[1]) {
|
|
11960
|
-
const from = new Date(selectedDates[0]);
|
|
11961
|
-
const to = new Date(selectedDates[1]);
|
|
11962
|
-
to.setHours(23, 59, 59, 999);
|
|
11963
|
-
const range = { from: from.getTime(), to: to.getTime() };
|
|
11964
|
-
this.rangeChange.emit(range);
|
|
11965
|
-
this.onChange.emit(range);
|
|
11966
|
-
}
|
|
11967
|
-
},
|
|
11968
|
-
onOpen: () => {
|
|
11969
|
-
this.opened = true;
|
|
11970
|
-
this.openedChange.emit(this.opened);
|
|
11971
|
-
this.onOpen.emit(this.opened);
|
|
11972
|
-
},
|
|
11973
|
-
onClose: () => {
|
|
11974
|
-
this.opened = false;
|
|
11975
|
-
this.openedChange.emit(this.opened);
|
|
11976
|
-
this.onOpen.emit(this.opened);
|
|
11977
|
-
}
|
|
11978
|
-
});
|
|
11979
|
-
this.started = true;
|
|
11953
|
+
finally {
|
|
11954
|
+
this.#starting = null;
|
|
11955
|
+
}
|
|
11956
|
+
}
|
|
11957
|
+
}
|
|
11958
|
+
async #initialize() {
|
|
11959
|
+
const [{ default: flatpickr }, { default: monthSelectPlugin }, { Spanish }] = await Promise.all([
|
|
11960
|
+
import('flatpickr'),
|
|
11961
|
+
import('flatpickr/dist/plugins/monthSelect/index.js'),
|
|
11962
|
+
import('flatpickr/dist/l10n/es.js')
|
|
11963
|
+
]);
|
|
11964
|
+
if (this.#destroyed) {
|
|
11965
|
+
return;
|
|
11966
|
+
}
|
|
11967
|
+
const plugins = [];
|
|
11968
|
+
if (this.dateFormat === 'Y-M') {
|
|
11969
|
+
plugins.push(monthSelectPlugin({
|
|
11970
|
+
shorthand: true
|
|
11971
|
+
}));
|
|
11980
11972
|
}
|
|
11973
|
+
const overlayHost = this.#getOverlayHost();
|
|
11974
|
+
this.#instance = flatpickr(this.bizyDatePicker.bizyInputWrapper.nativeElement, {
|
|
11975
|
+
locale: Spanish,
|
|
11976
|
+
mode: this.mode,
|
|
11977
|
+
dateFormat: this.dateFormat,
|
|
11978
|
+
enableTime: this.enableTime,
|
|
11979
|
+
enableSeconds: this.enableSeconds,
|
|
11980
|
+
plugins,
|
|
11981
|
+
minDate: this.minDate,
|
|
11982
|
+
maxDate: this.maxDate,
|
|
11983
|
+
noCalendar: this.noCalendar,
|
|
11984
|
+
disableMobile: true,
|
|
11985
|
+
...(overlayHost ? {
|
|
11986
|
+
appendTo: overlayHost,
|
|
11987
|
+
position: (instance, positionElement) => this.#positionCalendar(instance, positionElement)
|
|
11988
|
+
} : {}),
|
|
11989
|
+
time_24hr: true,
|
|
11990
|
+
defaultDate: this.mode === 'single' ? new Date(this.dates[0]) : this.dates.map(_date => new Date(_date)),
|
|
11991
|
+
defaultHour: this.#getHour(this.time),
|
|
11992
|
+
defaultMinute: this.#getMinute(this.time),
|
|
11993
|
+
onChange: (selectedDates) => {
|
|
11994
|
+
if (this.mode === 'single' && selectedDates[0]) {
|
|
11995
|
+
const date = new Date(selectedDates[0]);
|
|
11996
|
+
this.dateChange.emit(date.getTime());
|
|
11997
|
+
this.onChange.emit(date.getTime());
|
|
11998
|
+
}
|
|
11999
|
+
else if (selectedDates[0] && selectedDates[1]) {
|
|
12000
|
+
const from = new Date(selectedDates[0]);
|
|
12001
|
+
const to = new Date(selectedDates[1]);
|
|
12002
|
+
to.setHours(23, 59, 59, 999);
|
|
12003
|
+
const range = { from: from.getTime(), to: to.getTime() };
|
|
12004
|
+
this.rangeChange.emit(range);
|
|
12005
|
+
this.onChange.emit(range);
|
|
12006
|
+
}
|
|
12007
|
+
},
|
|
12008
|
+
onOpen: () => {
|
|
12009
|
+
this.opened = true;
|
|
12010
|
+
this.openedChange.emit(this.opened);
|
|
12011
|
+
this.onOpen.emit(this.opened);
|
|
12012
|
+
},
|
|
12013
|
+
onClose: () => {
|
|
12014
|
+
this.opened = false;
|
|
12015
|
+
this.openedChange.emit(this.opened);
|
|
12016
|
+
this.onOpen.emit(this.opened);
|
|
12017
|
+
}
|
|
12018
|
+
});
|
|
12019
|
+
this.started = true;
|
|
11981
12020
|
}
|
|
11982
12021
|
setTouched(touched) {
|
|
11983
12022
|
if (this.bizyDatePicker) {
|
|
@@ -12604,24 +12643,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImpor
|
|
|
12604
12643
|
}]
|
|
12605
12644
|
}] });
|
|
12606
12645
|
|
|
12607
|
-
const ES = {
|
|
12608
|
-
...es_ES,
|
|
12609
|
-
strings: {
|
|
12610
|
-
...es_ES.strings,
|
|
12611
|
-
noDuplicates: 'Archivo duplicado: \'%{fileName}\'',
|
|
12612
|
-
browseFiles: 'buscar archivo',
|
|
12613
|
-
dropPasteFiles: 'Soltar archivo aquí, pegar o %{browseFiles}'
|
|
12614
|
-
}
|
|
12615
|
-
};
|
|
12616
|
-
const EN = {
|
|
12617
|
-
...en_US,
|
|
12618
|
-
strings: {
|
|
12619
|
-
...en_US.strings,
|
|
12620
|
-
noDuplicates: 'Duplicated file: \'%{fileName}\'',
|
|
12621
|
-
browseFiles: 'browse file',
|
|
12622
|
-
dropPasteFiles: 'Drop a file here or %{browseFiles}'
|
|
12623
|
-
}
|
|
12624
|
-
};
|
|
12625
12646
|
class BizyFileUploaderService {
|
|
12626
12647
|
#renderer = inject(Renderer2);
|
|
12627
12648
|
#document = inject(DOCUMENT$1);
|
|
@@ -12655,10 +12676,35 @@ class BizyFileUploaderService {
|
|
|
12655
12676
|
get complete$() {
|
|
12656
12677
|
return this.#complete.asObservable();
|
|
12657
12678
|
}
|
|
12658
|
-
createFileUploader(data) {
|
|
12679
|
+
async createFileUploader(data) {
|
|
12680
|
+
const [{ default: UppyConstructor }, { default: es_ES }, { default: en_US }, { default: Dashboard }, { default: XHRUpload }] = await Promise.all([
|
|
12681
|
+
import('@uppy/core'),
|
|
12682
|
+
import('@uppy/locales/lib/es_ES'),
|
|
12683
|
+
import('@uppy/locales/lib/en_US'),
|
|
12684
|
+
import('@uppy/dashboard'),
|
|
12685
|
+
import('@uppy/xhr-upload')
|
|
12686
|
+
]);
|
|
12687
|
+
const ES = {
|
|
12688
|
+
...es_ES,
|
|
12689
|
+
strings: {
|
|
12690
|
+
...es_ES.strings,
|
|
12691
|
+
noDuplicates: 'Archivo duplicado: \'%{fileName}\'',
|
|
12692
|
+
browseFiles: 'buscar archivo',
|
|
12693
|
+
dropPasteFiles: 'Soltar archivo aquí, pegar o %{browseFiles}'
|
|
12694
|
+
}
|
|
12695
|
+
};
|
|
12696
|
+
const EN = {
|
|
12697
|
+
...en_US,
|
|
12698
|
+
strings: {
|
|
12699
|
+
...en_US.strings,
|
|
12700
|
+
noDuplicates: 'Duplicated file: \'%{fileName}\'',
|
|
12701
|
+
browseFiles: 'browse file',
|
|
12702
|
+
dropPasteFiles: 'Drop a file here or %{browseFiles}'
|
|
12703
|
+
}
|
|
12704
|
+
};
|
|
12659
12705
|
const locale = data.language === 'es' ? ES : EN;
|
|
12660
12706
|
this.#disableLocalFiles = data.disableLocalFiles;
|
|
12661
|
-
this.#uppy = new
|
|
12707
|
+
this.#uppy = new UppyConstructor({
|
|
12662
12708
|
locale,
|
|
12663
12709
|
infoTimeout: 2500,
|
|
12664
12710
|
restrictions: {
|
|
@@ -12786,6 +12832,10 @@ class BizyFileUploaderService {
|
|
|
12786
12832
|
}
|
|
12787
12833
|
this.#uppy.cancelAll();
|
|
12788
12834
|
};
|
|
12835
|
+
destroy = () => {
|
|
12836
|
+
this.#uppy?.destroy();
|
|
12837
|
+
this.#uppy = null;
|
|
12838
|
+
};
|
|
12789
12839
|
#normalizeLoadFile = (data) => {
|
|
12790
12840
|
if (this.#isLoadFile(data)) {
|
|
12791
12841
|
return data;
|
|
@@ -12870,10 +12920,11 @@ class BizyFileUploaderComponent {
|
|
|
12870
12920
|
#inputFiles = [];
|
|
12871
12921
|
#inputFileIds = new Map();
|
|
12872
12922
|
#isFileUploaderReady = false;
|
|
12923
|
+
#destroyed = false;
|
|
12873
12924
|
TEMPLATE_ID = 'bizy-file-uploader-template';
|
|
12874
|
-
ngAfterViewInit() {
|
|
12925
|
+
async ngAfterViewInit() {
|
|
12875
12926
|
const allowedFileTypes = this.#getAllowedFileTypes();
|
|
12876
|
-
this.#fileUploader.createFileUploader({
|
|
12927
|
+
await this.#fileUploader.createFileUploader({
|
|
12877
12928
|
maxFileSize: this.maxFileSize,
|
|
12878
12929
|
minFileSize: this.minFileSize,
|
|
12879
12930
|
maxTotalFileSize: this.maxTotalFileSize,
|
|
@@ -12891,6 +12942,10 @@ class BizyFileUploaderComponent {
|
|
|
12891
12942
|
enableUpload: this.mode === BIZY_FILE_UPLOADER_MODE.UPLOAD,
|
|
12892
12943
|
headers: this.headers,
|
|
12893
12944
|
});
|
|
12945
|
+
if (this.#destroyed) {
|
|
12946
|
+
this.#fileUploader.destroy();
|
|
12947
|
+
return;
|
|
12948
|
+
}
|
|
12894
12949
|
if (this.upload) {
|
|
12895
12950
|
this.#subscription.add(this.upload.subscribe(data => {
|
|
12896
12951
|
if (this.#files.size === 0 || (this.minNumberOfFiles && this.#files.size < this.minNumberOfFiles)) {
|
|
@@ -13009,7 +13064,8 @@ class BizyFileUploaderComponent {
|
|
|
13009
13064
|
};
|
|
13010
13065
|
getNativeElement = () => this.#elementRef?.nativeElement;
|
|
13011
13066
|
ngOnDestroy() {
|
|
13012
|
-
this.#
|
|
13067
|
+
this.#destroyed = true;
|
|
13068
|
+
this.#fileUploader.destroy();
|
|
13013
13069
|
this.#subscription.unsubscribe();
|
|
13014
13070
|
}
|
|
13015
13071
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyFileUploaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -15338,11 +15394,11 @@ class BizyMenuOptionComponent {
|
|
|
15338
15394
|
}
|
|
15339
15395
|
getNativeElement = () => this.#elementRef?.nativeElement;
|
|
15340
15396
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyMenuOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15341
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.5", type: BizyMenuOptionComponent, isStandalone: true, selector: "bizy-menu-option", inputs: { id: "id", disabled: "disabled", customClass: "customClass", selected: "selected" }, outputs: { onSelect: "onSelect" }, ngImport: i0, template: "<button \n type=\"button\"\n [id]=\"id\"\n (click)=\"_onSelect($event)\"\n (keyup.enter)=\"_onSelect($event)\"\n [ngClass]=\"{'bizy-menu-option--selected': selected, 'bizy-menu-option--disabled': disabled}\"\n class=\"bizy-menu-option {{customClass}}\">\n\n <span class=\"bizy-menu-option__content\">\n <ng-content></ng-content>\n </span>\n \n</button>\n\n<span class=\"bizy-menu-option__menu\">\n <ng-content select=\"bizy-menu\"></ng-content>\n</span>\n", styles: [":host{font-size:1rem}:host:has(>.bizy-menu-option__menu:not(:empty)) .bizy-menu-option{display:none!important}.bizy-menu-option{font-size:1rem;width:100%;border:none;background-color:var(--bizy-menu-option-background-color);display:flex;align-items:center;justify-content:space-between;column-gap
|
|
15397
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.5", type: BizyMenuOptionComponent, isStandalone: true, selector: "bizy-menu-option", inputs: { id: "id", disabled: "disabled", customClass: "customClass", selected: "selected" }, outputs: { onSelect: "onSelect" }, ngImport: i0, template: "<button \n type=\"button\"\n [id]=\"id\"\n (click)=\"_onSelect($event)\"\n (keyup.enter)=\"_onSelect($event)\"\n [ngClass]=\"{'bizy-menu-option--selected': selected, 'bizy-menu-option--disabled': disabled}\"\n class=\"bizy-menu-option {{customClass}}\">\n\n <span class=\"bizy-menu-option__content\">\n <ng-content></ng-content>\n </span>\n \n</button>\n\n<span class=\"bizy-menu-option__menu\">\n <ng-content select=\"bizy-menu\"></ng-content>\n</span>\n", styles: [":host{font-size:1rem}:host:has(>.bizy-menu-option__menu:not(:empty)) .bizy-menu-option{display:none!important}.bizy-menu-option{font-size:1rem;width:100%;height:var(--bizy-menu-option-height, 2rem);border:none;background-color:var(--bizy-menu-option-background-color);display:flex;align-items:center;justify-content:space-between;column-gap:var(--bizy-menu-option-column-gap, .5rem);padding:var(--bizy-menu-option-padding, .5rem);color:var(--bizy-menu-option-color);cursor:pointer}.bizy-menu-option:hover{background-color:var(--bizy-menu-option-hover-background-color)}.bizy-menu-option--selected{color:var(--bizy-menu-option-selected-color)!important;background-color:var(--bizy-menu-option-selected-background-color)!important}::ng-deep .bizy-menu-option--selected *{color:var(--bizy-menu-option-selected-color)!important}.bizy-menu-option--disabled{opacity:.5;pointer-events:none;cursor:not-allowed!important}.bizy-menu-option__content{font-size:1rem;display:flex;align-items:center;column-gap:.3rem;width:100%}::ng-deep .bizy-menu-option__menu *{color:var(--bizy-menu-option-color);fill:var(--bizy-menu-option-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15342
15398
|
}
|
|
15343
15399
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.5", ngImport: i0, type: BizyMenuOptionComponent, decorators: [{
|
|
15344
15400
|
type: Component,
|
|
15345
|
-
args: [{ selector: 'bizy-menu-option', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button \n type=\"button\"\n [id]=\"id\"\n (click)=\"_onSelect($event)\"\n (keyup.enter)=\"_onSelect($event)\"\n [ngClass]=\"{'bizy-menu-option--selected': selected, 'bizy-menu-option--disabled': disabled}\"\n class=\"bizy-menu-option {{customClass}}\">\n\n <span class=\"bizy-menu-option__content\">\n <ng-content></ng-content>\n </span>\n \n</button>\n\n<span class=\"bizy-menu-option__menu\">\n <ng-content select=\"bizy-menu\"></ng-content>\n</span>\n", styles: [":host{font-size:1rem}:host:has(>.bizy-menu-option__menu:not(:empty)) .bizy-menu-option{display:none!important}.bizy-menu-option{font-size:1rem;width:100%;border:none;background-color:var(--bizy-menu-option-background-color);display:flex;align-items:center;justify-content:space-between;column-gap
|
|
15401
|
+
args: [{ selector: 'bizy-menu-option', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button \n type=\"button\"\n [id]=\"id\"\n (click)=\"_onSelect($event)\"\n (keyup.enter)=\"_onSelect($event)\"\n [ngClass]=\"{'bizy-menu-option--selected': selected, 'bizy-menu-option--disabled': disabled}\"\n class=\"bizy-menu-option {{customClass}}\">\n\n <span class=\"bizy-menu-option__content\">\n <ng-content></ng-content>\n </span>\n \n</button>\n\n<span class=\"bizy-menu-option__menu\">\n <ng-content select=\"bizy-menu\"></ng-content>\n</span>\n", styles: [":host{font-size:1rem}:host:has(>.bizy-menu-option__menu:not(:empty)) .bizy-menu-option{display:none!important}.bizy-menu-option{font-size:1rem;width:100%;height:var(--bizy-menu-option-height, 2rem);border:none;background-color:var(--bizy-menu-option-background-color);display:flex;align-items:center;justify-content:space-between;column-gap:var(--bizy-menu-option-column-gap, .5rem);padding:var(--bizy-menu-option-padding, .5rem);color:var(--bizy-menu-option-color);cursor:pointer}.bizy-menu-option:hover{background-color:var(--bizy-menu-option-hover-background-color)}.bizy-menu-option--selected{color:var(--bizy-menu-option-selected-color)!important;background-color:var(--bizy-menu-option-selected-background-color)!important}::ng-deep .bizy-menu-option--selected *{color:var(--bizy-menu-option-selected-color)!important}.bizy-menu-option--disabled{opacity:.5;pointer-events:none;cursor:not-allowed!important}.bizy-menu-option__content{font-size:1rem;display:flex;align-items:center;column-gap:.3rem;width:100%}::ng-deep .bizy-menu-option__menu *{color:var(--bizy-menu-option-color);fill:var(--bizy-menu-option-color)}\n"] }]
|
|
15346
15402
|
}], propDecorators: { id: [{
|
|
15347
15403
|
type: Input
|
|
15348
15404
|
}], disabled: [{
|