@c8y/ngx-components 1017.0.31 → 1017.0.32

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 (38) hide show
  1. package/ecosystem/application-plugins/application-plugins.component.d.ts +54 -3
  2. package/ecosystem/application-plugins/plugin-list.component.d.ts +5 -3
  3. package/ecosystem/application-plugins/update-plugin-of-app/update-plugin-of-app.component.d.ts +4 -2
  4. package/ecosystem/application-properties/application-properties.component.d.ts +5 -3
  5. package/ecosystem/packages/deploy-application/deploy-application.component.d.ts +5 -4
  6. package/ecosystem/packages/package-availability.service.d.ts +4 -2
  7. package/ecosystem/packages/package-versions/package-versions-list/package-versions-list.component.d.ts +4 -2
  8. package/ecosystem/shared/application-card.component.d.ts +5 -3
  9. package/ecosystem/shared/duplicate-application/duplicate-application-properties/duplicate-application-properties.component.d.ts +4 -2
  10. package/ecosystem/shared/ecosystem.model.d.ts +49 -0
  11. package/esm2020/core/help/help.component.mjs +3 -3
  12. package/esm2020/ecosystem/application-plugins/application-plugins.component.mjs +32 -9
  13. package/esm2020/ecosystem/application-plugins/plugin-list.component.mjs +18 -6
  14. package/esm2020/ecosystem/application-plugins/update-plugin-of-app/update-plugin-of-app.component.mjs +20 -5
  15. package/esm2020/ecosystem/application-properties/application-properties.component.mjs +13 -6
  16. package/esm2020/ecosystem/packages/deploy-application/deploy-application.component.mjs +20 -7
  17. package/esm2020/ecosystem/packages/package-availability.service.mjs +18 -5
  18. package/esm2020/ecosystem/packages/package-versions/package-versions-list/package-versions-list.component.mjs +43 -6
  19. package/esm2020/ecosystem/shared/application-card.component.mjs +28 -5
  20. package/esm2020/ecosystem/shared/duplicate-application/duplicate-application-properties/duplicate-application-properties.component.mjs +21 -8
  21. package/esm2020/ecosystem/shared/ecosystem.model.mjs +50 -1
  22. package/fesm2015/c8y-ngx-components-ecosystem-application-plugins.mjs +61 -12
  23. package/fesm2015/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
  24. package/fesm2015/c8y-ngx-components-ecosystem-shared.mjs +90 -7
  25. package/fesm2015/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
  26. package/fesm2015/c8y-ngx-components-ecosystem.mjs +143 -24
  27. package/fesm2015/c8y-ngx-components-ecosystem.mjs.map +1 -1
  28. package/fesm2015/c8y-ngx-components.mjs +2 -2
  29. package/fesm2015/c8y-ngx-components.mjs.map +1 -1
  30. package/fesm2020/c8y-ngx-components-ecosystem-application-plugins.mjs +61 -12
  31. package/fesm2020/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
  32. package/fesm2020/c8y-ngx-components-ecosystem-shared.mjs +90 -7
  33. package/fesm2020/c8y-ngx-components-ecosystem-shared.mjs.map +1 -1
  34. package/fesm2020/c8y-ngx-components-ecosystem.mjs +143 -24
  35. package/fesm2020/c8y-ngx-components-ecosystem.mjs.map +1 -1
  36. package/fesm2020/c8y-ngx-components.mjs +2 -2
  37. package/fesm2020/c8y-ngx-components.mjs.map +1 -1
  38. package/package.json +2 -2
@@ -38,6 +38,55 @@ var ERROR_TYPE;
38
38
  ERROR_TYPE["INVALID_APPLICATION"] = "INVALID_APPLICATION";
39
39
  ERROR_TYPE["MICROSERVICE_NAME_TOO_LONG"] = "MICROSERVICE_NAME_TOO_LONG";
40
40
  })(ERROR_TYPE || (ERROR_TYPE = {}));
