@paperless/angular 2.22.0-alpha.40 → 2.22.0-alpha.42

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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, EventEmitter, ViewChild, Output, Input, ChangeDetectionStrategy, HostListener, Directive, Self, Injector, Injectable, NgModule, HostBinding, TemplateRef, ContentChild, Host, ElementRef, ContentChildren, ViewChildren, inject, Pipe } from '@angular/core';
2
+ import { Component, EventEmitter, ViewChild, Output, Input, ChangeDetectionStrategy, HostListener, Directive, Self, Injector, Injectable, NgModule, HostBinding, TemplateRef, ContentChild, Host, ElementRef, ContentChildren, ViewChildren, inject, Pipe, provideAppInitializer } from '@angular/core';
3
3
  import * as i1 from '@angular/forms';
4
4
  import { FormControl, FormGroup, FormArray, NG_VALUE_ACCESSOR, NumberValueAccessor } from '@angular/forms';
5
5
  import { BehaviorSubject, filter, Subject, timer, fromEvent, distinctUntilChanged, debounceTime, take, map as map$1 } from 'rxjs';
@@ -89,6 +89,7 @@ import { defineCustomElement as defineCustomElement$18 } from '@paperless/core/c
89
89
  import { defineCustomElement as defineCustomElement$19 } from '@paperless/core/components/p-tooltip.js';
90
90
  import { RouterLink, RouterModule } from '@angular/router';
91
91
  import { v4 } from 'uuid';
92
+ import { defineCustomElements } from '@paperless/core/loader';
92
93
  import * as i1$3 from '@angular/platform-browser';
93
94
 
94
95
  class BaseFormComponent {
@@ -275,10 +276,11 @@ class BaseValueAccessor {
275
276
  this.el.nativeElement.value = this.lastValue = value == null ? '' : value;
276
277
  }
277
278
  handleChangeEvent(value) {
278
- if (value !== this.lastValue) {
279
- this.lastValue = value;
280
- this.onChange(value);
279
+ if (value === this.lastValue) {
280
+ return;
281
281
  }
282
+ this.lastValue = value;
283
+ this.onChange(value);
282
284
  }
283
285
  registerOnChange(fn) {
284
286
  this.onChange = fn;
@@ -442,10 +444,11 @@ class BaseNumberValueAccessor extends NumberValueAccessor {
442
444
  super.writeValue(value);
443
445
  }
444
446
  handleChangeEvent(value) {
445
- if (value !== this.lastValue) {
446
- this.lastValue = value;
447
- this.onChange(value);
447
+ if (value === this.lastValue) {
448
+ return;
448
449
  }
450
+ this.lastValue = value;
451
+ this.onChange(value);
449
452
  }
450
453
  _handleBlurEvent() {
451
454
  this.onTouched();
@@ -5221,14 +5224,22 @@ const NGX_PIPES = [DatePipe, CurrencyPipe];
5221
5224
  class PaperlessModule {
5222
5225
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PaperlessModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5223
5226
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: PaperlessModule, imports: [PAccordion, PAttachment, PAvatar, PAvatarGroup, PBackdrop, PBadge, PButton, PButtonGroup, PCalendar, PCardBody, PCardContainer, PCardHeader, PCheckbox, PContentSlider, PCropper, PDatepicker, PDivider, PDrawer, PDrawerBody, PDrawerContainer, PDrawerHeader, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PEmptyState, PField, PFieldContainer, PFloatingMenuContainer, PFloatingMenuItem, PHelper, PIbanIcon, PIcon, PIllustration, PInfoPanel, PLabel, PLayout, PListing, PListingItem, PListingLine, PLoader, PModal, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PNavigationSection, PNavigationTitle, PPagination, PPaginationPages, PPaginationPagesItem, PPaginationSize, PProfile, PRadio, PRange, PSegmentContainer, PSegmentItem, PSelect, PSmile, PStepper, PStepperItem, PStepperLine, PTabContainer, PTabItem, PTableContainer, PTableFooter, PTableHeader, PTableRow, PTableRowActionsContainer, PToast, PToggle, PTooltip, PPaginationSizeDirective, PPaginationPagesDirective, PSelectDirective, PDatepickerDirective, PCropperDirective, PFieldDirective, PFieldNumberDirective, PRadioDirective, PCheckboxDirective, PToggleDirective, TableModule, ToastModule, OverlayModule, CustomCurrencyPipe, CustomDatePipe, SafePipe, SelectAutocompletePipe, SelectSelectAllPipe], exports: [TableModule, ToastModule, OverlayModule, PPaginationSizeDirective, PPaginationPagesDirective, PSelectDirective, PDatepickerDirective, PCropperDirective, PFieldDirective, PFieldNumberDirective, PRadioDirective, PCheckboxDirective, PToggleDirective, PAccordion, PAttachment, PAvatar, PAvatarGroup, PBackdrop, PBadge, PButton, PButtonGroup, PCalendar, PCardBody, PCardContainer, PCardHeader, PCheckbox, PContentSlider, PCropper, PDatepicker, PDivider, PDrawer, PDrawerBody, PDrawerContainer, PDrawerHeader, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PEmptyState, PField, PFieldContainer, PFloatingMenuContainer, PFloatingMenuItem, PHelper, PIbanIcon, PIcon, PIllustration, PInfoPanel, PLabel, PLayout, PListing, PListingItem, PListingLine, PLoader, PModal, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PNavigationSection, PNavigationTitle, PPagination, PPaginationPages, PPaginationPagesItem, PPaginationSize, PProfile, PRadio, PRange, PSegmentContainer, PSegmentItem, PSelect, PSmile, PStepper, PStepperItem, PStepperLine, PTabContainer, PTabItem, PTableContainer, PTableFooter, PTableHeader, PTableRow, PTableRowActionsContainer, PToast, PToggle, PTooltip, CustomCurrencyPipe, CustomDatePipe, SafePipe, SelectAutocompletePipe, SelectSelectAllPipe] });
5224
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PaperlessModule, providers: [...NGX_PIPES, ...PIPES], imports: [MODULES, TableModule, ToastModule, OverlayModule] });
5227
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PaperlessModule, providers: [
5228
+ ...NGX_PIPES,
5229
+ ...PIPES,
5230
+ provideAppInitializer(() => defineCustomElements()),
5231
+ ], imports: [MODULES, TableModule, ToastModule, OverlayModule] });
5225
5232
  }
5226
5233
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PaperlessModule, decorators: [{
5227
5234
  type: NgModule,
5228
5235
  args: [{
5229
5236
  imports: [...DIRECTIVES, ...DIRECTIVES$1, ...MODULES, ...PIPES],
5230
5237
  exports: [...MODULES, ...DIRECTIVES$1, ...DIRECTIVES, ...PIPES],
5231
- providers: [...NGX_PIPES, ...PIPES],
5238
+ providers: [
5239
+ ...NGX_PIPES,
5240
+ ...PIPES,
5241
+ provideAppInitializer(() => defineCustomElements()),
5242
+ ],
5232
5243
  }]
5233
5244
  }] });
5234
5245