sin-pipes 1.0.6 → 2.0.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 (32) hide show
  1. package/README.md +7 -7
  2. package/{esm2015/lib/pipes/boolean-it.pipe.js → esm2022/lib/pipes/boolean-it.pipe.mjs} +4 -4
  3. package/esm2022/lib/pipes/bytetoxformat.pipe.mjs +25 -0
  4. package/{esm2015/lib/pipes/camel-case-to-split.pipe.js → esm2022/lib/pipes/camel-case-to-split.pipe.mjs} +4 -4
  5. package/{esm2015/lib/pipes/currency-it.pipe.js → esm2022/lib/pipes/currency-it.pipe.mjs} +4 -4
  6. package/{esm2015/lib/pipes/filter.pipe.js → esm2022/lib/pipes/filter.pipe.mjs} +4 -4
  7. package/{esm2015/lib/pipes/form-error.pipe.js → esm2022/lib/pipes/form-error.pipe.mjs} +4 -4
  8. package/{esm2015/lib/pipes/number-it.pipe.js → esm2022/lib/pipes/number-it.pipe.mjs} +4 -4
  9. package/esm2022/lib/pipes/safe-html.pipe.mjs +21 -0
  10. package/{esm2015/lib/pipes/trend-it.pipe.js → esm2022/lib/pipes/trend-it.pipe.mjs} +4 -4
  11. package/esm2022/lib/sin-pipes.module.mjs +61 -0
  12. package/{esm2015/public-api.js → esm2022/public-api.mjs} +1 -1
  13. package/{fesm2015/sin-pipes.js → fesm2022/sin-pipes.mjs} +51 -50
  14. package/fesm2022/sin-pipes.mjs.map +1 -0
  15. package/lib/pipes/boolean-it.pipe.d.ts +1 -1
  16. package/lib/pipes/bytetoxformat.pipe.d.ts +1 -1
  17. package/lib/pipes/camel-case-to-split.pipe.d.ts +1 -1
  18. package/lib/pipes/currency-it.pipe.d.ts +1 -1
  19. package/lib/pipes/filter.pipe.d.ts +1 -1
  20. package/lib/pipes/form-error.pipe.d.ts +1 -1
  21. package/lib/pipes/number-it.pipe.d.ts +1 -1
  22. package/lib/pipes/safe-html.pipe.d.ts +1 -1
  23. package/lib/pipes/trend-it.pipe.d.ts +1 -1
  24. package/package.json +16 -9
  25. package/bundles/sin-pipes.umd.js +0 -378
  26. package/bundles/sin-pipes.umd.js.map +0 -1
  27. package/esm2015/lib/pipes/bytetoxformat.pipe.js +0 -25
  28. package/esm2015/lib/pipes/safe-html.pipe.js +0 -20
  29. package/esm2015/lib/sin-pipes.module.js +0 -61
  30. package/fesm2015/sin-pipes.js.map +0 -1
  31. /package/{esm2015/sin-pipes.js → esm2022/sin-pipes.mjs} +0 -0
  32. /package/{sin-pipes.d.ts → index.d.ts} +0 -0
@@ -6,5 +6,5 @@ import * as i0 from "@angular/core";
6
6
  export declare class CurrencyItPipe implements PipeTransform {
7
7
  transform(input: any): any;
8
8
  static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyItPipe, never>;
9
- static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyItPipe, "currency_it">;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyItPipe, "currency_it", false>;
10
10
  }
@@ -11,5 +11,5 @@ export declare class FilterPipe implements PipeTransform {
11
11
  */
12
12
  applyFilter(item: any, filter: string): boolean;
13
13
  static ɵfac: i0.ɵɵFactoryDeclaration<FilterPipe, never>;
14
- static ɵpipe: i0.ɵɵPipeDeclaration<FilterPipe, "filter">;
14
+ static ɵpipe: i0.ɵɵPipeDeclaration<FilterPipe, "filter", false>;
15
15
  }
@@ -4,5 +4,5 @@ import * as i0 from "@angular/core";
4
4
  export declare class FormErrorPipe implements PipeTransform {
5
5
  transform(errors: ValidationErrors): any;
6
6
  static ɵfac: i0.ɵɵFactoryDeclaration<FormErrorPipe, never>;
7
- static ɵpipe: i0.ɵɵPipeDeclaration<FormErrorPipe, "formError">;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<FormErrorPipe, "formError", false>;
8
8
  }
