@c8y/ngx-components 1021.22.39 → 1021.22.42

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 (45) hide show
  1. package/context-dashboard/context-dashboard.model.d.ts +1 -0
  2. package/context-dashboard/context-dashboard.model.d.ts.map +1 -1
  3. package/core/docs/help-and-support-outlet/help-and-support-outlet.component.d.ts +5 -1
  4. package/core/docs/help-and-support-outlet/help-and-support-outlet.component.d.ts.map +1 -1
  5. package/core/docs/legal-notices-outlet/legal-notices-outlet.component.d.ts +5 -1
  6. package/core/docs/legal-notices-outlet/legal-notices-outlet.component.d.ts.map +1 -1
  7. package/core/docs/support-outlet/support-outlet.component.d.ts +5 -1
  8. package/core/docs/support-outlet/support-outlet.component.d.ts.map +1 -1
  9. package/core/i18n/translate.service.d.ts.map +1 -1
  10. package/core/shared/core.model.d.ts +5 -1
  11. package/core/shared/core.model.d.ts.map +1 -1
  12. package/ecosystem/application-plugins/application-plugins.component.d.ts +4 -0
  13. package/ecosystem/application-plugins/application-plugins.component.d.ts.map +1 -1
  14. package/ecosystem/application-plugins/plugin-list.component.d.ts.map +1 -1
  15. package/ecosystem/packages/package-details/package-details.component.d.ts +3 -2
  16. package/ecosystem/packages/package-details/package-details.component.d.ts.map +1 -1
  17. package/ecosystem/shared/ecosystem.model.d.ts +3 -0
  18. package/ecosystem/shared/ecosystem.model.d.ts.map +1 -1
  19. package/esm2022/branding/shared/lazy/branding-form/branding-form.component.mjs +3 -3
  20. package/esm2022/context-dashboard/context-dashboard.model.mjs +3 -2
  21. package/esm2022/core/docs/support-outlet/support-outlet.component.mjs +3 -3
  22. package/esm2022/core/i18n/translate.service.mjs +7 -5
  23. package/esm2022/core/shared/core.model.mjs +6 -2
  24. package/esm2022/ecosystem/application-plugins/application-plugins.component.mjs +36 -38
  25. package/esm2022/ecosystem/application-plugins/plugin-list.component.mjs +9 -12
  26. package/esm2022/ecosystem/packages/package-details/package-details.component.mjs +11 -6
  27. package/esm2022/ecosystem/shared/ecosystem.model.mjs +6 -3
  28. package/esm2022/report-dashboard/report-dashboard-list.component.mjs +4 -3
  29. package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +2 -2
  30. package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
  31. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +2 -1
  32. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  33. package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +43 -48
  34. package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
  35. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs +5 -2
  36. package/fesm2022/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
  37. package/fesm2022/c8y-ngx-components-ecosystem.mjs +51 -51
  38. package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
  39. package/fesm2022/c8y-ngx-components-report-dashboard.mjs +3 -2
  40. package/fesm2022/c8y-ngx-components-report-dashboard.mjs.map +1 -1
  41. package/fesm2022/c8y-ngx-components.mjs +13 -7
  42. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  43. package/package.json +1 -1
  44. package/report-dashboard/report-dashboard-list.component.d.ts +29 -0
  45. package/report-dashboard/report-dashboard-list.component.d.ts.map +1 -1
@@ -414,17 +414,12 @@ class PluginListComponent {
414
414
  this.onUpdateEventHandleGS(plugin, app, updateType);
415
415
  }
416
416
  catch (error) {
417
- this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.EVENTS.PACKAGE_PLUGINS, {
418
- component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.PLUGIN_LIST,
419
- result: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.SERVER_FAILURE,
420
- url: this.CURRENT_LOCATION,
421
- error
422
- });
417
+ this.onUpdateEventHandleGS(plugin, app, updateType, error);
423
418
  }
424
419
  }
425
420
  this.updatingPluginId[updateType] = '';
426
421
  }
