@ecodev/natural 45.1.0 → 45.2.0
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.
- package/esm2020/lib/classes/utility.mjs +1 -6
- package/esm2020/lib/modules/common/common-module.mjs +11 -7
- package/esm2020/lib/modules/common/pipes/time-ago.pipe.mjs +138 -0
- package/esm2020/lib/modules/common/public-api.mjs +2 -1
- package/esm2020/lib/modules/dropdown-components/type-select/type-select.component.mjs +2 -2
- package/esm2020/lib/modules/fixed-button-detail/fixed-button-detail.component.mjs +8 -4
- package/esm2020/lib/modules/hierarchic-selector/classes/model-node.mjs +1 -1
- package/esm2020/lib/modules/logger/error-handler.mjs +2 -4
- package/esm2020/lib/modules/stamp/stamp-module.module.mjs +9 -7
- package/esm2020/lib/modules/stamp/stamp.component.mjs +11 -3
- package/esm2020/lib/types/types.mjs +1 -1
- package/fesm2015/ecodev-natural.mjs +176 -31
- package/fesm2015/ecodev-natural.mjs.map +1 -1
- package/fesm2020/ecodev-natural.mjs +172 -31
- package/fesm2020/ecodev-natural.mjs.map +1 -1
- package/lib/classes/utility.d.ts +2 -0
- package/lib/modules/common/common-module.d.ts +9 -8
- package/lib/modules/common/pipes/time-ago.pipe.d.ts +19 -0
- package/lib/modules/common/public-api.d.ts +1 -0
- package/lib/modules/fixed-button-detail/fixed-button-detail.component.d.ts +2 -1
- package/lib/modules/hierarchic-selector/classes/model-node.d.ts +0 -1
- package/lib/modules/stamp/stamp-module.module.d.ts +2 -1
- package/lib/modules/stamp/stamp.component.d.ts +1 -0
- package/lib/types/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@angular/localize/init';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Directive, Component, Inject, Injectable, HostBinding, HostListener, InjectionToken, Input, NgModule, EventEmitter, ChangeDetectionStrategy, Output, ContentChildren, Pipe, TemplateRef, ViewEncapsulation, ViewChild, Injector,
|
|
4
|
-
import { Subject, BehaviorSubject, of, timer, switchMap as switchMap$1, endWith, last, EMPTY, Observable, first as first$1, combineLatest, ReplaySubject, debounceTime as debounceTime$1, raceWith, take as take$1, mergeMap, shareReplay as shareReplay$1, catchError, forkJoin, map as map$1, merge as merge$1, tap as tap$1, asyncScheduler } from 'rxjs';
|
|
3
|
+
import { Directive, Component, Inject, Injectable, HostBinding, HostListener, InjectionToken, Input, NgModule, EventEmitter, ChangeDetectionStrategy, Output, ContentChildren, Pipe, Optional, TemplateRef, ViewEncapsulation, ViewChild, Injector, Self, ContentChild, createEnvironmentInjector, createComponent, PLATFORM_ID, ErrorHandler } from '@angular/core';
|
|
4
|
+
import { Subject, BehaviorSubject, of, timer, switchMap as switchMap$1, endWith, last, EMPTY, Observable, first as first$1, combineLatest, ReplaySubject, debounceTime as debounceTime$1, raceWith, take as take$1, mergeMap, shareReplay as shareReplay$1, catchError, forkJoin, map as map$1, merge as merge$1, tap as tap$1, asyncScheduler, takeUntil as takeUntil$1 } from 'rxjs';
|
|
5
5
|
import * as i3 from '@angular/forms';
|
|
6
6
|
import { FormGroup, FormArray, Validators, UntypedFormGroup, UntypedFormArray, UntypedFormControl, FormsModule, FormControl, FormControlDirective, FormControlName, ReactiveFormsModule } from '@angular/forms';
|
|
7
7
|
import * as i2$1 from '@angular/router';
|
|
@@ -213,11 +213,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
|
|
|
213
213
|
args: ['click']
|
|
214
214
|
}] } });
|
|
215
215
|
|
|
216
|
-
/**
|
|
217
|
-
* Very basic formatting to get only date, without time and ignoring entirely the timezone
|
|
218
|
-
*
|
|
219
|
-
* So something like: "2021-09-23"
|
|
220
|
-
*/
|
|
221
216
|
function formatIsoDate(date) {
|
|
222
217
|
if (!date) {
|
|
223
218
|
return null;
|
|
@@ -4957,14 +4952,151 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
|
|
|
4957
4952
|
type: Input
|
|
4958
4953
|
}] } });
|
|
4959
4954
|
|
|
4960
|
-
|
|
4955
|
+
function isDate(value) {
|
|
4956
|
+
return value instanceof Date && !isNaN(value.valueOf());
|
|
4957
|
+
}
|
|
4958
|
+
/**
|
|
4959
|
+
* Returns a string to approximately describe the date.
|
|
4960
|
+
*
|
|
4961
|
+
* Eg:
|
|
4962
|
+
*
|
|
4963
|
+
* - "il y a quelques minutes"
|
|
4964
|
+
* - "dans 3 jours"
|
|
4965
|
+
* - "dans 3 ans"
|
|
4966
|
+
*/
|
|
4967
|
+
class NaturalTimeAgoPipe {
|
|
4968
|
+
constructor(fakedNow = null) {
|
|
4969
|
+
this.fakedNow = fakedNow;
|
|
4970
|
+
}
|
|
4971
|
+
getNow() {
|
|
4972
|
+
return this.fakedNow ?? Date.now();
|
|
4973
|
+
}
|
|
4974
|
+
transform(date) {
|
|
4975
|
+
if (!date) {
|
|
4976
|
+
return '';
|
|
4977
|
+
}
|
|
4978
|
+
const stamp = isDate(date) ? date.getTime() : Date.parse(date);
|
|
4979
|
+
const now = this.getNow();
|
|
4980
|
+
const $seconds = (stamp - now) / 1000;
|
|
4981
|
+
const minutes = $seconds / 60;
|
|
4982
|
+
const hours = minutes / 60;
|
|
4983
|
+
const days = hours / 24;
|
|
4984
|
+
const weeks = days / 7;
|
|
4985
|
+
const months = days / 31;
|
|
4986
|
+
const years = days / 365;
|
|
4987
|
+
// Find out the best unit to use for display
|
|
4988
|
+
if (years <= -2) {
|
|
4989
|
+
const value = Math.round(Math.abs(years));
|
|
4990
|
+
return $localize `il y a ${value} ans`;
|
|
4991
|
+
}
|
|
4992
|
+
else if (years <= -1) {
|
|
4993
|
+
return $localize `il y a un an`;
|
|
4994
|
+
}
|
|
4995
|
+
else if (months <= -2) {
|
|
4996
|
+
const value = Math.round(Math.abs(months));
|
|
4997
|
+
return $localize `il y a ${value} mois`;
|
|
4998
|
+
}
|
|
4999
|
+
else if (months <= -1) {
|
|
5000
|
+
return $localize `il y a un mois`;
|
|
5001
|
+
}
|
|
5002
|
+
else if (weeks <= -2) {
|
|
5003
|
+
const value = Math.round(Math.abs(weeks));
|
|
5004
|
+
return $localize `il y a ${value} semaines`;
|
|
5005
|
+
}
|
|
5006
|
+
else if (weeks <= -1) {
|
|
5007
|
+
return $localize `il y a une semaine`;
|
|
5008
|
+
}
|
|
5009
|
+
else if (days <= -2) {
|
|
5010
|
+
const value = Math.round(Math.abs(days));
|
|
5011
|
+
return $localize `il y a ${value} jours`;
|
|
5012
|
+
}
|
|
5013
|
+
else if (days <= -1) {
|
|
5014
|
+
return $localize `il y a un jour`;
|
|
5015
|
+
}
|
|
5016
|
+
else if (hours <= -2) {
|
|
5017
|
+
const value = Math.round(Math.abs(hours));
|
|
5018
|
+
return $localize `il y a ${value} heures`;
|
|
5019
|
+
}
|
|
5020
|
+
else if (hours <= -1) {
|
|
5021
|
+
return $localize `il y a une heure`;
|
|
5022
|
+
}
|
|
5023
|
+
else if (minutes <= -5) {
|
|
5024
|
+
const value = Math.round(Math.abs(minutes));
|
|
5025
|
+
return $localize `il y a ${value} minutes`;
|
|
5026
|
+
}
|
|
5027
|
+
else if (minutes <= 0) {
|
|
5028
|
+
return $localize `il y a quelques minutes`;
|
|
5029
|
+
}
|
|
5030
|
+
else if (years > 2) {
|
|
5031
|
+
const value = Math.round(years);
|
|
5032
|
+
return $localize `dans ${value} ans`;
|
|
5033
|
+
}
|
|
5034
|
+
else if (years > 1) {
|
|
5035
|
+
return $localize `dans un an`;
|
|
5036
|
+
}
|
|
5037
|
+
else if (months > 2) {
|
|
5038
|
+
const value = Math.round(months);
|
|
5039
|
+
return $localize `dans ${value} mois`;
|
|
5040
|
+
}
|
|
5041
|
+
else if (months > 1) {
|
|
5042
|
+
return $localize `dans un mois`;
|
|
5043
|
+
}
|
|
5044
|
+
else if (weeks > 2) {
|
|
5045
|
+
const value = Math.round(weeks);
|
|
5046
|
+
return $localize `dans ${value} semaines`;
|
|
5047
|
+
}
|
|
5048
|
+
else if (weeks > 1) {
|
|
5049
|
+
return $localize `dans une semaine`;
|
|
5050
|
+
}
|
|
5051
|
+
else if (days > 2) {
|
|
5052
|
+
const value = Math.round(days);
|
|
5053
|
+
return $localize `dans ${value} jours`;
|
|
5054
|
+
}
|
|
5055
|
+
else if (days > 1) {
|
|
5056
|
+
return $localize `dans un jour`;
|
|
5057
|
+
}
|
|
5058
|
+
else if (hours > 2) {
|
|
5059
|
+
const value = Math.round(hours);
|
|
5060
|
+
return $localize `dans ${value} heures`;
|
|
5061
|
+
}
|
|
5062
|
+
else if (hours > 1) {
|
|
5063
|
+
return $localize `dans une heure`;
|
|
5064
|
+
}
|
|
5065
|
+
else if (minutes > 5) {
|
|
5066
|
+
const value = Math.round(minutes);
|
|
5067
|
+
return $localize `dans ${value} minutes`;
|
|
5068
|
+
}
|
|
5069
|
+
else if (minutes > 0) {
|
|
5070
|
+
return $localize `dans quelques minutes`;
|
|
5071
|
+
}
|
|
5072
|
+
else {
|
|
5073
|
+
throw new Error('Time travelling just happened');
|
|
5074
|
+
}
|
|
5075
|
+
}
|
|
5076
|
+
}
|
|
5077
|
+
NaturalTimeAgoPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalTimeAgoPipe, deps: [{ token: 'SHOULD_NEVER_BE_INJECTED', optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
5078
|
+
NaturalTimeAgoPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: NaturalTimeAgoPipe, name: "timeAgo" });
|
|
5079
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalTimeAgoPipe, decorators: [{
|
|
5080
|
+
type: Pipe,
|
|
5081
|
+
args: [{
|
|
5082
|
+
name: 'timeAgo',
|
|
5083
|
+
}]
|
|
5084
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
5085
|
+
type: Optional
|
|
5086
|
+
}, {
|
|
5087
|
+
type: Inject,
|
|
5088
|
+
args: ['SHOULD_NEVER_BE_INJECTED']
|
|
5089
|
+
}] }]; } });
|
|
5090
|
+
|
|
5091
|
+
const declarationsToExport$1 = [
|
|
4961
5092
|
NaturalCapitalizePipe,
|
|
4962
5093
|
NaturalEllipsisPipe,
|
|
4963
5094
|
NaturalEnumPipe,
|
|
4964
|
-
NaturalSwissDatePipe,
|
|
4965
5095
|
NaturalHttpPrefixDirective,
|
|
4966
|
-
NaturalSrcDensityDirective,
|
|
4967
5096
|
NaturalLinkableTabDirective,
|
|
5097
|
+
NaturalSrcDensityDirective,
|
|
5098
|
+
NaturalSwissDatePipe,
|
|
5099
|
+
NaturalTimeAgoPipe,
|
|
4968
5100
|
];
|
|
4969
5101
|
class NaturalCommonModule {
|
|
4970
5102
|
}
|
|
@@ -4972,23 +5104,25 @@ NaturalCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", vers
|
|
|
4972
5104
|
NaturalCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: NaturalCommonModule, declarations: [NaturalCapitalizePipe,
|
|
4973
5105
|
NaturalEllipsisPipe,
|
|
4974
5106
|
NaturalEnumPipe,
|
|
4975
|
-
NaturalSwissDatePipe,
|
|
4976
5107
|
NaturalHttpPrefixDirective,
|
|
5108
|
+
NaturalLinkableTabDirective,
|
|
4977
5109
|
NaturalSrcDensityDirective,
|
|
4978
|
-
|
|
5110
|
+
NaturalSwissDatePipe,
|
|
5111
|
+
NaturalTimeAgoPipe], imports: [CommonModule, MatFormFieldModule, MatInputModule, MatSelectModule], exports: [NaturalCapitalizePipe,
|
|
4979
5112
|
NaturalEllipsisPipe,
|
|
4980
5113
|
NaturalEnumPipe,
|
|
4981
|
-
NaturalSwissDatePipe,
|
|
4982
5114
|
NaturalHttpPrefixDirective,
|
|
5115
|
+
NaturalLinkableTabDirective,
|
|
4983
5116
|
NaturalSrcDensityDirective,
|
|
4984
|
-
|
|
5117
|
+
NaturalSwissDatePipe,
|
|
5118
|
+
NaturalTimeAgoPipe] });
|
|
4985
5119
|
NaturalCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalCommonModule, providers: [sessionStorageProvider, localStorageProvider], imports: [CommonModule, MatFormFieldModule, MatInputModule, MatSelectModule] });
|
|
4986
5120
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalCommonModule, decorators: [{
|
|
4987
5121
|
type: NgModule,
|
|
4988
5122
|
args: [{
|
|
4989
|
-
declarations: [...declarationsToExport],
|
|
5123
|
+
declarations: [...declarationsToExport$1],
|
|
4990
5124
|
imports: [CommonModule, MatFormFieldModule, MatInputModule, MatSelectModule],
|
|
4991
|
-
exports: [...declarationsToExport],
|
|
5125
|
+
exports: [...declarationsToExport$1],
|
|
4992
5126
|
providers: [sessionStorageProvider, localStorageProvider],
|
|
4993
5127
|
}]
|
|
4994
5128
|
}] });
|
|
@@ -5553,7 +5687,7 @@ class TypeSelectComponent extends NaturalAbstractController {
|
|
|
5553
5687
|
this.items = items;
|
|
5554
5688
|
// Reload selection, according to possible values from configuration
|
|
5555
5689
|
const possibleIds = this.items.map(item => this.getId(item));
|
|
5556
|
-
const wantedAndPossibleIds = wantedIds.filter(id =>
|
|
5690
|
+
const wantedAndPossibleIds = wantedIds.filter(id => possibleIds.some(i => i === id));
|
|
5557
5691
|
return wantedAndPossibleIds;
|
|
5558
5692
|
}));
|
|
5559
5693
|
}
|
|
@@ -8806,13 +8940,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
|
|
|
8806
8940
|
* Public API Surface of natural
|
|
8807
8941
|
*/
|
|
8808
8942
|
|
|
8809
|
-
class NaturalFixedButtonDetailComponent {
|
|
8943
|
+
class NaturalFixedButtonDetailComponent extends NaturalAbstractController {
|
|
8810
8944
|
constructor(route) {
|
|
8945
|
+
super();
|
|
8811
8946
|
this.canChange = true;
|
|
8812
8947
|
this.isCreation = false;
|
|
8813
8948
|
this.create = new EventEmitter();
|
|
8814
8949
|
this.delete = new EventEmitter();
|
|
8815
|
-
route.params.subscribe(() => (this.canChange = true));
|
|
8950
|
+
route.params.pipe(takeUntil$1(this.ngUnsubscribe)).subscribe(() => (this.canChange = true));
|
|
8816
8951
|
}
|
|
8817
8952
|
get model() {
|
|
8818
8953
|
return this._model;
|
|
@@ -8821,6 +8956,7 @@ class NaturalFixedButtonDetailComponent {
|
|
|
8821
8956
|
this._model = value;
|
|
8822
8957
|
if (this.canChange) {
|
|
8823
8958
|
this.isCreation = !this._model.id;
|
|
8959
|
+
this.canChange = false;
|
|
8824
8960
|
}
|
|
8825
8961
|
}
|
|
8826
8962
|
clickCreate() {
|
|
@@ -8835,7 +8971,7 @@ class NaturalFixedButtonDetailComponent {
|
|
|
8835
8971
|
}
|
|
8836
8972
|
}
|
|
8837
8973
|
NaturalFixedButtonDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalFixedButtonDetailComponent, deps: [{ token: i2$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
8838
|
-
NaturalFixedButtonDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalFixedButtonDetailComponent, selector: "natural-fixed-button-detail", inputs: { model: "model", form: "form" }, outputs: { create: "create", delete: "delete" }, ngImport: i0, template: "<natural-fixed-button\n (click)=\"clickCreate()\"\n *ngIf=\"isCreation\"\n [disabled]=\"form.disabled\"\n [color]=\"form.valid ? 'accent' : 'warn'\"\n class=\"detail-speed-dial\"\n icon=\"save\"\n></natural-fixed-button>\n\n<natural-fixed-button\n (click)=\"clickDelete()\"\n *ngIf=\"!isCreation && (!model.permissions || model.permissions.delete)\"\n [disabled]=\"form.disabled\"\n class=\"detail-speed-dial\"\n color=\"warn\"\n icon=\"delete_forever\"\n i18n-matTooltip\n matTooltip=\"Supprimer d\u00E9finitivement\"\n matTooltipPosition=\"left\"\n></natural-fixed-button>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NaturalFixedButtonComponent, selector: "natural-fixed-button", inputs: ["icon", "link", "color", "disabled"] }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
|
|
8974
|
+
NaturalFixedButtonDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalFixedButtonDetailComponent, selector: "natural-fixed-button-detail", inputs: { model: "model", form: "form" }, outputs: { create: "create", delete: "delete" }, usesInheritance: true, ngImport: i0, template: "<natural-fixed-button\n (click)=\"clickCreate()\"\n *ngIf=\"isCreation\"\n [disabled]=\"form.disabled\"\n [color]=\"form.valid ? 'accent' : 'warn'\"\n class=\"detail-speed-dial\"\n icon=\"save\"\n></natural-fixed-button>\n\n<natural-fixed-button\n (click)=\"clickDelete()\"\n *ngIf=\"!isCreation && (!model.permissions || model.permissions.delete)\"\n [disabled]=\"form.disabled\"\n class=\"detail-speed-dial\"\n color=\"warn\"\n icon=\"delete_forever\"\n i18n-matTooltip\n matTooltip=\"Supprimer d\u00E9finitivement\"\n matTooltipPosition=\"left\"\n></natural-fixed-button>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NaturalFixedButtonComponent, selector: "natural-fixed-button", inputs: ["icon", "link", "color", "disabled"] }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
|
|
8839
8975
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalFixedButtonDetailComponent, decorators: [{
|
|
8840
8976
|
type: Component,
|
|
8841
8977
|
args: [{ selector: 'natural-fixed-button-detail', template: "<natural-fixed-button\n (click)=\"clickCreate()\"\n *ngIf=\"isCreation\"\n [disabled]=\"form.disabled\"\n [color]=\"form.valid ? 'accent' : 'warn'\"\n class=\"detail-speed-dial\"\n icon=\"save\"\n></natural-fixed-button>\n\n<natural-fixed-button\n (click)=\"clickDelete()\"\n *ngIf=\"!isCreation && (!model.permissions || model.permissions.delete)\"\n [disabled]=\"form.disabled\"\n class=\"detail-speed-dial\"\n color=\"warn\"\n icon=\"delete_forever\"\n i18n-matTooltip\n matTooltip=\"Supprimer d\u00E9finitivement\"\n matTooltipPosition=\"left\"\n></natural-fixed-button>\n" }]
|
|
@@ -9981,27 +10117,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
|
|
|
9981
10117
|
*/
|
|
9982
10118
|
|
|
9983
10119
|
class NaturalStampComponent {
|
|
10120
|
+
showUpdate() {
|
|
10121
|
+
const same = this.item.updater?.id === this.item.creator?.id &&
|
|
10122
|
+
this.item.updateDate &&
|
|
10123
|
+
this.item.updateDate === this.item.creationDate;
|
|
10124
|
+
return !same && (!!this.item.updateDate || !!this.item.updater);
|
|
10125
|
+
}
|
|
9984
10126
|
}
|
|
9985
10127
|
NaturalStampComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalStampComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9986
|
-
NaturalStampComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalStampComponent, selector: "natural-stamp", inputs: { item: "item" }, ngImport: i0, template: "<ng-container *ngIf=\"item\">\n <div *ngIf=\"item.creationDate || item.creator\">\n <span class=\"mat-body-2\" i18n>Cr\u00E9ation</span>\n :\n <span *ngIf=\"item.creator\">{{ item.creator.fullName || item.creator.name }}</span>\n <span *ngIf=\"item.creator && item.creationDate\">, </span>\n <span *ngIf=\"item.creationDate\"
|
|
10128
|
+
NaturalStampComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalStampComponent, selector: "natural-stamp", inputs: { item: "item" }, ngImport: i0, template: "<ng-container *ngIf=\"item\">\n <div *ngIf=\"item.creationDate || item.creator\">\n <span class=\"mat-body-2\" i18n>Cr\u00E9ation</span>\n :\n <span *ngIf=\"item.creator\">{{ item.creator.fullName || item.creator.name }}</span>\n <span *ngIf=\"item.creator && item.creationDate\">, </span>\n <span *ngIf=\"item.creationDate\">{{ item.creationDate | swissDate }} ({{ item.creationDate | timeAgo }})</span>\n </div>\n\n <div *ngIf=\"showUpdate()\">\n <span class=\"mat-body-2\" i18n>Modification</span>\n :\n <span *ngIf=\"item.updater\">{{ item.updater.fullName || item.updater.name }}</span>\n <span *ngIf=\"item.updater && item.updateDate\">, </span>\n <span *ngIf=\"item.updateDate\">{{ item.updateDate | swissDate }} ({{ item.updateDate | timeAgo }})</span>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: NaturalSwissDatePipe, name: "swissDate" }, { kind: "pipe", type: NaturalTimeAgoPipe, name: "timeAgo" }] });
|
|
9987
10129
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalStampComponent, decorators: [{
|
|
9988
10130
|
type: Component,
|
|
9989
|
-
args: [{ selector: 'natural-stamp', template: "<ng-container *ngIf=\"item\">\n <div *ngIf=\"item.creationDate || item.creator\">\n <span class=\"mat-body-2\" i18n>Cr\u00E9ation</span>\n :\n <span *ngIf=\"item.creator\">{{ item.creator.fullName || item.creator.name }}</span>\n <span *ngIf=\"item.creator && item.creationDate\">, </span>\n <span *ngIf=\"item.creationDate\"
|
|
10131
|
+
args: [{ selector: 'natural-stamp', template: "<ng-container *ngIf=\"item\">\n <div *ngIf=\"item.creationDate || item.creator\">\n <span class=\"mat-body-2\" i18n>Cr\u00E9ation</span>\n :\n <span *ngIf=\"item.creator\">{{ item.creator.fullName || item.creator.name }}</span>\n <span *ngIf=\"item.creator && item.creationDate\">, </span>\n <span *ngIf=\"item.creationDate\">{{ item.creationDate | swissDate }} ({{ item.creationDate | timeAgo }})</span>\n </div>\n\n <div *ngIf=\"showUpdate()\">\n <span class=\"mat-body-2\" i18n>Modification</span>\n :\n <span *ngIf=\"item.updater\">{{ item.updater.fullName || item.updater.name }}</span>\n <span *ngIf=\"item.updater && item.updateDate\">, </span>\n <span *ngIf=\"item.updateDate\">{{ item.updateDate | swissDate }} ({{ item.updateDate | timeAgo }})</span>\n </div>\n</ng-container>\n" }]
|
|
9990
10132
|
}], propDecorators: { item: [{
|
|
9991
10133
|
type: Input
|
|
9992
10134
|
}] } });
|
|
9993
10135
|
|
|
10136
|
+
const declarationsToExport = [NaturalStampComponent];
|
|
9994
10137
|
class NaturalStampModule {
|
|
9995
10138
|
}
|
|
9996
10139
|
NaturalStampModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalStampModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
9997
|
-
NaturalStampModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: NaturalStampModule, declarations: [NaturalStampComponent], imports: [CommonModule], exports: [NaturalStampComponent] });
|
|
9998
|
-
NaturalStampModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalStampModule, imports: [CommonModule] });
|
|
10140
|
+
NaturalStampModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: NaturalStampModule, declarations: [NaturalStampComponent], imports: [CommonModule, NaturalCommonModule], exports: [NaturalStampComponent] });
|
|
10141
|
+
NaturalStampModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalStampModule, imports: [CommonModule, NaturalCommonModule] });
|
|
9999
10142
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalStampModule, decorators: [{
|
|
10000
10143
|
type: NgModule,
|
|
10001
10144
|
args: [{
|
|
10002
|
-
declarations: [
|
|
10003
|
-
imports: [CommonModule],
|
|
10004
|
-
exports: [
|
|
10145
|
+
declarations: [...declarationsToExport],
|
|
10146
|
+
imports: [CommonModule, NaturalCommonModule],
|
|
10147
|
+
exports: [...declarationsToExport],
|
|
10005
10148
|
}]
|
|
10006
10149
|
}] });
|
|
10007
10150
|
|
|
@@ -10895,9 +11038,7 @@ class NaturalErrorHandler extends ErrorHandler {
|
|
|
10895
11038
|
if (this.url) {
|
|
10896
11039
|
this.http
|
|
10897
11040
|
.post(this.url, params, { headers: new HttpHeaders().set('content-type', 'application/json') })
|
|
10898
|
-
.pipe(catchError(() =>
|
|
10899
|
-
return EMPTY;
|
|
10900
|
-
}))
|
|
11041
|
+
.pipe(catchError(() => EMPTY))
|
|
10901
11042
|
.subscribe();
|
|
10902
11043
|
}
|
|
10903
11044
|
}
|
|
@@ -10966,5 +11107,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
|
|
|
10966
11107
|
* Generated bundle index. Do not edit.
|
|
10967
11108
|
*/
|
|
10968
11109
|
|
|
10969
|
-
export { AvatarComponent, AvatarService, FileComponent, IconsConfigService, LOCAL_STORAGE, NATURAL_DROPDOWN_DATA, NATURAL_SEO_CONFIG, NaturalAbstractController, NaturalAbstractDetail, NaturalAbstractEditableList, NaturalAbstractList, NaturalAbstractModelService, NaturalAbstractNavigableList, NaturalAbstractPanel, NaturalAlertModule, NaturalAlertService, NaturalAvatarModule, NaturalCapitalizePipe, NaturalColumnsPickerColumnDirective, NaturalColumnsPickerComponent, NaturalColumnsPickerModule, NaturalCommonModule, NaturalConfirmComponent, NaturalDataSource, NaturalDebounceService, NaturalDetailHeaderComponent, NaturalDetailHeaderModule, NaturalDialogTriggerComponent, NaturalDialogTriggerModule, NaturalDropdownComponentsModule, NaturalDropdownRef, NaturalEllipsisPipe, NaturalEnumPipe, NaturalEnumService, NaturalErrorHandler, NaturalErrorModule, NaturalFileDropDirective, NaturalFileModule, NaturalFileSelectDirective, NaturalFileService, NaturalFixedButtonComponent, NaturalFixedButtonDetailComponent, NaturalFixedButtonDetailModule, NaturalFixedButtonModule, NaturalHierarchicSelectorComponent, NaturalHierarchicSelectorDialogComponent, NaturalHierarchicSelectorDialogService, NaturalHierarchicSelectorModule, NaturalHierarchicSelectorService, NaturalHttpPrefixDirective, NaturalIconComponent, NaturalIconModule, NaturalLinkMutationService, NaturalLinkableTabDirective, NaturalLoggerConfigExtra, NaturalLoggerConfigUrl, NaturalMatomoModule, NaturalMatomoService, NaturalMemoryStorage, NaturalPanelsComponent, NaturalPanelsModule, NaturalPanelsService, NaturalPersistenceService, NaturalQueryVariablesManager, NaturalRelationsComponent, NaturalRelationsModule, NaturalSearchComponent, NaturalSearchModule, NaturalSelectComponent, NaturalSelectEnumComponent, NaturalSelectHierarchicComponent, NaturalSelectModule, NaturalSeoService, NaturalSidenavComponent, NaturalSidenavContainerComponent, NaturalSidenavContentComponent, NaturalSidenavModule, NaturalSidenavService, NaturalSidenavStackService, NaturalSrcDensityDirective, NaturalStampComponent, NaturalStampModule, NaturalSwissDatePipe, NaturalSwissParsingDateAdapter, NaturalTableButtonComponent, NaturalTableButtonModule, PanelsHooksConfig, SESSION_STORAGE, SortingOrder, TypeDateComponent, TypeDateRangeComponent, TypeHierarchicSelectorComponent, TypeNaturalSelectComponent, TypeNumberComponent, TypeSelectComponent, TypeTextComponent, available, cancellableTimeout, cleanSameValues, collectErrors, copyToClipboard, debug, decimal, deepFreeze, deliverableEmail, ensureHttpPrefix, fallbackIfNoOpenedPanels, formatIsoDate, formatIsoDateTime, fromUrl, getForegroundColor, hasFilesAndProcessDate, ifValid, integer, localStorageFactory, localStorageProvider, lowerCaseFirstLetter, makePlural, memoryLocalStorageProvider, memorySessionStorageProvider, mergeOverrideArray, money, naturalPanelsUrlMatcher, relationsToIds, replaceObjectKeepingReference, replaceOperatorByField, replaceOperatorByName, sessionStorageFactory, sessionStorageProvider, toGraphQLDoctrineFilter, toNavigationParameters, toUrl, unique, upperCaseFirstLetter, urlValidator, validTlds, validateAllFormControls, wrapLike };
|
|
11110
|
+
export { AvatarComponent, AvatarService, FileComponent, IconsConfigService, LOCAL_STORAGE, NATURAL_DROPDOWN_DATA, NATURAL_SEO_CONFIG, NaturalAbstractController, NaturalAbstractDetail, NaturalAbstractEditableList, NaturalAbstractList, NaturalAbstractModelService, NaturalAbstractNavigableList, NaturalAbstractPanel, NaturalAlertModule, NaturalAlertService, NaturalAvatarModule, NaturalCapitalizePipe, NaturalColumnsPickerColumnDirective, NaturalColumnsPickerComponent, NaturalColumnsPickerModule, NaturalCommonModule, NaturalConfirmComponent, NaturalDataSource, NaturalDebounceService, NaturalDetailHeaderComponent, NaturalDetailHeaderModule, NaturalDialogTriggerComponent, NaturalDialogTriggerModule, NaturalDropdownComponentsModule, NaturalDropdownRef, NaturalEllipsisPipe, NaturalEnumPipe, NaturalEnumService, NaturalErrorHandler, NaturalErrorModule, NaturalFileDropDirective, NaturalFileModule, NaturalFileSelectDirective, NaturalFileService, NaturalFixedButtonComponent, NaturalFixedButtonDetailComponent, NaturalFixedButtonDetailModule, NaturalFixedButtonModule, NaturalHierarchicSelectorComponent, NaturalHierarchicSelectorDialogComponent, NaturalHierarchicSelectorDialogService, NaturalHierarchicSelectorModule, NaturalHierarchicSelectorService, NaturalHttpPrefixDirective, NaturalIconComponent, NaturalIconModule, NaturalLinkMutationService, NaturalLinkableTabDirective, NaturalLoggerConfigExtra, NaturalLoggerConfigUrl, NaturalMatomoModule, NaturalMatomoService, NaturalMemoryStorage, NaturalPanelsComponent, NaturalPanelsModule, NaturalPanelsService, NaturalPersistenceService, NaturalQueryVariablesManager, NaturalRelationsComponent, NaturalRelationsModule, NaturalSearchComponent, NaturalSearchModule, NaturalSelectComponent, NaturalSelectEnumComponent, NaturalSelectHierarchicComponent, NaturalSelectModule, NaturalSeoService, NaturalSidenavComponent, NaturalSidenavContainerComponent, NaturalSidenavContentComponent, NaturalSidenavModule, NaturalSidenavService, NaturalSidenavStackService, NaturalSrcDensityDirective, NaturalStampComponent, NaturalStampModule, NaturalSwissDatePipe, NaturalSwissParsingDateAdapter, NaturalTableButtonComponent, NaturalTableButtonModule, NaturalTimeAgoPipe, PanelsHooksConfig, SESSION_STORAGE, SortingOrder, TypeDateComponent, TypeDateRangeComponent, TypeHierarchicSelectorComponent, TypeNaturalSelectComponent, TypeNumberComponent, TypeSelectComponent, TypeTextComponent, available, cancellableTimeout, cleanSameValues, collectErrors, copyToClipboard, debug, decimal, deepFreeze, deliverableEmail, ensureHttpPrefix, fallbackIfNoOpenedPanels, formatIsoDate, formatIsoDateTime, fromUrl, getForegroundColor, hasFilesAndProcessDate, ifValid, integer, localStorageFactory, localStorageProvider, lowerCaseFirstLetter, makePlural, memoryLocalStorageProvider, memorySessionStorageProvider, mergeOverrideArray, money, naturalPanelsUrlMatcher, relationsToIds, replaceObjectKeepingReference, replaceOperatorByField, replaceOperatorByName, sessionStorageFactory, sessionStorageProvider, toGraphQLDoctrineFilter, toNavigationParameters, toUrl, unique, upperCaseFirstLetter, urlValidator, validTlds, validateAllFormControls, wrapLike };
|
|
10970
11111
|
//# sourceMappingURL=ecodev-natural.mjs.map
|