@esfaenza/utility-components 11.2.5 → 14.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.
Files changed (33) hide show
  1. package/{esm2015/esfaenza-utility-components.js → esm2020/esfaenza-utility-components.mjs} +0 -0
  2. package/esm2020/lib/components/currency-span/currency-span.component.mjs +34 -0
  3. package/esm2020/lib/components/shorten-span/shorten-span.component.mjs +51 -0
  4. package/esm2020/lib/components/simple-dropdown/simple-dropdown.component.mjs +34 -0
  5. package/esm2020/lib/components/status-badge/status-badge.component.mjs +49 -0
  6. package/{esm2015/lib/models/DropdownOption.js → esm2020/lib/models/DropdownOption.mjs} +0 -0
  7. package/{esm2015/lib/models/UtilityComponentsModuleConfig.js → esm2020/lib/models/UtilityComponentsModuleConfig.mjs} +0 -0
  8. package/{esm2015/lib/tokens.js → esm2020/lib/tokens.mjs} +0 -0
  9. package/esm2020/lib/utility-components.module.mjs +71 -0
  10. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  11. package/fesm2015/esfaenza-utility-components.mjs +248 -0
  12. package/fesm2015/esfaenza-utility-components.mjs.map +1 -0
  13. package/fesm2020/esfaenza-utility-components.mjs +247 -0
  14. package/fesm2020/esfaenza-utility-components.mjs.map +1 -0
  15. package/{esfaenza-utility-components.d.ts → index.d.ts} +1 -0
  16. package/lib/components/currency-span/currency-span.component.d.ts +3 -0
  17. package/lib/components/shorten-span/shorten-span.component.d.ts +3 -0
  18. package/lib/components/simple-dropdown/simple-dropdown.component.d.ts +3 -0
  19. package/lib/components/status-badge/status-badge.component.d.ts +3 -0
  20. package/lib/utility-components.module.d.ts +14 -0
  21. package/package.json +21 -9
  22. package/bundles/esfaenza-utility-components.umd.js +0 -237
  23. package/bundles/esfaenza-utility-components.umd.js.map +0 -1
  24. package/bundles/esfaenza-utility-components.umd.min.js +0 -2
  25. package/bundles/esfaenza-utility-components.umd.min.js.map +0 -1
  26. package/esfaenza-utility-components.metadata.json +0 -1
  27. package/esm2015/lib/components/currency-span/currency-span.component.js +0 -32
  28. package/esm2015/lib/components/shorten-span/shorten-span.component.js +0 -54
  29. package/esm2015/lib/components/simple-dropdown/simple-dropdown.component.js +0 -32
  30. package/esm2015/lib/components/status-badge/status-badge.component.js +0 -42
  31. package/esm2015/lib/utility-components.module.js +0 -48
  32. package/fesm2015/esfaenza-utility-components.js +0 -219
  33. package/fesm2015/esfaenza-utility-components.js.map +0 -1