427
- onUpdateEventHandleGS(plugin, app, updateType) {
422
+ onUpdateEventHandleGS(plugin, app, updateType, error) {
428
423
  const pluginCustomEventInfo = pick(plugin, [
429
424
  'name',
430
425
  'contextPath',
@@ -436,14 +431,16 @@ class PluginListComponent {
436
431
  const gsEventResult = updateType === 'install'
437
432
  ? PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.PLUGIN_INSTALLED
438
433
  : PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.PLUGIN_REMOVED;
439
- this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.EVENTS.PACKAGE_PLUGINS, {
434
+ const eventData = {
440
435
  component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.PLUGIN_LIST,
441
- result: gsEventResult,
436
+ result: error || gsEventResult,
442
437
  url: this.CURRENT_LOCATION,
443
438
  ...pluginCustomEventInfo,
444
439
  targetApplicationName: app.name,
445
- targetApplicationContextPath: app.contextPath
446
- });
440
+ targetApplicationContextPath: app.contextPath,
441
+ ...(error && { error })
442
+ };
443
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.EVENTS.PACKAGE_PLUGINS, eventData);
447
444
  }
448
445
  async getAppsForUpdate(plugin, updateType) {
449
446
  let apps = (await this.ecosystemService.getWebApplications()).filter(app => this.ecosystemService.isOwner(app) && app.type !== ApplicationType.EXTERNAL);
@@ -1689,7 +1686,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
1689
1686
  }] } });
1690
1687
 
