@c8y/ngx-components 1021.70.1 → 1021.71.0

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 (116) hide show
  1. package/branding/shared/lazy/branding-import-modal/branding-import-modal.component.d.ts.map +1 -1
  2. package/core/beta-feature/beta-feature-show-notification.service.d.ts +10 -0
  3. package/core/beta-feature/beta-feature-show-notification.service.d.ts.map +1 -0
  4. package/core/beta-feature/beta-feature.providers.d.ts +3 -0
  5. package/core/beta-feature/beta-feature.providers.d.ts.map +1 -0
  6. package/core/beta-feature/beta-preview-button.component.d.ts +17 -0
  7. package/core/beta-feature/beta-preview-button.component.d.ts.map +1 -0
  8. package/core/beta-feature/beta-preview-drawer.factory.d.ts +19 -0
  9. package/core/beta-feature/beta-preview-drawer.factory.d.ts.map +1 -0
  10. package/core/beta-feature/beta-preview.component.d.ts +25 -0
  11. package/core/beta-feature/beta-preview.component.d.ts.map +1 -0
  12. package/core/beta-feature/beta-preview.model.d.ts +24 -0
  13. package/core/beta-feature/beta-preview.model.d.ts.map +1 -0
  14. package/core/beta-feature/beta-preview.service.d.ts +47 -0
  15. package/core/beta-feature/beta-preview.service.d.ts.map +1 -0
  16. package/core/beta-feature/feature-cache.service.d.ts +26 -0
  17. package/core/beta-feature/feature-cache.service.d.ts.map +1 -0
  18. package/core/beta-feature/feature-state.pipe.d.ts +12 -0
  19. package/core/beta-feature/feature-state.pipe.d.ts.map +1 -0
  20. package/core/beta-feature/index.d.ts +7 -0
  21. package/core/beta-feature/index.d.ts.map +1 -0
  22. package/core/bottom-drawer/bottom-drawer-ref.d.ts.map +1 -1
  23. package/core/bottom-drawer/bottom-drawer.component.d.ts +1 -0
  24. package/core/bottom-drawer/bottom-drawer.component.d.ts.map +1 -1
  25. package/core/bottom-drawer/bottom-drawer.model.d.ts +4 -0
  26. package/core/bottom-drawer/bottom-drawer.model.d.ts.map +1 -1
  27. package/core/common/ApplicationOptions.d.ts +8 -0
  28. package/core/common/ApplicationOptions.d.ts.map +1 -1
  29. package/core/common/index.d.ts +1 -0
  30. package/core/common/index.d.ts.map +1 -1
  31. package/core/common/notification-display.service.d.ts +19 -0
  32. package/core/common/notification-display.service.d.ts.map +1 -0
  33. package/core/core.module.d.ts.map +1 -1
  34. package/core/header/header-bar/header-bar.component.d.ts +1 -0
  35. package/core/header/header-bar/header-bar.component.d.ts.map +1 -1
  36. package/core/header/header.service.d.ts +4 -1
  37. package/core/header/header.service.d.ts.map +1 -1
  38. package/core/index.d.ts +1 -0
  39. package/core/index.d.ts.map +1 -1
  40. package/datapoint-explorer/datapoint-explorer-navigation-factory.d.ts +10 -0
  41. package/datapoint-explorer/datapoint-explorer-navigation-factory.d.ts.map +1 -0
  42. package/datapoint-explorer/datapoint-explorer-route-factory.d.ts +10 -0
  43. package/datapoint-explorer/datapoint-explorer-route-factory.d.ts.map +1 -0
  44. package/datapoint-explorer/datapoint-explorer.module.d.ts.map +1 -1
  45. package/esm2022/branding/shared/lazy/branding-import-modal/branding-import-modal.component.mjs +4 -7
  46. package/esm2022/core/beta-feature/beta-feature-show-notification.service.mjs +17 -0
  47. package/esm2022/core/beta-feature/beta-feature.providers.mjs +9 -0
  48. package/esm2022/core/beta-feature/beta-preview-button.component.mjs +53 -0
  49. package/esm2022/core/beta-feature/beta-preview-drawer.factory.mjs +52 -0
  50. package/esm2022/core/beta-feature/beta-preview.component.mjs +64 -0
  51. package/esm2022/core/beta-feature/beta-preview.model.mjs +2 -0
  52. package/esm2022/core/beta-feature/beta-preview.service.mjs +114 -0
  53. package/esm2022/core/beta-feature/feature-cache.service.mjs +48 -0
  54. package/esm2022/core/beta-feature/feature-state.pipe.mjs +22 -0
  55. package/esm2022/core/beta-feature/index.mjs +7 -0
  56. package/esm2022/core/bottom-drawer/bottom-drawer-ref.mjs +4 -1
  57. package/esm2022/core/bottom-drawer/bottom-drawer.component.mjs +4 -3
  58. package/esm2022/core/bottom-drawer/bottom-drawer.model.mjs +1 -1
  59. package/esm2022/core/common/ApplicationOptions.mjs +1 -1
  60. package/esm2022/core/common/index.mjs +2 -1
  61. package/esm2022/core/common/notification-display.service.mjs +2 -0
  62. package/esm2022/core/core.module.mjs +4 -2
  63. package/esm2022/core/docs/legal-notices-outlet/legal-notices-outlet.component.mjs +3 -3
  64. package/esm2022/core/header/header-bar/header-bar.component.mjs +4 -3
  65. package/esm2022/core/header/header.service.mjs +12 -6
  66. package/esm2022/core/index.mjs +2 -1
  67. package/esm2022/core/user/user-details-drawer/user-details-drawer.component.mjs +3 -3
  68. package/esm2022/core/version/version-list/version-list.component.mjs +3 -3
  69. package/esm2022/datapoint-explorer/datapoint-explorer-navigation-factory.mjs +31 -0
  70. package/esm2022/datapoint-explorer/datapoint-explorer-route-factory.mjs +37 -0
  71. package/esm2022/datapoint-explorer/datapoint-explorer.module.mjs +22 -48
  72. package/esm2022/register-device/bulk/bulk-device-registration-modal.component.mjs +8 -10
  73. package/esm2022/register-device/general/general-device-registration.component.mjs +8 -10
  74. package/esm2022/trusted-certificates/list/trusted-certificate-list.component.mjs +10 -12
  75. package/esm2022/upgrade/ng1/downgraded.services.mjs +3 -2
  76. package/esm2022/upgrade/ng1/index.mjs +3 -2
  77. package/esm2022/widgets/cockpit-exports/index.mjs +2 -2
  78. package/esm2022/widgets/definitions/datapoints-graph/datapoint-graph-widget-factory.mjs +56 -0
  79. package/esm2022/widgets/definitions/datapoints-graph/index.mjs +12 -29
  80. package/esm2022/widgets/definitions/index.mjs +3 -2
  81. package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +3 -6
  82. package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
  83. package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs +81 -48
  84. package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs.map +1 -1
  85. package/fesm2022/c8y-ngx-components-register-device.mjs +10 -14
  86. package/fesm2022/c8y-ngx-components-register-device.mjs.map +1 -1
  87. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +18 -20
  88. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
  89. package/fesm2022/c8y-ngx-components-upgrade.mjs +3 -1
  90. package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
  91. package/fesm2022/c8y-ngx-components-widgets-cockpit-exports.mjs +1 -1
  92. package/fesm2022/c8y-ngx-components-widgets-cockpit-exports.mjs.map +1 -1
  93. package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs +65 -28
  94. package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs.map +1 -1
  95. package/fesm2022/c8y-ngx-components-widgets-definitions.mjs +2 -1
  96. package/fesm2022/c8y-ngx-components-widgets-definitions.mjs.map +1 -1
  97. package/fesm2022/c8y-ngx-components.mjs +347 -17
  98. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  99. package/locales/locales.pot +31 -8
  100. package/package.json +1 -1
  101. package/register-device/bulk/bulk-device-registration-modal.component.d.ts +5 -5
  102. package/register-device/bulk/bulk-device-registration-modal.component.d.ts.map +1 -1
  103. package/register-device/general/general-device-registration.component.d.ts +5 -5
  104. package/register-device/general/general-device-registration.component.d.ts.map +1 -1
  105. package/trusted-certificates/list/trusted-certificate-list.component.d.ts +4 -4
  106. package/trusted-certificates/list/trusted-certificate-list.component.d.ts.map +1 -1
  107. package/upgrade/ng1/downgraded.services.d.ts +1 -0
  108. package/upgrade/ng1/downgraded.services.d.ts.map +1 -1
  109. package/upgrade/ng1/index.d.ts.map +1 -1
  110. package/widgets/cockpit-exports/index.d.ts +1 -1
  111. package/widgets/definitions/datapoints-graph/datapoint-graph-widget-factory.d.ts +11 -0
  112. package/widgets/definitions/datapoints-graph/datapoint-graph-widget-factory.d.ts.map +1 -0
  113. package/widgets/definitions/datapoints-graph/index.d.ts +0 -28
  114. package/widgets/definitions/datapoints-graph/index.d.ts.map +1 -1
  115. package/widgets/definitions/index.d.ts +2 -1
  116. package/widgets/definitions/index.d.ts.map +1 -1