41
+ const PRODUCT_EXPERIENCE = {
42
+ APPLICATIONS: {
43
+ EVENTS: {
44
+ AVAILABILITY: 'availability',
45
+ APPLICATION_CARD: 'applicationCard',
46
+ APPLICATION_PROPERTIES: 'applicationProperties',
47
+ DEPLOY_APPLICATION: 'deployApplication',
48
+ DUPLICATE_APPLICATION: 'duplicateApplication',
49
+ INSTALLED_PLUGINS: 'installedPlugins',
50
+ PACKAGE_PLUGINS: 'packagePlugins',
51
+ PACKAGE_VERSIONS: 'packageVersions'
52
+ },
53
+ COMPONENTS: {
54
+ APPLICATION_CARD: 'application-card',
55
+ APPLICATION_PLUGINS: 'application-plugins',
56
+ APPLICATION_PROPERTIES: 'application-properties',
57
+ DEPLOY_APPLICATION: 'deploy-application',
58
+ DUPLICATE_APPLICATION_PROPERTIES: 'duplicate-application-properties',
59
+ PLUGIN_LIST: 'plugin-list',
60
+ PACKAGE_VERSIONS: 'package-versions-list',
61
+ UPDATE_PLUGIN_OF_APP: 'update-plugin-of-app'
62
+ },
63
+ ACTIONS: {
64
+ AVAILABILITY_CHANGE: 'availabilityChange',
65
+ CANCEL: 'cancel',
66
+ CLONE: 'clone',
67
+ CHANGE_PLUGIN_VERSION: 'changePluginVersion',
68
+ DELETE: 'delete',
69
+ DOWNLOAD: 'download',
70
+ DEPLOY_APPLICATION: 'deployApplication',
71
+ EDIT: 'edit',
72
+ INSTALL_PLUGIN: 'installPlugin',
73
+ INSTALL_PLUGINS: 'installPlugins',
74
+ SELECT_VERSION: 'selectVersion',
75
+ SET_AS_LATEST: 'setAsLatest',
76
+ UPDATE_AVAILABLE: 'updateAvailable',
77
+ UPLOAD: 'upload'
78
+ },
79
+ RESULTS: {
80
+ DEPLOYED: 'deployed',
81
+ DUPLICATED: 'duplicated',
82
+ PLUGIN_INSTALLED: 'pluginInstalled',
83
+ PLUGIN_REMOVED: 'pluginRemoved',
84
+ PLUGIN_VERSION_CHANGED: 'pluginVersionChanged',
85
+ SERVER_FAILURE: 'serverFailure',
86
+ SUCCESS: 'success'
87
+ }
88
+ }
89
+ };
41
90
 
42
91
  const ERROR_MESSAGES = {
43
92
  [ERROR_TYPE.TYPE_VALIDATION]: gettext('Wrong file format. Expected a *.zip file with a valid manifest.'),
@@ -731,13 +780,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
731
780
  }] } });
732
781
 
733
782
  class ApplicationCardComponent {
734
- constructor(applicationService, ecosystemService, alertService, router, wizardModalService, alert) {
783
+ constructor(applicationService, ecosystemService, alertService, router, wizardModalService, alert, gainsightService) {
735
784
  this.applicationService = applicationService;
736
785
  this.ecosystemService = ecosystemService;
737
786
  this.alertService = alertService;
738
787
  this.router = router;
739
788
  this.wizardModalService = wizardModalService;
740
789
  this.alert = alert;
790
+ this.gainsightService = gainsightService;
791
+ this.CURRENT_LOCATION = location.href;
741
792
  this.canEdit = true;
742
793
  this.onAppDeleted = new EventEmitter();
743
794
  this.onAppCloned = new EventEmitter();
@@ -773,6 +824,11 @@ class ApplicationCardComponent {
773
824
  this.isMicroservice
774
825
  ? this.router.navigateByUrl(`/microservices/${this.app.id}`)
775
826
  : this.router.navigateByUrl(`/ecosystem/application/${this.app.id}`);
827
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.APPLICATION_CARD, {
828
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_CARD,
829
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.EDIT,
830
+ url: this.CURRENT_LOCATION
831
+ });
776
832
  }
777
833
  openApp() {
778
834
  this.ecosystemService.openApp(this.app);
@@ -781,10 +837,20 @@ class ApplicationCardComponent {
781
837
  try {
782
838
  await this.ecosystemService.deleteApp(this.app);
783
839
  this.onAppDeleted.emit();
840
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.APPLICATION_CARD, {
841
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_CARD,
842
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.DELETE,
843
+ url: this.CURRENT_LOCATION
844
+ });
784
845
  }
785
846
  catch (ex) {
786
847
  if (ex) {
787
848
  this.alertService.addServerFailure(ex);
849
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.APPLICATION_CARD, {
850
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_CARD,
851
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.SERVER_FAILURE,
852
+ url: this.CURRENT_LOCATION
853
+ });
788
854
  }
789
855
  }
790
856
  }
@@ -805,6 +871,11 @@ class ApplicationCardComponent {
805
871
  modalRef.content.onClose.subscribe(() => {
806
872
  this.onAppCloned.next();
807
873
  });
874
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.APPLICATION_CARD, {
875
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.APPLICATION_CARD,
876
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.CLONE,
877
+ url: this.CURRENT_LOCATION
878
+ });
808
879
  }
