@paperless/angular 0.1.0-alpha.208 → 0.1.0-alpha.209

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.
@@ -1656,6 +1656,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
1656
1656
  inputs: ['enableHover', 'variant']
1657
1657
  }]
1658
1658
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
1659
+ let PToast = class PToast {
1660
+ constructor(c, r, z) {
1661
+ this.z = z;
1662
+ c.detach();
1663
+ this.el = r.nativeElement;
1664
+ proxyOutputs(this, this.el, ['action']);
1665
+ }
1666
+ };
1667
+ PToast.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PToast, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
1668
+ PToast.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: PToast, selector: "p-toast", inputs: { actionIcon: "actionIcon", actionIconFlip: "actionIconFlip", actionIconRotate: "actionIconRotate", content: "content", enableAction: "enableAction", header: "header", variant: "variant" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1669
+ PToast = __decorate([
1670
+ ProxyCmp({
1671
+ defineCustomElementFn: undefined,
1672
+ inputs: ['actionIcon', 'actionIconFlip', 'actionIconRotate', 'content', 'enableAction', 'header', 'variant']
1673
+ })
1674
+ ], PToast);
1675
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PToast, decorators: [{
1676
+ type: Component,
1677
+ args: [{
1678
+ selector: 'p-toast',
1679
+ changeDetection: ChangeDetectionStrategy.OnPush,
1680
+ template: '<ng-content></ng-content>',
1681
+ inputs: ['actionIcon', 'actionIconFlip', 'actionIconRotate', 'content', 'enableAction', 'header', 'variant']
1682
+ }]
1683
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
1659
1684
  let PTooltip = class PTooltip {
1660
1685
  constructor(c, r, z) {
1661
1686
  this.z = z;
@@ -2729,13 +2754,14 @@ const DIRECTIVES = [
2729
2754
  PTableFooter,
2730
2755
  PTableHeader,
2731
2756
  PTableRow,
2757
+ PToast,
2732
2758
  PTooltip
2733
2759
  ];
2734
2760
 
2735
2761
  class StencilModule {
2736
2762
  }
2737
2763
  StencilModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: StencilModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2738
- StencilModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: StencilModule, declarations: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLabel, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSelect, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTableContainer, PTableFooter, PTableHeader, PTableRow, PTooltip], exports: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLabel, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSelect, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTableContainer, PTableFooter, PTableHeader, PTableRow, PTooltip] });
2764
+ StencilModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: StencilModule, declarations: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLabel, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSelect, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTableContainer, PTableFooter, PTableHeader, PTableRow, PToast, PTooltip], exports: [PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIcon, PIllustration, PInfoPanel, PInputGroup, PLabel, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSelect, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTableContainer, PTableFooter, PTableHeader, PTableRow, PToast, PTooltip] });
2739
2765
  StencilModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: StencilModule });
2740
2766
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: StencilModule, decorators: [{
2741
2767
  type: NgModule,
@@ -2822,63 +2848,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
2822
2848
  }]
2823
2849
  }] });
2824
2850
 