@@ -6,5 +6,5 @@ import * as i0 from "@angular/core";
6
6
  export declare class NumberItPipe implements PipeTransform {
7
7
  transform(input: any): any;
8
8
  static ɵfac: i0.ɵɵFactoryDeclaration<NumberItPipe, never>;
9
- static ɵpipe: i0.ɵɵPipeDeclaration<NumberItPipe, "number_it">;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<NumberItPipe, "number_it", false>;
10
10
  }
@@ -6,5 +6,5 @@ export declare class SafeHtmlPipe implements PipeTransform {
6
6
  constructor(sanitizer: DomSanitizer);
7
7
  transform(html: any, args?: any): any;
8
8
  static ɵfac: i0.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
9
- static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml">;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml", false>;
10
10
  }
@@ -6,5 +6,5 @@ import * as i0 from "@angular/core";
6
6
  export declare class TrendItPipe implements PipeTransform {
7
7
  transform(input: any): any;
8
8
  static ɵfac: i0.ɵɵFactoryDeclaration<TrendItPipe, never>;
9
- static ɵpipe: i0.ɵɵPipeDeclaration<TrendItPipe, "trend_it">;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<TrendItPipe, "trend_it", false>;
10
10
  }
package/package.json CHANGED
@@ -1,18 +1,25 @@
1
1
  {
2
2
  "name": "sin-pipes",
3
- "version": "1.0.6",
3
+ "version": "2.0.0",
4
4
  "peerDependencies": {
5
- "@angular/common": ">=12.0.0",
6
- "@angular/core": ">=12.0.0"
5
+ "@angular/common": ">=15.0.0 < 17.0.0",
6
+ "@angular/core": ">=15.0.0 < 17.0.0"
7
7
  },
8
8
  "dependencies": {
9
9
  "tslib": "^2.0.0"
10
10
  },
11
- "main": "bundles/sin-pipes.umd.js",
12
- "module": "fesm2015/sin-pipes.js",
13
- "es2015": "fesm2015/sin-pipes.js",
14
- "esm2015": "esm2015/sin-pipes.js",
15
- "fesm2015": "fesm2015/sin-pipes.js",
16
- "typings": "sin-pipes.d.ts",
11
+ "module": "fesm2022/sin-pipes.mjs",
12
+ "typings": "index.d.ts",
13
+ "exports": {
14
+ "./package.json": {
15
+ "default": "./package.json"
16
+ },
17
+ ".": {
18
+ "types": "./index.d.ts",
19
+ "esm2022": "./esm2022/sin-pipes.mjs",
20
+ "esm": "./esm2022/sin-pipes.mjs",
21
+ "default": "./fesm2022/sin-pipes.mjs"
22
+ }
23
+ },
17
24
  "sideEffects": false
18
25
  }
