@esfaenza/forms-and-validations 11.2.40 → 11.2.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/esfaenza-forms-and-validations.umd.js +25 -6
- package/bundles/esfaenza-forms-and-validations.umd.js.map +1 -1
- package/esfaenza-forms-and-validations.metadata.json +1 -1
- package/esm2015/lib/forms/form-adaptive/form-adaptive.component.js +12 -3
- package/esm2015/lib/forms/form-autocomplete/form-autocomplete.component.js +12 -3
- package/esm2015/lib/forms/form-multiselect/form-multiselect.component.js +3 -2
- package/esm2015/lib/forms/form-template/form-template.component.js +2 -2
- package/fesm2015/esfaenza-forms-and-validations.js +25 -6
- package/fesm2015/esfaenza-forms-and-validations.js.map +1 -1
- package/lib/forms/form-adaptive/form-adaptive.component.d.ts +4 -0
- package/lib/forms/form-autocomplete/form-autocomplete.component.d.ts +4 -0
- package/lib/forms/form-multiselect/form-multiselect.component.d.ts +1 -0
- package/package.json +7 -7
|
@@ -2340,6 +2340,10 @@
|
|
|
2340
2340
|
* Numero minimo di caratteri con cui cercare
|
|
2341
2341
|
*/
|
|
2342
2342
|
_this.MinChars = 3;
|
|
2343
|
+
/**
|
|
2344
|
+
* Indica se i controlli devono essere effettuati tenendo conto del Case o meno. Vale solo qualora la **Source** fosse fornita
|
|
2345
|
+
*/
|
|
2346
|
+
_this.CaseSensitive = false;
|
|
2343
2347
|
/**
|
|
2344
2348
|
* Variabile interna che gestisce se effettuare il riallineamento dei dati o meno
|
|
2345
2349
|
*/
|
|
@@ -2447,6 +2451,10 @@
|
|
|
2447
2451
|
}
|
|
2448
2452
|
// Quando filtro la source, se non devo ignorare l'evento devo comunque assicurarmi di impostare il valore selezionato a null
|
|
2449
2453
|
_super.prototype.changed.call(this, "");
|
|
2454
|
+
if (!event && this.MinChars == 0 && !this.SearchFunction) {
|
|
2455
|
+
this.FilteredBoundSource = this.BoundSource;
|
|
2456
|
+
return;
|
|
2457
|
+
}
|
|
2450
2458
|
if (!event || event.length < this.MinChars) {
|
|
2451
2459
|
this.FilteredBoundSource = [];
|
|
2452
2460
|
return;
|
|
@@ -2467,7 +2475,7 @@
|
|
|
2467
2475
|
else {
|
|
2468
2476
|
this.throttla("filtersource", function () {
|
|
2469
2477
|
// In questo caso devo filtrare io in memoria
|
|
2470
|
-
_this.FilteredBoundSource = _this.BoundSource.filter(function (t) { return t.description.includes(event); });
|
|
2478
|
+
_this.FilteredBoundSource = _this.BoundSource.filter(function (t) { return (_this.CaseSensitive && t.description.includes(event)) || (!_this.CaseSensitive && t.description.toLowerCase().includes(event.toLowerCase())); });
|
|
2471
2479
|
_this.cdr.markForCheck();
|
|
2472
2480
|
}, 100);
|
|
2473
2481
|
}
|
|
@@ -2566,7 +2574,8 @@
|
|
|
2566
2574
|
Precision: [{ type: core.Input }],
|
|
2567
2575
|
Alignment: [{ type: core.Input }],
|
|
2568
2576
|
SearchFunction: [{ type: core.Input }],
|
|
2569
|
-
MinChars: [{ type: core.Input }]
|
|
2577
|
+
MinChars: [{ type: core.Input }],
|
|
2578
|
+
CaseSensitive: [{ type: core.Input }]
|
|
2570
2579
|
};
|
|
2571
2580
|
|
|
2572
2581
|
// Angular
|
|
@@ -2656,7 +2665,7 @@
|
|
|
2656
2665
|
FormTemplateComponent.decorators = [
|
|
2657
2666
|
{ type: core.Component, args: [{
|
|
2658
2667
|
selector: "form-template",
|
|
2659
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-content></ng-content>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}
|
|
2668
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-content></ng-content>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}<span *ngIf=\"Label\">:</span></label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>",
|
|
2660
2669
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
2661
2670
|
},] }
|
|
2662
2671
|
];
|
|
@@ -3153,7 +3162,8 @@
|
|
|
3153
3162
|
text: this.SelectLabel || this.lc.loc("Select one or more values..."),
|
|
3154
3163
|
enableCheckAll: true,
|
|
3155
3164
|
disabled: disabled,
|
|
3156
|
-
labelKey: "description"
|
|
3165
|
+
labelKey: "description",
|
|
3166
|
+
tagToBody: false
|
|
3157
3167
|
};
|
|
3158
3168
|
};
|
|
3159
3169
|
/**
|
|
@@ -3313,6 +3323,10 @@
|
|
|
3313
3323
|
* Override del placeholder per select requried
|
|
3314
3324
|
*/
|
|
3315
3325
|
_this.RequiredPlaceholder = null;
|
|
3326
|
+
/**
|
|
3327
|
+
* Indica se i controlli devono essere effettuati tenendo conto del Case o meno. Vale solo qualora la **Source** fosse fornita
|
|
3328
|
+
*/
|
|
3329
|
+
_this.CaseSensitive = false;
|
|
3316
3330
|
/**
|
|
3317
3331
|
* Indica se ignorare il prossimo evento writeValue che normalmente dovrebbe richiedere la nuova source. Serve per quando l'utente seleziona un elemento:
|
|
3318
3332
|
* Subito dopo partirebbe un altro evento modelChange che ricaricherebbe nuovamente la source
|
|
@@ -3368,6 +3382,10 @@
|
|
|
3368
3382
|
}
|
|
3369
3383
|
// Quando filtro la source, se non devo ignorare l'evento devo comunque assicurarmi di impostare il valore selezionato a null
|
|
3370
3384
|
_super.prototype.changed.call(this, "");
|
|
3385
|
+
if (!event && this.MinChars == 0 && !this.SearchFunction) {
|
|
3386
|
+
this.FilteredBoundSource = this.BoundSource;
|
|
3387
|
+
return;
|
|
3388
|
+
}
|
|
3371
3389
|
if (!event || event.length < this.MinChars) {
|
|
3372
3390
|
this.FilteredBoundSource = [];
|
|
3373
3391
|
return;
|
|
@@ -3388,7 +3406,7 @@
|
|
|
3388
3406
|
else {
|
|
3389
3407
|
this.throttla("filtersource", function () {
|
|
3390
3408
|
// In questo caso devo filtrare io in memoria
|
|
3391
|
-
_this.FilteredBoundSource = _this.BoundSource.filter(function (t) { return t.description.includes(event); });
|
|
3409
|
+
_this.FilteredBoundSource = _this.BoundSource.filter(function (t) { return (_this.CaseSensitive && t.description.includes(event)) || (!_this.CaseSensitive && t.description.toLowerCase().includes(event.toLowerCase())); });
|
|
3392
3410
|
_this.cdr.markForCheck();
|
|
3393
3411
|
}, 100);
|
|
3394
3412
|
}
|
|
@@ -3456,7 +3474,8 @@
|
|
|
3456
3474
|
SelectLabel: [{ type: core.Input }],
|
|
3457
3475
|
SearchFunction: [{ type: core.Input }],
|
|
3458
3476
|
MinChars: [{ type: core.Input }],
|
|
3459
|
-
RequiredPlaceholder: [{ type: core.Input }]
|
|
3477
|
+
RequiredPlaceholder: [{ type: core.Input }],
|
|
3478
|
+
CaseSensitive: [{ type: core.Input }]
|
|
3460
3479
|
};
|
|
3461
3480
|
|
|
3462
3481
|
/**
|