@churchillliving/se-ui-toolkit 6.53.95 → 6.53.97
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/churchillliving-se-ui-toolkit.umd.js +16 -4
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/churchillliving-se-ui-toolkit.metadata.json +1 -1
- package/esm2015/lib/components/base/grid/grid.component.js +5 -2
- package/esm2015/lib/models/user-info.model.js +2 -1
- package/esm2015/lib/services/form.service.js +2 -3
- package/esm2015/lib/services/grid.service.js +9 -2
- package/fesm2015/churchillliving-se-ui-toolkit.js +14 -4
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/models/user-info.model.d.ts +2 -1
- package/lib/services/grid.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2614,9 +2614,18 @@
|
|
|
2614
2614
|
return this.addColumn(columnInfo);
|
|
2615
2615
|
};
|
|
2616
2616
|
// Search AutoComplete Data for Grid
|
|
2617
|
-
GridService.prototype.getAutoCompleteData = function (column, uniqueKey, filters) {
|
|
2617
|
+
GridService.prototype.getAutoCompleteData = function (column, uniqueKey, filters, search) {
|
|
2618
2618
|
var _this = this;
|
|
2619
|
+
if (search === void 0) { search = ''; }
|
|
2619
2620
|
this.requestService.get('/Data/Fetch', { uniqueKey: uniqueKey, filters: filters }).subscribe(function (response) {
|
|
2621
|
+
var _g;
|
|
2622
|
+
var _a;
|
|
2623
|
+
if (search) {
|
|
2624
|
+
var existInRecord = (_a = response.records) === null || _a === void 0 ? void 0 : _a.some(function (record) { var _a, _b; return record[column.displayField] && ((_b = (_a = record[column.displayField]) === null || _a === void 0 ? void 0 : _a.toString()) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === (search === null || search === void 0 ? void 0 : search.toLowerCase()); });
|
|
2625
|
+
if (!existInRecord) {
|
|
2626
|
+
response.records.unshift((_g = {}, _g[column.displayField] = search, _g));
|
|
2627
|
+
}
|
|
2628
|
+
}
|
|
2620
2629
|
column.data = _this.setDataFields(response.records);
|
|
2621
2630
|
});
|
|
2622
2631
|
};
|
|
@@ -3135,6 +3144,7 @@
|
|
|
3135
3144
|
EPermissionType["VIEW"] = "view";
|
|
3136
3145
|
EPermissionType["DELETE"] = "delete";
|
|
3137
3146
|
EPermissionType["ADDROW"] = "addRow";
|
|
3147
|
+
EPermissionType["CRUD"] = "crud";
|
|
3138
3148
|
})(exports.EPermissionType || (exports.EPermissionType = {}));
|
|
3139
3149
|
|
|
3140
3150
|
var AuthenticationService = /** @class */ (function () {
|
|
@@ -3647,7 +3657,10 @@
|
|
|
3647
3657
|
isValid = true;
|
|
3648
3658
|
}
|
|
3649
3659
|
});
|
|
3650
|
-
if (permission.type === exports.EPermissionType.
|
|
3660
|
+
if (permission.type === exports.EPermissionType.CRUD && !isValid) {
|
|
3661
|
+
_this.useInlineCRUD = false;
|
|
3662
|
+
}
|
|
3663
|
+
else if (permission.type === exports.EPermissionType.VIEW &&
|
|
3651
3664
|
!hasValidEditPermission_1) {
|
|
3652
3665
|
_this.useInlineCRUD = true;
|
|
3653
3666
|
if (!isValid && !hasColumnPermissions_1) {
|
|
@@ -5825,8 +5838,7 @@
|
|
|
5825
5838
|
this.requestService.get('/Data/Fetch', { uniqueKey: uniqueKey, filters: filters }).subscribe(function (response) {
|
|
5826
5839
|
var _e;
|
|
5827
5840
|
if (search) {
|
|
5828
|
-
var existInRecord = response.records.some(function (record) { var _a, _b
|
|
5829
|
-
console.log('existInRecord: ', existInRecord);
|
|
5841
|
+
var existInRecord = response.records.some(function (record) { var _a, _b; return record[formField.displayField] && ((_b = (_a = record[formField.displayField]) === null || _a === void 0 ? void 0 : _a.toString()) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === (search === null || search === void 0 ? void 0 : search.toLowerCase()); });
|
|
5830
5842
|
if (!existInRecord) {
|
|
5831
5843
|
response.records.unshift((_e = {}, _e[formField.displayField] = search, _e));
|
|
5832
5844
|
}
|