2825
- let Toast = class Toast {
2826
- constructor(c, r, z) {
2827
- this.z = z;
2851
+ class ToastDirective {
2852
+ constructor() {
2828
2853
  this.delay = 5000;
2829
2854
  this.index = 0;
2830
2855
  this.dismissOnAction = true;
2831
2856
  this.dismiss = new EventEmitter();
2832
- c.detach();
2833
- this.el = r.nativeElement;
2834
- proxyOutputs(this, this.el, ['action']);
2835
2857
  }
2836
2858
  ngOnInit() {
2837
- if (this.dismissOnAction) {
2838
- this.el.addEventListener('action', () => this.doDismiss());
2839
- }
2840
2859
  if (this.delay === 'infinite' || this.delay === 0) {
2841
2860
  return;
2842
2861
  }
2843
2862
  setTimeout(() => this.doDismiss(), this.delay);
2844
2863
  }
2864
+ onAction() {
2865
+ if (this.dismissOnAction) {
2866
+ this.doDismiss();
2867
+ }
2868
+ }
2845
2869
  doDismiss() {
2846
2870
  this.dismiss.next(this.index);
2847
2871
  }
2848
- };
2849
- Toast.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: Toast, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
2850
- Toastcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: Toast, selector: "p-toast", inputs: { actionIcon: "actionIcon", actionIconFlip: "actionIconFlip", actionIconRotate: "actionIconRotate", content: "content", enableAction: "enableAction", header: "header", variant: "variant", delay: "delay", index: "index", dismissOnAction: "dismissOnAction" }, outputs: { dismiss: "dismiss" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2851
- Toast = __decorate([
2852
- ProxyCmp({
2853
- defineCustomElementFn: undefined,
2854
- inputs: [
2855
- 'actionIcon',
2856
- 'actionIconFlip',
2857
- 'actionIconRotate',
2858
- 'content',
2859
- 'enableAction',
2860
- 'header',
2861
- 'variant',
2862
- ],
2863
- })
2864
- ], Toast);
2865
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: Toast, decorators: [{
2866
- type: Component,
2872
+ }
2873
+ ToastDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ToastDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2874
+ ToastDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: ToastDirective, selector: "p-toast", inputs: { delay: "delay", index: "index", dismissOnAction: "dismissOnAction" }, outputs: { dismiss: "dismiss" }, host: { listeners: { "action": "onAction()" } }, ngImport: i0 });
2875
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ToastDirective, decorators: [{
2876
+ type: Directive,
2867
2877
  args: [{
2868
2878
  selector: 'p-toast',
2869
- changeDetection: ChangeDetectionStrategy.OnPush,
2870
- template: '<ng-content></ng-content>',
2871
- inputs: [
2872
- 'actionIcon',
2873
- 'actionIconFlip',
2874
- 'actionIconRotate',
2875
- 'content',
2876
- 'enableAction',
2877
- 'header',
2878
- 'variant',
2879
- ],
2879
+ host: {
2880
+ '(action)': 'onAction()',
2881
+ },
2880
2882
  }]
2881
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { delay: [{
2883
+ }], propDecorators: { delay: [{
2882
2884
  type: Input
2883
2885
  }], index: [{
2884
2886
  type: Input
@@ -2895,13 +2897,15 @@ let ToastContainer = class ToastContainer {
2895
2897
  this._toastService = _toastService;
2896
2898
  this.toasts$ = this._toastService.toasts$;
2897
2899
  this.el = r.nativeElement;
2900
+ console.log('Toast container created!');
2901
+ this.toasts$.subscribe((toasts) => console.log('Toasts updated', toasts.length));
2898
2902
  }
2899
2903
  dismiss(index) {
2900
2904
  this._toastService.hide(index);
2901
2905
  }
2902
2906
  };
2903
2907
  ToastContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ToastContainer, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Component });
2904
- ToastContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: ToastContainer, selector: "p-toast-container", inputs: { placement: "placement" }, ngImport: i0, template: "<p-toast\n *ngFor=\"let toast of toasts$ | async; let index = index\"\n [variant]=\"toast.variant\"\n [header]=\"toast.header\"\n [content]=\"toast.content\"\n [index]=\"index\"\n [delay]=\"toast.options.delay ?? 5000\"\n [dismissOnAction]=\"toast.options.dismissOnAction ?? true\"\n [enableAction]=\"toast.options.enableAction\"\n [actionIcon]=\"toast.options.icon?.variant\"\n [actionIconFlip]=\"toast.options.icon?.flip\"\n [actionIconRotate]=\"toast.options.icon?.rotate\"\n (dismiss)=\"dismiss($event)\"\n [@pSlideInBottomOutTop]\n></p-toast>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: Toast, selector: "p-toast", inputs: ["actionIcon", "actionIconFlip", "actionIconRotate", "content", "enableAction", "header", "variant", "delay", "index", "dismissOnAction"], outputs: ["dismiss"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], animations: [SLIDE_IN_BOTTOM_OUT_TOP], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2908
+ ToastContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: ToastContainer, selector: "p-toast-container", inputs: { placement: "placement" }, ngImport: i0, template: "<p-toast\n *ngFor=\"let toast of toasts$ | async; let index = index\"\n [variant]=\"toast.variant\"\n [header]=\"toast.header\"\n [content]=\"toast.content\"\n [index]=\"index\"\n [delay]=\"toast.options.delay ?? 5000\"\n [dismissOnAction]=\"toast.options.dismissOnAction ?? true\"\n [enableAction]=\"toast.options.enableAction\"\n [actionIcon]=\"toast.options.icon?.variant\"\n [actionIconFlip]=\"toast.options.icon?.flip\"\n [actionIconRotate]=\"toast.options.icon?.rotate\"\n (dismiss)=\"dismiss($event)\"\n [@pSlideInBottomOutTop]\n></p-toast>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PToast, selector: "p-toast", inputs: ["actionIcon", "actionIconFlip", "actionIconRotate", "content", "enableAction", "header", "variant"] }, { kind: "directive", type: ToastDirective, selector: "p-toast", inputs: ["delay", "index", "dismissOnAction"], outputs: ["dismiss"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], animations: [SLIDE_IN_BOTTOM_OUT_TOP], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2905
2909
  ToastContainer = __decorate([
2906
2910
  ProxyCmp({
2907
2911
  defineCustomElementFn: undefined,
@@ -2913,21 +2917,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
2913
2917
  args: [{ selector: 'p-toast-container', changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['placement'], animations: [SLIDE_IN_BOTTOM_OUT_TOP], template: "<p-toast\n *ngFor=\"let toast of toasts$ | async; let index = index\"\n [variant]=\"toast.variant\"\n [header]=\"toast.header\"\n [content]=\"toast.content\"\n [index]=\"index\"\n [delay]=\"toast.options.delay ?? 5000\"\n [dismissOnAction]=\"toast.options.dismissOnAction ?? true\"\n [enableAction]=\"toast.options.enableAction\"\n [actionIcon]=\"toast.options.icon?.variant\"\n [actionIconFlip]=\"toast.options.icon?.flip\"\n [actionIconRotate]=\"toast.options.icon?.rotate\"\n (dismiss)=\"dismiss($event)\"\n [@pSlideInBottomOutTop]\n></p-toast>\n" }]
2914
2918
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: ToastService }]; } });
2915
2919
 
2916
- const TOAST_COMPONENTS = [Toast, ToastContainer];
2920
+ const TOAST_COMPONENTS = [ToastContainer];
2921
+
2922
+ const TOAST_DIRECTIVES = [ToastDirective];
2917
2923
 
2918
2924
  const TOAST_SERVICES = [ToastService];
2919
2925
 
2920
2926
  class ToastModule {
2921
2927
  }
2922
2928
  ToastModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ToastModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2923
- ToastModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: ToastModule, declarations: [Toast, ToastContainer], imports: [CommonModule, StencilModule], exports: [Toast, ToastContainer] });
2929
+ ToastModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: ToastModule, declarations: [ToastContainer, ToastDirective], imports: [CommonModule, StencilModule], exports: [ToastContainer, ToastDirective] });
2924
2930
  ToastModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ToastModule, providers: [...TOAST_SERVICES], imports: [CommonModule, StencilModule] });
