@paperless/angular 2.8.8 → 2.8.10

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.
@@ -2,7 +2,7 @@ import { trigger, transition, style, animate } from '@angular/animations';
2
2
  import * as i0 from '@angular/core';
3
3
  import { Component, EventEmitter, ChangeDetectionStrategy, Input, Output, ViewChild, Directive, HostListener, Self, NgModule, Injector, Injectable, HostBinding, TemplateRef, ContentChild, Host, ElementRef, ViewChildren, ContentChildren, Pipe } from '@angular/core';
4
4
  import * as i1 from '@angular/forms';
5
- import { FormControl, FormGroup, FormArray, NG_VALUE_ACCESSOR } from '@angular/forms';
5
+ import { FormControl, FormGroup, FormArray, NG_VALUE_ACCESSOR, NumberValueAccessor } from '@angular/forms';
6
6
  import { BehaviorSubject, filter, fromEvent, Subject, timer, distinctUntilChanged, debounceTime, take, map as map$1 } from 'rxjs';
7
7
  import * as i1$2 from '@angular/common';
8
8
  import { CommonModule, DatePipe, CurrencyPipe } from '@angular/common';
@@ -94,7 +94,6 @@ class BaseFormComponent {
94
94
  this.markControlDirty(child);
95
95
  }
96
96
  }
97
- control.updateValueAndValidity();
98
97
  }
99
98
  markAllDirty(formGroup) {
100
99
  this.markedDirty = true;
@@ -366,7 +365,7 @@ class FieldDirective extends BaseValueAccessor {
366
365
  }
367
366
  }
368
367
  FieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FieldDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
369
- FieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: FieldDirective, selector: "p-field", host: { listeners: { "valueChange": "handleChangeEvent($event.detail)" } }, providers: [
368
+ FieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: FieldDirective, selector: "p-field:not([type=number])", host: { listeners: { "valueChange": "handleChangeEvent($event.detail)" } }, providers: [
370
369
  {
371
370
  provide: NG_VALUE_ACCESSOR,
372
371
  useExisting: FieldDirective,
@@ -376,7 +375,7 @@ FieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version
376
375
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FieldDirective, decorators: [{
377
376
  type: Directive,
378
377
  args: [{
379
- selector: 'p-field',
378
+ selector: 'p-field:not([type=number])',
380
379
  host: {
381
380
  '(valueChange)': 'handleChangeEvent($event.detail)',
382
381
  },
@@ -390,6 +389,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
390
389
  }]
391
390
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
392
391
 
392
+ class BaseNumberValueAccessor extends NumberValueAccessor {
393
+ constructor(el, renderer) {
394
+ super(renderer, el);
395
+ this.el = el;
396
+ this.renderer = renderer;
397
+ }
398
+ writeValue(value) {
399
+ this.el.nativeElement.value = this.lastValue = value == null ? '' : value;
400
+ super.writeValue(value);
401
+ }
402
+ handleChangeEvent(value) {
403
+ if (value !== this.lastValue) {
404
+ this.lastValue = value;
405
+ this.onChange(value);
406
+ }
407
+ }
408
+ _handleBlurEvent() {
409
+ this.onTouched();
410
+ }
411
+ }
412
+ BaseNumberValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseNumberValueAccessor, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
413
+ BaseNumberValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: BaseNumberValueAccessor, host: { listeners: { "focusout": "_handleBlurEvent()" } }, usesInheritance: true, ngImport: i0 });
414
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseNumberValueAccessor, decorators: [{
415
+ type: Directive,
416
+ args: [{}]
417
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { _handleBlurEvent: [{
418
+ type: HostListener,
419
+ args: ['focusout']
420
+ }] } });
421
+
422
+ class FieldNumberDirective extends BaseNumberValueAccessor {
423
+ constructor(el, renderer) {
424
+ super(el, renderer);
425
+ }
426
+ }
427
+ FieldNumberDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FieldNumberDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
428
+ FieldNumberDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: FieldNumberDirective, selector: "p-field[type=number]", host: { listeners: { "valueChange": "handleChangeEvent($event.detail)" } }, providers: [
429
+ {
430
+ provide: NG_VALUE_ACCESSOR,
431
+ useExisting: FieldNumberDirective,
432
+ multi: true,
433
+ },
434
+ ], usesInheritance: true, ngImport: i0 });
435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FieldNumberDirective, decorators: [{
436
+ type: Directive,
437
+ args: [{
438
+ selector: 'p-field[type=number]',
439
+ host: {
440
+ '(valueChange)': 'handleChangeEvent($event.detail)',
441
+ },
442
+ providers: [
443
+ {
444
+ provide: NG_VALUE_ACCESSOR,
445
+ useExisting: FieldNumberDirective,
446
+ multi: true,
447
+ },
448
+ ],
449
+ }]
450
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; } });
451
+
393
452
  class PaginationPagesDirective extends BaseValueAccessor {
394
453
  constructor(el) {
395
454
  super(el);
@@ -593,6 +652,7 @@ const DIRECTIVES$1 = [
593
652
  DatepickerDirective,
594
653
  CropperDirective,
595
654
  FieldDirective,
655
+ FieldNumberDirective,
596
656
  RadioDirective,
597
657
  CheckboxDirective,
598
658
  ToggleDirective,
@@ -4681,7 +4741,7 @@ class PaperlessModule {
4681
4741
  }
4682
4742
  }
4683
4743
  PaperlessModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PaperlessModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4684
- PaperlessModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: PaperlessModule, declarations: [PaginationSizeDirective, PaginationPagesDirective, SelectDirective, DatepickerDirective, CropperDirective, FieldDirective, RadioDirective, CheckboxDirective, ToggleDirective, CustomCurrencyPipe, CustomDatePipe, SafePipe], imports: [CommonModule, StencilModule, TableModule, ToastModule, OverlayModule], exports: [StencilModule, TableModule, ToastModule, OverlayModule, PaginationSizeDirective, PaginationPagesDirective, SelectDirective, DatepickerDirective, CropperDirective, FieldDirective, RadioDirective, CheckboxDirective, ToggleDirective, CustomCurrencyPipe, CustomDatePipe, SafePipe] });
4744
+ PaperlessModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: PaperlessModule, declarations: [PaginationSizeDirective, PaginationPagesDirective, SelectDirective, DatepickerDirective, CropperDirective, FieldDirective, FieldNumberDirective, RadioDirective, CheckboxDirective, ToggleDirective, CustomCurrencyPipe, CustomDatePipe, SafePipe], imports: [CommonModule, StencilModule, TableModule, ToastModule, OverlayModule], exports: [StencilModule, TableModule, ToastModule, OverlayModule, PaginationSizeDirective, PaginationPagesDirective, SelectDirective, DatepickerDirective, CropperDirective, FieldDirective, FieldNumberDirective, RadioDirective, CheckboxDirective, ToggleDirective, CustomCurrencyPipe, CustomDatePipe, SafePipe] });
4685
4745
  PaperlessModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PaperlessModule, providers: [...NGX_PIPES, ...PIPES], imports: [CommonModule, StencilModule, MODULES, StencilModule, TableModule, ToastModule, OverlayModule] });