809
880
  isOwnedByManagement() {
810
881
  const appOwner = get$1(this.app, 'owner.tenant.id');
@@ -826,12 +897,12 @@ class ApplicationCardComponent {
826
897
  }
827
898
  }
828
899
  }
829
- ApplicationCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ApplicationCardComponent, deps: [{ token: i3.ApplicationService }, { token: EcosystemService }, { token: i2.AlertService }, { token: i4.Router }, { token: i2.WizardModalService }, { token: i2.AlertService }], target: i0.ɵɵFactoryTarget.Component });
900
+ ApplicationCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ApplicationCardComponent, deps: [{ token: i3.ApplicationService }, { token: EcosystemService }, { token: i2.AlertService }, { token: i4.Router }, { token: i2.WizardModalService }, { token: i2.AlertService }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Component });
830
901
  ApplicationCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ApplicationCardComponent, selector: "c8y-application-card", inputs: { app: "app", canEdit: "canEdit" }, outputs: { onAppDeleted: "onAppDeleted", onAppCloned: "onAppCloned" }, ngImport: i0, template: "<div class=\"card pointer card--d-col\" *ngIf=\"!isFeature\">\n <div (click)=\"detail()\" class=\"card-block text-center card-column-40\">\n <div class=\"card-appicon\">\n <c8y-app-icon\n *ngIf=\"!isPackage && !isFeature && !isMicroservice && !isExternal\"\n [app]=\"app\"\n [contextPath]=\"app.contextPath\"\n [name]=\"app.name\"\n ></c8y-app-icon>\n <i *ngIf=\"isPackage\" c8yIcon=\"big-parcel\"></i>\n <i *ngIf=\"isMicroservice\" c8yIcon=\"microchip\"></i>\n <i *ngIf=\"isExternal\" c8yIcon=\"globe1\"></i>\n </div>\n <div>\n <p class=\"e2e-appCardName text-medium\" title=\"{{ app | humanizeAppName | async }}\">\n {{ app | humanizeAppName | async }}\n </p>\n <ng-container *ngIf=\"isShowVersion\">\n <p class=\"small text-muted\">\n <em>{{ app.manifest.version }}</em>\n <i\n *ngIf=\"shouldUpgradePackage && isUnpacked\"\n [tooltip]=\"'Update available' | translate\"\n c8yIcon=\"exclamation-triangle\"\n class=\"text-warning m-l-4\"\n ></i>\n </p>\n </ng-container>\n </div>\n </div>\n <div (click)=\"detail()\" class=\"card-block p-0 no-min-height card--d-col card-column-80 flex-grow\">\n <div class=\"card-block no-min-height p-t-0 p-b-0 card-column-80\">\n <div *ngIf=\"app.description || app.manifest?.description\" class=\"text-center-grid\">\n <div class=\"p-b-8 card-hidden-grid\"></div>\n <p class=\"small l-h-tight p-b-8 p-l-0 p-r-0\">\n {{ app.description || app.manifest?.description | translate }}\n </p>\n </div>\n </div>\n <div\n *ngIf=\"!app.label\"\n class=\"card-block no-min-height p-t-0 p-b-0 card-column-20 text-center-grid\"\n >\n <span [ngClass]=\"appState.class\" class=\"label\">\n {{ isUnpacked ? ('Unpacked' | translate) : (appState.label | translate) }}\n </span>\n </div>\n <div\n *ngIf=\"app.label\"\n class=\"card-block no-min-height p-t-0 p-b-0 card-column-20 text-center-grid\"\n >\n <span [ngClass]=\"appState.class\" class=\"label text-warning\">\n {{ isOwnedByManagementTenant ? app.label : ('COMMUNITY' | translate) }}\n </span>\n </div>\n <div class=\"card-footer no-min-height p-t-0 p-b-0 card-column-20 text-center-grid\">\n <div class=\"p-b-16 card-hidden-list\"></div>\n <button\n (click)=\"openApp(); $event.stopPropagation()\"\n *ngIf=\"canOpenInBrowser\"\n [disabled]=\"disableOpenInBrowser\"\n class=\"btn btn-sm btn-default\"\n [title]=\"openButtonTitle | translate\"\n >\n <i c8yIcon=\"external-link\" class=\"m-r-4\"></i>\n {{ 'Open' | translate }}\n </button>\n <div class=\"p-b-32 card-hidden-list\"></div>\n </div>\n </div>\n <div class=\"p-r-40 card-hidden-grid\"></div>\n <div *ngIf=\"canEdit || canOpenInBrowser || canDelete\" class=\"card-actions m-t-0\">\n <div class=\"dropdown\" dropdown>\n <button\n class=\"dropdown-toggle c8y-dropdown\"\n dropdownToggle\n title=\"{{ 'Settings' | translate }}\"\n >\n <i c8yIcon=\"ellipsis-v\"></i>\n </button>\n <ul *dropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <li *ngIf=\"canEdit\">\n <button (click)=\"detail()\" title=\"{{ 'Edit' | translate }}\">\n <i c8yIcon=\"pencil\" class=\"m-r-4\"></i>\n {{ 'Edit' | translate }}\n </button>\n </li>\n <ng-container *c8yIfAllowed=\"['ROLE_APPLICATION_MANAGEMENT_ADMIN']\">\n <li>\n <button\n (click)=\"delete()\"\n type=\"button\"\n [title]=\"canDelete ? ('Delete' | translate) : (CANNOT_DELETE_HINT | translate)\"\n [disabled]=\"!canDelete\"\n >\n <i c8yIcon=\"delete\" class=\"m-r-4\"></i>\n {{ 'Delete' | translate }}\n </button>\n </li>\n <li *ngIf=\"canClone\">\n <button\n *ngIf=\"isPackage\"\n (click)=\"clone()\"\n type=\"button\"\n [title]=\"'Clone`package`' | translate\"\n >\n <i c8yIcon=\"copy\" class=\"m-r-4\"></i>\n {{ 'Clone`package`' | translate }}\n </button>\n <button\n *ngIf=\"!isPackage\"\n (click)=\"clone()\"\n type=\"button\"\n [title]=\"'Clone`application`' | translate\"\n >\n <i c8yIcon=\"copy\" class=\"m-r-4\"></i>\n {{ 'Clone`application`' | translate }}\n </button>\n </li>\n </ng-container>\n </ul>\n </div>\n </div>\n</div>\n\n<button (click)=\"detail()\" class=\"card pointer card--d-col\" *ngIf=\"isFeature\">\n <div class=\"card-block text-center card-column-40\">\n <div class=\"card-appicon\">\n <c8y-app-icon\n *ngIf=\"!isPackage && !isFeature && !isMicroservice && !isExternal\"\n [app]=\"app\"\n [contextPath]=\"app.contextPath\"\n [name]=\"app.name\"\n ></c8y-app-icon>\n <i c8yIcon=\"tab\"></i>\n </div>\n <div>\n <p class=\"e2e-appCardName text-medium\" title=\"{{ app | humanizeAppName | async }}\">\n {{ app | humanizeAppName | async }}\n </p>\n <ng-container *ngIf=\"isShowVersion\">\n <p class=\"small text-muted\">\n <em>{{ app.manifest.version }}</em>\n <i\n *ngIf=\"shouldUpgradePackage && isUnpacked\"\n [tooltip]=\"'Update available' | translate\"\n c8yIcon=\"exclamation-triangle\"\n class=\"text-warning m-l-4\"\n ></i>\n </p>\n </ng-container>\n </div>\n </div>\n <div class=\"card-block p-0 no-min-height card--d-col card-column-80 flex-grow\">\n <div class=\"card-block no-min-height p-t-0 p-b-0 card-column-80\">\n <div *ngIf=\"app.description || app.manifest?.description\" class=\"text-center-grid\">\n <div class=\"p-b-8 card-hidden-grid\"></div>\n <p class=\"small l-h-tight p-b-8 p-l-0 p-r-0\">\n {{ app.description || app.manifest?.description | translate }}\n </p>\n </div>\n </div>\n <div class=\"card-block no-min-height p-t-0 p-b-0 card-column-20 text-center-grid\">\n <span [ngClass]=\"appState.class\" class=\"label\">\n {{ isUnpacked ? ('Unpacked' | translate) : (appState.label | translate) }}\n </span>\n </div>\n <div class=\"p-b-32 card-hidden-list\"></div>\n </div>\n</button>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.IfAllowedDirective, selector: "[c8yIfAllowed]", inputs: ["c8yIfAllowed", "c8yIfAllowedAllowAny"] }, { kind: "component", type: i2.AppIconComponent, selector: "c8y-app-icon", inputs: ["contextPath", "name", "app"] }, { kind: "directive", type: i6.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i6.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i6.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "directive", type: i7.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: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.HumanizeAppNamePipe, name: "humanizeAppName" }] });
