@c8y/ngx-components 1018.503.26 → 1018.503.37

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 (46) hide show
  1. package/device-grid/device-grid.component.d.ts +7 -2
  2. package/esm2020/child-devices/child-devices.component.mjs +1 -1
  3. package/esm2020/core/bootstrap/bootstrap.component.mjs +3 -3
  4. package/esm2020/core/dynamic-forms/json-schema/c8y-json-schema.service.mjs +8 -2
  5. package/esm2020/device-grid/device-grid-extension.service.mjs +13 -8
  6. package/esm2020/device-grid/device-grid.component.mjs +30 -15
  7. package/esm2020/device-list/device-list.component.mjs +1 -1
  8. package/esm2020/operations/device-selector/device-selector.component.mjs +1 -1
  9. package/esm2020/replace-device-wizard/replace-device-wizard.component.mjs +2 -2
  10. package/esm2020/sub-assets/add-group/add-group.component.mjs +4 -3
  11. package/esm2020/sub-assets/asset-properties-item.component.mjs +7 -3
  12. package/esm2020/sub-assets/asset-properties.component.mjs +25 -10
  13. package/esm2020/sub-assets/assign-devices/assign-devices.component.mjs +4 -3
  14. package/esm2020/sub-assets/location/asset-location.component.mjs +5 -3
  15. package/fesm2015/c8y-ngx-components-child-devices.mjs +1 -1
  16. package/fesm2015/c8y-ngx-components-child-devices.mjs.map +1 -1
  17. package/fesm2015/c8y-ngx-components-device-grid.mjs +41 -21
  18. package/fesm2015/c8y-ngx-components-device-grid.mjs.map +1 -1
  19. package/fesm2015/c8y-ngx-components-device-list.mjs +1 -1
  20. package/fesm2015/c8y-ngx-components-device-list.mjs.map +1 -1
  21. package/fesm2015/c8y-ngx-components-operations-device-selector.mjs +1 -1
  22. package/fesm2015/c8y-ngx-components-operations-device-selector.mjs.map +1 -1
  23. package/fesm2015/c8y-ngx-components-replace-device-wizard.mjs +1 -1
  24. package/fesm2015/c8y-ngx-components-replace-device-wizard.mjs.map +1 -1
  25. package/fesm2015/c8y-ngx-components-sub-assets.mjs +39 -18
  26. package/fesm2015/c8y-ngx-components-sub-assets.mjs.map +1 -1
  27. package/fesm2015/c8y-ngx-components.mjs +6 -3
  28. package/fesm2015/c8y-ngx-components.mjs.map +1 -1
  29. package/fesm2020/c8y-ngx-components-child-devices.mjs +1 -1
  30. package/fesm2020/c8y-ngx-components-child-devices.mjs.map +1 -1
  31. package/fesm2020/c8y-ngx-components-device-grid.mjs +41 -21
  32. package/fesm2020/c8y-ngx-components-device-grid.mjs.map +1 -1
  33. package/fesm2020/c8y-ngx-components-device-list.mjs +1 -1
  34. package/fesm2020/c8y-ngx-components-device-list.mjs.map +1 -1
  35. package/fesm2020/c8y-ngx-components-operations-device-selector.mjs +1 -1
  36. package/fesm2020/c8y-ngx-components-operations-device-selector.mjs.map +1 -1
  37. package/fesm2020/c8y-ngx-components-replace-device-wizard.mjs +1 -1
  38. package/fesm2020/c8y-ngx-components-replace-device-wizard.mjs.map +1 -1
  39. package/fesm2020/c8y-ngx-components-sub-assets.mjs +38 -17
  40. package/fesm2020/c8y-ngx-components-sub-assets.mjs.map +1 -1
  41. package/fesm2020/c8y-ngx-components.mjs +9 -3
  42. package/fesm2020/c8y-ngx-components.mjs.map +1 -1
  43. package/package.json +1 -1
  44. package/sub-assets/add-group/add-group.component.d.ts +2 -1
  45. package/sub-assets/asset-properties.component.d.ts +6 -0
  46. package/sub-assets/assign-devices/assign-devices.component.d.ts +2 -1