@@ -1,65 +1,98 @@
1
1
  import * as i0 from '@angular/core';
2
- import { NgModule } from '@angular/core';
3
- import { hookRoute, ViewContext, gettext, hookNavigator, NavigatorNode } from '@c8y/ngx-components';
2
+ import { inject, Injectable, NgModule } from '@angular/core';
3
+ import { PreviewService, NavigatorNode, gettext, ViewContext, hookRoute, hookNavigator, hookPreview } from '@c8y/ngx-components';
4
+ import { map } from 'rxjs';
5
+
6
+ class DatapointExplorerNavigationFactory {
7
+ constructor() {
8
+ this.betaPreviewService = inject(PreviewService);
9
+ }
10
+ get() {
11
+ return this.betaPreviewService.getState$('ui.datapoint-explorer.v2').pipe(map(state => {
12
+ if (state) {
13
+ return [
14
+ new NavigatorNode({
15
+ label: gettext('Data explorer'),
16
+ featureId: 'dataPointExplorer',
17
+ path: 'datapointexplorer-v2',
18
+ icon: 'c8y-data-explorer',
19
+ routerLinkExact: false
20
+ })
21
+ ];
22
+ }
23
+ return [];
24
+ }));
25
+ }
26
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatapointExplorerNavigationFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
27
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatapointExplorerNavigationFactory }); }
28
+ }
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatapointExplorerNavigationFactory, decorators: [{
30
+ type: Injectable
31
+ }] });
32
+
33
+ class DatapointExplorerRouteFactory {
34
+ constructor() {
35
+ this.betaPreviewService = inject(PreviewService);
36
+ }
37
+ get() {
38
+ return this.betaPreviewService.getState$('ui.datapoint-explorer.v2').pipe(map(state => {
39
+ if (state) {
40
+ return [
41
+ {
42
+ path: 'datapointexplorer-v2',
43
+ loadComponent: () => import('@c8y/ngx-components/datapoint-explorer/view').then(m => m.DatapointExplorerComponent)
44
+ },
45
+ {
46
+ context: ViewContext.Group,
47
+ path: 'data_explorer-v2',
48
+ priority: 800,
49
+ icon: 'c8y-data-explorer',
50
+ label: gettext('Data Explorer'),
51
+ loadComponent: () => import('@c8y/ngx-components/datapoint-explorer/view').then(m => m.DatapointExplorerComponent),
52
+ featureId: 'dataExplorer'
53
+ }
54
+ ];
55
+ }
56
+ return [];
57
+ }));
58
+ }
59
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatapointExplorerRouteFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
60
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatapointExplorerRouteFactory }); }
61
+ }
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatapointExplorerRouteFactory, decorators: [{
63
+ type: Injectable
64
+ }] });
4
65
 
5
66
  class DatapointExplorerModule {
6
67
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatapointExplorerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
7
68
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: DatapointExplorerModule }); }
8
69
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatapointExplorerModule, providers: [
9
- hookRoute([
10
- {
11
- path: 'datapointexplorer-v2',
12
- loadComponent: () => import('@c8y/ngx-components/datapoint-explorer/view').then(m => m.DatapointExplorerComponent)
13
- },
14
- {
15
- context: ViewContext.Group,
16
- path: 'data_explorer-v2',
17
- priority: 800,
18
- icon: 'c8y-data-explorer',
19
- label: gettext('Data Explorer "new"'),
20
- loadComponent: () => import('@c8y/ngx-components/datapoint-explorer/view').then(m => m.DatapointExplorerComponent),
21
- featureId: 'dataExplorer'
70
+ hookRoute(DatapointExplorerRouteFactory),
71
+ hookNavigator(DatapointExplorerNavigationFactory),
72
+ hookPreview({
73
+ key: 'ui.datapoint-explorer.v2',
74
+ label: 'Data point explorer',
75
+ description: () => import('@c8y/style/markdown-files/datapoint-explorer-preview.md').then(m => m.default),
76
+ settings: {
77
+ reload: true
22
78
  }
23
- ]),
24
- hookNavigator([
25
- new NavigatorNode({
26
- label: gettext('Data explorer "new"'),
27
- featureId: 'dataPointExplorer',
28
- path: 'datapointexplorer-v2',
29
- icon: 'c8y-data-explorer',
30
- routerLinkExact: false
31
- })
32
- ])
79
+ })
33
80
  ] }); }
34
81
  }
