@decaf-ts/for-angular 0.1.20 → 0.1.22

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.
@@ -1,6 +1,6 @@
1
- import { parseValueByType, HTML5InputTypes, UIKeys, HTML5CheckTypes, escapeHtml, parseToNumber, RenderingEngine, DecafTranslateService, DecafComponent, ComponentEventNames, UIValidator, RenderingError, UIMediaBreakPoints, LayoutGridGaps, ElementSizes, DecafEventHandler } from '@decaf-ts/ui-decorators';
1
+ import { parseValueByType, HTML5InputTypes, UIKeys, HTML5CheckTypes, escapeHtml, parseToNumber, RenderingEngine, DecafTranslateService, DecafComponent, ComponentEventNames, UIValidator, RenderingError, UIMediaBreakPoints, uihandlers, LayoutGridGaps, ElementSizes, DecafEventHandler } from '@decaf-ts/ui-decorators';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken, isDevMode, provideEnvironmentInitializer, reflectComponentType, Injector, createEnvironmentInjector, runInInjectionContext, createComponent, inject, NgZone, Injectable, Input, Directive, signal, ChangeDetectorRef, EnvironmentInjector, Renderer2, EventEmitter, ElementRef, Output, ViewChild, Inject, ViewContainerRef, TemplateRef, Component, ViewEncapsulation, HostListener, Pipe, NgModule } from '@angular/core';
3
+ import { InjectionToken, isDevMode, provideEnvironmentInitializer, reflectComponentType, Injector, createEnvironmentInjector, runInInjectionContext, createComponent, inject, NgZone, Injectable, Input, Directive, signal, ChangeDetectorRef, EnvironmentInjector, Renderer2, EventEmitter, effect, ElementRef, Output, ViewChild, Inject, ViewContainerRef, TemplateRef, Component, ViewEncapsulation, HostListener, Pipe, NgModule } from '@angular/core';
4
4
  import * as i1$1 from '@angular/common';
5
5
  import { Location, NgComponentOutlet, CommonModule } from '@angular/common';
6
6
  import { ValidationKeys, DEFAULT_PATTERNS, VALIDATION_PARENT_KEY, Primitives, Model, Validation, ComparisonValidationKeys, PathProxyEngine, ModelKeys, isValidDate as isValidDate$1, parseDate, sf as sf$1, ReservedModels } from '@decaf-ts/decorator-validation';
@@ -17,6 +17,7 @@ import { forkJoin, Subject, BehaviorSubject, fromEvent, of, merge, Observable, t
17
17
  import { Title, DomSanitizer } from '@angular/platform-browser';
18
18
  import { Router, NavigationStart, NavigationEnd, ActivatedRoute } from '@angular/router';
19
19
  import { MenuController } from '@ionic/angular';
20
+ import { toSignal } from '@angular/core/rxjs-interop';
20
21
  import { provideHttpClient, HttpClient } from '@angular/common/http';
21
22
  import { TranslateParser, provideTranslateService, TranslateLoader, provideTranslateParser, TranslateService, TranslatePipe, TranslateModule } from '@ngx-translate/core';
22
23
  import { map, distinctUntilChanged, takeUntil, shareReplay, tap, switchMap } from 'rxjs/operators';
@@ -3233,18 +3234,6 @@ function provideDecafI18nConfig(config = { fallbackLang: 'en', lang: 'en' }, res
3233
3234
  ];
3234
3235
  }
3235
3236
 
