tnx-shared 5.3.382 → 5.3.384
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/tnx-shared.umd.js +34 -8
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/components/entity-picker/entity-picker-dialog/components/entity-picker-data/entity-picker-data.component.d.ts.map +1 -1
- package/components/entity-picker/entity-picker-dialog/components/entity-picker-selected/entity-picker-selected.component.d.ts +1 -0
- package/components/entity-picker/entity-picker-dialog/components/entity-picker-selected/entity-picker-selected.component.d.ts.map +1 -1
- package/components/entity-picker/entity-picker.component.d.ts.map +1 -1
- package/esm2015/components/entity-picker/entity-picker-dialog/components/entity-picker-data/entity-picker-data.component.js +6 -2
- package/esm2015/components/entity-picker/entity-picker-dialog/components/entity-picker-selected/entity-picker-selected.component.js +17 -3
- package/esm2015/components/entity-picker/entity-picker.component.js +12 -5
- package/fesm2015/tnx-shared.js +32 -7
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/tnx-shared.metadata.json +1 -1
|
@@ -47168,8 +47168,9 @@
|
|
|
47168
47168
|
this.onPickSelected.emit(data);
|
|
47169
47169
|
};
|
|
47170
47170
|
EntityPickerDataComponent.prototype.modifyGridInfo = function (gridInfo) {
|
|
47171
|
+
var _a;
|
|
47171
47172
|
return __awaiter(this, void 0, void 0, function () {
|
|
47172
|
-
var allow;
|
|
47173
|
+
var value, allow;
|
|
47173
47174
|
return __generator(this, function (_c) {
|
|
47174
47175
|
switch (_c.label) {
|
|
47175
47176
|
case 0:
|
|
@@ -47181,7 +47182,10 @@
|
|
|
47181
47182
|
}
|
|
47182
47183
|
else {
|
|
47183
47184
|
if (this._value) {
|
|
47184
|
-
|
|
47185
|
+
value = this._value;
|
|
47186
|
+
if (typeof (this._value) == 'object')
|
|
47187
|
+
value = this._value[(_a = this.control.valueField) !== null && _a !== void 0 ? _a : 'id'];
|
|
47188
|
+
gridInfo.filters.push(this.newFilter(this.control.valueField, exports.Operator.notEqual, value));
|
|
47185
47189
|
}
|
|
47186
47190
|
}
|
|
47187
47191
|
return [4 /*yield*/, appendDefaultFilter(gridInfo.filters, this.control.defaultFilters)];
|
|
@@ -47528,7 +47532,7 @@
|
|
|
47528
47532
|
this.onUnPick.emit(data);
|
|
47529
47533
|
};
|
|
47530
47534
|
EntityPickerSelectedComponent.prototype.unPickAll = function () {
|
|
47531
|
-
this.onUnPickAll.emit(this.
|
|
47535
|
+
this.onUnPickAll.emit(this.itemCanDeletes);
|
|
47532
47536
|
};
|
|
47533
47537
|
EntityPickerSelectedComponent.prototype.unPickSelected = function (data) {
|
|
47534
47538
|
this.onUnPickSelected.emit(data);
|
|
@@ -47543,13 +47547,28 @@
|
|
|
47543
47547
|
};
|
|
47544
47548
|
EntityPickerSelectedComponent.prototype.clearFilter = function (evt) {
|
|
47545
47549
|
};
|
|
47550
|
+
EntityPickerSelectedComponent.prototype._onCheckAll = function (evt) {
|
|
47551
|
+
var _this = this;
|
|
47552
|
+
if (this._readOnlyValues.length > 0) {
|
|
47553
|
+
this.model.selectedItems = [];
|
|
47554
|
+
this.model.dataSource.forEach(function (item) {
|
|
47555
|
+
var unChecked = _this._readOnlyValues.includes(item[_this.control.valueField]);
|
|
47556
|
+
if (!unChecked) {
|
|
47557
|
+
_this.model.selectedItems.push(item);
|
|
47558
|
+
}
|
|
47559
|
+
else {
|
|
47560
|
+
item._checked = false;
|
|
47561
|
+
}
|
|
47562
|
+
});
|
|
47563
|
+
}
|
|
47564
|
+
};
|
|
47546
47565
|
return EntityPickerSelectedComponent;
|
|
47547
47566
|
}(DataListBase));
|
|
47548
47567
|
EntityPickerSelectedComponent.decorators = [
|
|
47549
47568
|
{ type: i0.Component, args: [{
|
|
47550
47569
|
// tslint:disable-next-line: component-selector
|
|
47551
47570
|
selector: 'app-entity-picker-selected',
|
|
47552
|
-
template: "<crud-list #crudList [templates]=\"templates\" [model]=\"model\" [setting]=\"setting\" [dataSource]=\"model.dataSource\"
|
|
47571
|
+
template: "<crud-list #crudList [templates]=\"templates\" [model]=\"model\" [setting]=\"setting\" [dataSource]=\"model.dataSource\"\n [showScrollHorizontal]=\"true\" (onContentInit)=\"onContentInit.emit($event)\" (onReload)=\"_triggerProcessData($event)\"\n (onAdd)=\"_add($event)\" (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\" (onDelete)=\"_delete($event)\"\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_unmarkLoading()\" (onCheckAll)=\"_onCheckAll($event)\">\n <ng-template #customTitle>\n <h1 [innerHTML]=\"dom.bypassSecurityTrustHtml(control.titlePicked)\"></h1>\n </ng-template>\n <ng-template #toolbar let-crudList=\"crudList\" let-selectedItems=\"selectedItems\">\n <button *ngIf=\"!itemCanDeletes.length && !model.dataSource.length && setting.hiddenAdvanceSearch\" pButton\n style=\"visibility: hidden\"></button>\n <button *ngIf=\"itemCanDeletes.length\" type=\"button\" pButton pRipple\n label=\"B\u1ECF t\u1EA5t c\u1EA3 ({{itemCanDeletes.length}})\" icon=\"pi pi-angle-double-left\"\n class=\"p-button-text p-button-danger\" [disabled]=\"model.loading\" (click)=\"unPickAll()\"></button>\n <button *ngIf=\"selectedItems.length > 0\" type=\"button\" pButton pRipple\n label=\"B\u1ECF m\u1EE5c \u0111\u00E3 ch\u1ECDn ({{selectedItems.length}})\" icon=\"pi pi-angle-left\"\n class=\"p-button-text p-button-danger\" [disabled]=\"model.loading\"\n (click)=\"unPickSelected(selectedItems)\"></button>\n </ng-template>\n\n <ng-template let-crudList=\"crudList\" #function let-rowData=\"rowData\">\n <button *ngIf=\"!rowData.hiddenDelete\" pButton type=\"button\"\n class=\"link-or-action p-button-danger p-button-text p-button-rounded\" icon=\"pi pi-times\"\n pTooltip=\"B\u1ECF ch\u1ECDn m\u1EE5c n\u00E0y\" tooltipPosition=\"top\" (click)=\"unPickEntity(rowData)\"></button>\n </ng-template>\n\n</crud-list>",
|
|
47553
47572
|
providers: [ComponentContextService],
|
|
47554
47573
|
styles: ["::ng-deep app-entity-picker-selected .custom-card{padding:.5em .5em 0!important}"]
|
|
47555
47574
|
},] }
|
|
@@ -48667,11 +48686,18 @@
|
|
|
48667
48686
|
}
|
|
48668
48687
|
}
|
|
48669
48688
|
};
|
|
48689
|
+
// Sang VV đã sửa
|
|
48670
48690
|
EntityPickerComponent.prototype.getObjSelectValueFromValue = function (value) {
|
|
48671
|
-
var temp = {
|
|
48672
|
-
|
|
48673
|
-
|
|
48674
|
-
|
|
48691
|
+
var temp = {};
|
|
48692
|
+
if (typeof (value) == 'object') {
|
|
48693
|
+
temp = Object.assign(Object.assign({}, value), { _dropdownvalue: this.control.valueField });
|
|
48694
|
+
}
|
|
48695
|
+
else {
|
|
48696
|
+
temp = {
|
|
48697
|
+
_dropdownvalue: this.control.valueField,
|
|
48698
|
+
};
|
|
48699
|
+
temp[this.control.valueField] = value;
|
|
48700
|
+
}
|
|
48675
48701
|
return temp;
|
|
48676
48702
|
};
|
|
48677
48703
|
EntityPickerComponent.prototype.registerOnChange = function (fn) {
|