831
902
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ApplicationCardComponent, decorators: [{
832
903
  type: Component,
833
904
  args: [{ selector: 'c8y-application-card', template: "<div class=\"card pointer card--d-col\" *ngIf=\"!isFeature\">\n <div (click)=\"detail()\" class=\"card-block text-center card-column-40\">\n <div class=\"card-appicon\">\n <c8y-app-icon\n *ngIf=\"!isPackage && !isFeature && !isMicroservice && !isExternal\"\n [app]=\"app\"\n [contextPath]=\"app.contextPath\"\n [name]=\"app.name\"\n ></c8y-app-icon>\n <i *ngIf=\"isPackage\" c8yIcon=\"big-parcel\"></i>\n <i *ngIf=\"isMicroservice\" c8yIcon=\"microchip\"></i>\n <i *ngIf=\"isExternal\" c8yIcon=\"globe1\"></i>\n </div>\n <div>\n <p class=\"e2e-appCardName text-medium\" title=\"{{ app | humanizeAppName | async }}\">\n {{ app | humanizeAppName | async }}\n </p>\n <ng-container *ngIf=\"isShowVersion\">\n <p class=\"small text-muted\">\n <em>{{ app.manifest.version }}</em>\n <i\n *ngIf=\"shouldUpgradePackage && isUnpacked\"\n [tooltip]=\"'Update available' | translate\"\n c8yIcon=\"exclamation-triangle\"\n class=\"text-warning m-l-4\"\n ></i>\n </p>\n </ng-container>\n </div>\n </div>\n <div (click)=\"detail()\" class=\"card-block p-0 no-min-height card--d-col card-column-80 flex-grow\">\n <div class=\"card-block no-min-height p-t-0 p-b-0 card-column-80\">\n <div *ngIf=\"app.description || app.manifest?.description\" class=\"text-center-grid\">\n <div class=\"p-b-8 card-hidden-grid\"></div>\n <p class=\"small l-h-tight p-b-8 p-l-0 p-r-0\">\n {{ app.description || app.manifest?.description | translate }}\n </p>\n </div>\n </div>\n <div\n *ngIf=\"!app.label\"\n class=\"card-block no-min-height p-t-0 p-b-0 card-column-20 text-center-grid\"\n >\n <span [ngClass]=\"appState.class\" class=\"label\">\n {{ isUnpacked ? ('Unpacked' | translate) : (appState.label | translate) }}\n </span>\n </div>\n <div\n *ngIf=\"app.label\"\n class=\"card-block no-min-height p-t-0 p-b-0 card-column-20 text-center-grid\"\n >\n <span [ngClass]=\"appState.class\" class=\"label text-warning\">\n {{ isOwnedByManagementTenant ? app.label : ('COMMUNITY' | translate) }}\n </span>\n </div>\n <div class=\"card-footer no-min-height p-t-0 p-b-0 card-column-20 text-center-grid\">\n <div class=\"p-b-16 card-hidden-list\"></div>\n <button\n (click)=\"openApp(); $event.stopPropagation()\"\n *ngIf=\"canOpenInBrowser\"\n [disabled]=\"disableOpenInBrowser\"\n class=\"btn btn-sm btn-default\"\n [title]=\"openButtonTitle | translate\"\n >\n <i c8yIcon=\"external-link\" class=\"m-r-4\"></i>\n {{ 'Open' | translate }}\n </button>\n <div class=\"p-b-32 card-hidden-list\"></div>\n </div>\n </div>\n <div class=\"p-r-40 card-hidden-grid\"></div>\n <div *ngIf=\"canEdit || canOpenInBrowser || canDelete\" class=\"card-actions m-t-0\">\n <div class=\"dropdown\" dropdown>\n <button\n class=\"dropdown-toggle c8y-dropdown\"\n dropdownToggle\n title=\"{{ 'Settings' | translate }}\"\n >\n <i c8yIcon=\"ellipsis-v\"></i>\n </button>\n <ul *dropdownMenu class=\"dropdown-menu dropdown-menu-right\">\n <li *ngIf=\"canEdit\">\n <button (click)=\"detail()\" title=\"{{ 'Edit' | translate }}\">\n <i c8yIcon=\"pencil\" class=\"m-r-4\"></i>\n {{ 'Edit' | translate }}\n </button>\n </li>\n <ng-container *c8yIfAllowed=\"['ROLE_APPLICATION_MANAGEMENT_ADMIN']\">\n <li>\n <button\n (click)=\"delete()\"\n type=\"button\"\n [title]=\"canDelete ? ('Delete' | translate) : (CANNOT_DELETE_HINT | translate)\"\n [disabled]=\"!canDelete\"\n >\n <i c8yIcon=\"delete\" class=\"m-r-4\"></i>\n {{ 'Delete' | translate }}\n </button>\n </li>\n <li *ngIf=\"canClone\">\n <button\n *ngIf=\"isPackage\"\n (click)=\"clone()\"\n type=\"button\"\n [title]=\"'Clone`package`' | translate\"\n >\n <i c8yIcon=\"copy\" class=\"m-r-4\"></i>\n {{ 'Clone`package`' | translate }}\n </button>\n <button\n *ngIf=\"!isPackage\"\n (click)=\"clone()\"\n type=\"button\"\n [title]=\"'Clone`application`' | translate\"\n >\n <i c8yIcon=\"copy\" class=\"m-r-4\"></i>\n {{ 'Clone`application`' | translate }}\n </button>\n </li>\n </ng-container>\n </ul>\n </div>\n </div>\n</div>\n\n<button (click)=\"detail()\" class=\"card pointer card--d-col\" *ngIf=\"isFeature\">\n <div class=\"card-block text-center card-column-40\">\n <div class=\"card-appicon\">\n <c8y-app-icon\n *ngIf=\"!isPackage && !isFeature && !isMicroservice && !isExternal\"\n [app]=\"app\"\n [contextPath]=\"app.contextPath\"\n [name]=\"app.name\"\n ></c8y-app-icon>\n <i c8yIcon=\"tab\"></i>\n </div>\n <div>\n <p class=\"e2e-appCardName text-medium\" title=\"{{ app | humanizeAppName | async }}\">\n {{ app | humanizeAppName | async }}\n </p>\n <ng-container *ngIf=\"isShowVersion\">\n <p class=\"small text-muted\">\n <em>{{ app.manifest.version }}</em>\n <i\n *ngIf=\"shouldUpgradePackage && isUnpacked\"\n [tooltip]=\"'Update available' | translate\"\n c8yIcon=\"exclamation-triangle\"\n class=\"text-warning m-l-4\"\n ></i>\n </p>\n </ng-container>\n </div>\n </div>\n <div class=\"card-block p-0 no-min-height card--d-col card-column-80 flex-grow\">\n <div class=\"card-block no-min-height p-t-0 p-b-0 card-column-80\">\n <div *ngIf=\"app.description || app.manifest?.description\" class=\"text-center-grid\">\n <div class=\"p-b-8 card-hidden-grid\"></div>\n <p class=\"small l-h-tight p-b-8 p-l-0 p-r-0\">\n {{ app.description || app.manifest?.description | translate }}\n </p>\n </div>\n </div>\n <div class=\"card-block no-min-height p-t-0 p-b-0 card-column-20 text-center-grid\">\n <span [ngClass]=\"appState.class\" class=\"label\">\n {{ isUnpacked ? ('Unpacked' | translate) : (appState.label | translate) }}\n </span>\n </div>\n <div class=\"p-b-32 card-hidden-list\"></div>\n </div>\n</button>\n" }]
834
- }], ctorParameters: function () { return [{ type: i3.ApplicationService }, { type: EcosystemService }, { type: i2.AlertService }, { type: i4.Router }, { type: i2.WizardModalService }, { type: i2.AlertService }]; }, propDecorators: { app: [{
905
+ }], ctorParameters: function () { return [{ type: i3.ApplicationService }, { type: EcosystemService }, { type: i2.AlertService }, { type: i4.Router }, { type: i2.WizardModalService }, { type: i2.AlertService }, { type: i2.GainsightService }]; }, propDecorators: { app: [{
835
906
  type: Input
836
907
  }], canEdit: [{
837
908
  type: Input
@@ -989,10 +1060,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
989
1060
  }] } });