1691
1688
  class PackageDetailsComponent {
1692
- constructor(activatedRoute, client, wizardModalService, ecosystemService, contextRouteService, pluginsService, packageAvailabilityService, ui, pluginService) {
1689
+ constructor(activatedRoute, client, wizardModalService, ecosystemService, contextRouteService, pluginsService, packageAvailabilityService, ui, pluginService, gainsightService) {
1693
1690
  this.activatedRoute = activatedRoute;
1694
1691
  this.client = client;
1695
1692
  this.wizardModalService = wizardModalService;
@@ -1699,6 +1696,7 @@ class PackageDetailsComponent {
1699
1696
  this.packageAvailabilityService = packageAvailabilityService;
1700
1697
  this.ui = ui;
1701
1698
  this.pluginService = pluginService;
1699
+ this.gainsightService = gainsightService;
1702
1700
  this.package = {};
1703
1701
  this.exportedPlugins$ = new BehaviorSubject([]);
1704
1702
  this.isChangingAvailability = false;
@@ -1715,6 +1713,10 @@ class PackageDetailsComponent {
1715
1713
  await this.loadData();
1716
1714
  }
1717
1715
  deploy() {
1716
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.EVENTS.PACKAGE_PLUGINS, {
1717
+ component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.PACKAGE_DETAILS,
1718
+ action: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.ACTIONS.DEPLOY_APPLICATION_INITIATED
1719
+ });
1718
1720
  const initialState = {
1719
1721
  wizardConfig: {},
1720
1722
  id: EcosystemWizards.BLUEPRINT_DEPLOYMENT,
@@ -1780,13 +1782,13 @@ class PackageDetailsComponent {
1780
1782
  getBaseUrl() {
1781
1783
  return `/apps/${this.package.contextPath}/`;
1782
1784
  }
1783
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: PackageDetailsComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i4.FetchClient }, { token: i2.WizardModalService }, { token: i1.EcosystemService }, { token: i2.ContextRouteService }, { token: i2.PluginsService }, { token: i1.PackageAvailabilityService }, { token: i2.AppStateService }, { token: i2.PluginsService }], target: i0.ɵɵFactoryTarget.Component }); }
1785
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: PackageDetailsComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i4.FetchClient }, { token: i2.WizardModalService }, { token: i1.EcosystemService }, { token: i2.ContextRouteService }, { token: i2.PluginsService }, { token: i1.PackageAvailabilityService }, { token: i2.AppStateService }, { token: i2.PluginsService }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Component }); }
1784
1786
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: PackageDetailsComponent, selector: "c8y-package-details", ngImport: i0, template: "<c8y-title>{{ name | humanizeAppName | async }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-atom'\"\n [label]=\"'Ecosystem' | translate\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'big-parcel'\"\n [label]=\"'Extensions' | translate\"\n [path]=\"'ecosystem/extension/extensions'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"name | humanizeAppName | async\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'Extension package' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item\n placement=\"right\"\n itemClass=\"navbar-form\"\n *ngIf=\"isOwnedByCurrentTenant && isAllowedToCreateSubtenants\"\n>\n <div class=\"form-horizontal\">\n <div class=\"form-group\">\n <label\n for=\"availability\"\n translate\n >\n Availability`of package based on app state`\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"availability\"\n [(ngModel)]=\"packageAvailability\"\n [disabled]=\"isChangingAvailability\"\n (ngModelChange)=\"togglePackageAvailability(package, $event)\"\n >\n <option\n *ngFor=\"let availability of packageAvailabilityService.availabilities\"\n [ngValue]=\"availability.value\"\n >\n {{ availability.label | translate }}\n </option>\n </select>\n <span></span>\n </div>\n </div>\n </div>\n</c8y-action-bar-item>\n\n<div class=\"card content-fullpage d-grid grid__col--8-4--md grid__row--fit-auto\">\n <div class=\"bg-level-1 grid__col--fullspan separator-bottom\">\n <div class=\"card-block p-t-24 p-b-24 large-padding\">\n <button\n class=\"card__ribbon btn-clean\"\n [attr.aria-label]=\"\n (package.label || package.manifest.label | translatePackageLabel) +\n ': ' +\n (packageTypeLabels[packageType].tooltip | translate)\n \"\n tooltip=\"{{ packageTypeLabels[packageType].tooltip | translate }}\"\n placement=\"bottom\"\n type=\"button\"\n *ngIf=\"packageType !== PACKAGE_TYPE.CUSTOM\"\n [delay]=\"500\"\n >\n <span\n [ngClass]=\"{\n 'bg-info': packageType === PACKAGE_TYPE.COMMUNITY,\n 'bg-primary': packageType === PACKAGE_TYPE.OFFICIAL\n }\"\n >\n {{ package.label || package.manifest.label | translatePackageLabel }}\n </span>\n </button>\n <div class=\"content-flex-70\">\n <div class=\"text-center\">\n <i\n class=\"c8y-icon-duocolor icon-48\"\n c8yIcon=\"big-parcel\"\n ></i>\n <button\n class=\"btn-clean\"\n [attr.aria-label]=\"\n (appState?.label | translate) + ': ' + (appState?.tooltip | translate)\n \"\n [tooltip]=\"appState?.tooltip | translate\"\n placement=\"top\"\n type=\"button\"\n [delay]=\"500\"\n >\n <span\n class=\"label\"\n [ngClass]=\"appState?.class\"\n >\n {{ appState?.label | translate }}\n </span>\n </button>\n <button\n class=\"btn-clean\"\n [attr.aria-label]=\"\n (packageContentState?.label | translate) +\n ': ' +\n (packageContentState?.tooltip | translate)\n \"\n [tooltip]=\"packageContentState?.tooltip | translate\"\n placement=\"bottom\"\n type=\"button\"\n [delay]=\"500\"\n >\n <span\n class=\"label\"\n [ngClass]=\"packageContentState?.class\"\n >\n {{ packageContentState?.label | translate }}\n </span>\n </button>\n </div>\n\n <div class=\"flex-grow col-10\">\n <div class=\"content-flex-80\">\n <div class=\"col-5\">\n <div class=\"card-title text-bold m-b-8\">{{ name | humanizeAppName | async }}</div>\n <p *ngIf=\"description\">{{ description }}</p>\n <p\n class=\"text-muted\"\n *ngIf=\"!description\"\n >\n <em>{{ 'No description available.' | translate }}</em>\n </p>\n </div>\n <div\n class=\"col-3 text-right-md p-r-md-40\"\n *ngIf=\"isPackageBlueprint\"\n >\n <button\n class=\"btn btn-primary btn-sm\"\n (click)=\"deploy()\"\n data-cy=\"c8y-package-details--deploy-application-button\"\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"output\"\n ></i>\n {{ 'Deploy application' | translate }}\n </button>\n </div>\n <div class=\"flex-grow\">\n <c8y-properties-list\n [data]=\"package.manifest\"\n [properties]=\"packageProperties\"\n ></c8y-properties-list>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"inner-scroll\">\n <div class=\"card-header separator sticky-top\">\n <div class=\"card-title\">{{ 'Extension package overview' | translate }}</div>\n </div>\n <div class=\"card-block p-l-16 p-r-16\">\n <c8y-ui-empty-state\n [icon]=\"'user-manual'\"\n [title]=\"'No README.md found' | translate\"\n [subtitle]=\"\n 'To view the contents of &quot;README&quot;, add the file &quot;README.md&quot; to the package.'\n | translate\n \"\n *ngIf=\"!markdown\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n <div\n class=\"markdown-content\"\n [innerHTML]=\"markdown | markdownToHtml: { baseUrl } | async\"\n ></div>\n </div>\n <div class=\"separator-bottom visible-sm visible-xs\"></div>\n </div>\n\n <div class=\"inner-scroll d-flex d-col\">\n <div class=\"card-header separator sticky-top\">\n <div class=\"card-title\">{{ 'Package plugins' | translate }}</div>\n </div>\n <div class=\"border-left flex-grow\">\n <!-- empty state -->\n <div\n class=\"p-16\"\n *ngIf=\"(exportedPlugins$ | async).length === 0\"\n >\n <c8y-ui-empty-state\n [icon]=\"'plugin'\"\n [title]=\"'No plugins to display.' | translate\"\n [subtitle]=\"'This package doesn\\'t contain plugins.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n <c8y-plugin-list\n [plugins$]=\"exportedPlugins$\"\n [selectable]=\"false\"\n [installable]=\"true\"\n [package]=\"package\"\n ></c8y-plugin-list>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: i2.BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: i2.BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "component", type: i2.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: i3$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.PropertiesListComponent, selector: "c8y-properties-list", inputs: ["properties", "title", "icon", "data", "groups", "noParse", "emptyLabel"] }, { kind: "directive", type: i9.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: PluginListComponent, selector: "c8y-plugin-list", inputs: ["plugins$", "emptyListText", "selectable", "hideSource", "installable", "package"], outputs: ["selectedItems"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.HumanizeAppNamePipe, name: "humanizeAppName" }, { kind: "pipe", type: i2.MarkdownToHtmlPipe, name: "markdownToHtml" }, { kind: "pipe", type: i1.TranslatePackageLabelPipe, name: "translatePackageLabel" }] }); }
1785
1787
  }