@@ -1,378 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/platform-browser')) :
3
- typeof define === 'function' && define.amd ? define('sin-pipes', ['exports', '@angular/core', '@angular/platform-browser'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['sin-pipes'] = {}, global.ng.core, global.ng.platformBrowser));
5
- }(this, (function (exports, i0, i1) { 'use strict';
6
-
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () {
17
- return e[k];
18
- }
19
- });
20
- }
21
- });
22
- }
23
- n['default'] = e;
24
- return Object.freeze(n);
25
- }
26
-
27
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
-
30
- /**
31
- * Filtro che replica il "filter" di AngularJS (da usare con parsimonia, se una vista necessita un filtro particolare è meglio farne uno specifico)
32
- */
33
- var FilterPipe = /** @class */ (function () {
34
- function FilterPipe() {
35
- }
36
- FilterPipe.prototype.transform = function (items, searchText) {
37
- var _this = this;
38
- if (searchText === '')
39
- searchText = undefined;
40
- if (searchText !== undefined && items !== undefined && searchText !== null) {
41
- searchText = searchText.toLowerCase();
42
- return items.filter(function (item) {
43
- return _this.applyFilter(item, searchText);
44
- });
45
- }
46
- else {
47
- return items;
48
- }
49
- };
50
- /**
51
- * TODO da migliorare con l'implementazione delle date e/o altri tipi
52
- * Applica il filtro all'oggetto
53
- */
54
- FilterPipe.prototype.applyFilter = function (item, filter) {
55
- for (var field in item) {
56
- if (item[field] === null)
57
- continue;
58
- if (typeof item[field] === 'string') {
59
- if (item[field].toLowerCase().indexOf(filter) !== -1) {
60
- return true;
61
- }
62
- }
63
- else if (typeof item[field] === 'number') {
64
- if (item[field] === filter) {
65
- return true;
66
- }
67
- }
68
- }
69
- return false;
70
- };
71
- return FilterPipe;
72
- }());
73
- FilterPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: FilterPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
74
- FilterPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: FilterPipe, name: "filter" });
75
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: FilterPipe, decorators: [{
76
- type: i0.Pipe,
77
- args: [{
78
- name: 'filter'
79
- }]
80
- }] });
81
-
82
- /**
83
- * Filtro per la formattazioni di numeri
84
- */
85
- var NumberItPipe = /** @class */ (function () {
86
- function NumberItPipe() {
87
- }
88
- NumberItPipe.prototype.transform = function (input) {
89
- if (input === undefined || input === null) {
90
- return '';
91
- }
92
- return input.toLocaleString();
93
- };
94
- return NumberItPipe;
95
- }());
96
- NumberItPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: NumberItPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
97
- NumberItPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: NumberItPipe, name: "number_it" });
98
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: NumberItPipe, decorators: [{
99
- type: i0.Pipe,
100
- args: [{
101
- name: 'number_it'
102
- }]
103
- }] });
104
-
105
- /**
106
- * Filtro per la formattazione di un numero % ( come il trend )
107
- */
108
- var TrendItPipe = /** @class */ (function () {
109
- function TrendItPipe() {
110
- }
111
- TrendItPipe.prototype.transform = function (input) {
112
- if (input === undefined || input === null) {
113
- return '';
114
- }
115
- return input.toLocaleString() + ' %';
116
- };
117
- return TrendItPipe;
118
- }());
119
- TrendItPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: TrendItPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
120
- TrendItPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: TrendItPipe, name: "trend_it" });
121
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: TrendItPipe, decorators: [{
122
- type: i0.Pipe,
123
- args: [{
124
- name: 'trend_it'
125
- }]
126
- }] });
127
-
128
- /**
129
- * Filtro per la formattazione degli importi ( per ora fisso in € )
130
- */
131
- var CurrencyItPipe = /** @class */ (function () {
132
- function CurrencyItPipe() {
133
- }
134
- CurrencyItPipe.prototype.transform = function (input) {
135
- if (input === undefined || input === null) {
136
- return "";
137
- }
138
- var moneystr = "";
139
- var dec = (input - Math.floor(input) == 0) ? ",00" : "";
140
- moneystr = input.toLocaleString() + dec + " \u20AC";
141
- return moneystr;
142
- };
143
- return CurrencyItPipe;
144
- }());
145
- CurrencyItPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: CurrencyItPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
146
- CurrencyItPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: CurrencyItPipe, name: "currency_it" });
147
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: CurrencyItPipe, decorators: [{
148
- type: i0.Pipe,
149
- args: [{
150
- name: 'currency_it'
151
- }]
152
- }] });
153
-
154
- var SafeHtmlPipe = /** @class */ (function () {
155
- function SafeHtmlPipe(sanitizer) {
156
- this.sanitizer = sanitizer;
157
- }
158
- SafeHtmlPipe.prototype.transform = function (html, args) {
159
- return this.sanitizer.bypassSecurityTrustHtml(html);
160
- };
161
- return SafeHtmlPipe;
162
- }());
163
- SafeHtmlPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: SafeHtmlPipe, deps: [{ token: i1__namespace.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
164
- SafeHtmlPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: SafeHtmlPipe, name: "safeHtml" });
165
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: SafeHtmlPipe, decorators: [{
166
- type: i0.Pipe,
167
- args: [{
168
- name: 'safeHtml'
169
- }]
170
- }], ctorParameters: function () { return [{ type: i1__namespace.DomSanitizer }]; } });
171
-
172
- /**
173
- * Filtro per la formattazione di booleani in visualizzazione
174
- */
175
- var BooleanItPipe = /** @class */ (function () {
176
- function BooleanItPipe() {
177
- }
178
- BooleanItPipe.prototype.transform = function (value) {
179
- var args = [];
180
- for (var _i = 1; _i < arguments.length; _i++) {
181
- args[_i - 1] = arguments[_i];
182
- }
183
- return value === true ? 'Si' : 'No';
184
- };
185
- return BooleanItPipe;
186
- }());
187
- BooleanItPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: BooleanItPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
188
- BooleanItPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: BooleanItPipe, name: "booleanIt" });
189
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: BooleanItPipe, decorators: [{
190
- type: i0.Pipe,
191
- args: [{
192
- name: 'booleanIt'
193
- }]
194
- }] });
195
-
196
- /**
197
- * Filtro per la formattazione del size dei file
198
- */
199
- var ByteToXFormatPipe = /** @class */ (function () {
200
- function ByteToXFormatPipe() {
201
- }
202
- ByteToXFormatPipe.prototype.transform = function (value, newFormat) {
203
- if (newFormat === 'kilobytes') {
204
- return (value / 1024).toFixed(2);
205
- }
206
- if (newFormat === 'megabytes') {
207
- return (value / (Math.pow(1024, 2))).toFixed(2);
208
- }
209
- if (newFormat === 'gigbytes') {
210
- return (value / (Math.pow(1024, 3))).toFixed(2);
211
- }
212
- };
213
- return ByteToXFormatPipe;
214
- }());
215
- ByteToXFormatPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: ByteToXFormatPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
216
- ByteToXFormatPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: ByteToXFormatPipe, name: "bytetoxformat" });
217
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: ByteToXFormatPipe, decorators: [{
218
- type: i0.Pipe,
219
- args: [{ name: 'bytetoxformat' }]
220
- }] });
221
-
222
- var FormErrorPipe = /** @class */ (function () {
223
- function FormErrorPipe() {
224
- }
225
- FormErrorPipe.prototype.transform = function (errors) {
226
- if (errors) {
227
- var text_1 = '';
228
- Object.keys(errors).forEach(function (error) {
229
- switch (error) {
230
- case 'required':
231
- text_1 += " campo obbligatorio !";
232
- break;
233
- case 'pattern':
234
- text_1 += " ha un formato non valido !";
235
- break;
236
- case 'requiredPattern':
237
- text_1 += " non rispetta la formattazione richiesta !";
238
- break;
239
- case 'invalid':
240
- text_1 += " ha un formato non valido !";
241
- break;
242
- case 'email':
243
- text_1 += " ha un formato non valido !";
244
- break;
245
- case 'minlength':
246
- text_1 += " lunghezza minima " + errors[error].requiredLength + " caratteri !";
247
- break;
248
- case 'maxlength':
249
- text_1 += " lunghezza massima " + errors[error].requiredLength + " caratteri !";
250
- break;
251
- case 'areEqual':
252
- text_1 += " deve essere uguale !";
253
- break;
254
- case 'ngbDate':
255
- text_1 += " ha un formato non valido !";
256
- break;
257
- case 'value':
258
- text_1 += " ha un formato non valido !";
259
- break;
260
- case 'actualValue':
261
- break;
262
- default:
263
- text_1 += error + ": " + errors[error];
264
- }
265
- });
266
- return text_1;
267
- }
268
- return '';
269
- };
270
- return FormErrorPipe;
271
- }());
272
- FormErrorPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: FormErrorPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
273
- FormErrorPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: FormErrorPipe, name: "formError" });
274
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: FormErrorPipe, decorators: [{
275
- type: i0.Pipe,
276
- args: [{
277
- name: 'formError'
278
- }]
279
- }] });
280
-
281
- var CamelCaseToSplitPipe = /** @class */ (function () {
282
- function CamelCaseToSplitPipe() {
283
- }
284
- CamelCaseToSplitPipe.prototype.transform = function (value) {
285
- if (value === value.toUpperCase() || value === value.toLowerCase()) {
286
- return value;
287
- }
288
- else {
289
- return value.match(/[A-Z][a-z]+|[0-9]+/g).join(' ');
290
- }
291
- };
292
- return CamelCaseToSplitPipe;
293
- }());
294
- CamelCaseToSplitPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: CamelCaseToSplitPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
295
- CamelCaseToSplitPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: CamelCaseToSplitPipe, name: "camelCaseToSplit" });
296
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: CamelCaseToSplitPipe, decorators: [{
297
- type: i0.Pipe,
298
- args: [{
299
- name: 'camelCaseToSplit'
300
- }]
301
- }] });
302
-
303
- var SinPipesModule = /** @class */ (function () {
304
- function SinPipesModule() {
305
- }
306
- return SinPipesModule;
307
- }());
308
- SinPipesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: SinPipesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
309
- SinPipesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: SinPipesModule, declarations: [FilterPipe,
310
- NumberItPipe,
311
- TrendItPipe,
312
- CurrencyItPipe,
313
- SafeHtmlPipe,
314
- BooleanItPipe,
315
- ByteToXFormatPipe,
316
- FormErrorPipe,
317
- CamelCaseToSplitPipe], exports: [FilterPipe,
318
- NumberItPipe,
319
- TrendItPipe,
320
- CurrencyItPipe,
321
- SafeHtmlPipe,
322
- BooleanItPipe,
323
- ByteToXFormatPipe,
324
- FormErrorPipe,
325
- CamelCaseToSplitPipe] });
326
- SinPipesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: SinPipesModule, imports: [[]] });
327
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0__namespace, type: SinPipesModule, decorators: [{
328
- type: i0.NgModule,
329
- args: [{
330
- declarations: [
331
- FilterPipe,
332
- NumberItPipe,
333
- TrendItPipe,
334
- CurrencyItPipe,
335
- SafeHtmlPipe,
336
- BooleanItPipe,
337
- ByteToXFormatPipe,
338
- FormErrorPipe,
339
- CamelCaseToSplitPipe
340
- ],
341
- imports: [],
342
- exports: [
343
- FilterPipe,
344
- NumberItPipe,
345
- TrendItPipe,
346
- CurrencyItPipe,
347
- SafeHtmlPipe,
348
- BooleanItPipe,
349
- ByteToXFormatPipe,
350
- FormErrorPipe,
351
- CamelCaseToSplitPipe
352
- ]
353
- }]
354
- }] });
355
-
356
- /*
357
- * Public API Surface of sin-pipes
358
- */
359
-
360
- /**
361
- * Generated bundle index. Do not edit.
362
- */
363
-
364
- exports.BooleanItPipe = BooleanItPipe;
365
- exports.ByteToXFormatPipe = ByteToXFormatPipe;
366
- exports.CamelCaseToSplitPipe = CamelCaseToSplitPipe;
367
- exports.CurrencyItPipe = CurrencyItPipe;
368
- exports.FilterPipe = FilterPipe;
369
- exports.FormErrorPipe = FormErrorPipe;
370
- exports.NumberItPipe = NumberItPipe;
371
- exports.SafeHtmlPipe = SafeHtmlPipe;
372
- exports.SinPipesModule = SinPipesModule;
373
- exports.TrendItPipe = TrendItPipe;
374
-
375
- Object.defineProperty(exports, '__esModule', { value: true });
376
-
377
- })));
378
- //# sourceMappingURL=sin-pipes.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sin-pipes.umd.js","sources":["../../../projects/sin-pipes/src/lib/pipes/filter.pipe.ts","../../../projects/sin-pipes/src/lib/pipes/number-it.pipe.ts","../../../projects/sin-pipes/src/lib/pipes/trend-it.pipe.ts","../../../projects/sin-pipes/src/lib/pipes/currency-it.pipe.ts","../../../projects/sin-pipes/src/lib/pipes/safe-html.pipe.ts","../../../projects/sin-pipes/src/lib/pipes/boolean-it.pipe.ts","../../../projects/sin-pipes/src/lib/pipes/bytetoxformat.pipe.ts","../../../projects/sin-pipes/src/lib/pipes/form-error.pipe.ts","../../../projects/sin-pipes/src/lib/pipes/camel-case-to-split.pipe.ts","../../../projects/sin-pipes/src/lib/sin-pipes.module.ts","../../../projects/sin-pipes/src/public-api.ts","../../../projects/sin-pipes/src/sin-pipes.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n/**\r\n * Filtro che replica il \"filter\" di AngularJS (da usare con parsimonia, se una vista necessita un filtro particolare è meglio farne uno specifico)\r\n */\r\n@Pipe({\r\n name: 'filter'\r\n})\r\nexport class FilterPipe implements PipeTransform {\r\n\r\n transform(items: any[], searchText: string): any {\r\n if (searchText === '') searchText = undefined;\r\n\r\n if (searchText !== undefined && items !== undefined && searchText !== null) {\r\n searchText = searchText.toLowerCase();\r\n return items.filter(item => {\r\n return this.applyFilter(item, searchText);\r\n });\r\n } else {\r\n return items;\r\n }\r\n }\r\n\r\n /**\r\n * TODO da migliorare con l'implementazione delle date e/o altri tipi\r\n * Applica il filtro all'oggetto\r\n */\r\n applyFilter(item: any, filter: string): boolean {\r\n for (const field in item) {\r\n if (item[field] === null) continue;\r\n\r\n if (typeof item[field] === 'string') {\r\n if (item[field].toLowerCase().indexOf(filter) !== -1) {\r\n return true;\r\n }\r\n } else if (typeof item[field] === 'number') {\r\n if (item[field] === filter) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Filtro per la formattazioni di numeri\n */\n@Pipe({\n name: 'number_it'\n})\nexport class NumberItPipe implements PipeTransform {\n\n transform(input: any): any {\n if (input === undefined || input === null) {\n return '';\n }\n return input.toLocaleString();\n }\n\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Filtro per la formattazione di un numero % ( come il trend )\n */\n@Pipe({\n name: 'trend_it'\n})\nexport class TrendItPipe implements PipeTransform {\n\n transform(input: any): any {\n if (input === undefined || input === null) {\n return '';\n }\n return input.toLocaleString() + ' %';\n }\n\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Filtro per la formattazione degli importi ( per ora fisso in € )\n */\n@Pipe({\n name: 'currency_it'\n})\nexport class CurrencyItPipe implements PipeTransform {\n\n transform(input: any): any\n {\n if (input === undefined || input === null)\n {\n return \"\";\n }\n\n let moneystr = \"\";\n let dec = (input - Math.floor(input) == 0) ? \",00\" : \"\";\n moneystr = input.toLocaleString() + dec + \" \\u20AC\";\n return moneystr;\n }\n\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport {DomSanitizer} from '@angular/platform-browser';\n\n@Pipe({\n name: 'safeHtml'\n})\nexport class SafeHtmlPipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) { }\n\n transform(html: any, args?: any): any {\n return this.sanitizer.bypassSecurityTrustHtml(html);\n }\n\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Filtro per la formattazione di booleani in visualizzazione\n */\n@Pipe({\n name: 'booleanIt'\n})\nexport class BooleanItPipe implements PipeTransform {\n\n transform(value: any, ...args: any[]): any {\n return value === true ? 'Si' : 'No';\n }\n\n}\n\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n/**\r\n * Filtro per la formattazione del size dei file\r\n */\r\n@Pipe({ name: 'bytetoxformat' })\r\nexport class ByteToXFormatPipe implements PipeTransform {\r\n transform(value: number, newFormat: string): string {\r\n if (newFormat === 'kilobytes') {\r\n return (value / 1024).toFixed(2);\r\n }\r\n if (newFormat === 'megabytes') {\r\n return (value / (1024 ** 2)).toFixed(2);\r\n }\r\n if (newFormat === 'gigbytes') {\r\n return (value / (1024 ** 3)).toFixed(2);\r\n }\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {ValidationErrors} from '@angular/forms';\n\n@Pipe({\n name: 'formError'\n})\nexport class FormErrorPipe implements PipeTransform {\n\n transform(errors: ValidationErrors): any {\n if (errors) {\n let text: string = '';\n Object.keys(errors).forEach(error => {\n switch (error) {\n case 'required':\n text += ` campo obbligatorio !`;\n break;\n case 'pattern':\n text += ` ha un formato non valido !`;\n break;\n case 'requiredPattern':\n text += ` non rispetta la formattazione richiesta !`;\n break;\n case 'invalid':\n text += ` ha un formato non valido !`;\n break;\n case 'email':\n text += ` ha un formato non valido !`;\n break;\n case 'minlength':\n text += ` lunghezza minima ${errors[error].requiredLength} caratteri !`;\n break;\n case 'maxlength':\n text += ` lunghezza massima ${errors[error].requiredLength} caratteri !`;\n break;\n case 'areEqual':\n text += ` deve essere uguale !`;\n break;\n case 'ngbDate':\n text += ` ha un formato non valido !`;\n break;\n case 'value':\n text += ` ha un formato non valido !`;\n break;\n case 'actualValue':\n break;\n default:\n text += `${error}: ${errors[error]}`;\n }\n });\n return text;\n }\n return '';\n }\n\n}\n","import {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({\n name: 'camelCaseToSplit'\n})\nexport class CamelCaseToSplitPipe implements PipeTransform {\n\n transform(value: string): string {\n if (value === value.toUpperCase() || value === value.toLowerCase()) {\n return value;\n } else {\n return value.match(/[A-Z][a-z]+|[0-9]+/g).join(' ');\n }\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { FilterPipe } from './pipes/filter.pipe';\nimport { NumberItPipe } from './pipes/number-it.pipe';\nimport { TrendItPipe } from './pipes/trend-it.pipe';\nimport { CurrencyItPipe } from './pipes/currency-it.pipe';\nimport { SafeHtmlPipe } from './pipes/safe-html.pipe';\nimport {BooleanItPipe} from './pipes/boolean-it.pipe';\nimport {ByteToXFormatPipe} from './pipes/bytetoxformat.pipe';\nimport {FormErrorPipe} from './pipes/form-error.pipe';\nimport {CamelCaseToSplitPipe} from './pipes/camel-case-to-split.pipe';\n\n@NgModule({\n declarations: [\n FilterPipe,\n NumberItPipe,\n TrendItPipe,\n CurrencyItPipe,\n SafeHtmlPipe,\n BooleanItPipe,\n ByteToXFormatPipe,\n FormErrorPipe,\n CamelCaseToSplitPipe\n ],\n imports: [ ],\n exports: [\n FilterPipe,\n NumberItPipe,\n TrendItPipe,\n CurrencyItPipe,\n SafeHtmlPipe,\n BooleanItPipe,\n ByteToXFormatPipe,\n FormErrorPipe,\n CamelCaseToSplitPipe\n ]\n})\nexport class SinPipesModule { }\n","/*\n * Public API Surface of sin-pipes\n */\n\nexport * from './lib/sin-pipes.module';\n\nexport * from './lib/pipes/boolean-it.pipe';\nexport * from './lib/pipes/bytetoxformat.pipe';\nexport * from './lib/pipes/camel-case-to-split.pipe';\nexport * from './lib/pipes/filter.pipe';\nexport * from './lib/pipes/form-error.pipe';\nexport * from './lib/pipes/currency-it.pipe';\nexport * from './lib/pipes/number-it.pipe';\nexport * from './lib/pipes/safe-html.pipe';\nexport * from './lib/pipes/trend-it.pipe';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Pipe","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEA;;;;QAMA;;QAEE,8BAAS,GAAT,UAAU,KAAY,EAAE,UAAkB;YAA1C,iBAWC;YAVC,IAAI,UAAU,KAAK,EAAE;gBAAE,UAAU,GAAG,SAAS,CAAC;YAE9C,IAAI,UAAU,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,IAAI,UAAU,KAAK,IAAI,EAAE;gBAC1E,UAAU,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;gBACtC,OAAO,KAAK,CAAC,MAAM,CAAC,UAAA,IAAI;oBACtB,OAAO,KAAI,CAAC,WAAW,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;iBAC3C,CAAC,CAAC;aACJ;iBAAM;gBACL,OAAO,KAAK,CAAC;aACd;SACF;;;;;QAMD,gCAAW,GAAX,UAAY,IAAS,EAAE,MAAc;YACnC,KAAK,IAAM,KAAK,IAAI,IAAI,EAAE;gBACxB,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI;oBAAE,SAAS;gBAEnC,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,QAAQ,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;;;;;;;;;;"}
@@ -1,25 +0,0 @@
1
- import { Pipe } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Filtro per la formattazione del size dei file
5
- */
6
- export class ByteToXFormatPipe {
7
- transform(value, newFormat) {
8
- if (newFormat === 'kilobytes') {
9
- return (value / 1024).toFixed(2);
10
- }
11
- if (newFormat === 'megabytes') {
12
- return (value / (Math.pow(1024, 2))).toFixed(2);
13
- }
14
- if (newFormat === 'gigbytes') {
15
- return (value / (Math.pow(1024, 3))).toFixed(2);
16
- }
17
- }
18
- }
19
- ByteToXFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0, type: ByteToXFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
20
- ByteToXFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0, type: ByteToXFormatPipe, name: "bytetoxformat" });
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0, type: ByteToXFormatPipe, decorators: [{
22
- type: Pipe,
23
- args: [{ name: 'bytetoxformat' }]
24
- }] });
25
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnl0ZXRveGZvcm1hdC5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2luLXBpcGVzL3NyYy9saWIvcGlwZXMvYnl0ZXRveGZvcm1hdC5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDOztBQUVwRDs7R0FFRztBQUVILE1BQU0sT0FBTyxpQkFBaUI7SUFDNUIsU0FBUyxDQUFDLEtBQWEsRUFBRSxTQUFpQjtRQUN4QyxJQUFJLFNBQVMsS0FBSyxXQUFX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gKHZhbHVlIC8gMTAyNCkudG9GaXhlZCgyKTtcclxuICAgIH1cclxuICAgIGlmIChuZXdGb3JtYXQgPT09ICdtZWdhYnl0ZXMnKSB7XHJcbiAgICAgIHJldHVybiAodmFsdWUgLyAoMTAyNCAqKiAyKSkudG9GaXhlZCgyKTtcclxuICAgIH1cclxuICAgIGlmIChuZXdGb3JtYXQgPT09ICdnaWdieXRlcycpIHtcclxuICAgICAgcmV0dXJuICh2YWx1ZSAvICgxMDI0ICoqIDMpKS50b0ZpeGVkKDIpO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
@@ -1,20 +0,0 @@
1
- import { Pipe } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@angular/platform-browser";
4
- export class SafeHtmlPipe {
5
- constructor(sanitizer) {
6
- this.sanitizer = sanitizer;
7
- }
8
- transform(html, args) {
9
- return this.sanitizer.bypassSecurityTrustHtml(html);
10
- }
11
- }
12
- SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
13
- SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0, type: SafeHtmlPipe, name: "safeHtml" });
14
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0, type: SafeHtmlPipe, decorators: [{
15
- type: Pipe,
16
- args: [{
17
- name: 'safeHtml'
18
- }]
19
- }], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
20
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2FmZS1odG1sLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9zaW4tcGlwZXMvc3JjL2xpYi9waXB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from './pipes/number-it.pipe';
4
- import { TrendItPipe } from './pipes/trend-it.pipe';
5
- import { CurrencyItPipe } from './pipes/currency-it.pipe';
6
- import { SafeHtmlPipe } from './pipes/safe-html.pipe';
7
- import { BooleanItPipe } from './pipes/boolean-it.pipe';
8
- import { ByteToXFormatPipe } from './pipes/bytetoxformat.pipe';
9
- import { FormErrorPipe } from './pipes/form-error.pipe';
10
- import { CamelCaseToSplitPipe } from './pipes/camel-case-to-split.pipe';
11
- import * as i0 from "@angular/core";
12
- export class SinPipesModule {
13
- }
14
- SinPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0, type: SinPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
15
- SinPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0, type: SinPipesModule, declarations: [FilterPipe,
16
- NumberItPipe,
17
- TrendItPipe,
18
- CurrencyItPipe,
19
- SafeHtmlPipe,
20
- BooleanItPipe,
21
- ByteToXFormatPipe,
22
- FormErrorPipe,
23
- CamelCaseToSplitPipe], exports: [FilterPipe,
24
- NumberItPipe,
25
- TrendItPipe,
26
- CurrencyItPipe,
27
- SafeHtmlPipe,
28
- BooleanItPipe,
29
- ByteToXFormatPipe,
30
- FormErrorPipe,
31
- CamelCaseToSplitPipe] });
32
- SinPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0, type: SinPipesModule, imports: [[]] });
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.1", ngImport: i0, type: SinPipesModule, decorators: [{
34
- type: NgModule,
35
- args: [{
36
- declarations: [
37
- FilterPipe,
38
- NumberItPipe,
39
- TrendItPipe,
40
- CurrencyItPipe,
41
- SafeHtmlPipe,
42
- BooleanItPipe,
43
- ByteToXFormatPipe,
44
- FormErrorPipe,
45
- CamelCaseToSplitPipe
46
- ],
47
- imports: [],
48
- exports: [
49
- FilterPipe,
50
- NumberItPipe,
51
- TrendItPipe,
52
- CurrencyItPipe,
53
- SafeHtmlPipe,
54
- BooleanItPipe,
55
- ByteToXFormatPipe,
56
- FormErrorPipe,
57
- CamelCaseToSplitPipe
58
- ]
59
- }]
60
- }] });
61
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2luLXBpcGVzLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3Npbi1waXBlcy9zcmMvbGliL3Npbi1waXBlcy5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDakQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ3RELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUNwRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDMUQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ3RELE9BQU8sRUFBQyxhQUFhLEVBQUMsTUFBTSx5QkFBeUIsQ0FBQztBQUN0RCxPQUFPLEVBQUMsaUJBQWlCLEVBQUMsTUFBTSw0QkFBNEIsQ0FBQztBQUM3RCxPQUFPLEVBQUMsYUFBYSxFQUFDLE1BQU0seUJBQXlCLENBQUM7QUFDdEQsT0FBTyxFQUFDLG9CQUFvQixFQUFDLE1BQU0sa0NBQWtDLENBQUM7O0FBMkJ0RSxNQUFNLE9BQU8sY0FBYzs7MkdBQWQsY0FBYzs0R0FBZCxjQUFjLGlCQXZCdkIsVUFBVTtRQUNWLFlB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