@churchillliving/se-ui-toolkit 6.53.96 → 6.53.98

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.
@@ -2500,8 +2500,13 @@
2500
2500
  columnInfo.optionLabel = columnInfo.optionLabel ? columnInfo.optionLabel : 'label';
2501
2501
  columnInfo.optionValue = columnInfo.optionValue ? columnInfo.optionValue : 'value';
2502
2502
  }
2503
- else if (columnInfo.type === exports.EGridColumnType.DIALOG && !columnInfo.filtering && !columnInfo.filter) {
2504
- columnInfo.filtering = false;
2503
+ else if (columnInfo.type === exports.EGridColumnType.DIALOG) {
2504
+ if (!columnInfo.filtering && !columnInfo.filter) {
2505
+ columnInfo.filtering = false;
2506
+ }
2507
+ if (columnInfo.params && !columnInfo.data) {
2508
+ columnInfo.data = columnInfo.params;
2509
+ }
2505
2510
  }
2506
2511
  var column = {
2507
2512
  allowSearch: columnInfo.allowSearch,
@@ -2614,9 +2619,18 @@
2614
2619
  return this.addColumn(columnInfo);
2615
2620
  };
2616
2621
  // Search AutoComplete Data for Grid
2617
- GridService.prototype.getAutoCompleteData = function (column, uniqueKey, filters) {
2622
+ GridService.prototype.getAutoCompleteData = function (column, uniqueKey, filters, search) {
2618
2623
  var _this = this;
2624
+ if (search === void 0) { search = ''; }
2619
2625
  this.requestService.get('/Data/Fetch', { uniqueKey: uniqueKey, filters: filters }).subscribe(function (response) {
2626
+ var _g;
2627
+ var _a;
2628
+ if (search) {
2629
+ 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()); });
2630
+ if (!existInRecord) {
2631
+ response.records.unshift((_g = {}, _g[column.displayField] = search, _g));
2632
+ }
2633
+ }
2620
2634
  column.data = _this.setDataFields(response.records);
2621
2635
  });
2622
2636
  };
@@ -2799,11 +2813,6 @@
2799
2813
  };
2800
2814
  GridService.prototype.setHyperlinks = function (fetchResponse, columns) {
2801
2815
  var _this = this;
2802
- columns.forEach(function (column) {
2803
- if (column.type === exports.EGridColumnType.DIALOG && !column.data) {
2804
- _this.alertService.error("\"Data\" property is missing for \"" + column.header + "\" column");
2805
- }
2806
- });
2807
2816
  var records = [];
2808
2817
  var data = fetchResponse && fetchResponse.records.length > 0 ? this.setDataFields(fetchResponse.records) : [];
2809
2818
  var newRow;
@@ -5829,8 +5838,7 @@
5829
5838
  this.requestService.get('/Data/Fetch', { uniqueKey: uniqueKey, filters: filters }).subscribe(function (response) {
5830
5839
  var _e;
5831
5840
  if (search) {
5832
- var existInRecord = response.records.some(function (record) { var _a, _b, _c; 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()) === ((_c = search === null || search === void 0 ? void 0 : search.toString()) === null || _c === void 0 ? void 0 : _c.toLowerCase()); });
5833
- 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()); });
5834
5842
  if (!existInRecord) {
5835
5843
  response.records.unshift((_e = {}, _e[formField.displayField] = search, _e));
5836
5844
  }