@c8y/ngx-components 1018.503.63 → 1018.503.69

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 (39) hide show
  1. package/ecosystem/application-plugins/plugin-list.component.d.ts +1 -0
  2. package/esm2020/core/product-experience/gainsight.service.mjs +16 -25
  3. package/esm2020/ecosystem/application-plugins/plugin-list.component.mjs +27 -13
  4. package/esm2020/ecosystem/packages/deploy-application/deploy-application.component.mjs +14 -3
  5. package/esm2020/map/map.component.mjs +2 -2
  6. package/esm2020/sub-assets/location/asset-location.component.mjs +2 -1
  7. package/fesm2015/c8y-ngx-components-ecosystem-application-plugins.mjs +19 -13
  8. package/fesm2015/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
  9. package/fesm2015/c8y-ngx-components-ecosystem.mjs +30 -20
  10. package/fesm2015/c8y-ngx-components-ecosystem.mjs.map +1 -1
  11. package/fesm2015/c8y-ngx-components-map.mjs +2 -1
  12. package/fesm2015/c8y-ngx-components-map.mjs.map +1 -1
  13. package/fesm2015/c8y-ngx-components-sub-assets.mjs +1 -0
  14. package/fesm2015/c8y-ngx-components-sub-assets.mjs.map +1 -1
  15. package/fesm2015/c8y-ngx-components.mjs +15 -20
  16. package/fesm2015/c8y-ngx-components.mjs.map +1 -1
  17. package/fesm2020/c8y-ngx-components-ecosystem-application-plugins.mjs +26 -13
  18. package/fesm2020/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
  19. package/fesm2020/c8y-ngx-components-ecosystem.mjs +38 -15
  20. package/fesm2020/c8y-ngx-components-ecosystem.mjs.map +1 -1
  21. package/fesm2020/c8y-ngx-components-map.mjs +1 -1
  22. package/fesm2020/c8y-ngx-components-map.mjs.map +1 -1
  23. package/fesm2020/c8y-ngx-components-sub-assets.mjs +1 -0
  24. package/fesm2020/c8y-ngx-components-sub-assets.mjs.map +1 -1
  25. package/fesm2020/c8y-ngx-components.mjs +15 -24
  26. package/fesm2020/c8y-ngx-components.mjs.map +1 -1
  27. package/locales/de.po +56 -8
  28. package/locales/en.po +6 -0
  29. package/locales/es.po +120 -24
  30. package/locales/fr.po +111 -15
  31. package/locales/ja_JP.po +131 -35
  32. package/locales/ko.po +114 -12
  33. package/locales/nl.po +106 -10
  34. package/locales/pl.po +110 -14
  35. package/locales/pt_BR.po +134 -38
  36. package/locales/ru.po +0 -39
  37. package/locales/zh_CN.po +107 -5
  38. package/locales/zh_TW.po +109 -7
  39. package/package.json +1 -1
@@ -23,7 +23,7 @@ import { tap, switchMap, shareReplay, takeUntil, map } from 'rxjs/operators';
23
23
  import * as i6 from 'ngx-bootstrap/dropdown';
24
24
  import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
25
25
  import { PopoverModule } from 'ngx-bootstrap/popover';
26
- import { uniq, pick } from 'lodash-es';
26
+ import { pick, uniq } from 'lodash-es';
27
27
  import { LicenseConfirmModule } from '@c8y/ngx-components/ecosystem/license-confirm';
28
28
  import { A11yModule } from '@angular/cdk/a11y';
29
29
 
@@ -1183,12 +1183,21 @@ class DeployApplicationComponent {
1183
1183
  }