4686
4746
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PaperlessModule, decorators: [{
4687
4747
  type: NgModule,
@@ -4701,5 +4761,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
4701
4761
  * Generated bundle index. Do not edit.
4702
4762
  */
4703
4763
 
4704
- export { BaseFormComponent, BaseTableComponent, BaseUploadComponent, BaseValueAccessor, CheckboxDirective, CropperDirective, CustomCurrencyPipe, CustomDatePipe, DIRECTIVES$1 as DIRECTIVES, DatepickerDirective, FADE_IN, FADE_OUT, FieldDirective, MODULES, OVERLAY_SERVICES, OverlayModule, OverlayRef, OverlayService, 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, PIPES, PIbanIcon, PIcon, PIllustration, PIllustrationDeprecated, 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, PaginationPagesDirective, PaginationSizeDirective, PaperlessModule, RadioDirective, SLIDE_IN_BOTTOM_OUT_TOP, SLIDE_IN_TOP_OUT_BOTTOM, SafePipe, SelectDirective, StencilModule, TABLE_COMPONENTS, TABLE_DIRECTIVES, TOAST_COMPONENTS, TOAST_DIRECTIVES, TOAST_SERVICES, Table, TableCell, TableColumn, TableCustomActionsDirective, TableCustomFilterDirective, TableCustomRowDirective, TableDirective, TableFilterModalDirective, TableFooterDirective, TableHeaderDirective, TableModule, TableNgxDirective, TableRowAction, ToastContainer, ToastDirective, ToastModule, ToastService, ToastVariants, ToggleDirective, createFormFilters };
4764
+ export { BaseFormComponent, BaseTableComponent, BaseUploadComponent, BaseValueAccessor, CheckboxDirective, CropperDirective, CustomCurrencyPipe, CustomDatePipe, DIRECTIVES$1 as DIRECTIVES, DatepickerDirective, FADE_IN, FADE_OUT, FieldDirective, FieldNumberDirective, MODULES, OVERLAY_SERVICES, OverlayModule, OverlayRef, OverlayService, 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, PIPES, PIbanIcon, PIcon, PIllustration, PIllustrationDeprecated, 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, PaginationPagesDirective, PaginationSizeDirective, PaperlessModule, RadioDirective, SLIDE_IN_BOTTOM_OUT_TOP, SLIDE_IN_TOP_OUT_BOTTOM, SafePipe, SelectDirective, StencilModule, TABLE_COMPONENTS, TABLE_DIRECTIVES, TOAST_COMPONENTS, TOAST_DIRECTIVES, TOAST_SERVICES, Table, TableCell, TableColumn, TableCustomActionsDirective, TableCustomFilterDirective, TableCustomRowDirective, TableDirective, TableFilterModalDirective, TableFooterDirective, TableHeaderDirective, TableModule, TableNgxDirective, TableRowAction, ToastContainer, ToastDirective, ToastModule, ToastService, ToastVariants, ToggleDirective, createFormFilters };
4705
4765
  //# sourceMappingURL=paperless-angular.mjs.map