2925
2931
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ToastModule, decorators: [{
2926
2932
  type: NgModule,
2927
2933
  args: [{
2928
2934
  imports: [CommonModule, StencilModule],
2929
- declarations: [...TOAST_COMPONENTS],
2930
- exports: [...TOAST_COMPONENTS],
2935
+ declarations: [...TOAST_COMPONENTS, ...TOAST_DIRECTIVES],
2936
+ exports: [...TOAST_COMPONENTS, ...TOAST_DIRECTIVES],
2931
2937
  providers: [...TOAST_SERVICES],
2932
2938
  }]
2933
2939
  }] });
@@ -3024,5 +3030,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImpor
3024
3030
  * Generated bundle index. Do not edit.
3025
3031
  */
3026
3032
 
3027
- export { BaseTableComponent, BaseUploadComponent, BaseValueAccessor, CustomCurrencyPipe, CustomDatePipe, DIRECTIVES$1 as DIRECTIVES, FormBaseComponent, MODULES, PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIPES, PIcon, PIllustration, PInfoPanel, PInputGroup, PLabel, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSelect, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTableContainer, PTableFooter, PTableHeader, PTableRow, PTooltip, PageSizeSelectDirective, PaginationDirective, PaperlessModule, SafePipe, SelectDirective, StencilModule, TABLE_COMPONENTS, TABLE_DIRECTIVES, TOAST_COMPONENTS, TOAST_SERVICES, Table, TableCell, TableColumn, TableDirective, TableFooterDirective, TableHeaderDirective, TableModule, TableNgxDirective, Toast, ToastContainer, ToastModule, ToastService, ToastVariants };
3033
+ export { BaseTableComponent, BaseUploadComponent, BaseValueAccessor, CustomCurrencyPipe, CustomDatePipe, DIRECTIVES$1 as DIRECTIVES, FormBaseComponent, MODULES, PAccordion, PAvatar, PAvatarGroup, PButton, PCardBody, PCardContainer, PCardHeader, PContentSlider, PCounter, PDivider, PDropdown, PDropdownMenuContainer, PDropdownMenuItem, PHelper, PIPES, PIcon, PIllustration, PInfoPanel, PInputGroup, PLabel, PLayout, PLoader, PModal, PModalBackdrop, PModalBody, PModalContainer, PModalFooter, PModalHeader, PNavbar, PNavigationItem, PPageSizeSelect, PPagination, PPaginationItem, PProfile, PSegmentContainer, PSegmentItem, PSelect, PSliderIndicator, PStatus, PStepper, PStepperItem, PStepperLine, PTabGroup, PTabItem, PTableContainer, PTableFooter, PTableHeader, PTableRow, PToast, PTooltip, PageSizeSelectDirective, PaginationDirective, PaperlessModule, SafePipe, SelectDirective, StencilModule, TABLE_COMPONENTS, TABLE_DIRECTIVES, TOAST_COMPONENTS, TOAST_DIRECTIVES, TOAST_SERVICES, Table, TableCell, TableColumn, TableDirective, TableFooterDirective, TableHeaderDirective, TableModule, TableNgxDirective, ToastContainer, ToastDirective, ToastModule, ToastService, ToastVariants };
3028
3034
  //# sourceMappingURL=paperless-angular.mjs.map