@esfaenza/utility-components 11.2.8 → 13.3.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/esfaenza-utility-components.d.ts +1 -0
- package/esm2020/lib/components/currency-span/currency-span.component.mjs +34 -0
- package/esm2020/lib/components/shorten-span/shorten-span.component.mjs +51 -0
- package/esm2020/lib/components/simple-dropdown/simple-dropdown.component.mjs +34 -0
- package/esm2020/lib/components/status-badge/status-badge.component.mjs +49 -0
- package/esm2020/lib/utility-components.module.mjs +69 -0
- package/fesm2015/esfaenza-utility-components.mjs +246 -0
- package/fesm2015/esfaenza-utility-components.mjs.map +1 -0
- package/fesm2020/esfaenza-utility-components.mjs +245 -0
- package/fesm2020/esfaenza-utility-components.mjs.map +1 -0
- package/lib/components/currency-span/currency-span.component.d.ts +3 -0
- package/lib/components/shorten-span/shorten-span.component.d.ts +3 -0
- package/lib/components/simple-dropdown/simple-dropdown.component.d.ts +3 -0
- package/lib/components/status-badge/status-badge.component.d.ts +3 -0
- package/lib/utility-components.module.d.ts +13 -0
- package/package.json +22 -10
- package/bundles/esfaenza-utility-components.umd.js +0 -236
- package/bundles/esfaenza-utility-components.umd.js.map +0 -1
- package/bundles/esfaenza-utility-components.umd.min.js +0 -2
- package/bundles/esfaenza-utility-components.umd.min.js.map +0 -1
- package/esfaenza-utility-components.metadata.json +0 -1
- package/esm2015/lib/components/currency-span/currency-span.component.js +0 -32
- package/esm2015/lib/components/shorten-span/shorten-span.component.js +0 -54
- package/esm2015/lib/components/simple-dropdown/simple-dropdown.component.js +0 -32
- package/esm2015/lib/components/status-badge/status-badge.component.js +0 -41
- package/esm2015/lib/utility-components.module.js +0 -48
- package/fesm2015/esfaenza-utility-components.js +0 -218
- package/fesm2015/esfaenza-utility-components.js.map +0 -1
- /package/{esm2015/esfaenza-utility-components.js → esm2020/esfaenza-utility-components.mjs} +0 -0
- /package/{esm2015/lib/models/DropdownOption.js → esm2020/lib/models/DropdownOption.mjs} +0 -0
- /package/{esm2015/lib/models/UtilityComponentsModuleConfig.js → esm2020/lib/models/UtilityComponentsModuleConfig.mjs} +0 -0
- /package/{esm2015/lib/tokens.js → esm2020/lib/tokens.mjs} +0 -0
- /package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Component, Input, ViewEncapsulation, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1$1 from 'ngx-toastr';
|
|
6
|
+
import { ToastrModule } from 'ngx-toastr';
|
|
7
|
+
import * as i2 from '@esfaenza/extensions';
|
|
8
|
+
import { FullExtensionsModule } from '@esfaenza/extensions';
|
|
9
|
+
import * as i4 from '@angular/material/tooltip';
|
|
10
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
11
|
+
import * as i1$2 from '@angular/material/menu';
|
|
12
|
+
import { MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
|
|
13
|
+
|
|
14
|
+
/** Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US" */
|
|
15
|
+
const UCCO_LOCALE = new InjectionToken('UCCO_LOCALE');
|
|
16
|
+
/** Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US" */
|
|
17
|
+
const UCCO_DEBUG_MODE = new InjectionToken('UCCO_DEBUG_MODE');
|
|
18
|
+
|
|
19
|
+
// Angular
|
|
20
|
+
/** Questo componente rappresenta un elemento span che formatta automaticamente un **CurrencyValue** in base al suo **CurrencyType** */
|
|
21
|
+
class CurrencySpanComponent {
|
|
22
|
+
constructor() {
|
|
23
|
+
/** Tipo in base al quale formattare il valore **CurrencyValue** */
|
|
24
|
+
this.CurrencyType = CurrencyType.EMPTY;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
CurrencySpanComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CurrencySpanComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
28
|
+
CurrencySpanComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CurrencySpanComponent, selector: "currency-span", inputs: { CurrencyValue: "CurrencyValue", CurrencyType: "CurrencyType" }, ngImport: i0, template: "<span [class.text-info]=\"CurrencyValue == 0\"\r\n [class.text-success]=\"CurrencyValue > 0\"\r\n [class.text-danger]=\"CurrencyValue < 0\">\r\n {{CurrencyValue ? (CurrencyValue | currency:'':'':'1.2-2':'it') : '0,00'}} {{CurrencyType}}\r\n</span>", pipes: { "currency": i1.CurrencyPipe } });
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CurrencySpanComponent, decorators: [{
|
|
30
|
+
type: Component,
|
|
31
|
+
args: [{ selector: "currency-span", template: "<span [class.text-info]=\"CurrencyValue == 0\"\r\n [class.text-success]=\"CurrencyValue > 0\"\r\n [class.text-danger]=\"CurrencyValue < 0\">\r\n {{CurrencyValue ? (CurrencyValue | currency:'':'':'1.2-2':'it') : '0,00'}} {{CurrencyType}}\r\n</span>" }]
|
|
32
|
+
}], propDecorators: { CurrencyValue: [{
|
|
33
|
+
type: Input
|
|
34
|
+
}], CurrencyType: [{
|
|
35
|
+
type: Input
|
|
36
|
+
}] } });
|
|
37
|
+
/**
|
|
38
|
+
* @ignore
|
|
39
|
+
* Al momento non serve assolutamente a niente, ma per espandere eventualmente
|
|
40
|
+
* il componente in futuro lo lascio qui che schifo non fa.
|
|
41
|
+
*/
|
|
42
|
+
var CurrencyType;
|
|
43
|
+
(function (CurrencyType) {
|
|
44
|
+
CurrencyType["EUR"] = "\u20AC";
|
|
45
|
+
CurrencyType["USD"] = "$";
|
|
46
|
+
CurrencyType["CAD"] = "$";
|
|
47
|
+
CurrencyType["EMPTY"] = "";
|
|
48
|
+
})(CurrencyType || (CurrencyType = {}));
|
|
49
|
+
|
|
50
|
+
// Angular
|
|
51
|
+
/** Questo componente rappresenta un elemento span che tronca un **Text** in base ad una **MaxLength** */
|
|
52
|
+
class ShortenSpanComponent {
|
|
53
|
+
/** @ignore */
|
|
54
|
+
constructor(toastrService, clipboardService) {
|
|
55
|
+
this.toastrService = toastrService;
|
|
56
|
+
this.clipboardService = clipboardService;
|
|
57
|
+
/** Mostra **Text** con stile grassetto */
|
|
58
|
+
this.Bold = false;
|
|
59
|
+
/** Lunghezza massima del testo, prima di venire troncato */
|
|
60
|
+
this.MaxLength = 999;
|
|
61
|
+
/** Abilita la possibilita di copiare **Text** col tasto sinistro del mouse */
|
|
62
|
+
this.ClipboardCopy = false;
|
|
63
|
+
/** Testo da mostrare nel tooltip di material, quando ha valore diverso da null */
|
|
64
|
+
this.ShowTooltip = null;
|
|
65
|
+
}
|
|
66
|
+
/** @ignore */
|
|
67
|
+
ngOnInit() {
|
|
68
|
+
this.ShowTooltip = this.Text?.length >= this.MaxLength ? this.Text : null;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Copia un valore nella clipboard
|
|
72
|
+
*
|
|
73
|
+
* @param {string} value Valore da copiare nella clipboard
|
|
74
|
+
*/
|
|
75
|
+
copyToClipboard(value) {
|
|
76
|
+
this.clipboardService.copyTextToClipboard(value);
|
|
77
|
+
this.toastrService.info('Testo copiato!', null, { positionClass: 'toast-top-center' });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
ShortenSpanComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ShortenSpanComponent, deps: [{ token: i1$1.ToastrService }, { token: i2.ClipboardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
81
|
+
ShortenSpanComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ShortenSpanComponent, selector: "shorten-span", inputs: { Bold: "Bold", Text: "Text", MaxLength: "MaxLength", ClipboardCopy: "ClipboardCopy" }, ngImport: i0, template: "<span [class.utils-copy]=\"ClipboardCopy\" (click)=\"ClipboardCopy ? copyToClipboard(Text) : null\" *ngIf=\"Text\" [class.utils-bold]=\"Bold\" [matTooltip]=\"ShowTooltip\">\r\n {{Text.length > MaxLength + 3 ? Text.substr(0, MaxLength) + \"...\" : Text}}\r\n</span>", styles: [".utils-pointer{cursor:pointer}.utils-copy{cursor:copy}.utils-bold{font-weight:700}.utils-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}::ng-deep .mat-tooltip{font-size:16px}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ShortenSpanComponent, decorators: [{
|
|
83
|
+
type: Component,
|
|
84
|
+
args: [{ selector: "shorten-span", template: "<span [class.utils-copy]=\"ClipboardCopy\" (click)=\"ClipboardCopy ? copyToClipboard(Text) : null\" *ngIf=\"Text\" [class.utils-bold]=\"Bold\" [matTooltip]=\"ShowTooltip\">\r\n {{Text.length > MaxLength + 3 ? Text.substr(0, MaxLength) + \"...\" : Text}}\r\n</span>", styles: [".utils-pointer{cursor:pointer}.utils-copy{cursor:copy}.utils-bold{font-weight:700}.utils-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}::ng-deep .mat-tooltip{font-size:16px}\n"] }]
|
|
85
|
+
}], ctorParameters: function () { return [{ type: i1$1.ToastrService }, { type: i2.ClipboardService }]; }, propDecorators: { Bold: [{
|
|
86
|
+
type: Input
|
|
87
|
+
}], Text: [{
|
|
88
|
+
type: Input
|
|
89
|
+
}], MaxLength: [{
|
|
90
|
+
type: Input
|
|
91
|
+
}], ClipboardCopy: [{
|
|
92
|
+
type: Input
|
|
93
|
+
}] } });
|
|
94
|
+
|
|
95
|
+
// Angular
|
|
96
|
+
/**
|
|
97
|
+
* Questo componente serve a mostrare un badge di stato, con un testo **Status**.
|
|
98
|
+
* Colorato in base a condizioni di **Info**, **Success**, **Warning** o **Danger**
|
|
99
|
+
*/
|
|
100
|
+
class StatusBadgeComponent {
|
|
101
|
+
constructor() {
|
|
102
|
+
/** Dimensione del badge, in valore numerico (1 = 100%) */
|
|
103
|
+
this.Zoom = 1;
|
|
104
|
+
/** Valore dello stile 'top' del badge */
|
|
105
|
+
this.Top = "20px";
|
|
106
|
+
/** Valore dello stile 'right' del badge */
|
|
107
|
+
this.Right = "0px";
|
|
108
|
+
}
|
|
109
|
+
ngOnInit() {
|
|
110
|
+
this.Info = this.Level == "Info";
|
|
111
|
+
this.Warning = this.Level == "Warning";
|
|
112
|
+
this.Success = this.Level == "Success";
|
|
113
|
+
this.Danger = this.Level == "Danger";
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
StatusBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: StatusBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
+
StatusBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: StatusBadgeComponent, selector: "status-badge", inputs: { Status: "Status", Zoom: "Zoom", Top: "Top", Right: "Right", Level: "Level", Info: "Info", Warning: "Warning", Success: "Success", Danger: "Danger" }, ngImport: i0, template: "<div class=\"status-badge-container utils-no-selection\" [style.margin-top]=\"Top\" [style.margin-right]=\"Right\" [style.zoom]=\"Zoom\" [style.-moz-transform]=\"'scale(' + Zoom + ')'\">\r\n <span class=\"status-badge\"\r\n [class.status-badge-info]=\"Info\"\r\n [class.status-badge-warning]=\"Warning\"\r\n [class.status-badge-success]=\"Success\"\r\n [class.status-badge-danger]=\"Danger\">\r\n <i style=\"font-size: 18px;\"\r\n class=\"fa\" \r\n [class.fa-info-circle]=\"Info\" \r\n [class.fa-exclamation-circle]=\"Warning\" \r\n [class.fa-check-circle]=\"Success\" \r\n [class.fa-times-circle]=\"Danger\" \r\n \r\n >\r\n </i>\r\n <span *ngIf=\"Status\" \r\n class=\"ml-2 app-bold\"\r\n [class.text-info]=\"Info\"\r\n [class.text-warning]=\"Warning\"\r\n [class.text-success]=\"Success\"\r\n [class.text-danger]=\"Danger\">\r\n {{Status.toUpperCase()}}\r\n </span>\r\n </span>\r\n</div>", styles: [".utils-pointer{cursor:pointer}.utils-copy{cursor:copy}.utils-bold{font-weight:700}.utils-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}::ng-deep .mat-tooltip{font-size:16px}.status-badge-container{position:absolute;right:0;margin-right:15px;top:0;white-space:nowrap}.status-badge{height:30px;padding:5px 10px;font-size:16px;line-height:20px;border-radius:5px}.status-badge-info{border:3px solid;color:#248dad}.status-badge-warning{border:3px solid;color:#f79a17}.status-badge-success{border:3px solid;color:#2d922d}.status-badge-danger{border:3px solid;color:#bf1725}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: StatusBadgeComponent, decorators: [{
|
|
119
|
+
type: Component,
|
|
120
|
+
args: [{ selector: "status-badge", template: "<div class=\"status-badge-container utils-no-selection\" [style.margin-top]=\"Top\" [style.margin-right]=\"Right\" [style.zoom]=\"Zoom\" [style.-moz-transform]=\"'scale(' + Zoom + ')'\">\r\n <span class=\"status-badge\"\r\n [class.status-badge-info]=\"Info\"\r\n [class.status-badge-warning]=\"Warning\"\r\n [class.status-badge-success]=\"Success\"\r\n [class.status-badge-danger]=\"Danger\">\r\n <i style=\"font-size: 18px;\"\r\n class=\"fa\" \r\n [class.fa-info-circle]=\"Info\" \r\n [class.fa-exclamation-circle]=\"Warning\" \r\n [class.fa-check-circle]=\"Success\" \r\n [class.fa-times-circle]=\"Danger\" \r\n \r\n >\r\n </i>\r\n <span *ngIf=\"Status\" \r\n class=\"ml-2 app-bold\"\r\n [class.text-info]=\"Info\"\r\n [class.text-warning]=\"Warning\"\r\n [class.text-success]=\"Success\"\r\n [class.text-danger]=\"Danger\">\r\n {{Status.toUpperCase()}}\r\n </span>\r\n </span>\r\n</div>", styles: [".utils-pointer{cursor:pointer}.utils-copy{cursor:copy}.utils-bold{font-weight:700}.utils-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}::ng-deep .mat-tooltip{font-size:16px}.status-badge-container{position:absolute;right:0;margin-right:15px;top:0;white-space:nowrap}.status-badge{height:30px;padding:5px 10px;font-size:16px;line-height:20px;border-radius:5px}.status-badge-info{border:3px solid;color:#248dad}.status-badge-warning{border:3px solid;color:#f79a17}.status-badge-success{border:3px solid;color:#2d922d}.status-badge-danger{border:3px solid;color:#bf1725}\n"] }]
|
|
121
|
+
}], propDecorators: { Status: [{
|
|
122
|
+
type: Input
|
|
123
|
+
}], Zoom: [{
|
|
124
|
+
type: Input
|
|
125
|
+
}], Top: [{
|
|
126
|
+
type: Input
|
|
127
|
+
}], Right: [{
|
|
128
|
+
type: Input
|
|
129
|
+
}], Level: [{
|
|
130
|
+
type: Input
|
|
131
|
+
}], Info: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}], Warning: [{
|
|
134
|
+
type: Input
|
|
135
|
+
}], Success: [{
|
|
136
|
+
type: Input
|
|
137
|
+
}], Danger: [{
|
|
138
|
+
type: Input
|
|
139
|
+
}] } });
|
|
140
|
+
|
|
141
|
+
// Angular
|
|
142
|
+
/** Questo componente si occupa di creare un context-menu con **Options** definite dal programmatore, che innescano una funzione quando selezionate */
|
|
143
|
+
class SimpleDropdownComponent {
|
|
144
|
+
constructor() {
|
|
145
|
+
/** Opzioni da mostrare nel context-menu, composte da un campo Nome ed uno Operazione */
|
|
146
|
+
this.Options = [];
|
|
147
|
+
/** Posizione di Default del context-menu, evitare di smanazzare */
|
|
148
|
+
this.MenuPosition = { x: '0', y: '0' };
|
|
149
|
+
}
|
|
150
|
+
/** Serve per far apparire il menu dove definito da **MenuPosition**, facendo uso di **matMenuTrigger** */
|
|
151
|
+
Show(event) {
|
|
152
|
+
this.MenuPosition.x = event.clientX + 'px';
|
|
153
|
+
this.MenuPosition.y = event.clientY + 'px';
|
|
154
|
+
this.matMenuTrigger.openMenu();
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
SimpleDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SimpleDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
159
|
+
SimpleDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SimpleDropdownComponent, selector: "simple-dropdown", inputs: { Options: "Options" }, viewQueries: [{ propertyName: "matMenuTrigger", first: true, predicate: MatMenuTrigger, descendants: true, static: true }], ngImport: i0, template: "<div style=\"visibility: hidden; position: fixed;\" \r\n [style.left]=\"MenuPosition.x\" \r\n [style.top]=\"MenuPosition.y\" \r\n [matMenuTriggerFor]=\"rightMenu\">\r\n</div>\r\n\r\n<mat-menu #rightMenu=\"matMenu\">\r\n <ng-container *ngFor=\"let item of Options\">\r\n <button mat-menu-item (click)=\"item.execute()\">{{item.label}}</button>\r\n </ng-container>\r\n</mat-menu>", styles: [".utils-pointer{cursor:pointer}.utils-copy{cursor:copy}.utils-bold{font-weight:700}.utils-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}::ng-deep .mat-tooltip{font-size:16px}.mat-menu-content:not(:empty){padding:0!important}.mat-menu-panel{min-height:unset!important}.mat-menu-item{background-color:#fff!important;height:38px!important;line-height:38px!important}\n"], components: [{ type: i1$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i1$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i1$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["matMenuTriggerRestoreFocus", "mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SimpleDropdownComponent, decorators: [{
|
|
161
|
+
type: Component,
|
|
162
|
+
args: [{ selector: "simple-dropdown", encapsulation: ViewEncapsulation.None, template: "<div style=\"visibility: hidden; position: fixed;\" \r\n [style.left]=\"MenuPosition.x\" \r\n [style.top]=\"MenuPosition.y\" \r\n [matMenuTriggerFor]=\"rightMenu\">\r\n</div>\r\n\r\n<mat-menu #rightMenu=\"matMenu\">\r\n <ng-container *ngFor=\"let item of Options\">\r\n <button mat-menu-item (click)=\"item.execute()\">{{item.label}}</button>\r\n </ng-container>\r\n</mat-menu>", styles: [".utils-pointer{cursor:pointer}.utils-copy{cursor:copy}.utils-bold{font-weight:700}.utils-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}::ng-deep .mat-tooltip{font-size:16px}.mat-menu-content:not(:empty){padding:0!important}.mat-menu-panel{min-height:unset!important}.mat-menu-item{background-color:#fff!important;height:38px!important;line-height:38px!important}\n"] }]
|
|
163
|
+
}], propDecorators: { matMenuTrigger: [{
|
|
164
|
+
type: ViewChild,
|
|
165
|
+
args: [MatMenuTrigger, { static: true }]
|
|
166
|
+
}], Options: [{
|
|
167
|
+
type: Input
|
|
168
|
+
}] } });
|
|
169
|
+
|
|
170
|
+
// Modules
|
|
171
|
+
class UtilityComponentsModule {
|
|
172
|
+
static forRoot(config) {
|
|
173
|
+
return {
|
|
174
|
+
ngModule: UtilityComponentsModule,
|
|
175
|
+
providers: [
|
|
176
|
+
{ provide: UCCO_LOCALE, useValue: config?.locale || 'it-IT' },
|
|
177
|
+
{ provide: UCCO_DEBUG_MODE, useValue: config?.debugMode != null ? config?.debugMode : false }
|
|
178
|
+
]
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
UtilityComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UtilityComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
183
|
+
UtilityComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UtilityComponentsModule, declarations: [CurrencySpanComponent,
|
|
184
|
+
ShortenSpanComponent,
|
|
185
|
+
StatusBadgeComponent,
|
|
186
|
+
SimpleDropdownComponent], imports: [CommonModule,
|
|
187
|
+
MatTooltipModule,
|
|
188
|
+
MatMenuModule,
|
|
189
|
+
FullExtensionsModule,
|
|
190
|
+
ToastrModule], exports: [CurrencySpanComponent,
|
|
191
|
+
ShortenSpanComponent,
|
|
192
|
+
StatusBadgeComponent,
|
|
193
|
+
SimpleDropdownComponent] });
|
|
194
|
+
UtilityComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UtilityComponentsModule, imports: [[
|
|
195
|
+
CommonModule,
|
|
196
|
+
MatTooltipModule,
|
|
197
|
+
MatMenuModule,
|
|
198
|
+
FullExtensionsModule,
|
|
199
|
+
ToastrModule
|
|
200
|
+
]] });
|
|
201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UtilityComponentsModule, decorators: [{
|
|
202
|
+
type: NgModule,
|
|
203
|
+
args: [{
|
|
204
|
+
declarations: [
|
|
205
|
+
CurrencySpanComponent,
|
|
206
|
+
ShortenSpanComponent,
|
|
207
|
+
StatusBadgeComponent,
|
|
208
|
+
SimpleDropdownComponent
|
|
209
|
+
],
|
|
210
|
+
imports: [
|
|
211
|
+
CommonModule,
|
|
212
|
+
MatTooltipModule,
|
|
213
|
+
MatMenuModule,
|
|
214
|
+
FullExtensionsModule,
|
|
215
|
+
ToastrModule
|
|
216
|
+
],
|
|
217
|
+
exports: [
|
|
218
|
+
CurrencySpanComponent,
|
|
219
|
+
ShortenSpanComponent,
|
|
220
|
+
StatusBadgeComponent,
|
|
221
|
+
SimpleDropdownComponent
|
|
222
|
+
]
|
|
223
|
+
}]
|
|
224
|
+
}] });
|
|
225
|
+
|
|
226
|
+
/** Modello che definisce una opzione del menu contestuale */
|
|
227
|
+
class DropdownOption {
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Classe di configurazione del modulo
|
|
232
|
+
*/
|
|
233
|
+
class UtilityComponentsModuleConfig {
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/*
|
|
237
|
+
* Public API Surface of utility-components
|
|
238
|
+
*/
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Generated bundle index. Do not edit.
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
export { CurrencySpanComponent, CurrencyType, DropdownOption, ShortenSpanComponent, SimpleDropdownComponent, StatusBadgeComponent, UCCO_DEBUG_MODE, UCCO_LOCALE, UtilityComponentsModule, UtilityComponentsModuleConfig };
|
|
245
|
+
//# sourceMappingURL=esfaenza-utility-components.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"esfaenza-utility-components.mjs","sources":["../../../projects/utility-components/src/lib/tokens.ts","../../../projects/utility-components/src/lib/components/currency-span/currency-span.component.ts","../../../projects/utility-components/src/lib/components/currency-span/currency-span.component.html","../../../projects/utility-components/src/lib/components/shorten-span/shorten-span.component.ts","../../../projects/utility-components/src/lib/components/shorten-span/shorten-span.component.html","../../../projects/utility-components/src/lib/components/status-badge/status-badge.component.ts","../../../projects/utility-components/src/lib/components/status-badge/status-badge.component.html","../../../projects/utility-components/src/lib/components/simple-dropdown/simple-dropdown.component.ts","../../../projects/utility-components/src/lib/components/simple-dropdown/simple-dropdown.component.html","../../../projects/utility-components/src/lib/utility-components.module.ts","../../../projects/utility-components/src/lib/models/DropdownOption.ts","../../../projects/utility-components/src/lib/models/UtilityComponentsModuleConfig.ts","../../../projects/utility-components/src/public-api.ts","../../../projects/utility-components/src/esfaenza-utility-components.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\n/** Token che indica la lingua da utilizzare, sono supportate \"it-IT\" ed \"en-US\" */\r\nexport const UCCO_LOCALE: InjectionToken<string> = new InjectionToken<string>('UCCO_LOCALE');\r\n/** Token che indica la lingua da utilizzare, sono supportate \"it-IT\" ed \"en-US\" */\r\nexport const UCCO_DEBUG_MODE: InjectionToken<boolean> = new InjectionToken<boolean>('UCCO_DEBUG_MODE');","// Angular\r\nimport { Component, Input } from \"@angular/core\";\r\n\r\n/** Questo componente rappresenta un elemento span che formatta automaticamente un **CurrencyValue** in base al suo **CurrencyType** */\r\n@Component({\r\n selector: \"currency-span\",\r\n templateUrl: \"currency-span.component.html\"\r\n})\r\nexport class CurrencySpanComponent {\r\n /** Valore da formattare */\r\n @Input() CurrencyValue: string | number;\r\n /** Tipo in base al quale formattare il valore **CurrencyValue** */\r\n @Input() CurrencyType: string = CurrencyType.EMPTY;\r\n}\r\n\r\n/**\r\n * @ignore\r\n * Al momento non serve assolutamente a niente, ma per espandere eventualmente \r\n * il componente in futuro lo lascio qui che schifo non fa.\r\n */\r\nexport enum CurrencyType {\r\n EUR = \"€\",\r\n USD = \"$\",\r\n CAD = \"$\",\r\n EMPTY = \"\"\r\n}","<span [class.text-info]=\"CurrencyValue == 0\"\r\n [class.text-success]=\"CurrencyValue > 0\"\r\n [class.text-danger]=\"CurrencyValue < 0\">\r\n {{CurrencyValue ? (CurrencyValue | currency:'':'':'1.2-2':'it') : '0,00'}} {{CurrencyType}}\r\n</span>","// Angular\r\nimport { Component, Input } from \"@angular/core\";\r\n\r\n// Configurazioni\r\nimport { ClipboardService } from \"@esfaenza/extensions\";\r\n\r\n// Direttive, Componenti, Librerie\r\nimport { ToastrService } from \"ngx-toastr\";\r\n\r\n/** Questo componente rappresenta un elemento span che tronca un **Text** in base ad una **MaxLength** */\r\n@Component({\r\n selector: \"shorten-span\",\r\n templateUrl: \"shorten-span.component.html\",\r\n styleUrls: [\"./shorten-span.component.scss\"]\r\n})\r\nexport class ShortenSpanComponent {\r\n /** Mostra **Text** con stile grassetto */\r\n @Input() Bold: boolean = false;\r\n /** Testo da mostrare nello span */\r\n @Input() Text: string;\r\n /** Lunghezza massima del testo, prima di venire troncato */\r\n @Input() MaxLength: number = 999;\r\n /** Abilita la possibilita di copiare **Text** col tasto sinistro del mouse */\r\n @Input() ClipboardCopy: boolean = false;\r\n\r\n /** @ignore */\r\n constructor(private toastrService: ToastrService, private clipboardService: ClipboardService) { }\r\n\r\n /** Testo da mostrare nel tooltip di material, quando ha valore diverso da null */\r\n public ShowTooltip = null;\r\n\r\n /** @ignore */\r\n ngOnInit() {\r\n this.ShowTooltip = this.Text?.length >= this.MaxLength ? this.Text : null;\r\n }\r\n\r\n /**\r\n * Copia un valore nella clipboard\r\n * \r\n * @param {string} value Valore da copiare nella clipboard\r\n */\r\n copyToClipboard(value: string) {\r\n this.clipboardService.copyTextToClipboard(value);\r\n this.toastrService.info('Testo copiato!', null, { positionClass: 'toast-top-center' });\r\n }\r\n}","<span [class.utils-copy]=\"ClipboardCopy\" (click)=\"ClipboardCopy ? copyToClipboard(Text) : null\" *ngIf=\"Text\" [class.utils-bold]=\"Bold\" [matTooltip]=\"ShowTooltip\">\r\n {{Text.length > MaxLength + 3 ? Text.substr(0, MaxLength) + \"...\" : Text}}\r\n</span>","// Angular\r\nimport { Component, Input } from \"@angular/core\";\r\n\r\n/** \r\n * Questo componente serve a mostrare un badge di stato, con un testo **Status**.\r\n * Colorato in base a condizioni di **Info**, **Success**, **Warning** o **Danger** \r\n */\r\n@Component({\r\n selector: \"status-badge\",\r\n templateUrl: \"status-badge.component.html\",\r\n styleUrls: [\"./status-badge.component.scss\"]\r\n})\r\nexport class StatusBadgeComponent {\r\n /** Etichetta da mostrare nel badge */\r\n @Input() public Status: string;\r\n /** Dimensione del badge, in valore numerico (1 = 100%) */\r\n @Input() public Zoom: number = 1;\r\n /** Valore dello stile 'top' del badge */\r\n @Input() public Top: string = \"20px\";\r\n /** Valore dello stile 'right' del badge */\r\n @Input() public Right: string = \"0px\";\r\n /** Condizione per la gestione del livello del badge - (Info o Warning o Success o Danger)*/\r\n @Input() public Level: 'Info' | 'Warning' | 'Success' | 'Danger';\r\n /** Valore boolen relativo al binding del livello badge - (Info) */\r\n @Input() public Info: boolean ;\r\n /** Valore boolen relativo al binding del livello badge - (Warning) */\r\n @Input() public Warning: boolean;\r\n /** Valore boolen relativo al binding del livello badge - (Success) */\r\n @Input() public Success: boolean ;\r\n /** Valore boolen relativo al binding del livello badge - (Danger) */\r\n @Input() public Danger: boolean ;\r\n\r\n ngOnInit() {\r\n this.Info = this.Level == \"Info\";\r\n this.Warning = this.Level == \"Warning\";\r\n this.Success = this.Level == \"Success\";\r\n this.Danger = this.Level == \"Danger\";\r\n }\r\n}","<div class=\"status-badge-container utils-no-selection\" [style.margin-top]=\"Top\" [style.margin-right]=\"Right\" [style.zoom]=\"Zoom\" [style.-moz-transform]=\"'scale(' + Zoom + ')'\">\r\n <span class=\"status-badge\"\r\n [class.status-badge-info]=\"Info\"\r\n [class.status-badge-warning]=\"Warning\"\r\n [class.status-badge-success]=\"Success\"\r\n [class.status-badge-danger]=\"Danger\">\r\n <i style=\"font-size: 18px;\"\r\n class=\"fa\" \r\n [class.fa-info-circle]=\"Info\" \r\n [class.fa-exclamation-circle]=\"Warning\" \r\n [class.fa-check-circle]=\"Success\" \r\n [class.fa-times-circle]=\"Danger\" \r\n \r\n >\r\n </i>\r\n <span *ngIf=\"Status\" \r\n class=\"ml-2 app-bold\"\r\n [class.text-info]=\"Info\"\r\n [class.text-warning]=\"Warning\"\r\n [class.text-success]=\"Success\"\r\n [class.text-danger]=\"Danger\">\r\n {{Status.toUpperCase()}}\r\n </span>\r\n </span>\r\n</div>","// Angular\r\nimport { Component, Input, ViewChild, ViewEncapsulation } from \"@angular/core\";\r\nimport { MatMenuTrigger } from \"@angular/material/menu\";\r\n\r\n// Models\r\nimport { DropdownOption } from \"../../models/DropdownOption\";\r\n\r\n/** Questo componente si occupa di creare un context-menu con **Options** definite dal programmatore, che innescano una funzione quando selezionate */\r\n@Component({\r\n selector: \"simple-dropdown\",\r\n templateUrl: \"simple-dropdown.component.html\",\r\n styleUrls: [\"./simple-dropdown.component.scss\"],\r\n encapsulation: ViewEncapsulation.None\r\n})\r\nexport class SimpleDropdownComponent {\r\n /** Trigger del MatMenu, per poter decidere quando mostrare il menu da codice */\r\n @ViewChild(MatMenuTrigger, { static: true }) matMenuTrigger: MatMenuTrigger;\r\n /** Opzioni da mostrare nel context-menu, composte da un campo Nome ed uno Operazione */\r\n @Input() Options: DropdownOption[] = [];\r\n /** Posizione di Default del context-menu, evitare di smanazzare */\r\n public MenuPosition = { x: '0', y: '0' }\r\n /** Serve per far apparire il menu dove definito da **MenuPosition**, facendo uso di **matMenuTrigger** */\r\n public Show(event: MouseEvent) {\r\n this.MenuPosition.x = event.clientX + 'px';\r\n this.MenuPosition.y = event.clientY + 'px';\r\n this.matMenuTrigger.openMenu();\r\n\r\n return false;\r\n }\r\n}","<div style=\"visibility: hidden; position: fixed;\" \r\n [style.left]=\"MenuPosition.x\" \r\n [style.top]=\"MenuPosition.y\" \r\n [matMenuTriggerFor]=\"rightMenu\">\r\n</div>\r\n\r\n<mat-menu #rightMenu=\"matMenu\">\r\n <ng-container *ngFor=\"let item of Options\">\r\n <button mat-menu-item (click)=\"item.execute()\">{{item.label}}</button>\r\n </ng-container>\r\n</mat-menu>","// Modules\r\nimport { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ToastrModule } from 'ngx-toastr';\r\nimport { FullExtensionsModule } from '@esfaenza/extensions';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { MatMenuModule } from '@angular/material/menu';\r\n// Models\r\nimport { UtilityComponentsModuleConfig } from './models/UtilityComponentsModuleConfig';\r\nimport { UCCO_DEBUG_MODE, UCCO_LOCALE } from './tokens';\r\n// Components\r\nimport { CurrencySpanComponent } from './components/currency-span/currency-span.component';\r\nimport { ShortenSpanComponent } from './components/shorten-span/shorten-span.component';\r\nimport { StatusBadgeComponent } from './components/status-badge/status-badge.component';\r\nimport { SimpleDropdownComponent } from './components/simple-dropdown/simple-dropdown.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n CurrencySpanComponent,\r\n ShortenSpanComponent,\r\n StatusBadgeComponent,\r\n SimpleDropdownComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MatTooltipModule,\r\n MatMenuModule,\r\n FullExtensionsModule,\r\n ToastrModule\r\n ],\r\n exports: [\r\n CurrencySpanComponent,\r\n ShortenSpanComponent,\r\n StatusBadgeComponent,\r\n SimpleDropdownComponent\r\n ]\r\n})\r\nexport class UtilityComponentsModule {\r\n static forRoot(config?: UtilityComponentsModuleConfig): ModuleWithProviders<UtilityComponentsModule> {\r\n return {\r\n ngModule: UtilityComponentsModule,\r\n providers: [\r\n { provide: UCCO_LOCALE, useValue: config?.locale || 'it-IT' },\r\n { provide: UCCO_DEBUG_MODE, useValue: config?.debugMode != null ? config?.debugMode : false }\r\n ]\r\n };\r\n }\r\n}\r\n","/** Modello che definisce una opzione del menu contestuale */\r\nexport class DropdownOption {\r\n /** Nome dell'opzione da mostrare */\r\n label: string;\r\n /** Funzione da eseguire quando viene selezionata l'opzione */\r\n execute: () => {};\r\n}","/**\r\n * Classe di configurazione del modulo\r\n */\r\n export class UtilityComponentsModuleConfig {\r\n /** Locale del modulo. Sono supportati solo 'it-IT' ed 'en-US', default it-IT */\r\n locale?: string;\r\n /** Abilita o meno la modalità di debug */\r\n debugMode?: boolean;\r\n}","/*\r\n * Public API Surface of utility-components\r\n */\r\n\r\nexport * from './lib/utility-components.module';\r\nexport * from './lib/components/currency-span/currency-span.component';\r\nexport * from './lib/components/shorten-span/shorten-span.component';\r\nexport * from './lib/components/simple-dropdown/simple-dropdown.component';\r\nexport * from './lib/components/status-badge/status-badge.component';\r\nexport * from './lib/models/DropdownOption';\r\nexport * from './lib/models/UtilityComponentsModuleConfig';\r\nexport * from './lib/tokens';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i3","i2"],"mappings":";;;;;;;;;;;;;AAEA;MACa,WAAW,GAA2B,IAAI,cAAc,CAAS,aAAa,EAAE;AAC7F;MACa,eAAe,GAA4B,IAAI,cAAc,CAAU,iBAAiB;;ACLrG;AAGA;MAKa,qBAAqB,CAAA;AAJlC,IAAA,WAAA,GAAA;;AAQa,QAAA,IAAA,CAAA,YAAY,GAAW,YAAY,CAAC,KAAK,CAAC;AACtD,KAAA;;mHALY,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,qBAAqB,+HCRlC,sQAIO,EAAA,KAAA,EAAA,EAAA,UAAA,EAAA,EAAA,CAAA,YAAA,EAAA,EAAA,CAAA,CAAA;4FDIM,qBAAqB,EAAA,UAAA,EAAA,CA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AACF,iBAAA,CAAA;;;ACpCD;MACa,cAAc,CAAA;AAK1B;;ACND;;AAEG;MACW,6BAA6B,CAAA;AAK1C;;ACRD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
1
2
|
/** Questo componente rappresenta un elemento span che formatta automaticamente un **CurrencyValue** in base al suo **CurrencyType** */
|
|
2
3
|
export declare class CurrencySpanComponent {
|
|
3
4
|
/** Valore da formattare */
|
|
4
5
|
CurrencyValue: string | number;
|
|
5
6
|
/** Tipo in base al quale formattare il valore **CurrencyValue** */
|
|
6
7
|
CurrencyType: string;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CurrencySpanComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CurrencySpanComponent, "currency-span", never, { "CurrencyValue": "CurrencyValue"; "CurrencyType": "CurrencyType"; }, {}, never, never>;
|
|
7
10
|
}
|
|
8
11
|
/**
|
|
9
12
|
* @ignore
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ClipboardService } from "@esfaenza/extensions";
|
|
2
2
|
import { ToastrService } from "ngx-toastr";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
/** Questo componente rappresenta un elemento span che tronca un **Text** in base ad una **MaxLength** */
|
|
4
5
|
export declare class ShortenSpanComponent {
|
|
5
6
|
private toastrService;
|
|
@@ -24,4 +25,6 @@ export declare class ShortenSpanComponent {
|
|
|
24
25
|
* @param {string} value Valore da copiare nella clipboard
|
|
25
26
|
*/
|
|
26
27
|
copyToClipboard(value: string): void;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShortenSpanComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ShortenSpanComponent, "shorten-span", never, { "Bold": "Bold"; "Text": "Text"; "MaxLength": "MaxLength"; "ClipboardCopy": "ClipboardCopy"; }, {}, never, never>;
|
|
27
30
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MatMenuTrigger } from "@angular/material/menu";
|
|
2
2
|
import { DropdownOption } from "../../models/DropdownOption";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
/** Questo componente si occupa di creare un context-menu con **Options** definite dal programmatore, che innescano una funzione quando selezionate */
|
|
4
5
|
export declare class SimpleDropdownComponent {
|
|
5
6
|
/** Trigger del MatMenu, per poter decidere quando mostrare il menu da codice */
|
|
@@ -13,4 +14,6 @@ export declare class SimpleDropdownComponent {
|
|
|
13
14
|
};
|
|
14
15
|
/** Serve per far apparire il menu dove definito da **MenuPosition**, facendo uso di **matMenuTrigger** */
|
|
15
16
|
Show(event: MouseEvent): boolean;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SimpleDropdownComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SimpleDropdownComponent, "simple-dropdown", never, { "Options": "Options"; }, {}, never, never>;
|
|
16
19
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
1
2
|
/**
|
|
2
3
|
* Questo componente serve a mostrare un badge di stato, con un testo **Status**.
|
|
3
4
|
* Colorato in base a condizioni di **Info**, **Success**, **Warning** o **Danger**
|
|
@@ -22,4 +23,6 @@ export declare class StatusBadgeComponent {
|
|
|
22
23
|
/** Valore boolen relativo al binding del livello badge - (Danger) */
|
|
23
24
|
Danger: boolean;
|
|
24
25
|
ngOnInit(): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StatusBadgeComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StatusBadgeComponent, "status-badge", never, { "Status": "Status"; "Zoom": "Zoom"; "Top": "Top"; "Right": "Right"; "Level": "Level"; "Info": "Info"; "Warning": "Warning"; "Success": "Success"; "Danger": "Danger"; }, {}, never, never>;
|
|
25
28
|
}
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { ModuleWithProviders } from '@angular/core';
|
|
2
2
|
import { UtilityComponentsModuleConfig } from './models/UtilityComponentsModuleConfig';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./components/currency-span/currency-span.component";
|
|
5
|
+
import * as i2 from "./components/shorten-span/shorten-span.component";
|
|
6
|
+
import * as i3 from "./components/status-badge/status-badge.component";
|
|
7
|
+
import * as i4 from "./components/simple-dropdown/simple-dropdown.component";
|
|
8
|
+
import * as i5 from "@angular/common";
|
|
9
|
+
import * as i6 from "@angular/material/tooltip";
|
|
10
|
+
import * as i7 from "@angular/material/menu";
|
|
11
|
+
import * as i8 from "@esfaenza/extensions";
|
|
12
|
+
import * as i9 from "ngx-toastr";
|
|
3
13
|
export declare class UtilityComponentsModule {
|
|
4
14
|
static forRoot(config?: UtilityComponentsModuleConfig): ModuleWithProviders<UtilityComponentsModule>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UtilityComponentsModule, never>;
|
|
16
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<UtilityComponentsModule, [typeof i1.CurrencySpanComponent, typeof i2.ShortenSpanComponent, typeof i3.StatusBadgeComponent, typeof i4.SimpleDropdownComponent], [typeof i5.CommonModule, typeof i6.MatTooltipModule, typeof i7.MatMenuModule, typeof i8.FullExtensionsModule, typeof i9.ToastrModule], [typeof i1.CurrencySpanComponent, typeof i2.ShortenSpanComponent, typeof i3.StatusBadgeComponent, typeof i4.SimpleDropdownComponent]>;
|
|
17
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<UtilityComponentsModule>;
|
|
5
18
|
}
|
package/package.json
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esfaenza/utility-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.3.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"tslib": "^2.0.0"
|
|
6
6
|
},
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@angular/common": "~
|
|
9
|
-
"@angular/core": "~
|
|
10
|
-
"@esfaenza/extensions": "^
|
|
8
|
+
"@angular/common": "~13.3.11",
|
|
9
|
+
"@angular/core": "~13.3.11",
|
|
10
|
+
"@esfaenza/extensions": "^13.3.8"
|
|
11
11
|
},
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"fesm2015": "fesm2015/esfaenza-utility-components.
|
|
12
|
+
"module": "fesm2015/esfaenza-utility-components.mjs",
|
|
13
|
+
"es2020": "fesm2020/esfaenza-utility-components.mjs",
|
|
14
|
+
"esm2020": "esm2020/esfaenza-utility-components.mjs",
|
|
15
|
+
"fesm2020": "fesm2020/esfaenza-utility-components.mjs",
|
|
16
|
+
"fesm2015": "fesm2015/esfaenza-utility-components.mjs",
|
|
17
17
|
"typings": "esfaenza-utility-components.d.ts",
|
|
18
|
-
"
|
|
18
|
+
"exports": {
|
|
19
|
+
"./package.json": {
|
|
20
|
+
"default": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./esfaenza-utility-components.d.ts",
|
|
24
|
+
"esm2020": "./esm2020/esfaenza-utility-components.mjs",
|
|
25
|
+
"es2020": "./fesm2020/esfaenza-utility-components.mjs",
|
|
26
|
+
"es2015": "./fesm2015/esfaenza-utility-components.mjs",
|
|
27
|
+
"node": "./fesm2015/esfaenza-utility-components.mjs",
|
|
28
|
+
"default": "./fesm2020/esfaenza-utility-components.mjs"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
19
31
|
"sideEffects": false
|
|
20
32
|
}
|