3236
- /**
3237
- * @module NgxMediaService
3238
- * @description Provides utilities for managing media-related features such as color scheme detection,
3239
- * window resize observation, and SVG injection.
3240
- * @summary
3241
- * This module exposes the `NgxMediaService` class, which includes methods for observing the
3242
- * application's color scheme, handling window resize events, and dynamically injecting SVG content
3243
- * into the DOM. It leverages Angular's dependency injection system and RxJS for reactive programming.
3244
- *
3245
- * Key exports:
3246
- * - {@link NgxMediaService}: The main service class providing media-related utilities.
3247
- */
3248
3237
  /**
3249
3238
  * @description Service for managing media-related features in an Angular application.
3250
3239
  * @summary
@@ -3363,7 +3352,7 @@ class NgxMediaService {
3363
3352
  const win = this._window;
3364
3353
  this.angularZone.runOutsideAngular(() => {
3365
3354
  fromEvent(win, 'resize')
3366
- .pipe(distinctUntilChanged(), takeUntil(this.destroy$), shareReplay(1))
3355
+ .pipe(distinctUntilChanged(), takeUntil(this.destroy$), shareReplay({ bufferSize: 1, refCount: true }))
3367
3356
  .subscribe(() => {
3368
3357
  const dimensions = {
3369
3358
  width: win.innerWidth,
@@ -3449,7 +3438,7 @@ class NgxMediaService {
3449
3438
  }
3450
3439
  // store the latest schema value
3451
3440
  this.currentSchema = scheme;
3452
- }), takeUntil(this.destroy$), shareReplay(1));
3441
+ }), takeUntil(this.destroy$), shareReplay({ bufferSize: 1, refCount: true }));
3453
3442
  }
3454
3443
  /**
3455
3444
  * @description Observes the scroll state of the active page.
@@ -3471,12 +3460,9 @@ class NgxMediaService {
3471
3460
  // await delay for page change to complete
3472
3461
  return timer(awaitDelay).pipe(switchMap(() => new Observable((observer) => {
3473
3462
  const activeContent = this._document.querySelector('ion-router-outlet .ion-page:not(.ion-page-hidden) ion-content');
3474
- if (!(activeContent &&
3475
- typeof activeContent.getScrollElement === 'function'))
3463
+ if (!(activeContent && typeof activeContent.getScrollElement === 'function'))
3476
3464
  return this.angularZone.run(() => observer.next(false));
3477
- activeContent
3478
- .getScrollElement()
3479
- .then((element) => {
3465
+ activeContent.getScrollElement().then((element) => {
3480
3466
  const emitScrollState = () => {
3481
3467
  const scrollTop = element.scrollTop || 0;
3482
3468
  this.angularZone.run(() => observer.next(scrollTop > offset));
@@ -3485,7 +3471,7 @@ class NgxMediaService {
3485
3471
  emitScrollState();
3486
3472
  return () => element.removeEventListener('scroll', emitScrollState);
3487
3473
  });
3488
- })), distinctUntilChanged(), takeUntil(this.destroy$), shareReplay(1));
3474
+ })), distinctUntilChanged(), takeUntil(this.destroy$), shareReplay({ bufferSize: 1, refCount: true }));
3489
3475
  }
3490
3476
  /**
3491
3477
  * @description Loads an SVG file and injects it into a target element.
@@ -3507,7 +3493,7 @@ class NgxMediaService {
3507
3493
  this.angularZone.runOutsideAngular(() => {
3508
3494
  const svg$ = http
3509
3495
  .get(path, { responseType: 'text' })
3510
- .pipe(takeUntil(this.destroy$), shareReplay(1));
3496
+ .pipe(takeUntil(this.destroy$), shareReplay({ bufferSize: 1, refCount: true }));
3511
3497
  svg$.subscribe((svg) => {
3512
3498
  this.angularZone.run(() => {
3513
3499
  target.innerHTML = svg;
@@ -3532,8 +3518,7 @@ class NgxMediaService {
3532
3518
  if (!this.darkModeEnabled())
3533
3519
  return of(false);
3534
3520
  const documentElement = this._document.documentElement;
3535
- return this.colorScheme$.pipe(map((scheme) => documentElement.classList.contains(AngularEngineKeys.DARK_PALETTE_CLASS) ||
3536
- scheme === WindowColorSchemes.dark), distinctUntilChanged(), shareReplay(1), takeUntil(this.destroy$));
3521
+ return this.colorScheme$.pipe(map((scheme) => documentElement.classList.contains(AngularEngineKeys.DARK_PALETTE_CLASS) || scheme === WindowColorSchemes.dark), distinctUntilChanged(), shareReplay({ bufferSize: 1, refCount: true }), takeUntil(this.destroy$));
3537
3522
  }
3538
3523
  /**
3539
3524
  * @description Toggles dark mode for a specific component.
@@ -3813,7 +3798,7 @@ class NgxRepositoryDirective extends DecafComponent {
3813
3798
  this.repository?.observe(this.repositoryObserver);
3814
3799
  this.log.for(this.observe).info(`Registered repository observer for model ${this.modelName}`);
3815
3800
  this.repositoryObserverSubject
3816
- .pipe(debounceTime(100), shareReplay$1(1), takeUntil$1(this.destroySubscriptions$))
3801
+ .pipe(debounceTime(100), shareReplay$1({ bufferSize: 1, refCount: true }), takeUntil$1(this.destroySubscriptions$))
3817
3802
  .subscribe(([model, action, uid, data]) => this.handleObserveEvent(data, model, action, uid));
3818
3803
  }
3819
3804
  }
@@ -4405,6 +4390,11 @@ class NgxComponentDirective extends NgxRepositoryDirective {
4405
4390
  * @default WindowColorSchemes.light
4406
4391
  */
4407
4392
  this.colorSchema = WindowColorSchemes.light;
4393
+ this.popState$ = fromEvent(window, 'popstate').pipe(shareReplay$1({ bufferSize: 1, refCount: true }));
4394
+ // Convertendo o Observable em Signal
4395
+ this.popStateSignal = toSignal(this.popState$, {
4396
+ initialValue: null,
4397
+ });
4408
4398
  this.value = undefined;
4409
4399
  this.componentName = componentName || this.constructor.name || 'NgxComponentDirective';
4410
4400
  this.localeRoot = localeRoot;
@@ -4419,6 +4409,34 @@ class NgxComponentDirective extends NgxRepositoryDirective {
4419
4409
  this.colorSchema = WindowColorSchemes.dark;
4420
4410
  }
4421
4411
  });
4412
+ effect(async () => {
4413
+ const event = this.popStateSignal();
4414
+ if (event) {
4415
+ await this.beforeInitialize(this);
4416
+ }
4417
+ });
4418
+ }
4419
+ async beforeInitialize(component) {
4420
+ if (!component) {
4421
+ component = this;
4422
+ }
4423
+ const instance = component;
4424
+ if (this.propsMapperFn) {
4425
+ for (const [key, fn] of Object.entries(this.propsMapperFn)) {
4426
+ if (key in instance)
4427
+ instance[key] = await fn(instance);
4428
+ }
4429
+ }
4430
+ // search for handler render
4431
+ const handler = this.handlers?.[ComponentEventNames.Render] || undefined;
4432
+ if (handler && typeof handler === 'function') {
4433
+ await handler.bind(instance)(instance, this.name, this.value);
4434
+ }
4435
+ // search for event render
4436
+ const event = this.events?.[ComponentEventNames.Render] || undefined;
4437
+ if (event && typeof event === 'function') {
4438
+ await event.bind(instance)(instance, this.name, this.value);
4439
+ }
4422
4440
  }