@@ -1,237 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('ngx-toastr'), require('@esfaenza/extensions'), require('@angular/material/tooltip'), require('@angular/material/menu')) :
3
- typeof define === 'function' && define.amd ? define('@esfaenza/utility-components', ['exports', '@angular/core', '@angular/common', 'ngx-toastr', '@esfaenza/extensions', '@angular/material/tooltip', '@angular/material/menu'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.esfaenza = global.esfaenza || {}, global.esfaenza['utility-components'] = {}), global.ng.core, global.ng.common, global.ngxToastr, global.extensions, global.ng.material.tooltip, global.ng.material.menu));
5
- }(this, (function (exports, core, common, ngxToastr, extensions, tooltip, menu) { 'use strict';
6
-
7
- /** Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US" */
8
- var UCCO_LOCALE = new core.InjectionToken('UCCO_LOCALE');
9
- /** Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US" */
10
- var UCCO_DEBUG_MODE = new core.InjectionToken('UCCO_DEBUG_MODE');
11
-
12
- // Angular
13
- /** Questo componente rappresenta un elemento span che formatta automaticamente un **CurrencyValue** in base al suo **CurrencyType** */
14
- var CurrencySpanComponent = /** @class */ (function () {
15
- function CurrencySpanComponent() {
16
- /** Tipo in base al quale formattare il valore **CurrencyValue** */
17
- this.CurrencyType = exports.CurrencyType.EMPTY;
18
- }
19
- return CurrencySpanComponent;
20
- }());
21
- CurrencySpanComponent.decorators = [
22
- { type: core.Component, args: [{
23
- selector: "currency-span",
24
- 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>"
25
- },] }
26
- ];
27
- CurrencySpanComponent.propDecorators = {
28
- CurrencyValue: [{ type: core.Input }],
29
- CurrencyType: [{ type: core.Input }]
30
- };
31
- (function (CurrencyType) {
32
- CurrencyType["EUR"] = "\u20AC";
33
- CurrencyType["USD"] = "$";
34
- CurrencyType["CAD"] = "$";
35
- CurrencyType["EMPTY"] = "";
36
- })(exports.CurrencyType || (exports.CurrencyType = {}));
37
-
38
- // Angular
39
- /** Questo componente rappresenta un elemento span che tronca un **Text** in base ad una **MaxLength** */
40
- var ShortenSpanComponent = /** @class */ (function () {
41
- /** @ignore */
42
- function ShortenSpanComponent(toastrService, clipboardService) {
43
- this.toastrService = toastrService;
44
- this.clipboardService = clipboardService;
45
- /** Mostra **Text** con stile grassetto */
46
- this.Bold = false;
47
- /** Lunghezza massima del testo, prima di venire troncato */
48
- this.MaxLength = 999;
49
- /** Abilita la possibilita di copiare **Text** col tasto sinistro del mouse */
50
- this.ClipboardCopy = false;
51
- /** Testo da mostrare nel tooltip di material, quando ha valore diverso da null */
52
- this.ShowTooltip = null;
53
- }
54
- /** @ignore */
55
- ShortenSpanComponent.prototype.ngOnInit = function () {
56
- var _a;
57
- this.ShowTooltip = ((_a = this.Text) === null || _a === void 0 ? void 0 : _a.length) >= this.MaxLength ? this.Text : null;
58
- };
59
- /**
60
- * Copia un valore nella clipboard
61
- *
62
- * @param {string} value Valore da copiare nella clipboard
63
- */
64
- ShortenSpanComponent.prototype.copyToClipboard = function (value) {
65
- this.clipboardService.copyTextToClipboard(value);
66
- this.toastrService.info('Testo copiato!', null, { positionClass: 'toast-top-center' });
67
- };
68
- return ShortenSpanComponent;
69
- }());
70
- ShortenSpanComponent.decorators = [
71
- { type: core.Component, args: [{
72
- selector: "shorten-span",
73
- template: "<span [class.utils-pointer]=\"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>",
74
- styles: [".utils-pointer{cursor:pointer}.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}"]
75
- },] }
76
- ];
77
- ShortenSpanComponent.ctorParameters = function () { return [
78
- { type: ngxToastr.ToastrService },
79
- { type: extensions.ClipboardService }
80
- ]; };
81
- ShortenSpanComponent.propDecorators = {
82
- Bold: [{ type: core.Input }],
83
- Text: [{ type: core.Input }],
84
- MaxLength: [{ type: core.Input }],
85
- ClipboardCopy: [{ type: core.Input }]
86
- };
87
-
88
- // Angular
89
- /**
90
- * Questo componente serve a mostrare un badge di stato, con un testo **Status**.
91
- * Colorato in base a condizioni di **Info**, **Success**, **Warning** o **Danger**
92
- */
93
- var StatusBadgeComponent = /** @class */ (function () {
94
- function StatusBadgeComponent() {
95
- /** Dimensione del badge, in valore numerico (1 = 100%) */
96
- this.Zoom = 1;
97
- /** Valore dello stile 'top' del badge */
98
- this.Top = "20px";
99
- /** Valore dello stile 'right' del badge */
100
- this.Right = "0px";
101
- /** Condizione per cui il badge carichi gli stili 'Info' */
102
- this.Info = true;
103
- /** Condizione per cui il badge carichi gli stili 'Warning' */
104
- this.Warning = false;
105
- /** Condizione per cui il badge carichi gli stili 'Success' */
106
- this.Success = false;
107
- /** Condizione per cui il badge carichi gli stili 'Danger' */
108
- this.Danger = false;
109
- }
110
- return StatusBadgeComponent;
111
- }());
112
- StatusBadgeComponent.decorators = [
113
- { type: core.Component, args: [{
114
- selector: "status-badge",
115
- 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\" [class.text-info]=\"Info\"\r\n [class.fa-exclamation-circle]=\"Warning\" [class.text-warning]=\"Warning\"\r\n [class.fa-check-circle]=\"Success\" [class.text-success]=\"Success\"\r\n [class.fa-times-circle]=\"Danger\" [class.text-danger]=\"Danger\">\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>",
116
- styles: [".utils-pointer{cursor:pointer}.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 #248dad}.status-badge-warning{border:3px solid #f79a17}.status-badge-success{border:3px solid #2d922d}.status-badge-danger{border:3px solid #bf1725}"]
117
- },] }
118
- ];
119
- StatusBadgeComponent.propDecorators = {
120
- Status: [{ type: core.Input }],
121
- Zoom: [{ type: core.Input }],
122
- Top: [{ type: core.Input }],
123
- Right: [{ type: core.Input }],
124
- Info: [{ type: core.Input }],
125
- Warning: [{ type: core.Input }],
126
- Success: [{ type: core.Input }],
127
- Danger: [{ type: core.Input }]
128
- };
129
-
130
- // Angular
131
- /** Questo componente si occupa di creare un context-menu con **Options** definite dal programmatore, che innescano una funzione quando selezionate */
132
- var SimpleDropdownComponent = /** @class */ (function () {
133
- function SimpleDropdownComponent() {
134
- /** Opzioni da mostrare nel context-menu, composte da un campo Nome ed uno Operazione */
135
- this.Options = [];
136
- /** Posizione di Default del context-menu, evitare di smanazzare */
137
- this.MenuPosition = { x: '0', y: '0' };
138
- }
139
- /** Serve per far apparire il menu dove definito da **MenuPosition**, facendo uso di **matMenuTrigger** */
140
- SimpleDropdownComponent.prototype.Show = function (event) {
141
- this.MenuPosition.x = event.clientX + 'px';
142
- this.MenuPosition.y = event.clientY + 'px';
143
- this.matMenuTrigger.openMenu();
144
- return false;
145
- };
146
- return SimpleDropdownComponent;
147
- }());
148
- SimpleDropdownComponent.decorators = [
149
- { type: core.Component, args: [{
150
- selector: "simple-dropdown",
151
- 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>",
152
- encapsulation: core.ViewEncapsulation.None,
153
- styles: [".utils-pointer{cursor:pointer}.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}"]
154
- },] }
155
- ];
156
- SimpleDropdownComponent.propDecorators = {
157
- matMenuTrigger: [{ type: core.ViewChild, args: [menu.MatMenuTrigger, { static: true },] }],
158
- Options: [{ type: core.Input }]
159
- };
160
-
161
- // Modules
162
- var UtilityComponentsModule = /** @class */ (function () {
163
- function UtilityComponentsModule() {
164
- }
165
- UtilityComponentsModule.forRoot = function (config) {
166
- return {
167
- ngModule: UtilityComponentsModule,
168
- providers: [
169
- { provide: UCCO_LOCALE, useValue: (config === null || config === void 0 ? void 0 : config.locale) || 'it-IT' },
170
- { provide: UCCO_DEBUG_MODE, useValue: (config === null || config === void 0 ? void 0 : config.debugMode) != null ? config === null || config === void 0 ? void 0 : config.debugMode : false }
171
- ]
172
- };
173
- };
174
- return UtilityComponentsModule;
175
- }());
176
- UtilityComponentsModule.decorators = [
177
- { type: core.NgModule, args: [{
178
- declarations: [
179
- CurrencySpanComponent,
180
- ShortenSpanComponent,
181
- StatusBadgeComponent,
182
- SimpleDropdownComponent
183
- ],
184
- imports: [
185
- common.CommonModule,
186
- tooltip.MatTooltipModule,
187
- menu.MatMenuModule,
188
- extensions.FullExtensionsModule,
189
- ngxToastr.ToastrModule
190
- ],
191
- exports: [
192
- CurrencySpanComponent,
193
- ShortenSpanComponent,
194
- StatusBadgeComponent,
195
- SimpleDropdownComponent
196
- ]
197
- },] }
198
- ];
199
-
200
- /** Modello che definisce una opzione del menu contestuale */
201
- var DropdownOption = /** @class */ (function () {
202
- function DropdownOption() {
203
- }
204
- return DropdownOption;
205
- }());
206
-
207
- /**
208
- * Classe di configurazione del modulo
209
- */
210
- var UtilityComponentsModuleConfig = /** @class */ (function () {
211
- function UtilityComponentsModuleConfig() {
212
- }
213
- return UtilityComponentsModuleConfig;
214
- }());
215
-
216
- /*
217
- * Public API Surface of utility-components
218
- */
219
-
220
- /**
221
- * Generated bundle index. Do not edit.
222
- */
223
-
224
- exports.CurrencySpanComponent = CurrencySpanComponent;
225
- exports.DropdownOption = DropdownOption;
226
- exports.ShortenSpanComponent = ShortenSpanComponent;
227
- exports.SimpleDropdownComponent = SimpleDropdownComponent;
228
- exports.StatusBadgeComponent = StatusBadgeComponent;
229
- exports.UCCO_DEBUG_MODE = UCCO_DEBUG_MODE;
230
- exports.UCCO_LOCALE = UCCO_LOCALE;
231
- exports.UtilityComponentsModule = UtilityComponentsModule;
232
- exports.UtilityComponentsModuleConfig = UtilityComponentsModuleConfig;
233
-
234
- Object.defineProperty(exports, '__esModule', { value: true });
235
-
236
- })));
237
- //# sourceMappingURL=esfaenza-utility-components.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"esfaenza-utility-components.umd.js","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/shorten-span/shorten-span.component.ts","../../../projects/utility-components/src/lib/components/status-badge/status-badge.component.ts","../../../projects/utility-components/src/lib/components/simple-dropdown/simple-dropdown.component.ts","../../../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}","// 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}","// 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 cui il badge carichi gli stili 'Info' */\r\n @Input() public Info: boolean = true;\r\n /** Condizione per cui il badge carichi gli stili 'Warning' */\r\n @Input() public Warning: boolean = false;\r\n /** Condizione per cui il badge carichi gli stili 'Success' */\r\n @Input() public Success: boolean = false;\r\n /** Condizione per cui il badge carichi gli stili 'Danger' */\r\n @Input() public Danger: boolean = false;\r\n}","// 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}","// 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":["InjectionToken","CurrencyType","Component","Input","ToastrService","ClipboardService","ViewEncapsulation","ViewChild","MatMenuTrigger","NgModule","CommonModule","MatTooltipModule","MatMenuModule","FullExtensionsModule","ToastrModule"],"mappings":";;;;;;IAEA;QACa,WAAW,GAA2B,IAAIA,mBAAc,CAAS,aAAa,EAAE;IAC7F;QACa,eAAe,GAA4B,IAAIA,mBAAc,CAAU,iBAAiB;;ICLrG;IAGA;;QACA;;YAQa,iBAAY,GAAWC,oBAAY,CAAC,KAAK,CAAC;SACtD;;;;gBATAC,cAAS,SAAC;oBACP,QAAQ,EAAE,eAAe;oBACzB,gRAA2C;iBAC9C;;;gCAGIC,UAAK;+BAELA,UAAK;;IAQV,WAAY,YAAY;QACpB,8BAAS,CAAA;QACT,yBAAS,CAAA;QACT,yBAAS,CAAA;QACT,0BAAU,CAAA;IACd,CAAC,EALWF,oBAAY,KAAZA,oBAAY;;ICpBxB;IASA;;;QAiBI,8BAAoB,aAA4B,EAAU,gBAAkC;YAAxE,kBAAa,GAAb,aAAa,CAAe;YAAU,qBAAgB,GAAhB,gBAAgB,CAAkB;;YATnF,SAAI,GAAY,KAAK,CAAC;;YAItB,cAAS,GAAW,GAAG,CAAC;;YAExB,kBAAa,GA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KA;4CAAA;KAAA;;ICRD;;;;ICAA;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("ngx-toastr"),require("@esfaenza/extensions"),require("@angular/material/tooltip"),require("@angular/material/menu")):"function"==typeof define&&define.amd?define("@esfaenza/utility-components",["exports","@angular/core","@angular/common","ngx-toastr","@esfaenza/extensions","@angular/material/tooltip","@angular/material/menu"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).esfaenza=e.esfaenza||{},e.esfaenza["utility-components"]={}),e.ng.core,e.ng.common,e.ngxToastr,e.extensions,e.ng.material.tooltip,e.ng.material.menu)}(this,(function(e,t,n,o,s,r,i){"use strict";var a,l=new t.InjectionToken("UCCO_LOCALE"),p=new t.InjectionToken("UCCO_DEBUG_MODE"),u=function(){this.CurrencyType=e.CurrencyType.EMPTY};u.decorators=[{type:t.Component,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>"}]}],u.propDecorators={CurrencyValue:[{type:t.Input}],CurrencyType:[{type:t.Input}]},(a=e.CurrencyType||(e.CurrencyType={})).EUR="€",a.USD="$",a.CAD="$",a.EMPTY="";var c=function(){function e(e,t){this.toastrService=e,this.clipboardService=t,this.Bold=!1,this.MaxLength=999,this.ClipboardCopy=!1,this.ShowTooltip=null}return e.prototype.ngOnInit=function(){var e;this.ShowTooltip=(null===(e=this.Text)||void 0===e?void 0:e.length)>=this.MaxLength?this.Text:null},e.prototype.copyToClipboard=function(e){this.clipboardService.copyTextToClipboard(e),this.toastrService.info("Testo copiato!",null,{positionClass:"toast-top-center"})},e}();c.decorators=[{type:t.Component,args:[{selector:"shorten-span",template:'<span [class.utils-pointer]="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-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}"]}]}],c.ctorParameters=function(){return[{type:o.ToastrService},{type:s.ClipboardService}]},c.propDecorators={Bold:[{type:t.Input}],Text:[{type:t.Input}],MaxLength:[{type:t.Input}],ClipboardCopy:[{type:t.Input}]};var d=function(){this.Zoom=1,this.Top="20px",this.Right="0px",this.Info=!0,this.Warning=!1,this.Success=!1,this.Danger=!1};d.decorators=[{type:t.Component,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" [class.text-info]="Info"\r\n [class.fa-exclamation-circle]="Warning" [class.text-warning]="Warning"\r\n [class.fa-check-circle]="Success" [class.text-success]="Success"\r\n [class.fa-times-circle]="Danger" [class.text-danger]="Danger">\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-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 #248dad}.status-badge-warning{border:3px solid #f79a17}.status-badge-success{border:3px solid #2d922d}.status-badge-danger{border:3px solid #bf1725}"]}]}],d.propDecorators={Status:[{type:t.Input}],Zoom:[{type:t.Input}],Top:[{type:t.Input}],Right:[{type:t.Input}],Info:[{type:t.Input}],Warning:[{type:t.Input}],Success:[{type:t.Input}],Danger:[{type:t.Input}]};var g=function(){function e(){this.Options=[],this.MenuPosition={x:"0",y:"0"}}return e.prototype.Show=function(e){return this.MenuPosition.x=e.clientX+"px",this.MenuPosition.y=e.clientY+"px",this.matMenuTrigger.openMenu(),!1},e}();g.decorators=[{type:t.Component,args:[{selector:"simple-dropdown",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>',encapsulation:t.ViewEncapsulation.None,styles:[".utils-pointer{cursor:pointer}.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}"]}]}],g.propDecorators={matMenuTrigger:[{type:t.ViewChild,args:[i.MatMenuTrigger,{static:!0}]}],Options:[{type:t.Input}]};var m=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:l,useValue:(null==t?void 0:t.locale)||"it-IT"},{provide:p,useValue:null!=(null==t?void 0:t.debugMode)&&(null==t?void 0:t.debugMode)}]}},e}();m.decorators=[{type:t.NgModule,args:[{declarations:[u,c,d,g],imports:[n.CommonModule,r.MatTooltipModule,i.MatMenuModule,s.FullExtensionsModule,o.ToastrModule],exports:[u,c,d,g]}]}];var y=function(){},f=function(){};e.CurrencySpanComponent=u,e.DropdownOption=y,e.ShortenSpanComponent=c,e.SimpleDropdownComponent=g,e.StatusBadgeComponent=d,e.UCCO_DEBUG_MODE=p,e.UCCO_LOCALE=l,e.UtilityComponentsModule=m,e.UtilityComponentsModuleConfig=f,Object.defineProperty(e,"__esModule",{value:!0})}));
2
- //# sourceMappingURL=esfaenza-utility-components.umd.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../projects/utility-components/src/lib/components/currency-span/currency-span.component.ts","../../../projects/utility-components/src/lib/tokens.ts","../../../projects/utility-components/src/lib/components/shorten-span/shorten-span.component.ts","../../../projects/utility-components/src/lib/components/status-badge/status-badge.component.ts","../../../projects/utility-components/src/lib/components/simple-dropdown/simple-dropdown.component.ts","../../../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"],"names":["CurrencyType","UCCO_LOCALE","InjectionToken","UCCO_DEBUG_MODE","this","EMPTY","Component","args","selector","template","Input","ShortenSpanComponent","toastrService","clipboardService","Bold","MaxLength","ClipboardCopy","ShowTooltip","prototype","ngOnInit","_a","Text","length","copyToClipboard","value","copyTextToClipboard","info","positionClass","ToastrService","ClipboardService","Zoom","Top","Right","Info","Warning","Success","Danger","SimpleDropdownComponent","Options","MenuPosition","x","y","Show","event","clientX","clientY","matMenuTrigger","openMenu","encapsulation","ViewEncapsulation","None","ViewChild","MatMenuTrigger","static","UtilityComponentsModule","forRoot","config","ngModule","providers","provide","useValue","locale","debugMode","NgModule","declarations","CurrencySpanComponent","StatusBadgeComponent","imports","CommonModule","MatTooltipModule","MatMenuModule","FullExtensionsModule","ToastrModule","exports"],"mappings":"qtBAoBYA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AA,uBAEAA,EAAAA,uBAEAA,EAAAA,sBAEAA,EAAAA,0BCpBL,SAAA2B,IAUajC,KAAAkC,QAA4B,GAE9BlC,KAAAmC,aAAe,CAAEC,EAAG,IAAKC,EAAG,YAE5BJ,EAAAnB,UAAAwB,KAAA,SAAKC,GAKR,OAJAvC,KAAKmC,aAAaC,EAAIG,EAAMC,QAAU,KACtCxC,KAAKmC,aAAaE,EAAIE,EAAME,QAAU,KACtCzC,KAAK0C,eAAeC,YAEb,4BAnBdzC,EAAAA,UAASC,KAAA,CAAC,CACPC,SAAU,kBACVC,SAAA,uYAEAuC,cAAeC,EAAAA,kBAAkBC,0cAIhCC,EAAAA,UAAS5C,KAAA,CAAC6C,EAAAA,eAAgB,CAAEC,QAAQ,qBAEpC3C,EAAAA,0BCmBL,SAAA4C,YACSA,EAAAC,QAAP,SAAeC,GACb,MAAO,CACLC,SAAUH,EACVI,UAAW,CACT,CAAEC,QAAS1D,EAAa2D,UAAUJ,MAAAA,OAAM,EAANA,EAAQK,SAAU,SACpD,CAAEF,QAASxD,EAAiByD,SAA+B,OAArBJ,MAAAA,OAAM,EAANA,EAAQM,aAAoBN,MAAAA,OAAM,EAANA,EAAQM,wCA3BjFC,EAAAA,SAAQxD,KAAA,CAAC,CACRyD,aAAc,CACZC,EACAtD,EACAuD,EACA7B,GAEF8B,QAAS,CACPC,EAAAA,aACAC,EAAAA,iBACAC,EAAAA,cACAC,EAAAA,qBACAC,EAAAA,cAEFC,QAAS,CACPR,EACAtD,EACAuD,EACA7B,aCjCJ,eCEC","sourcesContent":["// 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}","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// 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}","// 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 cui il badge carichi gli stili 'Info' */\r\n @Input() public Info: boolean = true;\r\n /** Condizione per cui il badge carichi gli stili 'Warning' */\r\n @Input() public Warning: boolean = false;\r\n /** Condizione per cui il badge carichi gli stili 'Success' */\r\n @Input() public Success: boolean = false;\r\n /** Condizione per cui il badge carichi gli stili 'Danger' */\r\n @Input() public Danger: boolean = false;\r\n}","// 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}","// 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}"]}
@@ -1 +0,0 @@
1
- {"__symbolic":"module","version":4,"metadata":{"UtilityComponentsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":16,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"CurrencySpanComponent"},{"__symbolic":"reference","name":"ShortenSpanComponent"},{"__symbolic":"reference","name":"StatusBadgeComponent"},{"__symbolic":"reference","name":"SimpleDropdownComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":24,"character":4},{"__symbolic":"reference","module":"@angular/material/tooltip","name":"MatTooltipModule","line":25,"character":4},{"__symbolic":"reference","module":"@angular/material/menu","name":"MatMenuModule","line":26,"character":4},{"__symbolic":"reference","module":"@esfaenza/extensions","name":"FullExtensionsModule","line":27,"character":4},{"__symbolic":"reference","module":"ngx-toastr","name":"ToastrModule","line":28,"character":4}],"exports":[{"__symbolic":"reference","name":"CurrencySpanComponent"},{"__symbolic":"reference","name":"ShortenSpanComponent"},{"__symbolic":"reference","name":"StatusBadgeComponent"},{"__symbolic":"reference","name":"SimpleDropdownComponent"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"UtilityComponentsModule"},"providers":[{"provide":{"__symbolic":"reference","name":"UCCO_LOCALE"},"useValue":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"locale"},"right":"it-IT"}},{"provide":{"__symbolic":"reference","name":"UCCO_DEBUG_MODE"},"useValue":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"!=","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"debugMode"},"right":null},"thenExpression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"debugMode"},"elseExpression":false}}]}}}},"CurrencySpanComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"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>"}]}],"members":{"CurrencyValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":5}}]}],"CurrencyType":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":5}}]}]}},"CurrencyType":{"EUR":"€","USD":"$","CAD":"$","EMPTY":""},"ShortenSpanComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"selector":"shorten-span","template":"<span [class.utils-pointer]=\"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-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}"]}]}],"members":{"Bold":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":5}}]}],"Text":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":5}}]}],"MaxLength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":5}}]}],"ClipboardCopy":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"ngx-toastr","name":"ToastrService","line":26,"character":39},{"__symbolic":"reference","module":"@esfaenza/extensions","name":"ClipboardService","line":26,"character":80}]}],"ngOnInit":[{"__symbolic":"method"}],"copyToClipboard":[{"__symbolic":"method"}]}},"SimpleDropdownComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":8,"character":1},"arguments":[{"selector":"simple-dropdown","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":12,"character":19},"member":"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-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}"]}]}],"members":{"matMenuTrigger":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":16,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/material/menu","name":"MatMenuTrigger","line":16,"character":15},{"static":true}]}]}],"Options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":5}}]}],"Show":[{"__symbolic":"method"}]}},"StatusBadgeComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":7,"character":1},"arguments":[{"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\" [class.text-info]=\"Info\"\r\n [class.fa-exclamation-circle]=\"Warning\" [class.text-warning]=\"Warning\"\r\n [class.fa-check-circle]=\"Success\" [class.text-success]=\"Success\"\r\n [class.fa-times-circle]=\"Danger\" [class.text-danger]=\"Danger\">\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-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 #248dad}.status-badge-warning{border:3px solid #f79a17}.status-badge-success{border:3px solid #2d922d}.status-badge-danger{border:3px solid #bf1725}"]}]}],"members":{"Status":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":5}}]}],"Zoom":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":5}}]}],"Top":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":5}}]}],"Right":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":5}}]}],"Info":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":5}}]}],"Warning":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":5}}]}],"Success":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":5}}]}],"Danger":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":5}}]}]}},"DropdownOption":{"__symbolic":"class","members":{}},"UtilityComponentsModuleConfig":{"__symbolic":"class","members":{}},"UCCO_LOCALE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":3,"character":55},"arguments":["UCCO_LOCALE"]},"UCCO_DEBUG_MODE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":5,"character":60},"arguments":["UCCO_DEBUG_MODE"]}},"origins":{"UtilityComponentsModule":"./lib/utility-components.module","CurrencySpanComponent":"./lib/components/currency-span/currency-span.component","CurrencyType":"./lib/components/currency-span/currency-span.component","ShortenSpanComponent":"./lib/components/shorten-span/shorten-span.component","SimpleDropdownComponent":"./lib/components/simple-dropdown/simple-dropdown.component","StatusBadgeComponent":"./lib/components/status-badge/status-badge.component","DropdownOption":"./lib/models/DropdownOption","UtilityComponentsModuleConfig":"./lib/models/UtilityComponentsModuleConfig","UCCO_LOCALE":"./lib/tokens","UCCO_DEBUG_MODE":"./lib/tokens"},"importAs":"@esfaenza/utility-components"}
@@ -1,32 +0,0 @@
1
- // Angular
2
- import { Component, Input } from "@angular/core";
3
- /** Questo componente rappresenta un elemento span che formatta automaticamente un **CurrencyValue** in base al suo **CurrencyType** */
4
- export class CurrencySpanComponent {
5
- constructor() {
6
- /** Tipo in base al quale formattare il valore **CurrencyValue** */
7
- this.CurrencyType = CurrencyType.EMPTY;
8
- }
9
- }
10
- CurrencySpanComponent.decorators = [
11
- { type: Component, args: [{
12
- selector: "currency-span",
13
- 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>"
14
- },] }
15
- ];
16
- CurrencySpanComponent.propDecorators = {
17
- CurrencyValue: [{ type: Input }],
18
- CurrencyType: [{ type: Input }]
19
- };
20
- /**
21
- * @ignore
22
- * Al momento non serve assolutamente a niente, ma per espandere eventualmente
23
- * il componente in futuro lo lascio qui che schifo non fa.
24
- */
25
- export var CurrencyType;
26
- (function (CurrencyType) {
27
- CurrencyType["EUR"] = "\u20AC";
28
- CurrencyType["USD"] = "$";
29
- CurrencyType["CAD"] = "$";
30
- CurrencyType["EMPTY"] = "";
31
- })(CurrencyType || (CurrencyType = {}));
32
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VycmVuY3ktc3Bhbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy91dGlsaXR5LWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2N1cnJlbmN5LXNwYW4vY3VycmVuY3ktc3Bhbi5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsVUFBVTtBQUNWLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRWpELHVJQUF1STtBQUt2SSxNQUFNLE9BQU8scUJBQXFCO0lBSmxDO1FBT0ksbUVBQW1FO1FBQzFELGlCQUFZLEdBQVcsWUFBWSxDQUFDLEtBQUssQ0FBQztJQUN2RCxDQUFDOzs7WUFUQSxTQUFTLFNBQUM7Z0JBQ1AsUUFBUSxFQUFFLGVBQWU7Z0JBQ3pCLGdSQUEyQzthQUM5Qzs7OzRCQUdJLEtBQUs7MkJBRUwsS0FBSzs7QUFHVjs7OztHQUlHO0FBQ0gsTUFBTSxDQUFOLElBQVksWUFLWDtBQUxELFdBQVksWUFBWTtJQUNwQiw4QkFBUyxDQUFBO0lBQ1QseUJBQVMsQ0FBQTtJQUNULHlCQUFTLENBQUE7SUFDVCwwQkFBVSxDQUFBO0FBQ2QsQ0FBQyxFQUxXLFlBQVksS0FBWixZQUFZLFFBS3ZCIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQW5ndWxhclxyXG5pbXBvcnQgeyBDb21wb25lbnQsIElucHV0IH0gZnJvbSBcIkBhbmd1bGF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ID0gXCJcIlxyXG59Il19
@@ -1,54 +0,0 @@
1
- // Angular
2
- import { Component, Input } from "@angular/core";
3
- // Configurazioni
4
- import { ClipboardService } from "@esfaenza/extensions";
5
- // Direttive, Componenti, Librerie
6
- import { ToastrService } from "ngx-toastr";
7
- /** Questo componente rappresenta un elemento span che tronca un **Text** in base ad una **MaxLength** */
8
- export class ShortenSpanComponent {
9
- /** @ignore */
10
- constructor(toastrService, clipboardService) {
11
- this.toastrService = toastrService;
12
- this.clipboardService = clipboardService;
13
- /** Mostra **Text** con stile grassetto */
14
- this.Bold = false;
15
- /** Lunghezza massima del testo, prima di venire troncato */
16
- this.MaxLength = 999;
17
- /** Abilita la possibilita di copiare **Text** col tasto sinistro del mouse */
18
- this.ClipboardCopy = false;
19
- /** Testo da mostrare nel tooltip di material, quando ha valore diverso da null */
20
- this.ShowTooltip = null;
21
- }
22
- /** @ignore */
23
- ngOnInit() {
24
- var _a;
25
- this.ShowTooltip = ((_a = this.Text) === null || _a === void 0 ? void 0 : _a.length) >= this.MaxLength ? this.Text : null;
26
- }
27
- /**
28
- * Copia un valore nella clipboard
29
- *
30
- * @param {string} value Valore da copiare nella clipboard
31
- */
32
- copyToClipboard(value) {
33
- this.clipboardService.copyTextToClipboard(value);
34
- this.toastrService.info('Testo copiato!', null, { positionClass: 'toast-top-center' });
35
- }
36
- }
37
- ShortenSpanComponent.decorators = [
38
- { type: Component, args: [{
39
- selector: "shorten-span",
40
- template: "<span [class.utils-pointer]=\"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>",
41
- styles: [".utils-pointer{cursor:pointer}.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}"]
42
- },] }
43
- ];
44
- ShortenSpanComponent.ctorParameters = () => [
45
- { type: ToastrService },
46
- { type: ClipboardService }
47
- ];
48
- ShortenSpanComponent.propDecorators = {
49
- Bold: [{ type: Input }],
50
- Text: [{ type: Input }],
51
- MaxLength: [{ type: Input }],
52
- ClipboardCopy: [{ type: Input }]
53
- };
54
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hvcnRlbi1zcGFuLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3V0aWxpdHktY29tcG9uZW50cy9zcmMvbGliL2NvbXBvbmVudHMvc2hvcnRlbi1zcGFuL3Nob3J0ZW4tc3Bhbi5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsVUFBVTtBQUNWLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRWpELGlCQUFpQjtBQUNqQixPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUV4RCxrQ0FBa0M7QUFDbEMsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLFlBQVksQ0FBQztBQUUzQyx5R0FBeUc7QUFNekcsTUFBTSxPQUFPLG9CQUFvQjtJQVU3QixjQUFjO0lBQ2QsWUFBb0IsYUFBNEIsRUFBVSxnQkFBa0M7UUFBeEUsa0JBQWEsR0FBYixhQUFhLENBQWU7UUFBVSxxQkFBZ0IsR0FBaEIsZ0JBQWdCLENBQWtCO1FBVjVGLDBDQUEwQztRQUNqQyxTQUFJLEdBQVksS0FBSyxDQUFDO1FBRy9CLDREQUE0RDtRQUNuRCxjQUFTLEdBQVcsR0FBRyxDQUFDO1FBQ2pDLDhFQUE4RTtRQUNyRSxrQkFBYSxHQUFZLEtBQUssQ0FBQztRQUt4Qyxr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lIGNsaXBib2FyZFNlcnZpY2U6IENsaXBib2FyZFNlcnZpY2UpIHsgfVxyXG5cclxuICAgIC8qKiBUZXN0byBkYSBtb3N0cmFyZSBuZWwgdG9vbHRpcCBkaSBtYXRlcmlhbCwgcXVhbmRvIGhhIHZhbG9yZSBkaXZlcnNvIGRhIG51bGwgKi9cclxuICAgIHB1YmxpYyBTaG93VG9vbHRpcCA9IG51bGw7XHJcblxyXG4gICAgLyoqIEBpZ25vcmUgKi9cclxuICAgIG5nT25Jbml0KCkge1xyXG4gICAgICAgIHRoaXMuU2hvd1Rvb2x0aXAgPSB0aGlzLlRleHQ/Lmxlbmd0aCA+PSB0aGlzLk1heExlbmd0aCA/IHRoaXMuVGV4dCA6IG51bGw7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBDb3BpYSB1biB2YWxvcmUgbmVsbGEgY2xpcGJvYXJkXHJcbiAgICAgKiBcclxuICAgICAqIEBwYXJhbSB7c3RyaW5nfSB2YWx1ZSBWYWxvcmUgZGEgY29waWFyZSBuZWxsYSBjbGlwYm9hcmRcclxuICAgICAqL1xyXG4gICAgY29weVRvQ2xpcGJvYXJkKHZhbHVlOiBzdHJpbmcpIHtcclxuICAgICAgICB0aGlzLmNsaXBib2FyZFNlcnZpY2UuY29weVRleHRUb0NsaXBib2FyZCh2YWx1ZSk7XHJcbiAgICAgICAgdGhpcy50b2FzdHJTZXJ2aWNlLmluZm8oJ1Rlc3RvIGNvcGlhdG8hJywgbnVsbCwgeyBwb3NpdGlvbkNsYXNzOiAndG9hc3QtdG9wLWNlbnRlcicgfSk7XHJcbiAgICB9XHJcbn0iXX0=
@@ -1,32 +0,0 @@
1
- // Angular
2
- import { Component, Input, ViewChild, ViewEncapsulation } from "@angular/core";
3
- import { MatMenuTrigger } from "@angular/material/menu";
4
- /** Questo componente si occupa di creare un context-menu con **Options** definite dal programmatore, che innescano una funzione quando selezionate */
5
- export class SimpleDropdownComponent {
6
- constructor() {
7
- /** Opzioni da mostrare nel context-menu, composte da un campo Nome ed uno Operazione */
8
- this.Options = [];
9
- /** Posizione di Default del context-menu, evitare di smanazzare */
10
- this.MenuPosition = { x: '0', y: '0' };
11
- }
12
- /** Serve per far apparire il menu dove definito da **MenuPosition**, facendo uso di **matMenuTrigger** */
13
- Show(event) {
14
- this.MenuPosition.x = event.clientX + 'px';
15
- this.MenuPosition.y = event.clientY + 'px';
16
- this.matMenuTrigger.openMenu();
17
- return false;
18
- }
19
- }
20
- SimpleDropdownComponent.decorators = [
21
- { type: Component, args: [{
22
- selector: "simple-dropdown",
23
- 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>",
24
- encapsulation: ViewEncapsulation.None,
25
- styles: [".utils-pointer{cursor:pointer}.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}"]
26
- },] }
27
- ];
28
- SimpleDropdownComponent.propDecorators = {
29
- matMenuTrigger: [{ type: ViewChild, args: [MatMenuTrigger, { static: true },] }],
30
- Options: [{ type: Input }]
31
- };
32
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2ltcGxlLWRyb3Bkb3duLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3V0aWxpdHktY29tcG9uZW50cy9zcmMvbGliL2N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IH0pIG1hdE1lbnVUcmlnZ2VyOiBNYXRNZW51VHJpZ2dlcjtcclxuICAgIC8qKiBPcHppb25pIGRhIG1vc3RyYXJlIG5lbCBjb250ZXh0LW1lbnUsIGNvbXBvc3RlIGRhIHVuIGNhbXBvIE5vbWUgZWQgdW5vIE9wZXJhemlvbmUgKi9cclxuICAgIEBJbnB1dCgpIE9wdGlvbnM6IERyb3Bkb3duT3B0aW9uW10gPSBbXTtcclxuICAgIC8qKiBQb3NpemlvbmUgZGkgRGVmYXVsdCBkZWwgY29udGV4dC1tZW51LCBldml0YXJlIGRpIHNtYW5henphcmUgKi9cclxuICAgIHB1YmxpYyBNZW51UG9zaXRpb24gPSB7IHg6ICcwJywgeTogJzAnIH1cclxuICAgIC8qKiBTZXJ2ZSBwZXIgZmFyIGFwcGFyaXJlIGlsIG1lbnUgZG92ZSBkZWZpbml0byBkYSAqKk1lbnVQb3NpdGlvbioqLCBmYWNlbmRvIHVzbyBkaSAqKm1hdE1lbnVUcmlnZ2VyKiogKi9cclxuICAgIHB1YmxpYyBTaG93KGV2ZW50OiBNb3VzZUV2ZW50KSB7XHJcbiAgICAgICAgdGhpcy5NZW51UG9zaXRpb24ueCA9IGV2ZW50LmNsaWVudFggKyAncHgnO1xyXG4gICAgICAgIHRoaXMuTWVudVBvc2l0aW9uLnkgPSBldmVudC5jbGllbnRZICsgJ3B4JztcclxuICAgICAgICB0aGlzLm1hdE1lbnVUcmlnZ2VyLm9wZW5NZW51KCk7XHJcblxyXG4gICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgIH1cclxufSJdfQ==
@@ -1,42 +0,0 @@
1
- // Angular
2
- import { Component, Input } from "@angular/core";
3
- /**
4
- * Questo componente serve a mostrare un badge di stato, con un testo **Status**.
5
- * Colorato in base a condizioni di **Info**, **Success**, **Warning** o **Danger**
6
- */
7
- export class StatusBadgeComponent {
8
- constructor() {
9
- /** Dimensione del badge, in valore numerico (1 = 100%) */
10
- this.Zoom = 1;
11
- /** Valore dello stile 'top' del badge */
12
- this.Top = "20px";
13
- /** Valore dello stile 'right' del badge */
14
- this.Right = "0px";
15
- /** Condizione per cui il badge carichi gli stili 'Info' */
16
- this.Info = true;
17
- /** Condizione per cui il badge carichi gli stili 'Warning' */
18
- this.Warning = false;
19
- /** Condizione per cui il badge carichi gli stili 'Success' */
20
- this.Success = false;
21
- /** Condizione per cui il badge carichi gli stili 'Danger' */
22
- this.Danger = false;
23
- }
24
- }
25
- StatusBadgeComponent.decorators = [
26
- { type: Component, args: [{
27
- selector: "status-badge",
28
- 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\" [class.text-info]=\"Info\"\r\n [class.fa-exclamation-circle]=\"Warning\" [class.text-warning]=\"Warning\"\r\n [class.fa-check-circle]=\"Success\" [class.text-success]=\"Success\"\r\n [class.fa-times-circle]=\"Danger\" [class.text-danger]=\"Danger\">\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>",
29
- styles: [".utils-pointer{cursor:pointer}.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 #248dad}.status-badge-warning{border:3px solid #f79a17}.status-badge-success{border:3px solid #2d922d}.status-badge-danger{border:3px solid #bf1725}"]
30
- },] }
31
- ];
32
- StatusBadgeComponent.propDecorators = {
33
- Status: [{ type: Input }],
34
- Zoom: [{ type: Input }],
35
- Top: [{ type: Input }],
36
- Right: [{ type: Input }],
37
- Info: [{ type: Input }],
38
- Warning: [{ type: Input }],
39
- Success: [{ type: Input }],
40
- Danger: [{ type: Input }]
41
- };
42
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdHVzLWJhZGdlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3V0aWxpdHktY29tcG9uZW50cy9zcmMvbGliL2NvbXBvbmVudHMvc3RhdHVzLWJhZGdlL3N0YXR1cy1iYWRnZS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsVUFBVTtBQUNWLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRWpEOzs7R0FHRztBQU1ILE1BQU0sT0FBTyxvQkFBb0I7SUFMakM7UUFRSSwwREFBMEQ7UUFDMUMsU0FBSSxHQUFXLENBQUMsQ0FBQztRQUNqQyx5Q0FBeUM7UUFDekIsUUFBRyxHQUFXLE1BQU0sQ0FBQztRQUNyQywyQ0FBMkM7UUFDM0IsVUFBSyxHQUFXLEtBQUssQ0FBQztRQUN0QywyREFBMkQ7UUFDM0MsU0FBSSxHQUFZLElBQUksQ0FBQztRQUNyQyw4REFBOEQ7UUFDOUMsWUFBTyxHQUFZLEtBQUssQ0FBQztRQUN6Qyw4REFBOEQ7UUFDOUMsWUFBTyxHQUFZLEtBQUssQ0FBQztRQUN6Qyw2REFBNkQ7UUFDN0MsV0FBTSxHQUFZLEtBQUssQ0F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KSBwdWJsaWMgWm9vbTogbnVtYmVyID0gMTtcclxuICAgIC8qKiBWYWxvcmUgZGVsbG8gc3RpbGUgJ3RvcCcgZGVsIGJhZGdlICovXHJcbiAgICBASW5wdXQoKSBwdWJsaWMgVG9wOiBzdHJpbmcgPSBcIjIwcHhcIjtcclxuICAgIC8qKiBWYWxvcmUgZGVsbG8gc3RpbGUgJ3JpZ2h0JyBkZWwgYmFkZ2UgKi9cclxuICAgIEBJbnB1dCgpIHB1YmxpYyBSaWdodDogc3RyaW5nID0gXCIwcHhcIjtcclxuICAgIC8qKiBDb25kaXppb25lIHBlciBjdWkgaWwgYmFkZ2UgY2FyaWNoaSBnbGkgc3RpbGkgJ0luZm8nICovXHJcbiAgICBASW5wdXQoKSBwdWJsaWMgSW5mbzogYm9vbGVhbiA9IHRydWU7XHJcbiAgICAvKiogQ29uZGl6aW9uZSBwZXIgY3VpIGlsIGJhZGdlIGNhcmljaGkgZ2xpIHN0aWxpICdXYXJuaW5nJyAqL1xyXG4gICAgQElucHV0KCkgcHVibGljIFdhcm5pbmc6IGJvb2xlYW4gPSBmYWxzZTtcclxuICAgIC8qKiBDb25kaXppb25lIHBlciBjdWkgaWwgYmFkZ2UgY2FyaWNoaSBnbGkgc3RpbGkgJ1N1Y2Nlc3MnICovXHJcbiAgICBASW5wdXQoKSBwdWJsaWMgU3VjY2VzczogYm9vbGVhbiA9IGZhbHNlO1xyXG4gICAgLyoqIENvbmRpemlvbmUgcGVyIGN1aSBpbCBiYWRnZSBjYXJpY2hpIGdsaSBzdGlsaSAnRGFuZ2VyJyAqL1xyXG4gICAgQElucHV0KCkgcHVibGljIERhbmdlcjogYm9vbGVhbiA9IGZhbHNlO1xyXG59Il19
@@ -1,48 +0,0 @@
1
- // Modules
2
- import { NgModule } from '@angular/core';
3
- import { CommonModule } from '@angular/common';
4
- import { ToastrModule } from 'ngx-toastr';
5
- import { FullExtensionsModule } from '@esfaenza/extensions';
6
- import { MatTooltipModule } from '@angular/material/tooltip';
7
- import { MatMenuModule } from '@angular/material/menu';
8
- import { UCCO_DEBUG_MODE, UCCO_LOCALE } from './tokens';
9
- // Components
10
- import { CurrencySpanComponent } from './components/currency-span/currency-span.component';
11
- import { ShortenSpanComponent } from './components/shorten-span/shorten-span.component';
12
- import { StatusBadgeComponent } from './components/status-badge/status-badge.component';
13
- import { SimpleDropdownComponent } from './components/simple-dropdown/simple-dropdown.component';
14
- export class UtilityComponentsModule {
15
- static forRoot(config) {
16
- return {
17
- ngModule: UtilityComponentsModule,
18
- providers: [
19
- { provide: UCCO_LOCALE, useValue: (config === null || config === void 0 ? void 0 : config.locale) || 'it-IT' },
20
- { provide: UCCO_DEBUG_MODE, useValue: (config === null || config === void 0 ? void 0 : config.debugMode) != null ? config === null || config === void 0 ? void 0 : config.debugMode : false }
21
- ]
22
- };
23
- }
24
- }
25
- UtilityComponentsModule.decorators = [
26
- { type: NgModule, args: [{
27
- declarations: [
28
- CurrencySpanComponent,
29
- ShortenSpanComponent,
30
- StatusBadgeComponent,
31
- SimpleDropdownComponent
32
- ],
33
- imports: [
34
- CommonModule,
35
- MatTooltipModule,
36
- MatMenuModule,
37
- FullExtensionsModule,
38
- ToastrModule
39
- ],
40
- exports: [
41
- CurrencySpanComponent,
42
- ShortenSpanComponent,
43
- StatusBadgeComponent,
44
- SimpleDropdownComponent
45
- ]
46
- },] }
47
- ];
48
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbGl0eS1jb21wb25lbnRzLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3V0aWxpdHktY29tcG9uZW50cy9zcmMvbGliL3V0aWxpdHktY29tcG9uZW50cy5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsVUFBVTtBQUNWLE9BQU8sRUFBdUIsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0F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