1786
1788
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: PackageDetailsComponent, decorators: [{
1787
1789
  type: Component,
1788
1790
  args: [{ selector: 'c8y-package-details', template: "<c8y-title>{{ name | humanizeAppName | async }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-atom'\"\n [label]=\"'Ecosystem' | translate\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'big-parcel'\"\n [label]=\"'Extensions' | translate\"\n [path]=\"'ecosystem/extension/extensions'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"name | humanizeAppName | async\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'Extension package' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item\n placement=\"right\"\n itemClass=\"navbar-form\"\n *ngIf=\"isOwnedByCurrentTenant && isAllowedToCreateSubtenants\"\n>\n <div class=\"form-horizontal\">\n <div class=\"form-group\">\n <label\n for=\"availability\"\n translate\n >\n Availability`of package based on app state`\n </label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control\"\n id=\"availability\"\n [(ngModel)]=\"packageAvailability\"\n [disabled]=\"isChangingAvailability\"\n (ngModelChange)=\"togglePackageAvailability(package, $event)\"\n >\n <option\n *ngFor=\"let availability of packageAvailabilityService.availabilities\"\n [ngValue]=\"availability.value\"\n >\n {{ availability.label | translate }}\n </option>\n </select>\n <span></span>\n </div>\n </div>\n </div>\n</c8y-action-bar-item>\n\n<div class=\"card content-fullpage d-grid grid__col--8-4--md grid__row--fit-auto\">\n <div class=\"bg-level-1 grid__col--fullspan separator-bottom\">\n <div class=\"card-block p-t-24 p-b-24 large-padding\">\n <button\n class=\"card__ribbon btn-clean\"\n [attr.aria-label]=\"\n (package.label || package.manifest.label | translatePackageLabel) +\n ': ' +\n (packageTypeLabels[packageType].tooltip | translate)\n \"\n tooltip=\"{{ packageTypeLabels[packageType].tooltip | translate }}\"\n placement=\"bottom\"\n type=\"button\"\n *ngIf=\"packageType !== PACKAGE_TYPE.CUSTOM\"\n [delay]=\"500\"\n >\n <span\n [ngClass]=\"{\n 'bg-info': packageType === PACKAGE_TYPE.COMMUNITY,\n 'bg-primary': packageType === PACKAGE_TYPE.OFFICIAL\n }\"\n >\n {{ package.label || package.manifest.label | translatePackageLabel }}\n </span>\n </button>\n <div class=\"content-flex-70\">\n <div class=\"text-center\">\n <i\n class=\"c8y-icon-duocolor icon-48\"\n c8yIcon=\"big-parcel\"\n ></i>\n <button\n class=\"btn-clean\"\n [attr.aria-label]=\"\n (appState?.label | translate) + ': ' + (appState?.tooltip | translate)\n \"\n [tooltip]=\"appState?.tooltip | translate\"\n placement=\"top\"\n type=\"button\"\n [delay]=\"500\"\n >\n <span\n class=\"label\"\n [ngClass]=\"appState?.class\"\n >\n {{ appState?.label | translate }}\n </span>\n </button>\n <button\n class=\"btn-clean\"\n [attr.aria-label]=\"\n (packageContentState?.label | translate) +\n ': ' +\n (packageContentState?.tooltip | translate)\n \"\n [tooltip]=\"packageContentState?.tooltip | translate\"\n placement=\"bottom\"\n type=\"button\"\n [delay]=\"500\"\n >\n <span\n class=\"label\"\n [ngClass]=\"packageContentState?.class\"\n >\n {{ packageContentState?.label | translate }}\n </span>\n </button>\n </div>\n\n <div class=\"flex-grow col-10\">\n <div class=\"content-flex-80\">\n <div class=\"col-5\">\n <div class=\"card-title text-bold m-b-8\">{{ name | humanizeAppName | async }}</div>\n <p *ngIf=\"description\">{{ description }}</p>\n <p\n class=\"text-muted\"\n *ngIf=\"!description\"\n >\n <em>{{ 'No description available.' | translate }}</em>\n </p>\n </div>\n <div\n class=\"col-3 text-right-md p-r-md-40\"\n *ngIf=\"isPackageBlueprint\"\n >\n <button\n class=\"btn btn-primary btn-sm\"\n (click)=\"deploy()\"\n data-cy=\"c8y-package-details--deploy-application-button\"\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"output\"\n ></i>\n {{ 'Deploy application' | translate }}\n </button>\n </div>\n <div class=\"flex-grow\">\n <c8y-properties-list\n [data]=\"package.manifest\"\n [properties]=\"packageProperties\"\n ></c8y-properties-list>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"inner-scroll\">\n <div class=\"card-header separator sticky-top\">\n <div class=\"card-title\">{{ 'Extension package overview' | translate }}</div>\n </div>\n <div class=\"card-block p-l-16 p-r-16\">\n <c8y-ui-empty-state\n [icon]=\"'user-manual'\"\n [title]=\"'No README.md found' | translate\"\n [subtitle]=\"\n 'To view the contents of &quot;README&quot;, add the file &quot;README.md&quot; to the package.'\n | translate\n \"\n *ngIf=\"!markdown\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n <div\n class=\"markdown-content\"\n [innerHTML]=\"markdown | markdownToHtml: { baseUrl } | async\"\n ></div>\n </div>\n <div class=\"separator-bottom visible-sm visible-xs\"></div>\n </div>\n\n <div class=\"inner-scroll d-flex d-col\">\n <div class=\"card-header separator sticky-top\">\n <div class=\"card-title\">{{ 'Package plugins' | translate }}</div>\n </div>\n <div class=\"border-left flex-grow\">\n <!-- empty state -->\n <div\n class=\"p-16\"\n *ngIf=\"(exportedPlugins$ | async).length === 0\"\n >\n <c8y-ui-empty-state\n [icon]=\"'plugin'\"\n [title]=\"'No plugins to display.' | translate\"\n [subtitle]=\"'This package doesn\\'t contain plugins.' | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n <c8y-plugin-list\n [plugins$]=\"exportedPlugins$\"\n [selectable]=\"false\"\n [installable]=\"true\"\n [package]=\"package\"\n ></c8y-plugin-list>\n </div>\n </div>\n</div>\n" }]
1789
- }], ctorParameters: () => [{ type: i1$2.ActivatedRoute }, { type: i4.FetchClient }, { type: i2.WizardModalService }, { type: i1.EcosystemService }, { type: i2.ContextRouteService }, { type: i2.PluginsService }, { type: i1.PackageAvailabilityService }, { type: i2.AppStateService }, { type: i2.PluginsService }] });
1791
+ }], ctorParameters: () => [{ type: i1$2.ActivatedRoute }, { type: i4.FetchClient }, { type: i2.WizardModalService }, { type: i1.EcosystemService }, { type: i2.ContextRouteService }, { type: i2.PluginsService }, { type: i1.PackageAvailabilityService }, { type: i2.AppStateService }, { type: i2.PluginsService }, { type: i2.GainsightService }] });
1790
1792
 