4423
4441
  async initialize() {
4424
4442
  this.mediaService.darkModeEnabled();
@@ -4430,7 +4448,9 @@ class NgxComponentDirective extends NgxRepositoryDirective {
4430
4448
  if (this.operation === OperationKeys.CREATE) {
4431
4449
  this.refreshing = false;
4432
4450
  }
4433
- this.router.events.pipe(shareReplay$1(1), takeUntil$1(this.destroySubscriptions$)).subscribe(async (event) => {
4451
+ this.router.events
4452
+ .pipe(shareReplay$1({ bufferSize: 1, refCount: true }), takeUntil$1(this.destroySubscriptions$))
4453
+ .subscribe(async (event) => {
4434
4454
  if (event instanceof NavigationStart) {
4435
4455
  if (this.value) {
4436
4456
  await this.ngOnDestroy();
@@ -4438,24 +4458,9 @@ class NgxComponentDirective extends NgxRepositoryDirective {
4438
4458
  }
4439
4459
  });
4440
4460
  this.route = this.router.url.replace('/', '');
4441
- const instance = this;
4442
- if (this.propsMapperFn) {
4443
- for (const [key, fn] of Object.entries(this.propsMapperFn)) {
4444
- if (key in instance)
4445
- instance[key] = await fn(instance);
4446
- }
4447
- }
4448
4461
  // search for handler to render event
4449
4462
  if (!this.initialized) {
4450
- const handler = this.handlers?.[ComponentEventNames.Render] || undefined;
4451
- if (handler && typeof handler === 'function') {
4452
- await handler.bind(instance)(instance, this.name, this.value);
4453
- }
4454
- // search for event to render event
4455
- const event = this.events?.[ComponentEventNames.Render] || undefined;
4456
- if (event && typeof event === 'function') {
4457
- await event.bind(instance)(instance, this.name, this.value);
4458
- }
4463
+ await this.beforeInitialize(this);
4459
4464
  }
4460
4465
  await super.initialize();
4461
4466
  this.initialized = true;
@@ -5155,7 +5160,9 @@ class NgxPageDirective extends NgxComponentDirective {
5155
5160
  * @memberOf module:lib/engine/NgxPageDirective
5156
5161
  */
5157
5162
  async ngAfterViewInit() {
5158
- this.router.events.pipe(takeUntil$1(this.destroySubscriptions$), shareReplay$1(1)).subscribe(async (event) => {
5163
+ this.router.events
5164
+ .pipe(takeUntil$1(this.destroySubscriptions$), shareReplay$1({ bufferSize: 1, refCount: true }))
5165
+ .subscribe(async (event) => {
5159
5166
  if (event instanceof NavigationEnd) {
5160
5167
  const url = (event?.url || '').replace('/', '');
5161
5168
  this.currentRoute = url;
@@ -5683,7 +5690,7 @@ class NgxModelPageDirective extends NgxPageDirective {
5683
5690
  if (this.isModalChild) {
5684
5691
  this.listenEvent.emit({
5685
5692
  ...event,
5686
- data: result,
5693
+ data: result || event.data,
5687
5694
  });
5688
5695
  }
5689
5696
  return { ...event, success, message, model: result, aborted: false };
@@ -5799,7 +5806,7 @@ class NgxRenderableComponentDirective extends NgxModelPageDirective {
5799
5806
  const value = this.instance[key];
5800
5807
  if (value instanceof EventEmitter)
5801
5808
  this.instance[key]
5802
- .pipe(shareReplay$1(1), takeUntil$1(this.destroySubscriptions$))
5809
+ .pipe(shareReplay$1({ bufferSize: 1, refCount: true }), takeUntil$1(this.destroySubscriptions$))
5803
5810
  .subscribe(async (event) => {
5804
5811
  await this.handleEvent({
5805
5812
  component: component.name || '',
@@ -7034,6 +7041,7 @@ let ModalComponent = class ModalComponent extends NgxParentComponentDirective {
7034
7041
  * @type {Color}
7035
7042
  */
7036
7043
  this.iconColor = 'dark';
7044
+ this.handlers = {};
7037
7045
  }
7038
7046
  /**
7039
7047
  * @description Lifecycle hook that initializes the modal component.
@@ -7055,6 +7063,12 @@ let ModalComponent = class ModalComponent extends NgxParentComponentDirective {
7055
7063
  async prepare(options = {}) {
7056
7064
  this.options = Object.assign({}, DefaultModalOptions, this.options, options);
7057
7065
  this.globals = Object.assign({}, this.globals || {}, { isModalChild: true });
7066
+ let handlers = this.globals?.['handlers'] || this.handlers;
7067
+ // binding custom handlers to the model
7068
+ if (Object.keys(handlers).length) {
7069
+ handlers = typeof this.handlers === 'function' ? { confirm: handlers } : handlers;
7070
+ uihandlers(handlers)(this.model.constructor);
7071
+ }
7058
7072
  if (this.globals?.['props']) {
7059
7073
  this.globals['props'] = Object.assign({}, this.globals['props'], { isModalChild: true });
7060
7074
  }
@@ -7159,7 +7173,7 @@ let ModalComponent = class ModalComponent extends NgxParentComponentDirective {
7159
7173
  await modal.dismiss(event?.data || undefined, ActionRoles.confirm);
7160
7174
  }
7161
7175
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7162
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: ModalComponent, isStandalone: true, selector: "ngx-decaf-modal", inputs: { title: "title", isOpen: "isOpen", tag: "tag", options: "options", globals: "globals", inlineContent: "inlineContent", inlineContentPosition: "inlineContentPosition", fullscreen: "fullscreen", expandable: "expandable", lightBox: "lightBox", headerTransparent: "headerTransparent", headerBackground: "headerBackground", showHeader: "showHeader", showCloseButton: "showCloseButton" }, outputs: { willDismissEvent: "willDismissEvent" }, host: { properties: { "attr.id": "uid" } }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["component"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ion-modal\n [id]=\"uid\"\n [class]=\"'dcf-modal-component ' + className\"\n [isOpen]=\"isOpen\"\n (willDismiss)=\"handleWillDismiss($event)\"\n [backdropDismiss]=\"options?.backdropDismiss\"\n [showBackdrop]=\"options?.showBackdrop\"\n [animated]=\"options?.animated\"\n [canDismiss]=\"options?.canDismiss\"\n [class.dcf-fullscreen-modal]=\"fullscreen\"\n [class.dcf-fullscreen-expanded]=\"expanded\"\n [class.dcf-lightbox-modal]=\"lightBox\"\n [class.dcf-modal-no-header]=\"!showHeader\"\n [class.dcf-header-transparent]=\"headerTransparent\"\n [class.dcf-no-title]=\"!title?.length\"\n #component\n>\n <ng-template>\n <ion-header>\n <ion-toolbar [color]=\"headerBackground\">\n @if (title?.length) {\n <ion-title>{{ title | translate }}</ion-title>\n }\n <ion-buttons slot=\"end\">\n @if (expandable && !fullscreen) {\n <ion-button\n fill=\"clear\"\n size=\"small\"\n type=\"button\"\n class=\"dcf-button-expand\"\n (click)=\"handleExpandToggle()\"\n >\n <ngx-decaf-icon\n [color]=\"iconColor\"\n [name]=\"expanded ? 'ti-maximize-off' : 'ti-maximize'\"\n />\n </ion-button>\n }\n @if (showCloseButton) {\n <ion-button\n size=\"small\"\n type=\"button\"\n class=\"dcf-button-close\"\n (click)=\"cancel()\"\n >\n <ngx-decaf-icon\n [color]=\"iconColor\"\n name=\"ti-x\"\n />\n </ion-button>\n }\n </ion-buttons>\n </ion-toolbar>\n </ion-header>\n\n <ion-content>\n <section\n class=\"dcf-modal-body\"\n [class.dcf-has-title]=\"title?.length\"\n >\n @if (!tag && !model && !inlineContent) {\n <div class=\"dcf-loading-container\">\n <ion-spinner\n name=\"crescent\"\n color=\"primary\"\n ></ion-spinner>\n </div>\n } @else {\n @if (inlineContent && inlineContentPosition === 'top') {\n <div\n class=\"dcf-modal-content\"\n id=\"dcf-modal-content\"\n [innerHTML]=\"inlineContent\"\n ></div>\n }\n @if (!tag && model) {\n <ngx-decaf-model-renderer\n (listenEvent)=\"handleEvent($event)\"\n [model]=\"model\"\n [globals]=\"globals\"\n />\n } @else if (tag && globals) {\n <ngx-decaf-component-renderer\n [tag]=\"tag\"\n (listenEvent)=\"handleEvent($event)\"\n [model]=\"model\"\n [globals]=\"{ props: globals }\"\n />\n }\n @if (inlineContent && inlineContentPosition === 'bottom') {\n <div\n class=\"dcf-modal-content\"\n id=\"dcf-modal-content\"\n [innerHTML]=\"inlineContent\"\n ></div>\n }\n }\n </section>\n </ion-content>\n </ng-template>\n</ion-modal>\n", styles: [".dcf-modal-component{--border-radius: var(--dcf-border-radius)}.dcf-modal-component.dcf-modal-confirm{top:-100px;--max-width: 320px;--max-height: 35vh}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-title{font-weight:500;font-size:1.125rem;line-height:1.75rem;color:var(--dcf-color-gray-8)}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-delete .dcf-title{color:var(--dcf-color-danger)}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-content{font-weight:400;font-size:.935rem;line-height:1.375rem;color:var(--dcf-color-gray-6);margin-top:1rem}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-buttons-grid{position:absolute;bottom:2rem;right:1rem}.dcf-modal-component ::ng-deep form .dcf-buttons-grid{align-content:center!important;justify-content:center;padding-top:1rem}.dcf-modal-component ion-header{box-shadow:none!important;border-bottom:1px solid var(--dcf-color-gray-2)}.dcf-modal-component ion-button.dcf-button-close{--background: var(--dcf-color-light) !important;--border-radius: var(--dcf-border-radius-small) !important}.dcf-modal-component.dcf-modal-no-header ion-header,.dcf-modal-component.dcf-no-title ion-header{box-shadow:none;border-color:transparent!important}.dcf-modal-component .dcf-modal-content ::ng-deep pre{border:1px solid var(--dcf-color-gray-2);white-space:pre-wrap;overflow-wrap:anywhere;background:rgba(var(--dcf-color-warning-rgb),.175)!important;padding:var(--dcf-padding);border-radius:var(--dcf-border-radius-small);font-size:.9rem!important;font-weight:500;margin-top:2rem}@media (max-width: 768px){.dcf-modal-component .dcf-button-expand{display:none!important}}.dcf-modal-component.dcf-modal-select-interface{--min-width: 300px;--max-width: 500px;--max-height: 50%;--border-radius: var(--dcf-border-radius)}.dcf-modal-component.dcf-modal-select-interface .dcf-modal-body{--max-height: 60%;max-height:60%;padding:0px var(--dcf-padding-small)!important}.dcf-modal-component.dcf-modal-expand{--min-height: 50%;--min-width: 75%;--max-width: 100%}.dcf-modal-component.dcf-fullscreen-expanded,.dcf-modal-component.dcf-fullscreen-modal{--height: 100%;--width: 100%;--max-width: 100%;--border-radius: 0}.dcf-modal-component.dcf-fullscreen-expanded.dcf-header-transparent,.dcf-modal-component.dcf-fullscreen-modal.dcf-header-transparent{padding-left:2rem;padding-bottom:2rem;padding-right:1rem}.dcf-modal-component.dcf-fullscreen-expanded:not(.dcf-header-transparent).dcf-no-title ion-header ion-button,.dcf-modal-component.dcf-fullscreen-modal:not(.dcf-header-transparent).dcf-no-title ion-header ion-button{transform:translate(-5px,5px)}.dcf-modal-component.dcf-lightbox-modal ion-content{--background: transparent !important}.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body{display:flex;height:auto;justify-content:center;align-items:center}.dcf-modal-component.dcf-lightbox-modal.dcf-fullscreen-modal{padding:var(--dcf-padding-small)}.dcf-modal-component.dcf-header-transparent ion-header{box-shadow:none!important;border-bottom:none!important}.dcf-modal-component.dcf-header-transparent ion-title{width:calc(100% + 10px);position:relative;top:1.25rem;background:#fff;height:50px!important}.dcf-modal-component.dcf-header-transparent ion-buttons ion-button:not(:last-of-type){position:relative;right:1px}.dcf-modal-component.dcf-header-transparent ion-content[part=background],.dcf-modal-component.dcf-header-transparent ion-content::part(background){border-radius:var(--dcf-border-radius)!important}.dcf-modal-component.dcf-header-transparent .dcf-modal-body.dcf-has-title{padding-top:2rem!important}.dcf-modal-component.dcf-header-transparent,.dcf-modal-component.dcf-lightbox-modal{--background: transparent;--box-shadow: none !important}@media (max-width: 767px){.dcf-modal-component.dcf-header-transparent,.dcf-modal-component.dcf-lightbox-modal{padding:var(--dcf-padding-xsmall)}}.dcf-modal-component.dcf-header-transparent ion-header,.dcf-modal-component.dcf-lightbox-modal ion-header{box-shadow:none!important;border-color:transparent!important;padding:unset!important;margin:unset!important;height:30px}.dcf-modal-component.dcf-header-transparent ion-header ion-buttons,.dcf-modal-component.dcf-lightbox-modal ion-header ion-buttons{background:var(--dcf-color-gray-2)!important;border-radius:var(--dcf-border-radius)!important;box-shadow:var(--dcf-box-shadow)!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button{--background: transparent !important;margin:0!important;width:35px!important;height:25px!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button *,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button *{margin:-5px}.dcf-modal-component.dcf-header-transparent ion-header ion-button ngx-decaf-icon,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button ngx-decaf-icon{transform:translate(-1px)!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button ion-icon,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button ion-icon{font-size:1.15rem!important;color:var(--dcf-color-gray-5)}.dcf-modal-component.dcf-header-transparent ion-header ion-toolbar,.dcf-modal-component.dcf-lightbox-modal ion-header ion-toolbar{--background: transparent !important;padding:unset!important;margin:unset!important}.dcf-modal-component.dcf-header-transparent ion-content,.dcf-modal-component.dcf-lightbox-modal ion-content{max-width:calc(100% - 10px)}.dcf-modal-component.dcf-header-transparent .dcf-modal-body,.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body{background:#fff!important;padding:2px 0 0;border-radius:var(--dcf-border-radius)}.dcf-modal-component.dcf-header-transparent .dcf-modal-body>div,.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body>div{border-radius:var(--dcf-border-radius)!important;max-width:calc(100% - 5px)}.dcf-modal-component:not(.dcf-lightbox-modal) .dcf-modal-body{padding:1.5rem 1rem}.dcf-modal-component .dcf-loading-container{height:50%;display:flex;justify-content:center;align-items:center}.dcf-modal-component .dcf-loading-container ion-spinner{width:60px;height:60px}\n"], dependencies: [{ kind: "component", type: IonModal, selector: "ion-modal" }, { kind: "component", type: ComponentRendererComponent, selector: "ngx-decaf-component-renderer", inputs: ["tag", "children", "projectable", "pk", "parent"] }, { kind: "component", type: ModelRendererComponent, selector: "ngx-decaf-model-renderer", inputs: ["projectable"] }, { kind: "component", type: IconComponent, selector: "ngx-decaf-icon", inputs: ["name", "color", "slot", "button", "buttonFill", "buttonShape", "width", "size", "inline"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
7176
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: ModalComponent, isStandalone: true, selector: "ngx-decaf-modal", inputs: { title: "title", isOpen: "isOpen", tag: "tag", options: "options", globals: "globals", inlineContent: "inlineContent", inlineContentPosition: "inlineContentPosition", fullscreen: "fullscreen", expandable: "expandable", lightBox: "lightBox", headerTransparent: "headerTransparent", headerBackground: "headerBackground", showHeader: "showHeader", showCloseButton: "showCloseButton", handlers: "handlers" }, outputs: { willDismissEvent: "willDismissEvent" }, host: { properties: { "attr.id": "uid" } }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["component"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ion-modal\n [id]=\"uid\"\n [class]=\"'dcf-modal-component ' + className\"\n [isOpen]=\"isOpen\"\n (willDismiss)=\"handleWillDismiss($event)\"\n [backdropDismiss]=\"options?.backdropDismiss\"\n [showBackdrop]=\"options?.showBackdrop\"\n [animated]=\"options?.animated\"\n [canDismiss]=\"options?.canDismiss\"\n [class.dcf-fullscreen-modal]=\"fullscreen\"\n [class.dcf-fullscreen-expanded]=\"expanded\"\n [class.dcf-lightbox-modal]=\"lightBox\"\n [class.dcf-modal-no-header]=\"!showHeader\"\n [class.dcf-header-transparent]=\"headerTransparent\"\n [class.dcf-no-title]=\"!title?.length\"\n #component\n>\n <ng-template>\n <ion-header>\n <ion-toolbar [color]=\"headerBackground\">\n @if (title?.length) {\n <ion-title>{{ title | translate }}</ion-title>\n }\n <ion-buttons slot=\"end\">\n @if (expandable && !fullscreen) {\n <ion-button\n fill=\"clear\"\n size=\"small\"\n type=\"button\"\n class=\"dcf-button-expand\"\n (click)=\"handleExpandToggle()\"\n >\n <ngx-decaf-icon\n [color]=\"iconColor\"\n [name]=\"expanded ? 'ti-maximize-off' : 'ti-maximize'\"\n />\n </ion-button>\n }\n @if (showCloseButton) {\n <ion-button\n size=\"small\"\n type=\"button\"\n class=\"dcf-button-close\"\n (click)=\"cancel()\"\n >\n <ngx-decaf-icon\n [color]=\"iconColor\"\n name=\"ti-x\"\n />\n </ion-button>\n }\n </ion-buttons>\n </ion-toolbar>\n </ion-header>\n\n <ion-content>\n <section\n class=\"dcf-modal-body\"\n [class.dcf-has-title]=\"title?.length\"\n >\n @if (!tag && !model && !inlineContent) {\n <div class=\"dcf-loading-container\">\n <ion-spinner\n name=\"crescent\"\n color=\"primary\"\n ></ion-spinner>\n </div>\n } @else {\n @if (inlineContent && inlineContentPosition === 'top') {\n <div\n class=\"dcf-modal-content\"\n id=\"dcf-modal-content\"\n [innerHTML]=\"inlineContent\"\n ></div>\n }\n @if (!tag && model) {\n <ngx-decaf-model-renderer\n (listenEvent)=\"handleEvent($event)\"\n [model]=\"model\"\n [globals]=\"globals\"\n />\n } @else if (tag && globals) {\n <ngx-decaf-component-renderer\n [tag]=\"tag\"\n (listenEvent)=\"handleEvent($event)\"\n [model]=\"model\"\n [globals]=\"{ props: globals }\"\n />\n }\n @if (inlineContent && inlineContentPosition === 'bottom') {\n <div\n class=\"dcf-modal-content\"\n id=\"dcf-modal-content\"\n [innerHTML]=\"inlineContent\"\n ></div>\n }\n }\n </section>\n </ion-content>\n </ng-template>\n</ion-modal>\n", styles: [".dcf-modal-component{--border-radius: var(--dcf-border-radius)}.dcf-modal-component.dcf-modal-confirm{top:-100px;--max-width: 320px;--max-height: 35vh}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-title{font-weight:500;font-size:1.125rem;line-height:1.75rem;color:var(--dcf-color-gray-8)}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-delete .dcf-title{color:var(--dcf-color-danger)}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-content{font-weight:400;font-size:.935rem;line-height:1.375rem;color:var(--dcf-color-gray-6);margin-top:1rem}.dcf-modal-component.dcf-modal-confirm ::ng-deep .dcf-buttons-grid{position:absolute;bottom:2rem;right:1rem}.dcf-modal-component ::ng-deep form .dcf-buttons-grid{align-content:center!important;justify-content:center;padding-top:1rem}.dcf-modal-component ion-header{box-shadow:none!important;border-bottom:1px solid var(--dcf-color-gray-2)}.dcf-modal-component ion-button.dcf-button-close{--background: var(--dcf-color-light) !important;--border-radius: var(--dcf-border-radius-small) !important}.dcf-modal-component.dcf-modal-no-header ion-header,.dcf-modal-component.dcf-no-title ion-header{box-shadow:none;border-color:transparent!important}.dcf-modal-component .dcf-modal-content ::ng-deep pre{border:1px solid var(--dcf-color-gray-2);white-space:pre-wrap;overflow-wrap:anywhere;background:rgba(var(--dcf-color-warning-rgb),.175)!important;padding:var(--dcf-padding);border-radius:var(--dcf-border-radius-small);font-size:.9rem!important;font-weight:500;margin-top:2rem}@media (max-width: 768px){.dcf-modal-component .dcf-button-expand{display:none!important}}.dcf-modal-component.dcf-modal-select-interface{--min-width: 300px;--max-width: 500px;--max-height: 50%;--border-radius: var(--dcf-border-radius)}.dcf-modal-component.dcf-modal-select-interface .dcf-modal-body{--max-height: 60%;max-height:60%;padding:0px var(--dcf-padding-small)!important}.dcf-modal-component.dcf-modal-expand{--min-height: 50%;--min-width: 75%;--max-width: 100%}.dcf-modal-component.dcf-fullscreen-expanded,.dcf-modal-component.dcf-fullscreen-modal{--height: 100%;--width: 100%;--max-width: 100%;--border-radius: 0}.dcf-modal-component.dcf-fullscreen-expanded.dcf-header-transparent,.dcf-modal-component.dcf-fullscreen-modal.dcf-header-transparent{padding-left:2rem;padding-bottom:2rem;padding-right:1rem}.dcf-modal-component.dcf-fullscreen-expanded:not(.dcf-header-transparent).dcf-no-title ion-header ion-button,.dcf-modal-component.dcf-fullscreen-modal:not(.dcf-header-transparent).dcf-no-title ion-header ion-button{transform:translate(-5px,5px)}.dcf-modal-component.dcf-lightbox-modal ion-content{--background: transparent !important}.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body{display:flex;height:auto;justify-content:center;align-items:center}.dcf-modal-component.dcf-lightbox-modal.dcf-fullscreen-modal{padding:var(--dcf-padding-small)}.dcf-modal-component.dcf-header-transparent ion-header{box-shadow:none!important;border-bottom:none!important}.dcf-modal-component.dcf-header-transparent ion-title{width:calc(100% + 10px);position:relative;top:1.25rem;background:#fff;height:50px!important}.dcf-modal-component.dcf-header-transparent ion-buttons ion-button:not(:last-of-type){position:relative;right:1px}.dcf-modal-component.dcf-header-transparent ion-content[part=background],.dcf-modal-component.dcf-header-transparent ion-content::part(background){border-radius:var(--dcf-border-radius)!important}.dcf-modal-component.dcf-header-transparent .dcf-modal-body.dcf-has-title{padding-top:2rem!important}.dcf-modal-component.dcf-header-transparent,.dcf-modal-component.dcf-lightbox-modal{--background: transparent;--box-shadow: none !important}@media (max-width: 767px){.dcf-modal-component.dcf-header-transparent,.dcf-modal-component.dcf-lightbox-modal{padding:var(--dcf-padding-xsmall)}}.dcf-modal-component.dcf-header-transparent ion-header,.dcf-modal-component.dcf-lightbox-modal ion-header{box-shadow:none!important;border-color:transparent!important;padding:unset!important;margin:unset!important;height:30px}.dcf-modal-component.dcf-header-transparent ion-header ion-buttons,.dcf-modal-component.dcf-lightbox-modal ion-header ion-buttons{background:var(--dcf-color-gray-2)!important;border-radius:var(--dcf-border-radius)!important;box-shadow:var(--dcf-box-shadow)!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button{--background: transparent !important;margin:0!important;width:35px!important;height:25px!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button *,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button *{margin:-5px}.dcf-modal-component.dcf-header-transparent ion-header ion-button ngx-decaf-icon,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button ngx-decaf-icon{transform:translate(-1px)!important}.dcf-modal-component.dcf-header-transparent ion-header ion-button ion-icon,.dcf-modal-component.dcf-lightbox-modal ion-header ion-button ion-icon{font-size:1.15rem!important;color:var(--dcf-color-gray-5)}.dcf-modal-component.dcf-header-transparent ion-header ion-toolbar,.dcf-modal-component.dcf-lightbox-modal ion-header ion-toolbar{--background: transparent !important;padding:unset!important;margin:unset!important}.dcf-modal-component.dcf-header-transparent ion-content,.dcf-modal-component.dcf-lightbox-modal ion-content{max-width:calc(100% - 10px)}.dcf-modal-component.dcf-header-transparent .dcf-modal-body,.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body{background:#fff!important;padding:2px 0 0;border-radius:var(--dcf-border-radius)}.dcf-modal-component.dcf-header-transparent .dcf-modal-body>div,.dcf-modal-component.dcf-lightbox-modal .dcf-modal-body>div{border-radius:var(--dcf-border-radius)!important;max-width:calc(100% - 5px)}.dcf-modal-component:not(.dcf-lightbox-modal) .dcf-modal-body{padding:1.5rem 1rem}.dcf-modal-component .dcf-loading-container{height:50%;display:flex;justify-content:center;align-items:center}.dcf-modal-component .dcf-loading-container ion-spinner{width:60px;height:60px}\n"], dependencies: [{ kind: "component", type: IonModal, selector: "ion-modal" }, { kind: "component", type: ComponentRendererComponent, selector: "ngx-decaf-component-renderer", inputs: ["tag", "children", "projectable", "pk", "parent"] }, { kind: "component", type: ModelRendererComponent, selector: "ngx-decaf-model-renderer", inputs: ["projectable"] }, { kind: "component", type: IconComponent, selector: "ngx-decaf-icon", inputs: ["name", "color", "slot", "button", "buttonFill", "buttonShape", "width", "size", "inline"] }, { kind: "component", type: IonSpinner, selector: "ion-spinner", inputs: ["color", "duration", "name", "paused"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
7163
7177
  };
7164
7178
  ModalComponent = __decorate([
7165
7179
  Dynamic(),
@@ -7214,6 +7228,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
7214
7228
  type: Input
7215
7229
  }], willDismissEvent: [{
7216
7230
  type: Output
7231
+ }], handlers: [{
7232
+ type: Input
7217
7233
  }] } });
7218
7234
  let ModalConfirmComponent = class ModalConfirmComponent extends ModalComponent {
7219
7235
  async ngOnInit() {
@@ -7291,8 +7307,18 @@ async function getNgxModalComponent(props = {}, modalProps = {}, injector) {
7291
7307
  * @returns {Promise<IonModal>} - A promise that resolves with the modal instance.
7292
7308
  */
7293
7309
  async function getNgxModalCrudComponent(model, props = {}, modalProps = {}, injector) {
7294
- if (!props || !props?.['operation'])
7310
+ if (!props || !props?.['operation']) {
7295
7311
  props.operation = OperationKeys.CREATE;
7312
+ }
7313
+ const { handlers } = props;
7314
+ // if has not custom handlers passed, create a generic confirm handler for crud operations and bind it to the model using uihandlers decorator
7315
+ if (Model.isModel(model) && !handlers) {
7316
+ uihandlers({
7317
+ [ComponentEventNames.Submit]: (event, data, instance) => {
7318
+ instance.listenEvent.emit(event);
7319
+ },
7320
+ })(model.constructor);
7321
+ }
7296
7322
  const component = await NgxRenderingEngine.createComponent(ModalComponent, {
7297
7323
  model,
7298
7324
  globals: props,
@@ -7606,11 +7632,16 @@ let CrudFieldComponent = class CrudFieldComponent extends NgxFormFieldDirective
7606
7632
  this.parentForm = this.formGroup.parent;
7607
7633
  this.formControl = this.formGroup.get(this.name);
7608
7634
  }
7609
- if (!this.value && this.options.length)
7610
- this.setValue(this.options[0].value);
7635
+ if (HTML5InputTypes.SELECT === this.type && !this.value) {
7636
+ if (this.options?.length) {
7637
+ this.setValue(this.options[0].value);
7638
+ this.changeDetectorRef.detectChanges();
7639
+ }
7640
+ }
7611
7641
  if (this.type === HTML5InputTypes.CHECKBOX) {
7612
- if (this.labelPlacement === 'floating')
7642
+ if (this.labelPlacement === 'floating') {
7613
7643
  this.labelPlacement = 'end';
7644
+ }
7614
7645
  this.setValue(this.value);
7615
7646
  }
7616
7647
  }
@@ -7626,8 +7657,18 @@ let CrudFieldComponent = class CrudFieldComponent extends NgxFormFieldDirective
7626
7657
  * @memberOf CrudFieldComponent
7627
7658
  */
7628
7659
  async ngAfterViewInit() {
7629
- if (this.type === HTML5InputTypes.RADIO && !this.value)
7630
- this.setValue(this.options[0].value); // TODO: migrate to RenderingEngine
7660
+ if (this.type === HTML5InputTypes.RADIO && this.formGroup && !this.value) {
7661
+ const options = this.options;
7662
+ let checked = options.find((o) => o.checked);
7663
+ if (!checked) {
7664
+ checked = options.find((o) => o.value !== undefined);
7665
+ }
7666
+ if (checked) {
7667
+ this.setValue(checked.value);
7668
+ this.changeDetectorRef.detectChanges();
7669
+ }
7670
+ this.setValue(this.value);
7671
+ }
7631
7672
  }
7632
7673
  /**
7633
7674
  * Returns a list of options for select or radio inputs, with their `text` property
@@ -7694,7 +7735,8 @@ let CrudFieldComponent = class CrudFieldComponent extends NgxFormFieldDirective
7694
7735
  const options = (!this.required || (this.options?.length > 1 && this.startEmpty)
7695
7736
  ? [{ value: '', text: '', selected: true, disabled: this.required }, ...this.options]
7696
7737
  : this.options);
7697
- return (this.options = [...options]);
7738
+ this.options = [...options];
7739
+ return this.options;
7698
7740
  }
7699
7741
  /**
7700
7742
  * Handles the opening of select options based on the specified interface type.
@@ -7753,8 +7795,9 @@ let CrudFieldComponent = class CrudFieldComponent extends NgxFormFieldDirective
7753
7795
  this.formControl.updateValueAndValidity();
7754
7796
  }
7755
7797
  isOptionChecked(value) {
7756
- if (!this.formControl.value || !Array.isArray(this.formControl.value))
7798
+ if (!this.formControl.value || !Array.isArray(this.formControl.value)) {
7757
7799
  return false;
7800
+ }
7758
7801
  return this.formControl.value.includes(value);
7759
7802
  }
7760
7803
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: CrudFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -8030,6 +8073,24 @@ class NgxFormDirective extends NgxParentComponentDirective {
8030
8073
  // }
8031
8074
  }
8032
8075
  async ngAfterViewInit() {
8076
+ const formElement = this.component?.nativeElement;
8077
+ // if (this.isModalChild && formElement) {
8078
+ // const ionContent = await formElement.closest('ion-content');
8079
+ // const formHeigth = interval(50)
8080
+ // .pipe(
8081
+ // map(() => Math.ceil(formElement.getBoundingClientRect().height)),
8082
+ // filter((h) => h > 0), // só passa quando tiver altura real
8083
+ // take(1)
8084
+ // )
8085
+ // .subscribe(async (height) => {
8086
+ // const scrollElement = await ionContent.getScrollElement();
8087
+ // const extraSpace = 24; // margem para evitar corte no final
8088
+ // const targetHeight = height + extraSpace * 10000;
8089
+ // this.renderer.setStyle(scrollElement, 'height', `auto !important`);
8090
+ // this.renderer.setStyle(ionContent, 'min-height', `${targetHeight}px`);
8091
+ // this.renderer.setStyle(scrollElement, 'overflow-y', 'auto');
8092
+ // });
8093
+ // }
8033
8094
  //TODO: ver se isso é necessário
8034
8095
  // if (this.formGroup)
8035
8096
  // this.formGroupLoadedEvent.emit({
@@ -8589,7 +8650,6 @@ let LayoutComponent = class LayoutComponent extends NgxParentComponentDirective
8589
8650
  this.listenEvent.emit(event);
8590
8651
  }
8591
8652
  toggleCollapse(container) {
8592
- console.log('toggleCollapse', container);
8593
8653
  this.collapsed = !this.collapsed;
8594
8654
  this.changeDetectorRef.detectChanges();
8595
8655
  }
@@ -10530,7 +10590,7 @@ let FilterComponent = class FilterComponent extends NgxComponentDirective {
10530
10590
  async ngOnInit() {
10531
10591
  this.windowWidth = getWindowWidth();
10532
10592
  this.windowResizeSubscription = fromEvent(window, 'resize')
10533
- .pipe(debounceTime(300), takeUntil$1(this.destroySubscriptions$), shareReplay$1(1))
10593
+ .pipe(debounceTime(300), takeUntil$1(this.destroySubscriptions$), shareReplay$1({ bufferSize: 1, refCount: true }))
10534
10594
  .subscribe(() => {
10535
10595
  this.windowWidth = getWindowWidth();
10536
10596
  });
@@ -11726,7 +11786,7 @@ let ListComponent = class ListComponent extends NgxComponentDirective {
11726
11786
  if (!this.searchbarPlaceholder)
11727
11787
  this.searchbarPlaceholder = `${this.locale}.search.placeholder`;
11728
11788
  this.clickItemSubject
11729
- .pipe(debounceTime(100), shareReplay$1(1), takeUntil$1(this.destroySubscriptions$))
11789
+ .pipe(debounceTime(100), shareReplay$1({ bufferSize: 1, refCount: true }), takeUntil$1(this.destroySubscriptions$))
11730
11790
  .subscribe((event) => this.clickEventEmit(event));
11731
11791
  this.limit = Number(this.limit);
11732
11792
  this.start = Number(this.start);
@@ -14666,7 +14726,7 @@ let TableComponent = class TableComponent extends ListComponent {
14666
14726
  this.type = ListComponentsTypes.PAGINATED;
14667
14727
  this.empty = Object.assign({}, DefaultListEmptyOptions, this.empty);
14668
14728
  this.repositoryObserverSubject
14669
- .pipe(debounceTime(100), shareReplay$1(1), takeUntil$1(this.destroySubscriptions$))
14729
+ .pipe(debounceTime(100), shareReplay$1({ bufferSize: 1, refCount: true }), takeUntil$1(this.destroySubscriptions$))
14670
14730
  .subscribe(([model, action, uid, data]) => this.handleObserveEvent(model, action, uid, data));
14671
14731
  this.cols = this._cols;
14672
14732
  this.getOperations();