@c8y/ngx-components 1022.26.1 → 1022.28.2

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.
Files changed (88) hide show
  1. package/core/search/inventory-search.service.d.ts +4 -3
  2. package/core/search/inventory-search.service.d.ts.map +1 -1
  3. package/core/search/search-input.component.d.ts +5 -2
  4. package/core/search/search-input.component.d.ts.map +1 -1
  5. package/core/search/search.model.d.ts +4 -0
  6. package/core/search/search.model.d.ts.map +1 -1
  7. package/core/search/search.service.d.ts +2 -1
  8. package/core/search/search.service.d.ts.map +1 -1
  9. package/core/select/typeahead.component.d.ts +2 -1
  10. package/core/select/typeahead.component.d.ts.map +1 -1
  11. package/device-grid/device-grid.component.d.ts.map +1 -1
  12. package/device-grid/device-grid.service.d.ts +4 -3
  13. package/device-grid/device-grid.service.d.ts.map +1 -1
  14. package/echart/charts.component.d.ts.map +1 -1
  15. package/ecosystem/application-plugins/application-plugins.component.d.ts +3 -0
  16. package/ecosystem/application-plugins/application-plugins.component.d.ts.map +1 -1
  17. package/fesm2022/c8y-ngx-components-alarms.mjs +2 -2
  18. package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
  19. package/fesm2022/c8y-ngx-components-assets-navigator.mjs +2 -2
  20. package/fesm2022/c8y-ngx-components-assets-navigator.mjs.map +1 -1
  21. package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +1 -1
  22. package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
  23. package/fesm2022/c8y-ngx-components-device-grid.mjs +21 -13
  24. package/fesm2022/c8y-ngx-components-device-grid.mjs.map +1 -1
  25. package/fesm2022/c8y-ngx-components-device-profile.mjs +1 -1
  26. package/fesm2022/c8y-ngx-components-device-profile.mjs.map +1 -1
  27. package/fesm2022/c8y-ngx-components-echart.mjs +22 -70
  28. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  29. package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +41 -21
  30. package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
  31. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +1 -1
  32. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
  33. package/fesm2022/c8y-ngx-components-ecosystem.mjs +1 -1
  34. package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
  35. package/fesm2022/c8y-ngx-components-map.mjs +84 -26
  36. package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
  37. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs +1 -1
  38. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-configuration.mjs.map +1 -1
  39. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs +1 -1
  40. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-device-profile.mjs.map +1 -1
  41. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs +1 -1
  42. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs.map +1 -1
  43. package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs +2 -2
  44. package/fesm2022/c8y-ngx-components-protocol-lpwan.mjs.map +1 -1
  45. package/fesm2022/c8y-ngx-components-repository-configuration.mjs +1 -1
  46. package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
  47. package/fesm2022/c8y-ngx-components-repository-firmware.mjs +2 -2
  48. package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
  49. package/fesm2022/c8y-ngx-components-repository-shared.mjs +2 -2
  50. package/fesm2022/c8y-ngx-components-repository-shared.mjs.map +1 -1
  51. package/fesm2022/c8y-ngx-components-repository-software.mjs +1 -1
  52. package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
  53. package/fesm2022/c8y-ngx-components-search.mjs +328 -210
  54. package/fesm2022/c8y-ngx-components-search.mjs.map +1 -1
  55. package/fesm2022/c8y-ngx-components-sub-assets.mjs +36 -16
  56. package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
  57. package/fesm2022/c8y-ngx-components.mjs +7390 -7345
  58. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  59. package/locales/de.po +27 -0
  60. package/locales/es.po +27 -0
  61. package/locales/fr.po +27 -0
  62. package/locales/ja_JP.po +27 -0
  63. package/locales/ko.po +27 -0
  64. package/locales/locales.pot +25 -3
  65. package/locales/nl.po +27 -0
  66. package/locales/pl.po +27 -0
  67. package/locales/pt_BR.po +27 -0
  68. package/locales/zh_CN.po +27 -0
  69. package/locales/zh_TW.po +27 -0
  70. package/map/map.service.d.ts +13 -10
  71. package/map/map.service.d.ts.map +1 -1
  72. package/package.json +1 -1
  73. package/search/columns/asset-type-search-grid-column.d.ts.map +1 -1
  74. package/search/search-action.component.d.ts +12 -8
  75. package/search/search-action.component.d.ts.map +1 -1
  76. package/search/search-custom-filters.component.d.ts +18 -4
  77. package/search/search-custom-filters.component.d.ts.map +1 -1
  78. package/search/search-grid.component.d.ts +14 -14
  79. package/search/search-grid.component.d.ts.map +1 -1
  80. package/search/search-results.component.d.ts +3 -1
  81. package/search/search-results.component.d.ts.map +1 -1
  82. package/search/search.module.d.ts.map +1 -1
  83. package/search/search.service.d.ts +14 -6
  84. package/search/search.service.d.ts.map +1 -1
  85. package/sub-assets/sub-assets.service.d.ts +9 -5
  86. package/sub-assets/sub-assets.service.d.ts.map +1 -1
  87. package/echart/services/custom-measurements.service.d.ts +0 -12
  88. package/echart/services/custom-measurements.service.d.ts.map +0 -1
