@paperless/angular 2.8.7 → 2.8.9

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';
@@ -366,7 +366,7 @@ class FieldDirective extends BaseValueAccessor {
366
366
  }
367
367
  }
368
368
  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: [
369
+ 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
370
  {
371
371
  provide: NG_VALUE_ACCESSOR,
372
372
  useExisting: FieldDirective,
@@ -376,7 +376,7 @@ FieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version
376
376
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FieldDirective, decorators: [{
377
377
  type: Directive,
378
378
  args: [{
379
- selector: 'p-field',
379
+ selector: 'p-field:not([type=number])',
380
380
  host: {
381
381
  '(valueChange)': 'handleChangeEvent($event.detail)',
382
382
  },
@@ -390,6 +390,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
390
390
  }]
391
391
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
392
392
 
393
+ class BaseNumberValueAccessor extends NumberValueAccessor {
394
+ constructor(el, renderer) {
395
+ super(renderer, el);
396
+ this.el = el;
397
+ this.renderer = renderer;
398
+ }
399
+ writeValue(value) {
400
+ this.el.nativeElement.value = this.lastValue = value == null ? '' : value;
401
+ super.writeValue(value);
402
+ }
403
+ handleChangeEvent(value) {
404
+ if (value !== this.lastValue) {
405
+ this.lastValue = value;
406
+ this.onChange(value);
407
+ }
408
+ }
409
+ _handleBlurEvent() {
410
+ this.onTouched();
411
+ }
412
+ }
413
+ 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 });
414
+ BaseNumberValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: BaseNumberValueAccessor, host: { listeners: { "focusout": "_handleBlurEvent()" } }, usesInheritance: true, ngImport: i0 });
415
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BaseNumberValueAccessor, decorators: [{
416
+ type: Directive,
417
+ args: [{}]
418
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { _handleBlurEvent: [{
419
+ type: HostListener,
420
+ args: ['focusout']
421
+ }] } });
422
+
423
+ class FieldNumberDirective extends BaseNumberValueAccessor {
424
+ constructor(el, renderer) {
425
+ super(el, renderer);
426
+ }
427
+ }
428
+ 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 });
429
+ 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: [
430
+ {
431
+ provide: NG_VALUE_ACCESSOR,
432
+ useExisting: FieldNumberDirective,
433
+ multi: true,
434
+ },
435
+ ], usesInheritance: true, ngImport: i0 });
436
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FieldNumberDirective, decorators: [{
437
+ type: Directive,
438
+ args: [{
439
+ selector: 'p-field[type=number]',
440
+ host: {
441
+ '(valueChange)': 'handleChangeEvent($event.detail)',
442
+ },
443
+ providers: [
444
+ {
445
+ provide: NG_VALUE_ACCESSOR,
446
+ useExisting: FieldNumberDirective,
447
+ multi: true,
448
+ },
449
+ ],
450
+ }]
451
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; } });
452
+
393
453
  class PaginationPagesDirective extends BaseValueAccessor {
394
454
  constructor(el) {
395
455
  super(el);
@@ -593,6 +653,7 @@ const DIRECTIVES$1 = [
593
653
  DatepickerDirective,
594
654
  CropperDirective,
595
655
  FieldDirective,
656
+ FieldNumberDirective,
596
657
  RadioDirective,
597
658
  CheckboxDirective,
598
659
  ToggleDirective,
@@ -4681,7 +4742,7 @@ class PaperlessModule {
4681
4742
  }
4682
4743
  }
4683
4744
  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] });
4745
+ 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
4746
  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
4747
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PaperlessModule, decorators: [{
4687
4748
  type: NgModule,
@@ -4701,5 +4762,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
4701
4762
  * Generated bundle index. Do not edit.
4702
4763
  */
4703
4764
 
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 };
4765
+ 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
4766
  //# sourceMappingURL=paperless-angular.mjs.map