35
82
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatapointExplorerModule, decorators: [{
36
83
  type: NgModule,
37
84
  args: [{
38
85
  providers: [
39
- hookRoute([
40
- {
41
- path: 'datapointexplorer-v2',
42
- loadComponent: () => import('@c8y/ngx-components/datapoint-explorer/view').then(m => m.DatapointExplorerComponent)
43
- },
44
- {
45
- context: ViewContext.Group,
46
- path: 'data_explorer-v2',
47
- priority: 800,
48
- icon: 'c8y-data-explorer',
49
- label: gettext('Data Explorer "new"'),
50
- loadComponent: () => import('@c8y/ngx-components/datapoint-explorer/view').then(m => m.DatapointExplorerComponent),
51
- featureId: 'dataExplorer'
86
+ hookRoute(DatapointExplorerRouteFactory),
87
+ hookNavigator(DatapointExplorerNavigationFactory),
88
+ hookPreview({
89
+ key: 'ui.datapoint-explorer.v2',
90
+ label: 'Data point explorer',
91
+ description: () => import('@c8y/style/markdown-files/datapoint-explorer-preview.md').then(m => m.default),
92
+ settings: {
93
+ reload: true
52
94
  }
53
- ]),
54
- hookNavigator([
55
- new NavigatorNode({
56
- label: gettext('Data explorer "new"'),
57
- featureId: 'dataPointExplorer',
58
- path: 'datapointexplorer-v2',
59
- icon: 'c8y-data-explorer',
60
- routerLinkExact: false
61
- })
62
- ])
95
+ })
63
96
  ]
64
97
  }]
65
98
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"c8y-ngx-components-datapoint-explorer.mjs","sources":["../../datapoint-explorer/datapoint-explorer.module.ts","../../datapoint-explorer/c8y-ngx-components-datapoint-explorer.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { gettext, hookNavigator, hookRoute, NavigatorNode, ViewContext } from '@c8y/ngx-components';\n\n@NgModule({\n providers: [\n hookRoute([\n {\n path: 'datapointexplorer-v2',\n loadComponent: () =>\n import('@c8y/ngx-components/datapoint-explorer/view').then(\n m => m.DatapointExplorerComponent\n )\n },\n {\n context: ViewContext.Group,\n path: 'data_explorer-v2',\n priority: 800,\n icon: 'c8y-data-explorer',\n label: gettext('Data Explorer \"new\"'),\n loadComponent: () =>\n import('@c8y/ngx-components/datapoint-explorer/view').then(\n m => m.DatapointExplorerComponent\n ),\n featureId: 'dataExplorer'\n }\n ]),\n hookNavigator([\n new NavigatorNode({\n label: gettext('Data explorer \"new\"'),\n featureId: 'dataPointExplorer',\n path: 'datapointexplorer-v2',\n icon: 'c8y-data-explorer',\n routerLinkExact: false\n })\n ])\n ]\n})\nexport class DatapointExplorerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAqCa,uBAAuB,CAAA;+GAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;gHAAvB,uBAAuB,EAAA,CAAA,CAAA,EAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,EAjCvB,SAAA,EAAA;AACT,YAAA,SAAS,CAAC;AACR,gBAAA;AACE,oBAAA,IAAI,EAAE,sBAAsB;AAC5B,oBAAA,aAAa,EAAE,MAC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AO,CAAC,qBAAqB,CAAC;AACrC,gCAAA,aAAa,EAAE,MACb,OAAO,6CAA6C,CAAC,CAAC,IAAI,CACxD,CAAC,IAAI,CAAC,CAAC,0BAA0B,CAClC;AACH,gCAAA,SAAS,EAAE,cAAc;AAC1B,6BAAA;yBACF,CAAC;AACF,wBAAA,aAAa,CAAC;AACZ,4BAAA,IAAI,aAAa,CAAC;AAChB,gCAAA,KAAK,EAAE,OAAO,CAAC,qBAAqB,CAAC;AACrC,gCAAA,SAAS,EAAE,mBAAmB;AAC9B,gCAAA,IAAI,EAAE,sBAAsB;AAC5B,gCAAA,IAAI,EAAE,mBAAmB;AACzB,gCAAA,eAAe,EAAE,KAAK;6BACvB,CAAC;yBACH,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACpCD;;AAEG;;;;"}
1
+ {"version":3,"file":"c8y-ngx-components-datapoint-explorer.mjs","sources":["../../datapoint-explorer/datapoint-explorer-navigation-factory.ts","../../datapoint-explorer/datapoint-explorer-route-factory.ts","../../datapoint-explorer/datapoint-explorer.module.ts","../../datapoint-explorer/c8y-ngx-components-datapoint-explorer.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { gettext, NavigatorNode, NavigatorNodeFactory, PreviewService } from '@c8y/ngx-components';\nimport { map, Observable } from 'rxjs';\n\n@Injectable()\nexport class DatapointExplorerNavigationFactory implements NavigatorNodeFactory {\n private readonly betaPreviewService = inject(PreviewService);\n\n get(): Observable<NavigatorNode[]> {\n return this.betaPreviewService.getState$('ui.datapoint-explorer.v2').pipe(\n map(state => {\n if (state) {\n return [\n new NavigatorNode({\n label: gettext('Data explorer'),\n featureId: 'dataPointExplorer',\n path: 'datapointexplorer-v2',\n icon: 'c8y-data-explorer',\n routerLinkExact: false\n })\n ];\n }\n return [];\n })\n );\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport {\n ExtensionFactory,\n gettext,\n PreviewService,\n Route,\n RouteWithComponent,\n ViewContext\n} from '@c8y/ngx-components';\nimport { map, Observable } from 'rxjs';\n\n@Injectable()\nexport class DatapointExplorerRouteFactory implements ExtensionFactory<Route> {\n private readonly betaPreviewService = inject(PreviewService);\n\n get(): Observable<Route[]> {\n return this.betaPreviewService.getState$('ui.datapoint-explorer.v2').pipe(\n map(state => {\n if (state) {\n return [\n {\n path: 'datapointexplorer-v2',\n loadComponent: () =>\n import('@c8y/ngx-components/datapoint-explorer/view').then(\n m => m.DatapointExplorerComponent\n )\n } as RouteWithComponent,\n {\n context: ViewContext.Group,\n path: 'data_explorer-v2',\n priority: 800,\n icon: 'c8y-data-explorer',\n label: gettext('Data Explorer'),\n loadComponent: () =>\n import('@c8y/ngx-components/datapoint-explorer/view').then(\n m => m.DatapointExplorerComponent\n ),\n featureId: 'dataExplorer'\n }\n ];\n }\n return [];\n })\n );\n }\n}\n","import { NgModule } from '@angular/core';\nimport { hookNavigator, hookRoute, hookPreview } from '@c8y/ngx-components';\nimport { DatapointExplorerNavigationFactory } from './datapoint-explorer-navigation-factory';\nimport { DatapointExplorerRouteFactory } from './datapoint-explorer-route-factory';\n\n@NgModule({\n providers: [\n hookRoute(DatapointExplorerRouteFactory),\n hookNavigator(DatapointExplorerNavigationFactory),\n hookPreview({\n key: 'ui.datapoint-explorer.v2',\n label: 'Data point explorer',\n description: () =>\n import('@c8y/style/markdown-files/datapoint-explorer-preview.md').then(m => m.default),\n settings: {\n reload: true\n }\n })\n ]\n})\nexport class DatapointExplorerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAKa,kCAAkC,CAAA;AAD/C,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAoB9D,KAAA;IAlBC,GAAG,GAAA;AACD,QAAA,OAAO,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,0BAA0B,CAAC,CAAC,IAAI,CACvE,GAAG,CAAC,KAAK,IAAG;YACV,IA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,oBAAA,SAAS,EAAE;wBACT,SAAS,CAAC,6BAA6B,CAAC;wBACxC,aAAa,CAAC,kCAAkC,CAAC;AACjD,wBAAA,WAAW,CAAC;AACV,4BAAA,GAAG,EAAE,0BAA0B;AAC/B,4BAAA,KAAK,EAAE,qBAAqB;AAC5B,4BAAA,WAAW,EAAE,MACX,OAAO,yDAAyD,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC;AACxF,4BAAA,QAAQ,EAAE;AACR,gCAAA,MAAM,EAAE,IAAI;AACb,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACnBD;;AAEG;;;;"}
@@ -245,19 +245,17 @@ const csvHeaders = [
245
245
  const fullCsvHeaders = [...csvHeaders, 'CREDENTIALS'];
246
246
  const ESTCsvHeaders = [...csvHeaders, 'ENROLLMENT_OTP'];
247
247
  class BulkDeviceRegistrationModalComponent {
248
- constructor(jsonschema, deviceRegistrationService, registerDeviceService, bsModalRef, gainsightService, featureService, translateService) {
248
+ constructor(jsonschema, deviceRegistrationService, registerDeviceService, bsModalRef, gainsightService, featureCacheService, translateService) {
249
249
  this.jsonschema = jsonschema;
250
250
  this.deviceRegistrationService = deviceRegistrationService;
251
251
  this.registerDeviceService = registerDeviceService;
252
252
  this.bsModalRef = bsModalRef;
253
253
  this.gainsightService = gainsightService;
254
- this.featureService = featureService;
254
+ this.featureCacheService = featureCacheService;
255
255
  this.translateService = translateService;
256
256
  this.form = new FormGroup({});
257
257
  this.model = {};
258
- this.certificateAuthorityFeatureEnabled = this.featureService
259
- .detail('certificate-authority')
260
- .then(({ data }) => data.active);
258
+ this.certificateAuthorityFeatureEnabled = this.featureCacheService.getFeatureState('certificate-authority');
261
259
  }
262
260
  ngOnInit() {
263
261
  this.template = [this.jsonschema.toFieldConfig(registerDeviceBulkSchema)];
@@ -330,19 +328,19 @@ class BulkDeviceRegistrationModalComponent {
330
328
  const csvBulkFile = model?.csvBulkFile;
331
329
  return csvBulkFile ? csvBulkFile[0]?.file : undefined;
332
330
  }
333
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BulkDeviceRegistrationModalComponent, deps: [{ token: i1$1.C8yJSONSchema }, { token: i2.DeviceRegistrationBulkService }, { token: RegisterDeviceService }, { token: i4.BsModalRef }, { token: i1$1.GainsightService }, { token: i2.FeatureService }, { token: i5.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
331
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BulkDeviceRegistrationModalComponent, deps: [{ token: i1$1.C8yJSONSchema }, { token: i2.DeviceRegistrationBulkService }, { token: RegisterDeviceService }, { token: i4.BsModalRef }, { token: i1$1.GainsightService }, { token: i1$1.FeatureCacheService }, { token: i5.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
334
332
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: BulkDeviceRegistrationModalComponent, selector: "bulk-device-registration", viewQueries: [{ propertyName: "stepper", first: true, predicate: C8yStepper, descendants: true, static: true }], ngImport: i0, template: "<c8y-modal\n [title]=\"'Bulk device registration' | translate\"\n [headerClasses]=\"'dialog-header'\"\n [customFooter]=\"true\"\n>\n <ng-container c8y-modal-title>\n <i c8yIcon=\"upload\"></i>\n </ng-container>\n\n <c8y-stepper [hideStepProgress]=\"true\" linear id=\"modal-body\">\n <cdk-step>\n <p class=\"modal-subtitle sticky-top\" translate>Register devices in bulk</p>\n\n <c8y-form-group class=\"d-block p-24 p-t-16 p-b-0 m-b-0\">\n <formly-form [form]=\"form\" [fields]=\"template\" [model]=\"model\"></formly-form>\n </c8y-form-group>\n\n <div class=\"p-24 m-t-0 bg-level-1\">\n <div class=\"bg-gray-white separator-bottom p-t-16 p-b-16 p-l-24 p-r-24\">\n <div>\n <p class=\"m-b-8 text-medium\">\n <strong translate>Simple registration</strong>\n </p>\n <small class=\"text-muted\" translate>\n Creates all registration requests at once, then each one needs to go through regular\n acceptance process.\n </small>\n </div>\n <div class=\"m-b-16 m-t-16\">\n <a\n title=\"{{ 'Download template' | translate }}\"\n class=\"btn btn-default btn-sm\"\n target=\"_self\"\n (click)=\"downloadSimple()\"\n >\n <i c8yIcon=\"download\" translate></i>\n {{ 'Download template' | translate }}\n </a>\n </div>\n </div>\n <div class=\"bg-gray-white separator-bottom p-t-16 p-b-16 p-l-24 p-r-24\">\n <div>\n <p class=\"m-b-8 text-medium\">\n <strong translate>Full registration</strong>\n </p>\n <small class=\"text-muted\" translate>\n Creates all device credentials and devices using provided list of property values.\n Devices can start communicating with the platform immediately.\n </small>\n </div>\n <div class=\"m-b-16 m-t-16\">\n <a\n title=\"{{ 'Download template' | translate }}\"\n class=\"btn btn-default btn-sm\"\n target=\"_self\"\n (click)=\"downloadFull()\"\n >\n <i c8yIcon=\"download\" translate></i>\n {{ 'Download template' | translate }}\n </a>\n </div>\n </div>\n <div class=\"bg-gray-white separator-bottom p-t-16 p-b-16 p-l-24 p-r-24\" *ngIf=\"certificateAuthorityFeatureEnabled | async\">\n <div>\n <p class=\"m-b-8 text-medium\">\n <strong translate>Full registration with device certificate creation</strong>\n </p>\n <small class=\"text-muted\" translate>\n Creates device certificates and devices using the provided list of property values. Once the certificates are provisioned, the devices can immediately start communicating with the platform\n </small>\n </div>\n <div class=\"m-b-16 m-t-16\">\n <a\n title=\"{{ 'Download template' | translate }}\"\n class=\"btn btn-default btn-sm\"\n target=\"_self\"\n (click)=\"downloadEst()\"\n >\n <i c8yIcon=\"download\"></i>\n {{ 'Download template' | translate }}\n </a>\n </div>\n </div>\n </div>\n\n <c8y-stepper-buttons\n class=\"sticky-bottom d-block p-t-16 p-b-16 separator-top bg-level-0\"\n [showButtons]=\"{ cancel: true, next: true }\"\n [disabled]=\"form.invalid\"\n [pending]=\"pending\"\n (onCancel)=\"cancel()\"\n (onNext)=\"upload()\"\n [labels]=\"{ next: 'Upload' }\"\n ></c8y-stepper-buttons>\n </cdk-step>\n\n <cdk-step state=\"final\">\n <div class=\"m-24\">\n <div *ngIf=\"success; else warning\">\n <c8y-operation-result\n text=\"{{ message | translate }}\"\n [size]=\"84\"\n [vertical]=\"true\"\n type=\"success\"\n class=\"lead\"\n ></c8y-operation-result>\n </div>\n <ng-template #warning>\n <c8y-operation-result\n text=\"{{ message | translate }}\"\n [size]=\"84\"\n [vertical]=\"true\"\n type=\"error\"\n class=\"lead\"\n ></c8y-operation-result>\n </ng-template>\n <c8y-list-group class=\"separator-top m-t-16\">\n <ng-container *ngIf=\"result; else failedResponse\">\n <c8y-li *ngIf=\"success; else fail\">\n <c8y-li-icon class=\"text-success\" icon=\"check-circle\"></c8y-li-icon>\n <p>{{ 'All devices have been processed.' | translate }}</p>\n <c8y-li-collapse>\n <pre><code>{{ result | json }}</code></pre>\n </c8y-li-collapse>\n </c8y-li>\n <ng-template #fail>\n <c8y-li>\n <c8y-li-icon class=\"text-danger\" icon=\"ban\"></c8y-li-icon>\n <p\n ngNonBindable\n [translateParams]=\"{ count: result?.numberOfFailed, total: result?.numberOfAll }\"\n translate\n >\n Failed to process {{ count }} out of {{ total }}.\n </p>\n <c8y-li-collapse>\n <pre><code>{{ result | json }}</code></pre>\n </c8y-li-collapse>\n </c8y-li>\n </ng-template>\n </ng-container>\n <ng-template #failedResponse>\n <c8y-li>\n <c8y-li-icon class=\"text-danger\" [icon]=\"'ban'\"></c8y-li-icon>\n <small>{{ failedResult?.message | translate }}</small>\n <c8y-li-collapse>\n <pre><code>{{ failedResult | json }}</code></pre>\n </c8y-li-collapse>\n </c8y-li>\n </ng-template>\n </c8y-list-group>\n </div>\n <c8y-stepper-buttons\n class=\"sticky-bottom d-block p-t-16 p-b-16 separator-top bg-level-0\"\n [showButtons]=\"{ next: true }\"\n (onNext)=\"complete()\"\n [labels]=\"{ next: success ? 'Close' : 'Cancel' }\"\n ></c8y-stepper-buttons>\n </cdk-step>\n </c8y-stepper>\n</c8y-modal>\n", dependencies: [{ kind: "directive", type: i1$1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i1$1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$1.OperationResultComponent, selector: "c8y-operation-result", inputs: ["text", "vertical", "size", "type"] }, { kind: "component", type: i1$1.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "component", type: i1$1.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i1$1.C8yStepper, selector: "c8y-stepper", inputs: ["disableDefaultIcons", "disableProgressButtons", "customClasses", "hideStepProgress", "useStepLabelsAsTitlesOnly"], outputs: ["onStepChange"] }, { kind: "component", type: i6.CdkStep, selector: "cdk-step", inputs: ["stepControl", "label", "errorMessage", "aria-label", "aria-labelledby", "state", "editable", "optional", "completed", "hasError"], outputs: ["interacted"], exportAs: ["cdkStep"] }, { kind: "component", type: i1$1.C8yStepperButtons, selector: "c8y-stepper-buttons", inputs: ["labels", "pending", "disabled", "showButtons"], outputs: ["onCancel", "onNext", "onBack", "onCustom"] }, { kind: "component", type: i1$1.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i1$1.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i1$1.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i1$1.ListItemCollapseComponent, selector: "c8y-list-item-collapse, c8y-li-collapse", inputs: ["collapseWay"] }, { kind: "component", type: i7.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "pipe", type: i1$1.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i5$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5$1.JsonPipe, name: "json" }] }); }
335
333
  }
336
334
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BulkDeviceRegistrationModalComponent, decorators: [{
337
335
  type: Component,
338
336
  args: [{ selector: 'bulk-device-registration', template: "<c8y-modal\n [title]=\"'Bulk device registration' | translate\"\n [headerClasses]=\"'dialog-header'\"\n [customFooter]=\"true\"\n>\n <ng-container c8y-modal-title>\n <i c8yIcon=\"upload\"></i>\n </ng-container>\n\n <c8y-stepper [hideStepProgress]=\"true\" linear id=\"modal-body\">\n <cdk-step>\n <p class=\"modal-subtitle sticky-top\" translate>Register devices in bulk</p>\n\n <c8y-form-group class=\"d-block p-24 p-t-16 p-b-0 m-b-0\">\n <formly-form [form]=\"form\" [fields]=\"template\" [model]=\"model\"></formly-form>\n </c8y-form-group>\n\n <div class=\"p-24 m-t-0 bg-level-1\">\n <div class=\"bg-gray-white separator-bottom p-t-16 p-b-16 p-l-24 p-r-24\">\n <div>\n <p class=\"m-b-8 text-medium\">\n <strong translate>Simple registration</strong>\n </p>\n <small class=\"text-muted\" translate>\n Creates all registration requests at once, then each one needs to go through regular\n acceptance process.\n </small>\n </div>\n <div class=\"m-b-16 m-t-16\">\n <a\n title=\"{{ 'Download template' | translate }}\"\n class=\"btn btn-default btn-sm\"\n target=\"_self\"\n (click)=\"downloadSimple()\"\n >\n <i c8yIcon=\"download\" translate></i>\n {{ 'Download template' | translate }}\n </a>\n </div>\n </div>\n <div class=\"bg-gray-white separator-bottom p-t-16 p-b-16 p-l-24 p-r-24\">\n <div>\n <p class=\"m-b-8 text-medium\">\n <strong translate>Full registration</strong>\n </p>\n <small class=\"text-muted\" translate>\n Creates all device credentials and devices using provided list of property values.\n Devices can start communicating with the platform immediately.\n </small>\n </div>\n <div class=\"m-b-16 m-t-16\">\n <a\n title=\"{{ 'Download template' | translate }}\"\n class=\"btn btn-default btn-sm\"\n target=\"_self\"\n (click)=\"downloadFull()\"\n >\n <i c8yIcon=\"download\" translate></i>\n {{ 'Download template' | translate }}\n </a>\n </div>\n </div>\n <div class=\"bg-gray-white separator-bottom p-t-16 p-b-16 p-l-24 p-r-24\" *ngIf=\"certificateAuthorityFeatureEnabled | async\">\n <div>\n <p class=\"m-b-8 text-medium\">\n <strong translate>Full registration with device certificate creation</strong>\n </p>\n <small class=\"text-muted\" translate>\n Creates device certificates and devices using the provided list of property values. Once the certificates are provisioned, the devices can immediately start communicating with the platform\n </small>\n </div>\n <div class=\"m-b-16 m-t-16\">\n <a\n title=\"{{ 'Download template' | translate }}\"\n class=\"btn btn-default btn-sm\"\n target=\"_self\"\n (click)=\"downloadEst()\"\n >\n <i c8yIcon=\"download\"></i>\n {{ 'Download template' | translate }}\n </a>\n </div>\n </div>\n </div>\n\n <c8y-stepper-buttons\n class=\"sticky-bottom d-block p-t-16 p-b-16 separator-top bg-level-0\"\n [showButtons]=\"{ cancel: true, next: true }\"\n [disabled]=\"form.invalid\"\n [pending]=\"pending\"\n (onCancel)=\"cancel()\"\n (onNext)=\"upload()\"\n [labels]=\"{ next: 'Upload' }\"\n ></c8y-stepper-buttons>\n </cdk-step>\n\n <cdk-step state=\"final\">\n <div class=\"m-24\">\n <div *ngIf=\"success; else warning\">\n <c8y-operation-result\n text=\"{{ message | translate }}\"\n [size]=\"84\"\n [vertical]=\"true\"\n type=\"success\"\n class=\"lead\"\n ></c8y-operation-result>\n </div>\n <ng-template #warning>\n <c8y-operation-result\n text=\"{{ message | translate }}\"\n [size]=\"84\"\n [vertical]=\"true\"\n type=\"error\"\n class=\"lead\"\n ></c8y-operation-result>\n </ng-template>\n <c8y-list-group class=\"separator-top m-t-16\">\n <ng-container *ngIf=\"result; else failedResponse\">\n <c8y-li *ngIf=\"success; else fail\">\n <c8y-li-icon class=\"text-success\" icon=\"check-circle\"></c8y-li-icon>\n <p>{{ 'All devices have been processed.' | translate }}</p>\n <c8y-li-collapse>\n <pre><code>{{ result | json }}</code></pre>\n </c8y-li-collapse>\n </c8y-li>\n <ng-template #fail>\n <c8y-li>\n <c8y-li-icon class=\"text-danger\" icon=\"ban\"></c8y-li-icon>\n <p\n ngNonBindable\n [translateParams]=\"{ count: result?.numberOfFailed, total: result?.numberOfAll }\"\n translate\n >\n Failed to process {{ count }} out of {{ total }}.\n </p>\n <c8y-li-collapse>\n <pre><code>{{ result | json }}</code></pre>\n </c8y-li-collapse>\n </c8y-li>\n </ng-template>\n </ng-container>\n <ng-template #failedResponse>\n <c8y-li>\n <c8y-li-icon class=\"text-danger\" [icon]=\"'ban'\"></c8y-li-icon>\n <small>{{ failedResult?.message | translate }}</small>\n <c8y-li-collapse>\n <pre><code>{{ failedResult | json }}</code></pre>\n </c8y-li-collapse>\n </c8y-li>\n </ng-template>\n </c8y-list-group>\n </div>\n <c8y-stepper-buttons\n class=\"sticky-bottom d-block p-t-16 p-b-16 separator-top bg-level-0\"\n [showButtons]=\"{ next: true }\"\n (onNext)=\"complete()\"\n [labels]=\"{ next: success ? 'Close' : 'Cancel' }\"\n ></c8y-stepper-buttons>\n </cdk-step>\n </c8y-stepper>\n</c8y-modal>\n" }]
339
- }], ctorParameters: () => [{ type: i1$1.C8yJSONSchema }, { type: i2.DeviceRegistrationBulkService }, { type: RegisterDeviceService }, { type: i4.BsModalRef }, { type: i1$1.GainsightService }, { type: i2.FeatureService }, { type: i5.TranslateService }], propDecorators: { stepper: [{
337
+ }], ctorParameters: () => [{ type: i1$1.C8yJSONSchema }, { type: i2.DeviceRegistrationBulkService }, { type: RegisterDeviceService }, { type: i4.BsModalRef }, { type: i1$1.GainsightService }, { type: i1$1.FeatureCacheService }, { type: i5.TranslateService }], propDecorators: { stepper: [{
340
338
  type: ViewChild,
341
339
  args: [C8yStepper, { static: true }]
342
340
  }] } });
343
341
 
344
342
  class GeneralDeviceRegistrationComponent {
345
- constructor(tenantUIService, tenantService, registerDeviceService, inventoryService, cd, bsModalRef, gainsightService, deviceRegistrationService, featureService) {
343
+ constructor(tenantUIService, tenantService, registerDeviceService, inventoryService, cd, bsModalRef, gainsightService, deviceRegistrationService, featureCacheService) {
346
344
  this.tenantUIService = tenantUIService;
347
345
  this.tenantService = tenantService;
348
346
  this.registerDeviceService = registerDeviceService;
@@ -351,16 +349,14 @@ class GeneralDeviceRegistrationComponent {
351
349
  this.bsModalRef = bsModalRef;
352
350
  this.gainsightService = gainsightService;
353
351
  this.deviceRegistrationService = deviceRegistrationService;
354
- this.featureService = featureService;
352
+ this.featureCacheService = featureCacheService;
355
353
  this.MANAGEMENT = 'management';
356
354
  this.FILTER = {
357
355
  withTotalPages: true,
358
356
  pageSize: 25
359
357
  };
360
358
  this.useEST$ = new BehaviorSubject(false);
361
- this.certificateAuthorityFeatureEnabled = this.featureService
362
- .detail('certificate-authority')
363
- .then(({ data }) => data.active);
359
+ this.certificateAuthorityFeatureEnabled = this.featureCacheService.getFeatureState('certificate-authority');
364
360
  this.form = new FormGroup({});
365
361
  this.model = {
366
362
  devicesToCreate: [{}]
@@ -616,7 +612,7 @@ class GeneralDeviceRegistrationComponent {
616
612
  getGroups$() {
617
613
  return defer(() => from(this.inventoryService.listQuery({ __filter: { __has: 'c8y_IsDeviceGroup' }, __orderby: [{ name: 1 }] }, { ...this.FILTER }))).pipe(shareReplay(1));
618
614
  }
619
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GeneralDeviceRegistrationComponent, deps: [{ token: i1$1.TenantUiService }, { token: i2.TenantService }, { token: RegisterDeviceService }, { token: i2.InventoryService }, { token: i0.ChangeDetectorRef }, { token: i4.BsModalRef }, { token: i1$1.GainsightService }, { token: i2.DeviceRegistrationBulkService }, { token: i2.FeatureService }], target: i0.ɵɵFactoryTarget.Component }); }
615
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GeneralDeviceRegistrationComponent, deps: [{ token: i1$1.TenantUiService }, { token: i2.TenantService }, { token: RegisterDeviceService }, { token: i2.InventoryService }, { token: i0.ChangeDetectorRef }, { token: i4.BsModalRef }, { token: i1$1.GainsightService }, { token: i2.DeviceRegistrationBulkService }, { token: i1$1.FeatureCacheService }], target: i0.ɵɵFactoryTarget.Component }); }
620
616
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: GeneralDeviceRegistrationComponent, selector: "c8y-general-device-registration", ngImport: i0, template: "<c8y-modal\n [title]=\"'Register devices' | translate\"\n [headerClasses]=\"'dialog-header'\"\n [customFooter]=\"true\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'c8y-device-connect'\"></span>\n </ng-container>\n <c8y-stepper [hideStepProgress]=\"true\" linear c8y-modal-body>\n <cdk-step [stepControl]=\"form\">\n <div class=\"text-center sticky-top bg-component\">\n <p class=\"text-medium text-16 separator-bottom p-16\" translate>Register general devices</p>\n <label\n class=\"c8y-switch m-24 a-i-center\"\n title=\"{{ 'Create device certificates during device registration' | translate }}\"\n for=\"useEST\"\n *ngIf=\"certificateAuthorityFeatureEnabled | async\"\n >\n <input\n type=\"checkbox\"\n name=\"useEST\"\n id=\"useEST\"\n [ngModel]=\"useEST$.getValue()\"\n (ngModelChange)=\"useEST$.next($event)\"\n />\n <span></span>\n <span class=\"control-label\">{{ 'Create device certificates during device registration' | translate }}</span>\n <button\n type=\"button\"\n class=\"btn-help\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ 'The device registration process includes creating device certificates, which are issued by the tenant\\'s Certificate Authority (CA).' | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n ></button>\n </label>\n </div>\n <div>\n <formly-form\n [form]=\"form\"\n [fields]=\"fields\"\n [model]=\"model\"\n [options]=\"options\"\n class=\"formly-group-array-cols d-block p-l-24 p-b-24 min-height-fit p-r-8\"\n [ngClass]=\"{'p-t-24' : !(certificateAuthorityFeatureEnabled | async)}\"\n ></formly-form>\n </div>\n <c8y-stepper-buttons\n (onNext)=\"registerDevice($event)\"\n (onCancel)=\"cancel()\"\n [showButtons]=\"{ cancel: true, next: true }\"\n [disabled]=\"!form?.valid\"\n [pending]=\"isLoading$ | async\"\n class=\"sticky-bottom d-block p-t-16 p-b-16 separator-top bg-level-0\"\n ></c8y-stepper-buttons>\n </cdk-step>\n <cdk-step state=\"final\">\n <div class=\"p-24 min-height-fit\">\n <c8y-operation-result\n *ngIf=\"success.length === 1 && failed.length === 0\"\n text=\"{{ 'Device registered' | translate }}\"\n [size]=\"84\"\n [vertical]=\"true\"\n type=\"success\"\n class=\"lead\"\n ></c8y-operation-result>\n <c8y-operation-result\n *ngIf=\"success.length === 0 && failed.length === 1\"\n text=\"{{ 'Failed to register device' | translate }}\"\n [size]=\"84\"\n [vertical]=\"true\"\n type=\"error\"\n class=\"lead\"\n ></c8y-operation-result>\n\n <ng-container *ngIf=\"success.length > 1 || failed.length > 1\">\n <c8y-operation-result\n *ngIf=\"failed.length === 0\"\n [text]=\"\n '{{ successfulDevicesCount }} devices registered'\n | translate: { successfulDevicesCount: success.length }\n \"\n [size]=\"84\"\n [vertical]=\"true\"\n type=\"success\"\n class=\"lead\"\n ></c8y-operation-result>\n <c8y-operation-result\n *ngIf=\"success.length === 0\"\n [text]=\"\n '{{ failedDevicesCount }} devices failed to register'\n | translate: { failedDevicesCount: failed.length }\n \"\n [size]=\"84\"\n [vertical]=\"true\"\n type=\"error\"\n class=\"lead\"\n ></c8y-operation-result>\n </ng-container>\n\n <div *ngIf=\"success.length > 0 && failed.length > 0\" class=\"p-l-24 p-r-24 text-center\">\n <c8y-operation-result\n text=\"{{ 'Several devices failed to register' | translate }}\"\n [size]=\"84\"\n [vertical]=\"true\"\n type=\"error\"\n class=\"lead\"\n ></c8y-operation-result>\n <p\n ngNonBindable\n translate\n [translateParams]=\"{ count: failed.length, total: failed.length + success.length }\"\n class=\"p-b-16 text-danger\"\n >\n Registration failed for {{ count }} devices out of {{ total }}.\n </p>\n </div>\n\n <div class=\"m-b-8 p-l-24 p-r-24\" *ngIf=\"success.length > 0\" translate>\n Turn on the registered device(s) and wait for connection(s) to be established. Once a\n device is connected, its status will change to \"Pending acceptance\". You will need to\n approve it by clicking on the \"Accept\" button.\n </div>\n\n <c8y-list-group class=\"separator-top m-t-16\">\n <c8y-li *ngFor=\"let fail of failed\">\n <c8y-li-icon class=\"text-danger\" [icon]=\"'ban'\"></c8y-li-icon>\n <p>{{ fail?.id }}</p>\n <small>{{ fail?.message | translate }}</small>\n <c8y-li-collapse>\n <pre><code>{{ fail?.details | json }}</code></pre>\n </c8y-li-collapse>\n </c8y-li>\n\n <c8y-li *ngFor=\"let s of success\">\n <c8y-li-icon class=\"text-success\" [icon]=\"'check-circle'\"></c8y-li-icon>\n {{ s?.id }}\n </c8y-li>\n </c8y-list-group>\n </div>\n <c8y-stepper-buttons\n class=\"sticky-bottom d-block p-t-16 p-b-16 separator-top bg-level-0\"\n (onCustom)=\"close()\"\n (onBack)=\"fixErrors($event, failed)\"\n [showButtons]=\"{ back: failed.length > 0, custom: true }\"\n [labels]=\"{ back: 'Fix errors', custom: 'Close' }\"\n ></c8y-stepper-buttons>\n </cdk-step>\n </c8y-stepper>\n</c8y-modal>\n", dependencies: [{ kind: "directive", type: i5$2.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "directive", type: i1$1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i1$1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i5$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$1.OperationResultComponent, selector: "c8y-operation-result", inputs: ["text", "vertical", "size", "type"] }, { kind: "component", type: i1$1.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: i8.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$1.C8yStepper, selector: "c8y-stepper", inputs: ["disableDefaultIcons", "disableProgressButtons", "customClasses", "hideStepProgress", "useStepLabelsAsTitlesOnly"], outputs: ["onStepChange"] }, { kind: "component", type: i6.CdkStep, selector: "cdk-step", inputs: ["stepControl", "label", "errorMessage", "aria-label", "aria-labelledby", "state", "editable", "optional", "completed", "hasError"], outputs: ["interacted"], exportAs: ["cdkStep"] }, { kind: "component", type: i1$1.C8yStepperButtons, selector: "c8y-stepper-buttons", inputs: ["labels", "pending", "disabled", "showButtons"], outputs: ["onCancel", "onNext", "onBack", "onCustom"] }, { kind: "component", type: i1$1.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i1$1.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i1$1.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i1$1.ListItemCollapseComponent, selector: "c8y-list-item-collapse, c8y-li-collapse", inputs: ["collapseWay"] }, { kind: "component", type: i7.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "pipe", type: i1$1.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i5$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5$1.JsonPipe, name: "json" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
621
617
  }
622
618
  __decorate([
@@ -640,7 +636,7 @@ __decorate([
640
636
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GeneralDeviceRegistrationComponent, decorators: [{
641
637
  type: Component,
642
638
  args: [{ selector: 'c8y-general-device-registration', changeDetection: ChangeDetectionStrategy.OnPush, template: "<c8y-modal\n [title]=\"'Register devices' | translate\"\n [headerClasses]=\"'dialog-header'\"\n [customFooter]=\"true\"\n>\n <ng-container c8y-modal-title>\n <span [c8yIcon]=\"'c8y-device-connect'\"></span>\n </ng-container>\n <c8y-stepper [hideStepProgress]=\"true\" linear c8y-modal-body>\n <cdk-step [stepControl]=\"form\">\n <div class=\"text-center sticky-top bg-component\">\n <p class=\"text-medium text-16 separator-bottom p-16\" translate>Register general devices</p>\n <label\n class=\"c8y-switch m-24 a-i-center\"\n title=\"{{ 'Create device certificates during device registration' | translate }}\"\n for=\"useEST\"\n *ngIf=\"certificateAuthorityFeatureEnabled | async\"\n >\n <input\n type=\"checkbox\"\n name=\"useEST\"\n id=\"useEST\"\n [ngModel]=\"useEST$.getValue()\"\n (ngModelChange)=\"useEST$.next($event)\"\n />\n <span></span>\n <span class=\"control-label\">{{ 'Create device certificates during device registration' | translate }}</span>\n <button\n type=\"button\"\n class=\"btn-help\"\n [attr.aria-label]=\"'Help' | translate\"\n popover=\"{{ 'The device registration process includes creating device certificates, which are issued by the tenant\\'s Certificate Authority (CA).' | translate }}\"\n placement=\"right\"\n triggers=\"focus\"\n container=\"body\"\n ></button>\n </label>\n </div>\n <div>\n <formly-form\n [form]=\"form\"\n [fields]=\"fields\"\n [model]=\"model\"\n [options]=\"options\"\n class=\"formly-group-array-cols d-block p-l-24 p-b-24 min-height-fit p-r-8\"\n [ngClass]=\"{'p-t-24' : !(certificateAuthorityFeatureEnabled | async)}\"\n ></formly-form>\n </div>\n <c8y-stepper-buttons\n (onNext)=\"registerDevice($event)\"\n (onCancel)=\"cancel()\"\n [showButtons]=\"{ cancel: true, next: true }\"\n [disabled]=\"!form?.valid\"\n [pending]=\"isLoading$ | async\"\n class=\"sticky-bottom d-block p-t-16 p-b-16 separator-top bg-level-0\"\n ></c8y-stepper-buttons>\n </cdk-step>\n <cdk-step state=\"final\">\n <div class=\"p-24 min-height-fit\">\n <c8y-operation-result\n *ngIf=\"success.length === 1 && failed.length === 0\"\n text=\"{{ 'Device registered' | translate }}\"\n [size]=\"84\"\n [vertical]=\"true\"\n type=\"success\"\n class=\"lead\"\n ></c8y-operation-result>\n <c8y-operation-result\n *ngIf=\"success.length === 0 && failed.length === 1\"\n text=\"{{ 'Failed to register device' | translate }}\"\n [size]=\"84\"\n [vertical]=\"true\"\n type=\"error\"\n class=\"lead\"\n ></c8y-operation-result>\n\n <ng-container *ngIf=\"success.length > 1 || failed.length > 1\">\n <c8y-operation-result\n *ngIf=\"failed.length === 0\"\n [text]=\"\n '{{ successfulDevicesCount }} devices registered'\n | translate: { successfulDevicesCount: success.length }\n \"\n [size]=\"84\"\n [vertical]=\"true\"\n type=\"success\"\n class=\"lead\"\n ></c8y-operation-result>\n <c8y-operation-result\n *ngIf=\"success.length === 0\"\n [text]=\"\n '{{ failedDevicesCount }} devices failed to register'\n | translate: { failedDevicesCount: failed.length }\n \"\n [size]=\"84\"\n [vertical]=\"true\"\n type=\"error\"\n class=\"lead\"\n ></c8y-operation-result>\n </ng-container>\n\n <div *ngIf=\"success.length > 0 && failed.length > 0\" class=\"p-l-24 p-r-24 text-center\">\n <c8y-operation-result\n text=\"{{ 'Several devices failed to register' | translate }}\"\n [size]=\"84\"\n [vertical]=\"true\"\n type=\"error\"\n class=\"lead\"\n ></c8y-operation-result>\n <p\n ngNonBindable\n translate\n [translateParams]=\"{ count: failed.length, total: failed.length + success.length }\"\n class=\"p-b-16 text-danger\"\n >\n Registration failed for {{ count }} devices out of {{ total }}.\n </p>\n </div>\n\n <div class=\"m-b-8 p-l-24 p-r-24\" *ngIf=\"success.length > 0\" translate>\n Turn on the registered device(s) and wait for connection(s) to be established. Once a\n device is connected, its status will change to \"Pending acceptance\". You will need to\n approve it by clicking on the \"Accept\" button.\n </div>\n\n <c8y-list-group class=\"separator-top m-t-16\">\n <c8y-li *ngFor=\"let fail of failed\">\n <c8y-li-icon class=\"text-danger\" [icon]=\"'ban'\"></c8y-li-icon>\n <p>{{ fail?.id }}</p>\n <small>{{ fail?.message | translate }}</small>\n <c8y-li-collapse>\n <pre><code>{{ fail?.details | json }}</code></pre>\n </c8y-li-collapse>\n </c8y-li>\n\n <c8y-li *ngFor=\"let s of success\">\n <c8y-li-icon class=\"text-success\" [icon]=\"'check-circle'\"></c8y-li-icon>\n {{ s?.id }}\n </c8y-li>\n </c8y-list-group>\n </div>\n <c8y-stepper-buttons\n class=\"sticky-bottom d-block p-t-16 p-b-16 separator-top bg-level-0\"\n (onCustom)=\"close()\"\n (onBack)=\"fixErrors($event, failed)\"\n [showButtons]=\"{ back: failed.length > 0, custom: true }\"\n [labels]=\"{ back: 'Fix errors', custom: 'Close' }\"\n ></c8y-stepper-buttons>\n </cdk-step>\n </c8y-stepper>\n</c8y-modal>\n" }]
643
- }], ctorParameters: () => [{ type: i1$1.TenantUiService }, { type: i2.TenantService }, { type: RegisterDeviceService }, { type: i2.InventoryService }, { type: i0.ChangeDetectorRef }, { type: i4.BsModalRef }, { type: i1$1.GainsightService }, { type: i2.DeviceRegistrationBulkService }, { type: i2.FeatureService }], propDecorators: { canLoadTenants$: [], getTenants$: [], getGroups$: [] } });
639
+ }], ctorParameters: () => [{ type: i1$1.TenantUiService }, { type: i2.TenantService }, { type: RegisterDeviceService }, { type: i2.InventoryService }, { type: i0.ChangeDetectorRef }, { type: i4.BsModalRef }, { type: i1$1.GainsightService }, { type: i2.DeviceRegistrationBulkService }, { type: i1$1.FeatureCacheService }], propDecorators: { canLoadTenants$: [], getTenants$: [], getGroups$: [] } });
644
640
 
645
641
  class GeneralDeviceRegistrationService {
646
642
  constructor() {