@seniorsistemas/angular-components 17.3.13 → 17.3.14
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/seniorsistemas-angular-components.umd.js +46 -29
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/dynamic-form/components/lookup/lookup.component.d.ts +3 -2
- package/esm2015/components/dynamic-form/components/lookup/lookup.component.js +46 -30
- package/esm5/components/dynamic-form/components/lookup/lookup.component.js +47 -30
- package/fesm2015/seniorsistemas-angular-components.js +45 -29
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +46 -29
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -5304,27 +5304,7 @@
|
|
|
5304
5304
|
return result;
|
|
5305
5305
|
}, {});
|
|
5306
5306
|
this.formGroupDialog = new forms.FormGroup(formGroup);
|
|
5307
|
-
this.
|
|
5308
|
-
this.onSelect.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () { return _this.onChange(_this.value); });
|
|
5309
|
-
this.onUnselect.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () { return _this.onChange(_this.value); });
|
|
5310
|
-
this.onClear.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () {
|
|
5311
|
-
if (_this.multiple || _this.value) {
|
|
5312
|
-
return;
|
|
5313
|
-
}
|
|
5314
|
-
_this.onChange(null);
|
|
5315
|
-
});
|
|
5316
|
-
this.onFocus.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () {
|
|
5317
|
-
_this.onTouched();
|
|
5318
|
-
});
|
|
5319
|
-
this.onBlur.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (event) {
|
|
5320
|
-
var currentValue = _this.value && _this.value[_this.lookupDisplayField];
|
|
5321
|
-
var value = event.target.value;
|
|
5322
|
-
if (_this.multiple || !currentValue || currentValue == value)
|
|
5323
|
-
return;
|
|
5324
|
-
var newValue = "";
|
|
5325
|
-
event.target.value = newValue;
|
|
5326
|
-
_this.onChange(newValue);
|
|
5327
|
-
});
|
|
5307
|
+
this._subscribeEvents();
|
|
5328
5308
|
};
|
|
5329
5309
|
LookupComponent.prototype.printRecordTotalizer = function () {
|
|
5330
5310
|
if (this.searchTotalRecordsLabel) {
|
|
@@ -5476,15 +5456,15 @@
|
|
|
5476
5456
|
else
|
|
5477
5457
|
this.selected = [selected];
|
|
5478
5458
|
};
|
|
5479
|
-
LookupComponent.prototype.registerOnChange = function (
|
|
5459
|
+
LookupComponent.prototype.registerOnChange = function (onChange) {
|
|
5480
5460
|
var _this = this;
|
|
5481
|
-
this.onChange = function (
|
|
5482
|
-
_this.writeValue(
|
|
5483
|
-
|
|
5461
|
+
this.onChange = function (value) {
|
|
5462
|
+
_this.writeValue(value);
|
|
5463
|
+
onChange(value);
|
|
5484
5464
|
};
|
|
5485
5465
|
};
|
|
5486
|
-
LookupComponent.prototype.registerOnTouched = function (
|
|
5487
|
-
this.onTouched =
|
|
5466
|
+
LookupComponent.prototype.registerOnTouched = function (onTouched) {
|
|
5467
|
+
this.onTouched = onTouched;
|
|
5488
5468
|
};
|
|
5489
5469
|
LookupComponent.prototype.writeValue = function (value) {
|
|
5490
5470
|
this.value = value;
|
|
@@ -5592,7 +5572,7 @@
|
|
|
5592
5572
|
scale: this.getScale(col.scale),
|
|
5593
5573
|
decimalSeparator: (_a = col.numberLocaleOptions) === null || _a === void 0 ? void 0 : _a.decimalSeparator,
|
|
5594
5574
|
thousandsSeparator: (_b = col.numberLocaleOptions) === null || _b === void 0 ? void 0 : _b.thousandsSeparator,
|
|
5595
|
-
prefix: (_c = col.numberLocaleOptions) === null || _c === void 0 ? void 0 : _c.currencySymbol
|
|
5575
|
+
prefix: (_c = col.numberLocaleOptions) === null || _c === void 0 ? void 0 : _c.currencySymbol,
|
|
5596
5576
|
};
|
|
5597
5577
|
};
|
|
5598
5578
|
LookupComponent.prototype.onTableRowDoubleClick = function (rowData) {
|
|
@@ -5602,12 +5582,49 @@
|
|
|
5602
5582
|
LookupComponent.prototype._setFocusFilter = function () {
|
|
5603
5583
|
var _a, _b, _c;
|
|
5604
5584
|
if (this.dialogVisible && !this.collapsed) {
|
|
5605
|
-
var input = (_c = (_b = (_a = this.dialog) === null || _a === void 0 ? void 0 : _a.contentViewChild) === null || _b === void 0 ? void 0 : _b.nativeElement) === null || _c === void 0 ? void 0 : _c.getElementsByTagName(
|
|
5585
|
+
var input = (_c = (_b = (_a = this.dialog) === null || _a === void 0 ? void 0 : _a.contentViewChild) === null || _b === void 0 ? void 0 : _b.nativeElement) === null || _c === void 0 ? void 0 : _c.getElementsByTagName("input")[0];
|
|
5606
5586
|
if (input) {
|
|
5607
5587
|
input.focus();
|
|
5608
5588
|
}
|
|
5609
5589
|
}
|
|
5610
5590
|
};
|
|
5591
|
+
LookupComponent.prototype._subscribeEvents = function () {
|
|
5592
|
+
var _this = this;
|
|
5593
|
+
this.onSearchRequest
|
|
5594
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
5595
|
+
.subscribe(function () { return (_this.loading = true); });
|
|
5596
|
+
this.onSelect
|
|
5597
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
5598
|
+
.subscribe(function () { return _this.onChange(_this.value); });
|
|
5599
|
+
this.onUnselect
|
|
5600
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
5601
|
+
.subscribe(function () { return _this.onChange(_this.value); });
|
|
5602
|
+
this.onClear
|
|
5603
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
5604
|
+
.subscribe(function () {
|
|
5605
|
+
if (_this.multiple) {
|
|
5606
|
+
return;
|
|
5607
|
+
}
|
|
5608
|
+
_this.onChange(null);
|
|
5609
|
+
});
|
|
5610
|
+
this.onFocus
|
|
5611
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
5612
|
+
.subscribe(function () {
|
|
5613
|
+
_this.onTouched();
|
|
5614
|
+
});
|
|
5615
|
+
this.onBlur
|
|
5616
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
5617
|
+
.subscribe(function (event) {
|
|
5618
|
+
var target = event.target;
|
|
5619
|
+
var currentValue = _this.value && _this.value[_this.lookupDisplayField];
|
|
5620
|
+
var value = target.value;
|
|
5621
|
+
if (_this.multiple || !currentValue || currentValue == value)
|
|
5622
|
+
return;
|
|
5623
|
+
var newValue = "";
|
|
5624
|
+
target.value = newValue;
|
|
5625
|
+
_this.onChange(newValue);
|
|
5626
|
+
});
|
|
5627
|
+
};
|
|
5611
5628
|
var LookupComponent_1;
|
|
5612
5629
|
LookupComponent.nextId = 0;
|
|
5613
5630
|
LookupComponent.ctorParameters = function () { return [
|