990
1061
 
991
1062
  class DuplicateApplicationPropertiesComponent {
992
- constructor(bsModalRef, ecosystemService, applicationService) {
1063
+ constructor(bsModalRef, ecosystemService, applicationService, gainsightService) {
993
1064
  this.bsModalRef = bsModalRef;
994
1065
  this.ecosystemService = ecosystemService;
995
1066
  this.applicationService = applicationService;
1067
+ this.gainsightService = gainsightService;
1068
+ this.CURRENT_LOCATION = location.href;
996
1069
  this.isFirstStep = false;
997
1070
  this.duplicatedApp = new EventEmitter();
998
1071
  this.disableForm = false;
@@ -1015,9 +1088,19 @@ class DuplicateApplicationPropertiesComponent {
1015
1088
  delete clonedApp.type;
1016
1089
  await this.updateApp(clonedApp);
1017
1090
  this.inProgress = false;
1091
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.DUPLICATE_APPLICATION, {
1092
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.DUPLICATE_APPLICATION_PROPERTIES,
1093
+ result: PRODUCT_EXPERIENCE.APPLICATIONS.RESULTS.DUPLICATED,
1094
+ url: this.CURRENT_LOCATION
1095
+ });
1018
1096
  }
1019
1097
  cancel() {
1020
1098
  this.bsModalRef.hide();
1099
+ this.gainsightService.triggerEvent(PRODUCT_EXPERIENCE.APPLICATIONS.EVENTS.DUPLICATE_APPLICATION, {
1100
+ component: PRODUCT_EXPERIENCE.APPLICATIONS.COMPONENTS.DUPLICATE_APPLICATION_PROPERTIES,
1101
+ action: PRODUCT_EXPERIENCE.APPLICATIONS.ACTIONS.CANCEL,
1102
+ url: this.CURRENT_LOCATION
1103
+ });
1021
1104
  }
1022
1105
  back() {
1023
1106
  this.stepper.previous();
@@ -1068,12 +1151,12 @@ class DuplicateApplicationPropertiesComponent {
1068
1151
  }
1069
1152
  }
1070
1153
  }
1071
- DuplicateApplicationPropertiesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DuplicateApplicationPropertiesComponent, deps: [{ token: i1$1.BsModalRef }, { token: EcosystemService }, { token: i3.ApplicationService }], target: i0.ɵɵFactoryTarget.Component });
1154
+ DuplicateApplicationPropertiesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DuplicateApplicationPropertiesComponent, deps: [{ token: i1$1.BsModalRef }, { token: EcosystemService }, { token: i3.ApplicationService }, { token: i2.GainsightService }], target: i0.ɵɵFactoryTarget.Component });
1072
1155
  DuplicateApplicationPropertiesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: DuplicateApplicationPropertiesComponent, selector: "c8y-duplicate-application-properties", inputs: { stepper: "stepper", existingApps: "existingApps", selectedApp: "selectedApp", isFirstStep: "isFirstStep" }, outputs: { duplicatedApp: "duplicatedApp" }, viewQueries: [{ propertyName: "applicationPropertiesForm", first: true, predicate: ApplicationPropertiesFormComponent, descendants: true }], ngImport: i0, template: "<p\n class=\"p-16 text-center text-medium separator-bottom sticky-top bg-level-0 fit-w\"\n *ngIf=\"!inProgress\"\n>\n {{ 'Provide application details' | translate }}\n</p>\n\n<ng-container *ngIf=\"!inProgress\">\n <label class=\"c8y-switch\" *ngIf=\"isSubscribedApp$ | async\">\n <input type=\"checkbox\" [(ngModel)]=\"disableForm\" (change)=\"getAppConfig()\" />\n <span></span> {{ 'Overrule subscribed application' | translate }}\n </label>\n\n <c8y-application-properties-form\n [application]=\"newAppConfig\"\n class=\"d-block fit-w\"\n [disabled]=\"disableForm\"\n ></c8y-application-properties-form>\n</ng-container>\n<c8y-progress-bar\n *ngIf=\"inProgress\"\n [message]=\"'Duplicating\u2026' | translate\"\n class=\"text-center d-block\"\n></c8y-progress-bar>\n\n<c8y-wizard-footer>\n <button\n *ngIf=\"!isFirstStep\"\n (click)=\"back()\"\n [disabled]=\"inProgress\"\n class=\"btn btn-default\"\n type=\"button\"\n title=\"{{ 'Back' | translate }}\"\n >\n {{ 'Back' | translate }}\n </button>\n <button (click)=\"cancel()\" class=\"btn btn-default\" title=\"{{ 'Cancel' | translate }}\">\n {{ 'Cancel' | translate }}\n </button>\n <button\n (click)=\"duplicateApp()\"\n [disabled]=\"inProgress\"\n class=\"btn btn-primary\"\n type=\"button\"\n title=\"{{ 'Duplicate' | translate }}\"\n >\n {{ 'Duplicate' | translate }}\n </button>\n</c8y-wizard-footer>\n", dependencies: [{ kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ProgressBarComponent, selector: "c8y-progress-bar", inputs: ["message", "progress"] }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.WizardFooterComponent, selector: "c8y-wizard-footer" }, { kind: "component", type: ApplicationPropertiesFormComponent, selector: "c8y-application-properties-form", inputs: ["application", "disabled"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }] });