@@ -953,7 +953,7 @@ class IconDeviceGridColumn extends BaseColumn {
953
953
  }
954
954
 
955
955
  class DeviceGridService extends DataGridService {
956
- constructor(inventoryService, userService, translateService, alertService, modal, columnUtilService, userPreferencesService) {
956
+ constructor(inventoryService, userService, translateService, alertService, modal, columnUtilService, userPreferencesService, searchService) {
957
957
  super(userPreferencesService);
958
958
  this.inventoryService = inventoryService;
959
959
  this.userService = userService;
@@ -962,6 +962,7 @@ class DeviceGridService extends DataGridService {
962
962
  this.modal = modal;
963
963
  this.columnUtilService = columnUtilService;
964
964
  this.userPreferencesService = userPreferencesService;
965
+ this.searchService = searchService;
965
966
  this.GRID_CONFIG_DEFAULT_STORAGE_KEY = 'device-grid-config';
966
967
  }
967
968
  getDefaultColumns() {
@@ -1067,7 +1068,7 @@ class DeviceGridService extends DataGridService {
1067
1068
  }
1068
1069
  async getData(columns, pagination, query = {}, withChildren = false, text = null) {
1069
1070
  const filters = {
1070
- ...this.getDevicesFilters(columns, pagination, query, false, text),
1071
+ ...(await this.getDevicesFilters(columns, pagination, query, false, text)),
1071
1072
  withGroups: true,
1072
1073
  withChildren,
1073
1074
  withTotalElements: true
@@ -1077,7 +1078,7 @@ class DeviceGridService extends DataGridService {
1077
1078
  async getChildDeviceData(columns, pagination, query = {}, withChildren = false, id) {
1078
1079
  const childDeviceFilters = true;
1079
1080
  const filters = {
1080
- ...this.getDevicesFilters(columns, pagination, query, childDeviceFilters),
1081
+ ...(await this.getDevicesFilters(columns, pagination, query, childDeviceFilters)),
1081
1082
  withGroups: true,
1082
1083
  withChildren
1083
1084
  };
@@ -1085,7 +1086,7 @@ class DeviceGridService extends DataGridService {
1085
1086
  }
1086
1087
  async getCount(columns, pagination, query = {}, text = null) {
1087
1088
  const filters = {
1088
- ...this.getDevicesFilters(columns, pagination, query, false, text),
1089
+ ...(await this.getDevicesFilters(columns, pagination, query, false, text)),
1089
1090
  withTotalElements: true
1090
1091
  };
1091
1092
  return (await this.inventoryService.list(filters)).paging.totalElements;
@@ -1093,7 +1094,7 @@ class DeviceGridService extends DataGridService {
1093
1094
  async getCountChildDevices(columns, pagination, query = {}, id) {
1094
1095
  const childDeviceFilters = true;
1095
1096
  const filters = {
1096
- ...this.getDevicesFilters(columns, pagination, query, childDeviceFilters),
1097
+ ...(await this.getDevicesFilters(columns, pagination, query, childDeviceFilters)),
1097
1098
  withTotalElements: true
1098
1099
  };
1099
1100
  return (await this.inventoryService.childDevicesList(id, filters)).paging.totalElements;
@@ -1112,8 +1113,13 @@ class DeviceGridService extends DataGridService {
1112
1113
  };
1113
1114
  return (await this.inventoryService.list(filters)).paging.totalElements;
1114
1115
  }
1115
- getDeviceQueryString(columns, query) {
1116
+ getDeviceQueryString(columns, query, text, isWildcardSearchEnabled) {
1116
1117
  let fullQuery = this.getQueryObj(columns);
1118
+ if (text && isWildcardSearchEnabled) {
1119
+ fullQuery = this.queriesUtil.addAndFilter(fullQuery, {
1120
+ name: `*${text.trim().replace(/\s+/g, '*')}*`
1121
+ });
1122
+ }
1117
1123
  fullQuery = this.queriesUtil.addAndFilter(fullQuery, query);
1118
1124
  return this.queriesUtil.buildQuery(fullQuery);
1119
1125
  }
@@ -1126,19 +1132,20 @@ class DeviceGridService extends DataGridService {
1126
1132
  saveConfig$(config, key = this.GRID_CONFIG_DEFAULT_STORAGE_KEY) {
1127
1133
  return super.saveConfig$(config, key);
1128
1134
  }
1129
- getDevicesFilters(columns, pagination, query, childDeviceFilters, text) {
1135
+ async getDevicesFilters(columns, pagination, query, childDeviceFilters, text) {
1136
+ const isWildcardSearchEnabled = await this.searchService.isWildcardSearchEnabled();
1130
1137
  return {
1131
1138
  ...(childDeviceFilters
1132
- ? { query: this.getDeviceQueryString(columns, query) }
1133
- : { q: this.getDeviceQueryString(columns, query) }),
1134
- ...(text && { text }),
1139
+ ? { query: this.getDeviceQueryString(columns, query, text, isWildcardSearchEnabled) }
1140
+ : { q: this.getDeviceQueryString(columns, query, text, isWildcardSearchEnabled) }),
1141
+ ...(text && !isWildcardSearchEnabled && { text }),
1135
1142
  pageSize: pagination.pageSize,
1136
1143
  currentPage: pagination.currentPage,
1137
1144
  withChildren: false,
1138
1145
  withTotalPages: true
1139
1146
  };
1140
1147
  }
1141
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DeviceGridService, deps: [{ token: i1$2.InventoryService }, { token: i1$2.UserService }, { token: i1.TranslateService }, { token: i1$1.AlertService }, { token: i1$1.ModalService }, { token: ColumnUtilService }, { token: i1$1.UserPreferencesService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1148
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DeviceGridService, deps: [{ token: i1$2.InventoryService }, { token: i1$2.UserService }, { token: i1.TranslateService }, { token: i1$1.AlertService }, { token: i1$1.ModalService }, { token: ColumnUtilService }, { token: i1$1.UserPreferencesService }, { token: i1$1.InventorySearchService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1142
1149
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DeviceGridService, providedIn: 'root' }); }
1143
1150
  }
1144
1151
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DeviceGridService, decorators: [{
@@ -1146,7 +1153,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1146
1153
  args: [{
1147
1154
  providedIn: 'root'
1148
1155
  }]
1149
- }], ctorParameters: () => [{ type: i1$2.InventoryService }, { type: i1$2.UserService }, { type: i1.TranslateService }, { type: i1$1.AlertService }, { type: i1$1.ModalService }, { type: ColumnUtilService }, { type: i1$1.UserPreferencesService }] });
1156
+ }], ctorParameters: () => [{ type: i1$2.InventoryService }, { type: i1$2.UserService }, { type: i1.TranslateService }, { type: i1$1.AlertService }, { type: i1$1.ModalService }, { type: ColumnUtilService }, { type: i1$1.UserPreferencesService }, { type: i1$1.InventorySearchService }] });
1150
1157
 
1151
1158
  class DeviceGridComponent {
1152
1159
  /** Pagination settings, e.g. allows for setting current page or page size. If not given, defaults to standard settings. */
@@ -1268,7 +1275,8 @@ class DeviceGridComponent {
1268
1275
  };
1269
1276
  }
1270
1277
  this.onColumnsChange.emit(dataSourceModifier.columns);
1271
- this.onDeviceQueryStringChange.emit(this.deviceGridService.getDeviceQueryString(dataSourceModifier.columns, this.baseQuery));
1278
+ this.onDeviceQueryStringChange.emit(this.deviceGridService.getDeviceQueryString(dataSourceModifier.columns, this.baseQuery, dataSourceModifier.searchText, false // Search is not applied for smart groups
1279
+ ));
1272
1280
  if (this.dataCallback) {
1273
1281
  serverSideDataResult = this.dataCallback(serverSideDataResult);
1274
1282
  }