1791
1793
  class PackagesListComponent {
1792
1794
  constructor(ecosystemService, wizardModalService, permissions) {
@@ -2471,7 +2473,15 @@ class ApplicationPluginsComponent {
2471
2473
  this.alertService.success(gettext('The application was reset to its default plugins.'));
2472
2474
  }
2473
2475
  async installPlugins() {
2476
+ let currentPlugin = null;
2474
2477
  try {
2478
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2479
+ component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2480
+ action: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.ACTIONS.INSTALL_PLUGINS_INITIATED,
2481
+ url: this.CURRENT_LOCATION,
2482
+ targetApplicationName: this.app.name,
2483
+ targetApplicationContextPath: this.app.contextPath
2484
+ });
2475
2485
  const pluginsToAdd = await this.bsModalService.show(InstallPluginComponent, {
2476
2486
  class: 'modal-sm',
2477
2487
  ariaDescribedby: 'modal-body',
@@ -2491,33 +2501,14 @@ class ApplicationPluginsComponent {
2491
2501
  await this.handleRemotesInstallation(pluginsToAdd);
2492
2502
  this.alertService.success(gettext('Plugins installed.'));
2493
2503
  pluginsToAdd.forEach(plugin => {
2494
- const pluginCustomEventInfo = pick(plugin, [
2495
- 'name',
2496
- 'contextPath',
2497
- 'module',
2498
- 'version',
2499
- 'type',
2500
- 'id'
2501
- ]);
2502
- this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2503
- component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2504
- result: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.PLUGIN_INSTALLED,
2505
- url: this.CURRENT_LOCATION,
2506
- ...pluginCustomEventInfo,
2507
- targetApplicationName: this.app.name,
2508
- targetApplicationContextPath: this.app.contextPath
2509
- });
2504
+ currentPlugin = plugin;
2505
+ this.triggerPluginEvent(plugin, PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.PLUGIN_INSTALLED);
2510
2506
  });
2511
2507
  }
2512
2508
  catch (ex) {
2513
2509
  if (ex) {
2514
2510
  this.alertService.addServerFailure(ex);
2515
- this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2516
- component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2517
- result: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.SERVER_FAILURE,
2518
- url: this.CURRENT_LOCATION,
2519
- error: ex
2520
- });
2511
+ this.triggerPluginEvent(currentPlugin, PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.SERVER_FAILURE);
2521
2512
  }
2522
2513
  }