1073
1156
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DuplicateApplicationPropertiesComponent, decorators: [{
1074
1157
  type: Component,
1075
1158
  args: [{ selector: 'c8y-duplicate-application-properties', template: "<p\n class=\"p-16 text-center text-medium separator-bottom sticky-top bg-level-0 fit-w\"\n *ngIf=\"!inProgress\"\n>\n {{ 'Provide application details' | translate }}\n</p>\n\n<ng-container *ngIf=\"!inProgress\">\n <label class=\"c8y-switch\" *ngIf=\"isSubscribedApp$ | async\">\n <input type=\"checkbox\" [(ngModel)]=\"disableForm\" (change)=\"getAppConfig()\" />\n <span></span> {{ 'Overrule subscribed application' | translate }}\n </label>\n\n <c8y-application-properties-form\n [application]=\"newAppConfig\"\n class=\"d-block fit-w\"\n [disabled]=\"disableForm\"\n ></c8y-application-properties-form>\n</ng-container>\n<c8y-progress-bar\n *ngIf=\"inProgress\"\n [message]=\"'Duplicating\u2026' | translate\"\n class=\"text-center d-block\"\n></c8y-progress-bar>\n\n<c8y-wizard-footer>\n <button\n *ngIf=\"!isFirstStep\"\n (click)=\"back()\"\n [disabled]=\"inProgress\"\n class=\"btn btn-default\"\n type=\"button\"\n title=\"{{ 'Back' | translate }}\"\n >\n {{ 'Back' | translate }}\n </button>\n <button (click)=\"cancel()\" class=\"btn btn-default\" title=\"{{ 'Cancel' | translate }}\">\n {{ 'Cancel' | translate }}\n </button>\n <button\n (click)=\"duplicateApp()\"\n [disabled]=\"inProgress\"\n class=\"btn btn-primary\"\n type=\"button\"\n title=\"{{ 'Duplicate' | translate }}\"\n >\n {{ 'Duplicate' | translate }}\n </button>\n</c8y-wizard-footer>\n" }]
1076
- }], ctorParameters: function () { return [{ type: i1$1.BsModalRef }, { type: EcosystemService }, { type: i3.ApplicationService }]; }, propDecorators: { stepper: [{
1159
+ }], ctorParameters: function () { return [{ type: i1$1.BsModalRef }, { type: EcosystemService }, { type: i3.ApplicationService }, { type: i2.GainsightService }]; }, propDecorators: { stepper: [{
1077
1160
  type: Input
1078
1161
  }], existingApps: [{
1079
1162
  type: Input
@@ -1301,5 +1384,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
1301
1384
  * Generated bundle index. Do not edit.
1302
1385
  */
1303
1386
 
1304
- export { APP_STATE, AddApplicationComponent, ApplicationCardComponent, ApplicationPropertiesFormComponent, DuplicateApplicationComponent, DuplicateApplicationListComponent, DuplicateApplicationPropertiesComponent, ERROR_MESSAGES, ERROR_TYPE, EcosystemService, PackageVersionSelectComponent, SharedEcosystemModule, UploadArchiveComponent, Wizards, packageProperties };
1387
+ export { APP_STATE, AddApplicationComponent, ApplicationCardComponent, ApplicationPropertiesFormComponent, DuplicateApplicationComponent, DuplicateApplicationListComponent, DuplicateApplicationPropertiesComponent, ERROR_MESSAGES, ERROR_TYPE, EcosystemService, PRODUCT_EXPERIENCE, PackageVersionSelectComponent, SharedEcosystemModule, UploadArchiveComponent, Wizards, packageProperties };
1305
1388
  //# sourceMappingURL=c8y-ngx-components-ecosystem-shared.mjs.map