@@ -23,7 +23,7 @@ class ChildDevicesComponent {
23
23
  }
24
24
  }
25
25
  ChildDevicesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ChildDevicesComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.DeviceGridService }], target: i0.ɵɵFactoryTarget.Component });
26
- ChildDevicesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: ChildDevicesComponent, selector: "c8y-child-devices", providers: [ManagedObjectRealtimeService], ngImport: i0, template: "<div class=\"content-fullpage border-top border-bottom\">\n <c8y-device-grid\n [title]=\"'Child devices' | translate\"\n [childDeviceGrid]=\"true\"\n [columns]=\"columns\"\n [parentDeviceId]=\"id\"\n c8yProductExperience\n [actionName]=\"'childDevices'\"\n ></c8y-device-grid>\n</div>\n", dependencies: [{ kind: "directive", type: i3.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "component", type: i2.DeviceGridComponent, selector: "c8y-device-grid", inputs: ["dataCallback", "refresh", "title", "loadMoreItemsLabel", "loadingItemsLabel", "legacyConfigKey", "legacyFilterKey", "columns", "pagination", "infiniteScroll", "actionControls", "selectable", "singleSelection", "baseQuery", "bulkActionControls", "headerActionControls", "childDeviceGrid", "parentDeviceId", "withChildren", "showSearch", "activeClassName"], outputs: ["onColumnsChange", "onFilterChange", "onDeviceQueryStringChange", "itemsSelect"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] });
26
+ ChildDevicesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: ChildDevicesComponent, selector: "c8y-child-devices", providers: [ManagedObjectRealtimeService], ngImport: i0, template: "<div class=\"content-fullpage border-top border-bottom\">\n <c8y-device-grid\n [title]=\"'Child devices' | translate\"\n [childDeviceGrid]=\"true\"\n [columns]=\"columns\"\n [parentDeviceId]=\"id\"\n c8yProductExperience\n [actionName]=\"'childDevices'\"\n ></c8y-device-grid>\n</div>\n", dependencies: [{ kind: "directive", type: i3.ProductExperienceDirective, selector: "[c8yProductExperience]", inputs: ["actionName", "actionData", "inherit", "suppressDataOverriding"] }, { kind: "component", type: i2.DeviceGridComponent, selector: "c8y-device-grid", inputs: ["dataCallback", "refresh", "title", "loadMoreItemsLabel", "loadingItemsLabel", "legacyConfigKey", "legacyFilterKey", "columns", "pagination", "infiniteScroll", "builtInActionsToHide", "actionControls", "selectable", "singleSelection", "baseQuery", "bulkActionControls", "headerActionControls", "childDeviceGrid", "parentDeviceId", "withChildren", "showSearch", "activeClassName"], outputs: ["onColumnsChange", "onFilterChange", "onDeviceQueryStringChange", "itemsSelect"] }, { kind: "pipe", type: i3.C8yTranslatePipe, name: "translate" }] });
27
27
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ChildDevicesComponent, decorators: [{
28
28
  type: Component,
29
29
  args: [{ selector: 'c8y-child-devices', providers: [ManagedObjectRealtimeService], template: "<div class=\"content-fullpage border-top border-bottom\">\n <c8y-device-grid\n [title]=\"'Child devices' | translate\"\n [childDeviceGrid]=\"true\"\n [columns]=\"columns\"\n [parentDeviceId]=\"id\"\n c8yProductExperience\n [actionName]=\"'childDevices'\"\n ></c8y-device-grid>\n</div>\n" }]
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-child-devices.mjs","sources":["../../child-devices/child-devices.component.ts","../../child-devices/child-devices.component.html","../../child-devices/child-devices.guard.ts","../../child-devices/child-devices.module.ts","../../child-devices/c8y-ngx-components-child-devices.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { Column, ManagedObjectRealtimeService } from '@c8y/ngx-components';\nimport { DeviceGridService } from '@c8y/ngx-components/device-grid';\n\n@Component({\n selector: 'c8y-child-devices',\n templateUrl: './child-devices.component.html',\n providers: [ManagedObjectRealtimeService]\n})\nexport class ChildDevicesComponent implements OnInit {\n id: string;\n columns: Column[];\n\n constructor(private route: ActivatedRoute, private deviceGridService: DeviceGridService) {}\n\n async ngOnInit() {\n await this.getAllDevices();\n this.columns = this.deviceGridService.getChildDeviceGridColumns();\n }\n\n async getAllDevices() {\n this.id = this.route.snapshot.parent.data.contextData;\n }\n}\n","<div class=\"content-fullpage border-top border-bottom\">\n <c8y-device-grid\n [title]=\"'Child devices' | translate\"\n [childDeviceGrid]=\"true\"\n [columns]=\"columns\"\n [parentDeviceId]=\"id\"\n c8yProductExperience\n [actionName]=\"'childDevices'\"\n ></c8y-device-grid>\n</div>\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate } from '@angular/router';\nimport { InventoryService } from '@c8y/client';\nimport { isEmpty } from 'lodash-es';\n\n@Injectable()\nexport class ChildDevicesTabGuard implements CanActivate {\n constructor(private inventory: InventoryService) {}\n\n async canActivate(route: ActivatedRouteSnapshot): Promise<boolean> {\n const contextData = route.data.contextData;\n\n const filter: object = {\n pageSize: 1\n };\n\n if (isEmpty(contextData)) {\n return true;\n }\n const device = await this.inventory.childDevicesList(contextData.id, filter);\n const hasChildren = device.data.length;\n const isVendme = route.data.contextData.type === 'com_nsn_startups_vendme_VendingMachine';\n return hasChildren && !isVendme;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule, gettext, hookRoute, ViewContext } from '@c8y/ngx-components';\nimport { DeviceGridModule } from '@c8y/ngx-components/device-grid';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { ChildDevicesComponent } from './child-devices.component';\nimport { ChildDevicesTabGuard } from './child-devices.guard';\n\n@NgModule({\n declarations: [ChildDevicesComponent],\n imports: [CoreModule, DeviceGridModule, PopoverModule],\n entryComponents: [ChildDevicesComponent],\n providers: [\n ChildDevicesTabGuard,\n hookRoute({\n context: ViewContext.Device,\n path: 'child-devices',\n priority: 1000,\n icon: 'code-fork',\n label: gettext('Child devices'),\n component: ChildDevicesComponent,\n canActivate: [ChildDevicesTabGuard]\n })\n ]\n})\nexport class ChildDevicesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;MAUa,qBAAqB,CAAA;IAIhC,WAAoB,CAAA,KAAqB,EAAU,iBAAoC,EAAA;QAAnE,IAAK,CAAA,KAAA,GAAL,KAAK,CAAgB;QAAU,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAmB;KAAI;AAE3F,IAAA,MAAM,QAAQ,GAAA;AACZ,QAAA,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAC3B,IAAI,CAAC,OAA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oBAAA,SAAS,EAAE;wBACT,oBAAoB;AACpB,wBAAA,SAAS,CAAC;4BACR,OAAO,EAAE,WAAW,CAAC,MAAM;AAC3B,4BAAA,IAAI,EAAE,eAAe;AACrB,4BAAA,QAAQ,EAAE,IAAI;AACd,4BAAA,IAAI,EAAE,WAAW;AACjB,4BAAA,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC;AAC/B,4BAAA,SAAS,EAAE,qBAAqB;4BAChC,WAAW,EAAE,CAAC,oBAAoB,CAAC;yBACpC,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-child-devices.mjs","sources":["../../child-devices/child-devices.component.ts","../../child-devices/child-devices.component.html","../../child-devices/child-devices.guard.ts","../../child-devices/child-devices.module.ts","../../child-devices/c8y-ngx-components-child-devices.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { Column, ManagedObjectRealtimeService } from '@c8y/ngx-components';\nimport { DeviceGridService } from '@c8y/ngx-components/device-grid';\n\n@Component({\n selector: 'c8y-child-devices',\n templateUrl: './child-devices.component.html',\n providers: [ManagedObjectRealtimeService]\n})\nexport class ChildDevicesComponent implements OnInit {\n id: string;\n columns: Column[];\n\n constructor(private route: ActivatedRoute, private deviceGridService: DeviceGridService) {}\n\n async ngOnInit() {\n await this.getAllDevices();\n this.columns = this.deviceGridService.getChildDeviceGridColumns();\n }\n\n async getAllDevices() {\n this.id = this.route.snapshot.parent.data.contextData;\n }\n}\n","<div class=\"content-fullpage border-top border-bottom\">\n <c8y-device-grid\n [title]=\"'Child devices' | translate\"\n [childDeviceGrid]=\"true\"\n [columns]=\"columns\"\n [parentDeviceId]=\"id\"\n c8yProductExperience\n [actionName]=\"'childDevices'\"\n ></c8y-device-grid>\n</div>\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate } from '@angular/router';\nimport { InventoryService } from '@c8y/client';\nimport { isEmpty } from 'lodash-es';\n\n@Injectable()\nexport class ChildDevicesTabGuard implements CanActivate {\n constructor(private inventory: InventoryService) {}\n\n async canActivate(route: ActivatedRouteSnapshot): Promise<boolean> {\n const contextData = route.data.contextData;\n\n const filter: object = {\n pageSize: 1\n };\n\n if (isEmpty(contextData)) {\n return true;\n }\n const device = await this.inventory.childDevicesList(contextData.id, filter);\n const hasChildren = device.data.length;\n const isVendme = route.data.contextData.type === 'com_nsn_startups_vendme_VendingMachine';\n return hasChildren && !isVendme;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule, gettext, hookRoute, ViewContext } from '@c8y/ngx-components';\nimport { DeviceGridModule } from '@c8y/ngx-components/device-grid';\nimport { PopoverModule } from 'ngx-bootstrap/popover';\nimport { ChildDevicesComponent } from './child-devices.component';\nimport { ChildDevicesTabGuard } from './child-devices.guard';\n\n@NgModule({\n declarations: [ChildDevicesComponent],\n imports: [CoreModule, DeviceGridModule, PopoverModule],\n entryComponents: [ChildDevicesComponent],\n providers: [\n ChildDevicesTabGuard,\n hookRoute({\n context: ViewContext.Device,\n path: 'child-devices',\n priority: 1000,\n icon: 'code-fork',\n label: gettext('Child devices'),\n component: ChildDevicesComponent,\n canActivate: [ChildDevicesTabGuard]\n })\n ]\n})\nexport class ChildDevicesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;MAUa,qBAAqB,CAAA;IAIhC,WAAoB,CAAA,KAAqB,EAAU,iBAAoC,EAAA;QAAnE,IAAK,CAAA,KAAA,GAAL,KAAK,CAAgB;QAAU,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAmB;KAAI;AAE3F,IAAA,MAAM,QAAQ,GAAA;AACZ,QAAA,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,yBAAyB,EAAE,CAAC;KACnE;AAED,IAAA,M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BACR,OAAO,EAAE,WAAW,CAAC,MAAM;AAC3B,4BAAA,IAAI,EAAE,eAAe;AACrB,4BAAA,QAAQ,EAAE,IAAI;AACd,4BAAA,IAAI,EAAE,WAAW;AACjB,4BAAA,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC;AAC/B,4BAAA,SAAS,EAAE,qBAAqB;4BAChC,WAAW,EAAE,CAAC,oBAAoB,CAAC;yBACpC,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
@@ -1077,14 +1077,19 @@ class DeviceGridExtensionService extends ExtensionPointWithoutStateForPlugins {
1077
1077
  }
1078
1078
  setupItemsObservable() {
1079
1079
  return fromTriggerOnce(this.router, this.refresh$, [
1080
- () => flatten(this.injectors.map(injector => injector.get(HOOK_DEVICE_GRID_ACTION, [
1081
- {
1082
- type: "DELETE" /* BuiltInActionType.Delete */,
1083
- deviceMatches: (_mo) => true,
1084
- onAction: (mo) => this.deviceGridService.delete(mo),
1085
- refreshAfterActionDone: true
1080
+ () => {
1081
+ const actions = flatten(this.injectors.map(injector => injector.get(HOOK_DEVICE_GRID_ACTION, [], { self: true })));
1082
+ const hasDeleteAction = actions.some(action => action.type === "DELETE" /* BuiltInActionType.Delete */);
1083
+ if (!hasDeleteAction) {
1084
+ actions.push({
1085
+ type: "DELETE" /* BuiltInActionType.Delete */,
1086
+ deviceMatches: (_mo) => true,
1087
+ onAction: (mo) => this.deviceGridService.delete(mo),
1088
+ refreshAfterActionDone: true
1089
+ });
1086
1090
  }
1087
- ], { self: true }))),
1091
+ return actions;
1092
+ },
1088
1093
  () => this.factories
1089
1094
  ]).pipe(shareReplay(1));
1090
1095
  }
@@ -1152,6 +1157,11 @@ class DeviceGridComponent {
1152
1157
  this.loadingItemsLabel = gettext('Loading devices…');
1153
1158
  /** The list of columns to be displayed in the grid. If not given, it defaults to standard columns. */
1154
1159
  this.columns = this.deviceGridService.getDefaultColumns();
1160
+ /**
1161
+ * Represents the input property for hiding specific built-in action types.
1162
+ * The `actionsToHide` input allows specifying an array of `BuiltInActionType` values or the string 'ALL' to hide all action controls
1163
+ */
1164
+ this.builtInActionsToHide = [];
1155
1165
  /** Determines whether items can be selected by clicking a checkbox in the first column. */
1156
1166
  this.selectable = false;
1157
1167
  /** Restricts selection to a single row only. Selection column displays radio button instead of checkboxes */
@@ -1231,29 +1241,37 @@ class DeviceGridComponent {
1231
1241
  return serverSideDataResult;
1232
1242
  }
1233
1243
  setActionControls() {
1244
+ if (this.builtInActionsToHide === 'ALL') {
1245
+ return;
1246
+ }
1234
1247
  const asArrayOfGroupedActionHooks = (hooks) => Object.values(groupBy(hooks, 'type'));
1235
1248
  this.dgExtensionService.items$
1236
1249
  .pipe(map$1(asArrayOfGroupedActionHooks), switchMap(from), map$1((hooks) => {
1237
1250
  const { type, icon, text, showOnHover } = hooks[0];
1251
+ const actionsToHide = this.builtInActionsToHide;
1252
+ const shouldPushToActionControls = actionsToHide.length === 0 || !actionsToHide.includes(type);
1238
1253
  const matchingHooks = (device) => hooks.filter(hook => hook.deviceMatches(device));
1239
1254
  const hasMatchingHooks = (device) => !!matchingHooks(device).length;
1240
1255
  const useInventoryDelete = (device) => !hasMatchingHooks(device) && type === "DELETE" /* BuiltInActionType.Delete */;
1241
1256
  const resolveAction = (device) => useInventoryDelete(device)
1242
1257
  ? this.deviceGridService.delete(device)
1243
1258
  : matchingHooks(device)[0].onAction(device);
1244
- this.actionControls.push({
1245
- type,
1246
- icon,
1247
- text,
1248
- showOnHover,
1249
- showIf: (device) => type === "DELETE" /* BuiltInActionType.Delete */ || hasMatchingHooks(device),
1250
- callback: (device) => toObservable(resolveAction(device))
1251
- .pipe(catchError(_err => EMPTY), takeUntil(this.destroyed$))
1252
- .subscribe(_success => {
1253
- if (useInventoryDelete(device) || matchingHooks(device)[0].refreshAfterActionDone)
1254
- this.refresh.emit();
1255
- })
1256
- });
1259
+ if (shouldPushToActionControls) {
1260
+ this.actionControls.push({
1261
+ type,
1262
+ icon,
1263
+ text,
1264
+ showOnHover,
1265
+ showIf: (device) => type === "DELETE" /* BuiltInActionType.Delete */ || hasMatchingHooks(device),
1266
+ callback: (device) => toObservable(resolveAction(device))
1267
+ .pipe(catchError(_err => EMPTY), takeUntil(this.destroyed$))
1268
+ .subscribe(_success => {
1269
+ if (useInventoryDelete(device) ||
1270
+ matchingHooks(device)[0].refreshAfterActionDone)
1271
+ this.refresh.emit();
1272
+ })
1273
+ });
1274
+ }
1257
1275
  }), takeUntil(this.destroyed$))
1258
1276
  .subscribe();
1259
1277
  }
@@ -1268,7 +1286,7 @@ class DeviceGridComponent {
1268
1286
  }
1269
1287
  }
1270
1288
  DeviceGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DeviceGridComponent, deps: [{ token: DeviceGridService }, { token: DeviceGridExtensionService }], target: i0.ɵɵFactoryTarget.Component });
1271
- DeviceGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: DeviceGridComponent, selector: "c8y-device-grid", inputs: { dataCallback: "dataCallback", refresh: "refresh", title: "title", loadMoreItemsLabel: "loadMoreItemsLabel", loadingItemsLabel: "loadingItemsLabel", legacyConfigKey: "legacyConfigKey", legacyFilterKey: "legacyFilterKey", columns: "columns", _pagination: ["pagination", "_pagination"], _infiniteScroll: ["infiniteScroll", "_infiniteScroll"], _actionControls: ["actionControls", "_actionControls"], selectable: "selectable", singleSelection: "singleSelection", baseQuery: "baseQuery", _bulkActionControls: ["bulkActionControls", "_bulkActionControls"], _headerActionControls: ["headerActionControls", "_headerActionControls"], childDeviceGrid: "childDeviceGrid", parentDeviceId: "parentDeviceId", withChildren: "withChildren", showSearch: "showSearch", activeClassName: "activeClassName" }, outputs: { onColumnsChange: "onColumnsChange", onFilterChange: "onFilterChange", onDeviceQueryStringChange: "onDeviceQueryStringChange", itemsSelect: "itemsSelect" }, providers: [
1289
+ DeviceGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: DeviceGridComponent, selector: "c8y-device-grid", inputs: { dataCallback: "dataCallback", refresh: "refresh", title: "title", loadMoreItemsLabel: "loadMoreItemsLabel", loadingItemsLabel: "loadingItemsLabel", legacyConfigKey: "legacyConfigKey", legacyFilterKey: "legacyFilterKey", columns: "columns", _pagination: ["pagination", "_pagination"], _infiniteScroll: ["infiniteScroll", "_infiniteScroll"], builtInActionsToHide: "builtInActionsToHide", _actionControls: ["actionControls", "_actionControls"], selectable: "selectable", singleSelection: "singleSelection", baseQuery: "baseQuery", _bulkActionControls: ["bulkActionControls", "_bulkActionControls"], _headerActionControls: ["headerActionControls", "_headerActionControls"], childDeviceGrid: "childDeviceGrid", parentDeviceId: "parentDeviceId", withChildren: "withChildren", showSearch: "showSearch", activeClassName: "activeClassName" }, outputs: { onColumnsChange: "onColumnsChange", onFilterChange: "onFilterChange", onDeviceQueryStringChange: "onDeviceQueryStringChange", itemsSelect: "itemsSelect" }, providers: [
1272
1290
  {
1273
1291
  provide: PRODUCT_EXPERIENCE_EVENT_SOURCE,
1274
1292
  useExisting: forwardRef(() => DeviceGridComponent)
@@ -1305,6 +1323,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1305
1323
  }], _infiniteScroll: [{
1306
1324
  type: Input,
1307
1325
  args: ['infiniteScroll']
1326
+ }], builtInActionsToHide: [{
1327
+ type: Input
1308
1328
  }], _actionControls: [{
1309
1329
  type: Input,
1310
1330
  args: ['actionControls']