2523
2514
  finally {
@@ -2525,34 +2516,25 @@ class ApplicationPluginsComponent {
2525
2516
  }
2526
2517
  }
2527
2518
  async removePlugins(plugins) {
2519
+ let currentPlugin = null;
2528
2520
  try {
2529
2521
  this.isLoading = true;
2530
2522
  const installedPlugins = await firstValueFrom(this.installedPlugins$);
2523
+ const pluginsToRemove = installedPlugins.filter(p => plugins.includes(p.id));
2531
2524
  const updatedRemotes = await this.pluginsService.removeRemotes(this.app, plugins.map(id => installedPlugins.find(p => p.id === id)));
2532
2525
  this.emitRemotes(updatedRemotes);
2533
2526
  this.isLoading = false;
2534
2527
  this.dataGrid.cancel();
2535
2528
  this.alertService.success(gettext('Plugins removed.'));
2536
- plugins.forEach(plugin => {
2537
- this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2538
- component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2539
- result: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.PLUGIN_REMOVED,
2540
- url: this.CURRENT_LOCATION,
2541
- id: plugin,
2542
- targetApplicationName: this.app.name,
2543
- targetApplicationContextPath: this.app.contextPath
2544
- });
2529
+ pluginsToRemove.forEach(plugin => {
2530
+ currentPlugin = plugin;
2531
+ this.triggerPluginEvent(plugin, PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.PLUGIN_REMOVED);
2545
2532
  });
2546
2533
  }
2547
2534
  catch (ex) {
2548
2535
  if (ex) {
2549
2536
  this.alertService.addServerFailure(ex);
2550
- this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2551
- component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2552
- result: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.SERVER_FAILURE,
2553
- url: this.CURRENT_LOCATION,
2554
- error: ex
2555
- });
2537
+ this.triggerPluginEvent(currentPlugin, PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.RESULTS.SERVER_FAILURE);
2556
2538
  }