1184
1184
  try {
1185
1185
  this.deployedApp = await this.ecosystemService.deployApp(this.package, formGroupValue, this.model);
1186
+ const applicationCustomEventInfo = pick(this.package, [
1187
+ 'id',
1188
+ 'name',
1189
+ 'contextPath',
1190
+ 'label',
1191
+ 'key'
1192
+ ]);
1186
1193
  this.deployedWithSuccess = true;
1187
1194
  this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.DEPLOY_APPLICATION, {
1188
1195
  component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.DEPLOY_APPLICATION,
1189
1196
  action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.DEPLOY_APPLICATION,
1190
1197
  result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.DEPLOYED,
1191
- url: this.CURRENT_LOCATION
1198
+ url: this.CURRENT_LOCATION,
1199
+ ...applicationCustomEventInfo,
1200
+ package: this.deployedApp?.manifest?.package ?? null
1192
1201
  });
1193
1202
  }
1194
1203
  catch (error) {
@@ -1197,7 +1206,8 @@ class DeployApplicationComponent {
1197
1206
  component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.DEPLOY_APPLICATION,
1198
1207
  action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.DEPLOY_APPLICATION,
1199
1208
  result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
1200
- url: this.CURRENT_LOCATION
1209
+ url: this.CURRENT_LOCATION,
1210
+ error
1201
1211
  });
1202
1212
  }
1203
1213
  finally {
@@ -1390,11 +1400,6 @@ class PluginListComponent {
1390
1400
  await this.updateAppRemotes(plugin, 'install');
1391
1401
  }
1392
1402
  async uninstallPlugin(plugin) {
1393
- this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_PLUGINS, {
1394
- component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PLUGIN_LIST,
1395
- action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.INSTALL_PLUGIN,
1396
- url: this.CURRENT_LOCATION
1397
- });
1398
1403
  await this.updateAppRemotes(plugin, 'uninstall');
1399
1404
  }
1400
1405
  async updateAppRemotes(plugin, updateType) {
@@ -1447,22 +1452,40 @@ class PluginListComponent {
1447
1452
  })
1448
1453
  : this.translateService.instant(gettext('Plugin uninstalled from application "{{ appName }}".'), { appName: app.name });
1449
1454
  this.alertService.success(successText);
1450
- this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_PLUGINS, {
1451
- component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PLUGIN_LIST,
1452
- result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.PLUGIN_INSTALLED,
1453
- url: this.CURRENT_LOCATION
1454
- });
1455
+ this.onUpdateEventHandleGS(plugin, app, updateType);
1455
1456
  }
1456
- catch {
1457
+ catch (error) {
1457
1458
  this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_PLUGINS, {
1458
1459
  component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PLUGIN_LIST,
1459
1460
  result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
1460
- url: this.CURRENT_LOCATION
1461
+ url: this.CURRENT_LOCATION,
1462
+ error
1461
1463
  });
1462
1464
  }
1463
1465
  }
1464
1466
  this.updatingPluginId[updateType] = '';
1465
1467
  }
1468
+ onUpdateEventHandleGS(plugin, app, updateType) {
1469
+ const pluginCustomEventInfo = pick(plugin, [
1470
+ 'name',
1471
+ 'contextPath',
1472
+ 'module',
1473
+ 'version',
1474
+ 'type',
1475
+ 'id'
1476
+ ]);
1477
+ const gsEventResult = updateType === 'install'
1478
+ ? PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.PLUGIN_INSTALLED
1479
+ : PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.PLUGIN_REMOVED;
1480
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.PACKAGE_PLUGINS, {
1481
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.PLUGIN_LIST,
1482
+ result: gsEventResult,
1483
+ url: this.CURRENT_LOCATION,
1484
+ ...pluginCustomEventInfo,
1485
+ targetApplicationName: app.name,
1486
+ targetApplicationContextPath: app.contextPath
1487
+ });
1488
+ }
1466
1489
  async getAppsForUpdate(plugin, updateType) {
1467
1490
  let apps = (await this.ecosystemService.getWebApplications()).filter(app => this.ecosystemService.isOwner(app) && app.type !== ApplicationType.EXTERNAL);
1468
1491
  if (updateType === 'install') {