2557
2539
  }
2558
2540
  finally {
@@ -2795,6 +2777,24 @@ class ApplicationPluginsComponent {
2795
2777
  const value = matches ? matches[0] : '';
2796
2778
  return value.replace(/(@|\/)/g, '');
2797
2779
  }
2780
+ triggerPluginEvent(plugin, result) {
2781
+ const pluginInfo = pick(plugin, [
2782
+ 'name',
2783
+ 'contextPath',
2784
+ 'module',
2785
+ 'version',
2786
+ 'type',
2787
+ 'id'
2788
+ ]);
2789
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.EVENTS.INSTALLED_PLUGINS, {
2790
+ component: PRODUCT_EXPERIENCE_ECOSYSTEM.APPLICATIONS.COMPONENTS.APPLICATION_PLUGINS,
2791
+ result,
2792
+ url: this.CURRENT_LOCATION,
2793
+ ...pluginInfo,
2794
+ targetApplicationName: this.app.name,
2795
+ targetApplicationContextPath: this.app.contextPath
2796
+ });
2797
+ }
2798
2798
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: ApplicationPluginsComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i1.EcosystemService }, { token: i1$1.BsModalService }, { token: i2.PluginsService }, { token: i2.AlertService }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Component }); }
2799
2799
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: ApplicationPluginsComponent, selector: "c8y-app-plugins", inputs: { appId: "appId" }, viewQueries: [{ propertyName: "dataGrid", first: true, predicate: DataGridComponent, descendants: true }], ngImport: i0, template: "<c8y-title>{{ app | humanizeAppName | async }}</c8y-title>\n\n<c8y-breadcrumb>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-atom'\"\n [label]=\"'Ecosystem' | translate\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item\n [icon]=\"'c8y-modules'\"\n [label]=\"'Applications' | translate\"\n [path]=\"'ecosystem/application/applications'\"\n ></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"app | humanizeAppName | async\"></c8y-breadcrumb-item>\n <c8y-breadcrumb-item [label]=\"'Plugins' | translate\"></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<c8y-action-bar-item\n [placement]=\"'right'\"\n *ngIf=\"!(isStandard$ | async)\"\n>\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Reset to default plugins' | translate }}\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n (click)=\"resetToDefault()\"\n >\n <i c8yIcon=\"undo\"></i>\n {{ 'Reset to default' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item [placement]=\"'right'\">\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Install plugins' | translate }}\"\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Install plugins' | translate }}\n </button>\n</c8y-action-bar-item>\n\n<ng-container *ngIf=\"orphanedPlugins$ | async as orphanedPlugins\">\n <c8y-action-bar-item\n *ngIf=\"orphanedPlugins?.length\"\n [placement]=\"'right'\"\n >\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Clean up orphaned plugins' | translate }}\"\n (click)=\"cleanupOrphanedPlugins(orphanedPlugins)\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n >\n <i c8yIcon=\"erase\"></i>\n {{ 'Clean up orphaned plugins' | translate }}\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<div class=\"content-fullpage d-flex d-col border-top\">\n <c8y-data-grid\n class=\"d-contents\"\n [title]=\"title\"\n [loadMoreItemsLabel]=\"loadMoreItemsLabel\"\n [loadingItemsLabel]=\"loadingItemsLabel\"\n [displayOptions]=\"displayOptions\"\n [columns]=\"columns\"\n [rows]=\"installedPlugins$ | async\"\n [pagination]=\"pagination\"\n [selectable]=\"true\"\n [actionControls]=\"actionControls\"\n [bulkActionControls]=\"bulkActionControls\"\n [headerActionControls]=\"headerActionControls\"\n (onReload)=\"refresh()\"\n >\n <c8y-ui-empty-state\n [icon]=\"stats?.size > 0 ? 'search' : 'plugin'\"\n [title]=\"stats?.size > 0 ? (noResultsMessage | translate) : (noDataMessage | translate)\"\n [subtitle]=\"stats?.size > 0 ? (noResultsSubtitle | translate) : (noDataSubtitle | translate)\"\n *emptyStateContext=\"let stats\"\n [horizontal]=\"stats?.size > 0\"\n >\n <p *ngIf=\"stats?.size === 0\">\n <button\n class=\"btn btn-primary btn-sm\"\n title=\"{{ 'Install plugins' | translate }}\"\n (click)=\"installPlugins()\"\n [ngClass]=\"{ 'btn-pending': isLoading }\"\n translate\n >\n Install plugins\n </button>\n </p>\n </c8y-ui-empty-state>\n </c8y-data-grid>\n</div>\n", dependencies: [{ kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "component", type: i2.BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: i2.BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "component", type: i2.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i2.EmptyStateContextDirective, selector: "[emptyStateContext]" }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.DataGridComponent, selector: "c8y-data-grid", inputs: ["title", "loadMoreItemsLabel", "loadingItemsLabel", "showSearch", "refresh", "columns", "rows", "pagination", "infiniteScroll", "serverSideDataCallback", "selectable", "singleSelection", "selectionPrimaryKey", "displayOptions", "actionControls", "bulkActionControls", "headerActionControls", "searchText", "configureColumnsEnabled", "showCounterWarning", "activeClassName", "expandableRows"], outputs: ["rowMouseOver", "rowMouseLeave", "rowClick", "onConfigChange", "onBeforeFilter", "onBeforeSearch", "onFilter", "itemsSelect", "onReload", "onAddCustomColumn", "onRemoveCustomColumn", "onColumnFilterReset", "onSort", "onPageSizeChange", "onColumnReordered", "onColumnVisibilityChange"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.HumanizeAppNamePipe, name: "humanizeAppName" }] }); }
2800
2800
  }