{"version":3,"sources":["jsdelivr-header.js","/node_modules/tslib/tslib.es6.js","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/liveappsdata.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-component/live-apps-component.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-component/live-apps-component.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/tc-groups-data.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/live-apps.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-applications/live-apps-applications.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-applications/live-apps-applications.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-search/live-apps-case-search.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-search/live-apps-case-search.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/tc-case-card-config.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/tc-app-definition.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/tc-case-card-config.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-state-icon/live-apps-state-icon.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-state-icon/live-apps-state-icon.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-summary/live-apps-case-summary.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-summary/live-apps-case-summary.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-list/live-apps-case-list.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-list/live-apps-case-list.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-notes-editor/live-apps-notes-editor.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-notes-editor/live-apps-notes-editor.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-notes/live-apps-notes.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-notes/live-apps-notes.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/tc-document.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/tc-document.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-document-viewer/live-apps-document-viewer.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-document-viewer/live-apps-document-viewer.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-documents/live-apps-documents.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-documents/live-apps-documents.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-documents/app-live-apps-document-upload-dialog.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-documents/app-live-apps-document-viewer-dialog.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/tc-case-states.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/tc-case-data.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/tc-case-data.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/tc-case-states.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-milestone/live-apps-milestone.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-milestone/live-apps-milestone.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-states/live-apps-case-states.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-states/live-apps-case-states.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-application-configuration/live-apps-application-configuration.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-application-configuration/live-apps-application-configuration.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-application-configuration/upload-file-dialog/app-live-apps-state-icon-upload-dialog.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-favorite-cases/live-apps-favorite-cases.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-favorite-cases/live-apps-favorite-cases.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/tc-case-audit.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/tc-case-audit.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/pipes/audit.pipe.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-audit/live-apps-case-audit.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-audit/live-apps-case-audit.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/tc-liveapps-config.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/tc-form-config.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/tc-case-processes.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/tc-case-processes.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-data-display/live-apps-case-data-display.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-data-display/live-apps-case-data-display.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-data/live-apps-case-data.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-data/live-apps-case-data.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-actions/live-apps-case-actions.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-actions/live-apps-case-actions.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-recent-cases/live-apps-recent-cases.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-recent-cases/live-apps-recent-cases.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-state-audit/live-apps-case-state-audit.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-state-audit/live-apps-case-state-audit.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/credentials.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-login/live-apps-login.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-login/live-apps-login.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-search-widget/live-apps-search-widget.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-search-widget/live-apps-search-widget.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-creator/live-apps-case-creator.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-creator/live-apps-case-creator.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-creator-selector/live-apps-creator-selector.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-creator-selector/live-apps-creator-selector.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/tc-liveapps-form.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-creators/live-apps-case-creators.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-creators/live-apps-case-creators.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-form-wc/live-apps-form-wc.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-form-wc/live-apps-form-wc.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-creators/live-apps-creators.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-creators/live-apps-creators.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-legacy-process/live-apps-legacy-process.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-legacy-process/live-apps-legacy-process.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-action/live-apps-case-action.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-action/live-apps-case-action.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-actions/live-apps-actions.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-actions/live-apps-actions.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/resolvers/claims.resolver.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/guards/case.guard.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-legacy-form/live-apps-legacy-form.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-legacy-form/live-apps-legacy-form.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/tc-workitems.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-workitems/live-apps-workitems.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-workitems/live-apps-workitems.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/tc-roles-service.ts.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-workitem/live-apps-workitem.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-workitem/live-apps-workitem.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-cockpit/live-apps-case-cockpit.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-cockpit/live-apps-case-cockpit.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-app-configuration-widget/live-apps-app-configuration-widget.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-app-configuration-widget/live-apps-app-configuration-widget.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-creator-widget/live-apps-case-creator-widget.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-creator-widget/live-apps-case-creator-widget.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/tc-case-creator.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-creator-dialog/live-apps-creator-dialog.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-creator-dialog/live-apps-creator-dialog.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/tc-live-apps-reporting.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/tc-live-apps-reporting.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-active-cases-report/live-apps-active-cases-report.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-active-cases-report/live-apps-active-cases-report.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-active-cases-for-type-report/live-apps-active-cases-for-type-report.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-active-cases-for-type-report/live-apps-active-cases-for-type-report.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-active-cases-widget/live-apps-active-cases-widget.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-active-cases-widget/live-apps-active-cases-widget.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-application-create-button/live-apps-application-create-button.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-application-create-button/live-apps-application-create-button.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-home-cockpit/live-apps-home-cockpit.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-home-cockpit/live-apps-home-cockpit.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/tc-live-apps-config.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-application-list/live-apps-application-list.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-application-list/live-apps-application-list.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings/live-apps-settings.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings/live-apps-settings.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-summary-cards/live-apps-settings-summary-cards.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-summary-cards/live-apps-settings-summary-cards.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-recent-cases/live-apps-settings-recent-cases.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-recent-cases/live-apps-settings-recent-cases.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-roles/live-apps-settings-roles.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-roles/live-apps-settings-roles.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-role-switcher/live-apps-role-switcher.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-role-switcher/live-apps-role-switcher.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-actions-list/live-apps-case-actions-list.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-actions-list/live-apps-case-actions-list.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-landing-page/live-apps-landing-page.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-landing-page/live-apps-landing-page.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/tc-access-control.service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/resolvers/accessControlConfiguration.resolver.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/resolvers/roles.resolver.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/resolvers/role-active.resolver.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/resolvers/access.resolver.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/guards/role.guard.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-access-control/live-apps-settings-access-control.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-access-control/live-apps-settings-access-control.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-forms/live-apps-settings-forms.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-forms/live-apps-settings-forms.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/tc-live-apps-landing-page-config.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-landing/live-apps-settings-landing.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-landing/live-apps-settings-landing.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/resolvers/liveapps-config.resolver.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/resolvers/groups.resolver.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-home-cockpit-standalone/live-apps-home-cockpit-standalone.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-home-cockpit-standalone/live-apps-home-cockpit-standalone.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-cockpit-standalone/live-apps-case-cockpit-standalone.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-cockpit-standalone/live-apps-case-cockpit-standalone.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-creator-standalone/live-apps-creator-standalone.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-creator-standalone/live-apps-creator-standalone.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-action-standalone/live-apps-action-standalone.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-action-standalone/live-apps-action-standalone.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-processes/live-apps-processes.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-processes/live-apps-processes.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-form-preview/live-apps-form-preview.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-form-preview/live-apps-form-preview.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-form-layout/live-apps-settings-form-layout.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-form-layout/live-apps-settings-form-layout.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-form/live-apps-form.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-form/live-apps-form.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-custom-forms/live-apps-settings-custom-forms.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-settings-custom-forms/live-apps-settings-custom-forms.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-login-oauth/live-apps-login-oauth.component.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-login-oauth/live-apps-login-oauth.component.html","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/guards/auth.guard.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/tcLiveappsConfig.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/services/tc-liveapps-config-service.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/tc-liveapps-lib.module.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/models/appConfig.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/resolvers/la-config.resolver.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/resolvers/all-groups.resolver.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/resolvers/all-roles.resolver.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/resolvers/case-data.resolver.ts","/projects/tibco-tcstk/tc-liveapps-lib/src/lib/resolvers/form-config.resolver.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,o2KCUI,cAAgB,SAAS,EAAG,GAI5B,OAHA,cAAgB,OAAO,gBAClB,CAAE,UAAW,cAAgB,OAAS,SAAU,EAAG,GAAK,EAAE,UAAY,CAAE,GACzE,SAAU,EAAG,GAAK,IAAK,IAAI,KAAK,EAAO,OAAO,UAAU,eAAe,KAAK,EAAG,KAAI,EAAE,GAAK,EAAE,GAAG,EAC5F,cAAc,EAAG,EAC5B,E,SAEgB,UAAU,EAAG,GACzB,GAAiB,mBAAN,GAA0B,OAAN,EAC3B,MAAM,IAAI,UAAU,uBAAyB,OAAO,GAAK,iCAE7D,SAAS,IAAO,KAAK,YAAc,CAAE,CADrC,cAAc,EAAG,GAEjB,EAAE,UAAkB,OAAN,EAAa,OAAO,OAAO,IAAM,EAAG,UAAY,EAAE,UAAW,IAAI,EACnF,CAEO,IAAI,SAAW,WAQlB,OAPA,SAAW,OAAO,QAAU,SAAkB,GAC1C,IAAK,IAAI,EAAG,EAAI,EAAG,EAAI,UAAU,OAAQ,EAAI,EAAG,IAE5C,IAAK,IAAI,KADT,EAAI,UAAU,GACO,OAAO,UAAU,eAAe,KAAK,EAAG,KAAI,EAAE,GAAK,EAAE,IAE9E,OAAO,C,EAEJ,SAAS,MAAM,KAAM,UAChC,E,SAEgB,OAAO,EAAG,GACtB,IAAI,EAAI,GACR,IAAK,IAAI,KAAK,EAAO,OAAO,UAAU,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oBACA,gBACA,mBACA,mBACA,uBACA,mBACA,sBACA,mBACA,mBACA,qBACA,qBACA,mBACA,mBACA,oBACA,iBACA,sBACA,wBACA,uBACA,8BACA,yBACA,0BACA,0BACA,oBACA,oBACA,iBACA,4BACA,sBACA,qBACA,yBACA,qBAAc,QAAA,CAGd,uBACA,8BACA,0BACA,4BACA,6BACA,2BACA,gCACA,6BACA,+BACA,2BACA,uBACA,6BACA,sCACA,sCACA,6BACA,2BACA,0CACA,uCACA,0BACA,4BACA,8BACA,kBACA,iCACA,6BACA,0BACA,4BACA,yBACA,iCACA,6BACA,wCACA,mCACA,6BACA,iCACA,yCACA,+BACA,0BACA,sCACA,+BACA,iCACA,8BACA,8BACA,sBACA,iCACA,gCACA,6BACA,mCACA,mCACA,0CACA,4BACA,+BACA,+BACA,2BACA,uCACA,uCACA,mCACA,kCACA,2BACA,6BACA,oCACA,0BACA,sBACA,wBACA,qCACA,+B,8HAgBS,oBAAmB,UAbjB,CACP,uBACA,uBACA,CAAE,QAAS,mBAAiB,WAAY,yBAA0B,KAAM,CAAC,uBAAwB,yBAA0B,OAAO,GAClI,UACA,UACA,UACA,qBACA,CAAE,QAAS,qBAAmB,SAAU,sBAAoB,OAAO,IAEtE,QAAA,CA/GM,CACP,mBACA,sBACA,oBACA,gBACA,mBACA,mBACA,uBACA,mBACA,sBACA,mBACA,mBACA,qBACA,qBACA,mBACA,mBACA,oBACA,iBACA,sBACA,wBACA,uBACA,8BACA,yBACA,0BACA,0BACA,oBACA,oBACA,iBACA,4BACA,sBACA,qBACA,yBACA,wB,0GAkFS,oBAAmB,WAAA,E,KAxL/B,Y,MAAS,CACN,aAAc,CACV,uBACA,8BACA,0BACA,4BACA,6BACA,2BACA,gCACA,6BACA,+BACA,2BACA,uBACA,6BACA,sCACA,sCACA,6BACA,2BACA,0CACA,uCACA,0BACA,4BACA,8BACA,kBACA,6BACA,iCACA,0BACA,4BACA,yBACA,iCACA,6BACA,2BACA,wCACA,mCACA,6BACA,iCACA,yCACA,+BACA,0BACA,sCACA,qCACA,+BACA,8BACA,8BACA,sBACA,iCACA,gCACA,6BACA,mCACA,mCACA,0CACA,uCACA,4BACA,+BACA,+BACA,2BACA,iCACA,uCACA,uCACA,mCACA,kCACA,2BACA,6BACA,oCACA,sBACA,0BACA,wBACA,qCACA,6BAEN,QAAS,CACP,mBACA,sBACA,oBACA,gBACA,mBACA,mBACA,uBACA,mBACA,sBACA,mBACA,mBACA,qBACA,qBACA,mBACA,mBACA,oBACA,iBACA,sBACA,wBACA,uBACA,8BACA,yBACA,0BACA,0BACA,oBACA,oBACA,iBACA,4BACA,sBACA,qBACA,yBACA,qBAEF,QAAS,CACP,uBACA,8BACA,0BACA,4BACA,6BACA,2BACA,gCACA,6BACA,+BACA,2BACA,uBACA,6BACA,sCACA,sCACA,6BACA,2BACA,0CACA,uCACA,0BACA,4BACA,8BACA,kBACA,iCACA,6BACA,0BACA,4BACA,yBACA,iCACA,6BACA,wCACA,mCACA,6BACA,iCACA,yCACA,+BACA,0BACA,sCACA,+BACA,iCACA,8BACA,8BACA,sBACA,iCACA,gCACA,6BACA,mCACA,mCACA,0CACA,4BACA,+BACA,+BACA,2BACA,uCACA,uCACA,mCACA,kCACA,2BACA,6BACA,oCACA,0BACA,sBACA,wBACA,qCACA,6BAEA,gBAAiB,CAAC,uCAAwC,sCAAuC,sCAAuC,gCACxI,UAAW,CACP,uBACA,uBACA,CAAE,QAAS,mBAAiB,WAAY,yBAA0B,KAAM,CAAC,uBAAwB,yBAA0B,OAAO,GAClI,UACA,UACA,UACA,qBACA,CAAE,QAAS,qBAAmB,SAAU,sBAAoB,OAAO,IAGzE,QAAS,CAAC,+B,uMC/TZ,W,8BCyBE,SAAA,EAAoB,EAAkD,EAAsD,EAAwD,EAA4C,EAA0B,EAA0C,EAAwD,EAAsD,EAA4B,GAA1Z,KAAA,qBAAkD,KAAA,uBAAsD,KAAA,wBAAwD,KAAA,kBAA4C,KAAA,OAA0B,KAAA,kBAA0C,KAAA,w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gBAAA,a,gIAAlB,qB,0GAAA,mBAAkB,WAAA,E,KAD9B,gB","file":"/npm/@tibco-tcstk/tc-liveapps-lib@3.3.1/bundles/tibco-tcstk-tc-liveapps-lib.umd.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@tibco-tcstk/tc-liveapps-lib@3.3.1/bundles/tibco-tcstk-tc-liveapps-lib.umd.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n    if (typeof b !== \"function\" && b !== null)\r\n        throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n    __assign = Object.assign || function __assign(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    }\r\n    return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n    return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n    if (m) return m.call(o);\r\n    if (o && typeof o.length === \"number\") return {\r\n        next: function () {\r\n            if (o && i >= o.length) o = void 0;\r\n            return { value: o && o[i++], done: !o };\r\n        }\r\n    };\r\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n    if (!m) return o;\r\n    var i = m.call(o), r, ar = [], e;\r\n    try {\r\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n    }\r\n    catch (error) { e = { error: error }; }\r\n    finally {\r\n        try {\r\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n        }\r\n        finally { if (e) throw e.error; }\r\n    }\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n    for (var ar = [], i = 0; i < arguments.length; i++)\r\n        ar = ar.concat(__read(arguments[i]));\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n            r[k] = a[j];\r\n    return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n        if (ar || !(i in from)) {\r\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n            ar[i] = from[i];\r\n        }\r\n    }\r\n    return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n    return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n    return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n    function fulfill(value) { resume(\"next\", value); }\r\n    function reject(value) { resume(\"throw\", value); }\r\n    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n    var i, p;\r\n    return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var m = o[Symbol.asyncIterator], i;\r\n    return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n    o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n    if (mod && mod.__esModule) return mod;\r\n    var result = {};\r\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n    __setModuleDefault(result, mod);\r\n    return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n    return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n    return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n    if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n    if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n    return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import {AccessToken, AuthInfo, Deserializable, Claim, DeserializableClass} from '@tibco-tcstk/tc-core-lib';\nimport {LaProcessSelection} from '../models/tc-case-processes';\n\nexport class FormTab extends DeserializableClass implements Deserializable {\n  type: string;\n  title: string;\n  workitemId: number;\n  workitemName: string;\n  action: LaProcessSelection;\n}\n\nexport class NoteThread {\n  constructor(public threadId: string,\n              public showReplies: boolean,\n              public showNewReply: boolean,\n              public editMode: boolean,\n              public newReply: any,\n              public thread: Note[],\n              public note: Note\n  ) {\n  }\n}\n\nexport class CaseRoute {\n  public caseRef: string;\n  public appId: string;\n  public typeId: string;\n  public workitemId: number;\n  public workitemName: string;\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class NotificationCollection {\n  constructor(\n    public collectionName: string,\n    public lifecycledWithType: string,\n    public lifecycledWithId: string\n  ) { }\n}\n\nexport class Notification implements Deserializable {\n  entityId: string;\n  entityName: string;\n  entityType: string;\n  id: string;\n  notifyCollection: NotificationCollection;\n  notifyOnAllReplies: boolean;\n  notifyOnUpdate: boolean;\n  threadId: string;\n  topicId: string;\n  type: string;\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class NotificationList implements Deserializable {\n  notifications: Notification[];\n  deserialize(input: any): this {\n    this.notifications = [];\n    Object.assign(this.notifications, input);\n    return this;\n  }\n}\n\nexport class ThreadList implements Deserializable {\n  threads: NoteThread[];\n  deserialize(input: any): this {\n    this.threads = [];\n    Object.assign(this.threads, input);\n    return this;\n  }\n}\n\nexport class Metadata {\n  constructor(public createdBy:\tstring,\n              public creationTimestamp:\tstring,\n              public createdByDetails: UserInfo,\n              public modifiedBy:\tstring,\n              public modificationTimestamp:\tstring,\n              public modifiedByDetails: UserInfo,\n              public lock:\tboolean,\n              public lockType:\tstring,\n              public lockedBy:\tstring,\n              public msLockExpiry:\tstring,\n              public msSystemTime:\tstring,\n              public markedForPurge: boolean,\n              public applicationId:\tstring,\n              public applicationLabel: string,\n              public applicationVersion: number,\n              public typeId: string,\n              public stateColor: string,\n              public stateIcon: string,\n              public caseTypeColor: string,\n              public caseTypeIcon: string,\n              public useCaseTypeColor: boolean\n            ) {\n  }\n}\n\nexport class CaseTypeState implements Deserializable {\n  id: string;\n  label: string;\n  value: string;\n  isTerminal: boolean;\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class CaseTypeStatesListList implements  Deserializable {\n  casetypes: CaseTypeStatesList[];\n  deserialize(input: any): this {\n    this.casetypes = [];\n    Object.assign(this.casetypes, input);\n    return this;\n  }\n}\n\nexport class CaseTypeStatesList implements Deserializable {\n  states: CaseTypeState[];\n  deserialize(input: any): this {\n    this.states = [];\n    Object.assign(this.states, input);\n    return this;\n  }\n}\n\nexport class CaseInfo implements Deserializable {\n    deleted: boolean;\n    caseReference: string;\n    untaggedCasedata: string;\n    untaggedCasedataObj: any;\n    casedata: string;\n    casedataObj: any;\n    summary:  string;\n    summaryObj: any;\n    metadata: Metadata;\n    deserialize(input: any): this {\n      Object.assign(this, input);\n      this.summaryObj = this.summary ? JSON.parse(this.summary) : undefined;\n      this.casedataObj = this.casedata ? JSON.parse(this.casedata) : undefined;\n      this.untaggedCasedataObj = this.untaggedCasedata ? JSON.parse(this.untaggedCasedata) : undefined;\n      return this;\n    }\n}\n\nexport class CaseInfoList implements Deserializable {\n\n  caseinfos: CaseInfo[];\n  casecount: string;\n  deserialize(input: any): this {\n    this.caseinfos = [];\n    Object.assign(this.caseinfos, input);\n    this.caseinfos.forEach(function(caseinfo) {\n      if (caseinfo.summary) { caseinfo.summaryObj = JSON.parse(caseinfo.summary); }\n      if (caseinfo.casedata) { caseinfo.casedataObj = JSON.parse(caseinfo.casedata); }\n      if (caseinfo.untaggedCasedata) { caseinfo.untaggedCasedataObj = JSON.parse(caseinfo.untaggedCasedata); }\n    })\n    return this;\n  }\n}\n\nexport class CaseAttribute {\n  isIdentifier: boolean;\n  isMandatory: boolean;\n  isStructuredType: true;\n  label: string;\n  name: string;\n  type: string;\n  maximum: number;\n  minimum: number;\n}\n\nexport class JsonSchema implements Deserializable {\n  $schema: string;\n  definitions: any[];\n  properties: any[];\n  type: string;\n  required: string[];\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class Process {\n  jsonSchema: JsonSchema;\n  name: string;\n  id: string;\n  formTag: string;\n  processType: string;\n  unsupportedForm: boolean;\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class ProcessId {\n  caseIdentifier: string;\n  caseReference: string;\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\n\nexport class CaseType {\n  actions: Process[];\n  applicationId: string;\n  applicationInternalName: string;\n  applicationName: any;\n  applicationVersion: number;\n  attributes: CaseAttribute[];\n  creators: Process[];\n  id:  string;\n  isCase: boolean\n  label: any;\n  name: string;\n  states: CaseTypeState[];\n  jsonSchema: JsonSchema;\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class CaseTypesList implements Deserializable {\n  casetypes: CaseType[];\n  deserialize(input: any): this {\n    this.casetypes = [];\n    Object.assign(this.casetypes, input);\n    return this;\n  }\n}\n\nexport class CaseAction implements Deserializable {\n  activityName: string;\n  activityId: string;\n  applicationId: string;\n  applicationName: string;\n  availableInStates: string[];\n  chatBotEnabled: boolean;\n  id: string;\n  label: string;\n  name: string;\n  noData: boolean;\n  performerPaths: string[];\n  roles: string[];\n  version: number;\n  process: Process;\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class CaseActionsList implements Deserializable {\n  actions: CaseAction[];\n  deserialize(input: any): this {\n    this.actions = [];\n    Object.assign(this.actions, input);\n    return this;\n  }\n}\n\nexport class CaseCreator implements Deserializable {\n  activityName: string;\n  activityId: string;\n  applicationId: string;\n  applicationName: string;\n  chatBotEnabled: boolean;\n  id: string;\n  label: string;\n  name: string;\n  roles: string[];\n  version: number;\n  process: Process;\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class CaseCreatorsList implements Deserializable {\n  creators: CaseCreator[];\n  deserialize(input: any): this {\n    this.creators = [];\n    Object.assign(this.creators, input);\n    return this;\n  }\n}\n\nexport class CaseList implements Deserializable {\n  uniqueKey: string;\n  maxSize: number;\n  caseRefs: string[];\n  deserialize(input: any): this {\n    this.uniqueKey = input.uniqueKey;\n    this.maxSize = input.maxSize;\n    this.caseRefs = [];\n    Object.assign(this.caseRefs, input.caseRefs);\n    return this;\n  }\n}\n\nexport class ApiResponseText implements Deserializable {\n  message: string;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class ApiResponseError implements Deserializable {\n  errorMsg: string;\n  errorCode: string;\n  contextAttributes: string[];\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class UserInfo implements Deserializable {\n  externalId: string;\n  firstName: string;\n  lastName: string;\n  username: string;\n  email: string;\n  type: string;\n  id: string;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class UsersInfo implements Deserializable{\n  usersInfo: UserInfo[];\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class NotesRole implements Deserializable {\n  entityId: string;\n  entityName: string;\n  entityType: string;\n  id: string;\n  role: string;\n  threadId: string;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class Thread implements Deserializable {\n  acceptedStatusCount: number;\n  actionDate: number;\n  actionId: string;\n  actionType: string;\n  answerNoteCount: number;\n  answeredStatusCount: number;\n  createdById: string;\n  createdByName: string;\n  createdDate: number;\n  id: string;\n  informationalNoteCount: number;\n  isAbandoned: boolean;\n  isLocked: boolean;\n  isOrphaned: boolean;\n  issueNoteCount: number;\n  lifecycledWithId: boolean;\n  lifecycledWithType: boolean;\n  modifiedById: string;\n  modifiedByName: string;\n  modifiedDate: number;\n  questionNoteCount: number;\n  relatedItemCollection: string[];\n  relatedItemId: string;\n  relatedItemType: string;\n  resolutionNoteCount: number;\n  resolvedStatusCount: number;\n  roles: NotesRole[];\n  status: string;\n  topLevelNoteId: string;\n  topicId: string;\n  totalCount: number;\n  unacceptedStatusCount: number;\n  unansweredStatusCount: number;\n  unclassifiedStatusCount: number;\n  unresolvedStatusCount: number;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class Note implements Deserializable {\n  attributes: string[];\n  createdById: string;\n  createdByName: string;\n  createdDate: number;\n  descendantModifiedDate: number;\n  id: string;\n  isDescendantNewOrModified: boolean;\n  isHidden: boolean;\n  isModified: boolean;\n  isNew: boolean;\n  level: number;\n  modifiedByName: string;\n  modifiedDate: number;\n  notificationLabel: string;\n  notificationUrl: string;\n  parentId: string;\n  relatedItemCollection: string[];\n  relatedItemId: string;\n  relatedItemType: string;\n  replyAcceptedId: string;\n  replyCount: number;\n  replyDate: number;\n  status: string;\n  text: string;\n  thread: Thread;\n  threadId: string;\n  title: string;\n  topicId: string;\n  type: string;\n  editMode: boolean;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class NotesList implements Deserializable {\n  notes: Note[];\n  deserialize(input: any): this {\n    this.notes = [];\n    Object.assign(this.notes, input);\n    return this;\n  }\n}\n\nexport class IconMap {\n  constructor(\n    public isCaseType: boolean,\n    public state: string,\n    public fill: string,\n    public icon: string\n  ) {}\n}\n\nexport class CardConfig implements Deserializable {\n  id: string;\n  useCaseTypeColor: boolean;\n  stateMap: IconMap[];\n  deserialize(input: any): this {\n    // this.stateMap = [];\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class LoginContext implements Deserializable {\n  authInfo: AuthInfo;\n  accessToken: AccessToken;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class CaseSearchResults implements Deserializable {\n  caserefs: string[];\n  caseinfos: CaseInfo[];\n  searchString: string;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n","\nimport {\n  AfterViewChecked,\n  AfterViewInit,\n  ChangeDetectorRef,\n  Component,\n  ElementRef,\n  HostListener,\n  OnDestroy,\n  OnInit,\n  ViewChild, ViewChildren\n} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\nimport {distinctUntilChanged} from 'rxjs/internal/operators/distinctUntilChanged';\nimport {debounceTime, map} from 'rxjs/operators';\nimport {TcComponent} from '@tibco-tcstk/tc-core-lib';\n\n\n/**\n * Generic component extended by others\n *\n *@example <tcla-live-apps-component></tcla-live-apps-component>\n */\n@Component({\n  selector: 'tcla-live-apps-component',\n  templateUrl: './live-apps-component.component.html',\n  styleUrls: ['./live-apps-component.component.css']\n})\n\n/**\n * Class Description of the Component\n */\nexport class LiveAppsComponent implements OnDestroy, AfterViewInit, OnInit {\n\n  @ViewChild('componentDiv', {static: false}) componentDiv: ElementRef;\n  @ViewChildren('componentChildDiv') componentChildDivs: LiveAppsComponent[];\n\n  // use the _destroyed$/takeUntil pattern to avoid memory leaks if a response was never received\n  protected _destroyed$ = new Subject();\n  protected containerChanges$: Observable<TcComponent>;\n  public widget: TcComponent;\n  private observer;\n\n  @HostListener('window:resize', ['$event'])\n  onResize(event) {\n    // window resize changes\n    if (this.observer) {\n      setTimeout(handler => {\n        this.observer.next(this.componentDiv.nativeElement.offsetWidth);\n      });\n    }\n  }\n\n  constructor() { }\n\n  public resize = () => {\n    // explicit size changes\n    if (this.observer) {\n      setTimeout(handler => {\n        this.observer.next(this.componentDiv.nativeElement.offsetWidth);\n      });\n    }\n    this.componentChildDivs.forEach(child => {\n      if (child.resize) {\n        child.resize();\n      }\n    });\n  }\n\n  setupWidthObserver() {\n    this.containerChanges$ = new Observable<number>(observer => {\n      if (!this.observer) {\n        this.observer = observer;\n      }\n      // send initial value - need async so any flex items have resized\n      setTimeout(handler => {\n        observer.next(this.componentDiv.nativeElement.offsetWidth);\n      });\n    }).pipe(\n      distinctUntilChanged(),\n      map(width => {\n        if (this.widget && width) {\n          this.widget.width = width;\n        }\n        return this.widget;\n      }\n    )\n    );\n  }\n\n  ngAfterViewInit() {\n    // components that extend this can use the widget.width object to detect size of container by subscribing to containerChanges$\n    // we detect div size changes using two methods:\n    // 1: if window resizes\n    // 2: if a manual resize of the element is triggered - this.resize() - (example - from a button in UI)\n    this.setupWidthObserver();\n  }\n\n  ngOnDestroy() {\n    // on destroy\n    this._destroyed$.next();\n  }\n\n  ngOnInit() {\n    this.widget = new TcComponent();\n  }\n\n}\n","<p>\n  New Live Apps Component\n</p>\n","import {Deserializable, RoleAttribute} from '@tibco-tcstk/tc-core-lib';\n\nexport class Group {\n  public name: string;\n  public description: string;\n  public type: string;\n  public id: string;\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class Groups {\n  groups: Group[];\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class Roles {\n  roles: RoleAttribute[];\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class RouteAccessControlConfig {\n    id: string;\n    uiAppId: string;\n    allowedRoutes: string[];\n    allowedButtonIds: string[];\n    configuration: RouteAccessControlConfigurationElement[];\n    deserialize(input: any): this {\n        Object.assign(this, input);\n        return this;\n    }\n}\n\nexport class RouteAccessControlConfigurationElement {\n    roleId: string;\n    routes: string[];\n    buttonIds: string[];                                                                                  \n    deserialize(input: any): this {\n        Object.assign(this, input);\n        return this;\n    }\n}\n","import { Injectable, NgModule} from '@angular/core';\nimport {forkJoin, Observable, of, throwError, zip} from 'rxjs';\nimport { HttpClientModule, HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';\nimport { HttpClient } from '@angular/common/http';\nimport {\n  CaseInfo,\n  CaseInfoList,\n  CaseTypesList,\n  CaseTypeStatesList,\n  CaseActionsList,\n  CaseList,\n  UserInfo,\n  ApiResponseText,\n  NotesList,\n  Note,\n  ThreadList,\n  Thread,\n  NoteThread,\n  NotificationList,\n  CaseType,\n  CardConfig,\n  IconMap,\n  Metadata,\n  CaseSearchResults,\n  CaseTypeStatesListList,\n  UsersInfo\n} from '../models/liveappsdata';\nimport {  DocumentList, Document} from '../models/tc-document';\nimport {\n  AccessToken,\n  AuthInfo,\n  SharedStateList,\n  SharedStateEntry,\n  SharedStateContent,\n  TcSharedStateService,\n  UiAppConfig,\n  TcCoreCommonFunctions,\n  Group,\n  Claim,\n  Sandbox,\n  SandboxList\n} from '@tibco-tcstk/tc-core-lib';\nimport {Groups} from '../models/tc-groups-data';\nimport {\n  catchError,\n  debounceTime,\n  distinctUntilChanged, flatMap,\n  map,\n  mergeMap,\n  share,\n  shareReplay,\n  switchMap,\n  take,\n  takeUntil,\n  tap\n} from 'rxjs/operators';\nimport { Deserializable} from '@tibco-tcstk/tc-core-lib';\nimport {split} from 'ts-node';\nimport {Location} from '@angular/common';\nimport {StateTrackerData} from '../models/tc-case-states';\n\n@Injectable({\n  providedIn: 'root'\n})\n\nexport class LiveAppsService {\n  // these are 'per session' caches. They won't time out unless explicitly cleared or browser is refreshed\n  private claimsCacheMap = new Map();\n  private userInfoCacheMap = new Map();\n  private caseTypesCacheMap = new Map();\n  private iconSVGTextCacheMap = new Map();\n\n  constructor(\n    private http: HttpClient, private location: Location, private sharedStateService: TcSharedStateService) { }\n\n  public checkAuth(key: string): Promise<any> {\n    const url = '/organisation/v1/claims';\n    let headers;\n    headers = new HttpHeaders()\n      .set('Authorization', ('Bearer ' + key));\n    return this.http.get(url, { headers }).pipe(\n      tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n    ).toPromise();\n  }\n\n  public getSandboxes(): Observable<SandboxList> {\n    const url = '/organisation/v1/sandboxes';\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map ( sandboxList => new SandboxList().deserialize(sandboxList)));\n  }\n\n  public getApplications(sandboxId: number, appIds: string[], top: number, useCache: boolean): Observable<CaseTypesList> {\n    const select = 'b';\n    let url = '/case/v1/types?$sandbox=' + sandboxId + '&$select=' + select + '&$top=' + top;\n\n    if (appIds && appIds.length > 0) {\n      url = url + '&$filter=applicationId in(' + appIds.toString() + ') and isCase eq TRUE';\n    }\n    // note: since this is cached it will require a reload to see new apps\n    let headers;\n    if (useCache) {\n      headers = new HttpHeaders().set('cacheResponse', 'true');\n    } else {\n      headers = new HttpHeaders();\n    }\n\n\n    return this.http.get(url, { headers })\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(casetypes => {\n          if (appIds && appIds.length > 0) {\n            // This is to workaround a bug where non case type types are returned when > 1 appId\n            const tmpCaseTypes = new CaseTypesList().deserialize(casetypes);\n            const filteredCaseTypes = new CaseTypesList().deserialize( { casetypes: [] });\n\n            tmpCaseTypes.casetypes.forEach(ctype => {\n              if (ctype.id === '1') {\n                filteredCaseTypes.casetypes.push(ctype);\n              }\n            });\n            return filteredCaseTypes;\n          } else {\n            return new CaseTypesList().deserialize(casetypes);\n          }\n        }));\n  }\n\n  public getClaims(disableCache?: boolean): Observable<Claim> {\n    const url = '/organisation/v1/claims';\n    let headers;\n    if (!disableCache) {\n      headers = new HttpHeaders().set('cacheResponse', 'true');\n    }\n    return this.http.get(url, { headers: headers })\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map ( claim => new Claim().deserialize(claim)));\n  }\n\n  public getCases(sandboxId: number, appId: string, typeId: string, skip: number, top: number): Observable<CaseInfoList> {\n    const url = '/case/v1/cases' + '?$sandbox=' + sandboxId + '&$filter=applicationId eq '\n      + appId + ' and typeId eq ' + typeId + '&$skip=' + skip + '&$top=' + top;\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(caseinfos => new CaseInfoList().deserialize(caseinfos)));\n  }\n\n  public getCasesWithUserInfo(sandboxId: number, appId: string, typeId: string, skip: number, top: number): Observable<CaseInfoList> {\n    return this.getCases(sandboxId, appId, typeId, skip, top).pipe(\n      flatMap((caseinfos: CaseInfoList) => {\n        // get userIds\n        const calls$ = [];\n        caseinfos.caseinfos.forEach(caseinfo => {\n          calls$.push(forkJoin(\n            this.getUserInfo(caseinfo.metadata.createdBy),\n            this.getUserInfo(caseinfo.metadata.modifiedBy)\n          ).pipe(\n            map(([creator, modifier]) => {\n              caseinfo.metadata.createdByDetails = creator;\n              caseinfo.metadata.modifiedByDetails = modifier;\n              return caseinfo;\n            })\n          ));\n        });\n        return forkJoin(calls$).pipe(\n          map((caseinfosFilled: CaseInfo[]) => {\n            caseinfos.caseinfos = caseinfosFilled;\n            return caseinfos;\n          })\n        );\n      })\n    );\n  }\n\n  public getCasesCount(sandboxId: number, appId: string, typeId: string): Observable<string> {\n    const url = '/case/v1/cases' + '?$sandbox=' + sandboxId + '&$filter=applicationId eq '\n      + appId + ' and typeId eq ' + typeId + '&$count=true';\n\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(casecount => casecount.toString()));\n  }\n\n  public getCaseByRef(sandboxId, caseRef: string): Observable<CaseInfo> {\n    const url = '/case/v1/cases/' + caseRef\n      + '?$sandbox=' + sandboxId;\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(caseinfo => new CaseInfo().deserialize(caseinfo))\n      );\n  }\n\n  public getCase(caseRef: string, sandboxId: number, appId: string, typeId: string ): Observable<CaseInfo> {\n    const url = '/case/v1/cases/' + caseRef + '/' + '?$sandbox=' + sandboxId + '&$filter=applicationId eq '\n      + appId + ' and typeId eq ' + typeId + '&$select=uc, m';\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(caseinfo => new CaseInfo().deserialize(caseinfo)));\n  }\n\n  public caseSearch(terms: Observable<string>, sandboxId: number, appId: string, typeId: string, skip: number, top: number, stateId: number, select?: string, hidePurgeable?: boolean): Observable<CaseSearchResults> {\n    return terms\n      .pipe(\n        debounceTime(500),\n        distinctUntilChanged(),\n        switchMap(term => this.caseSearchEntries(term, sandboxId, appId, typeId, false, skip, top, stateId, select, hidePurgeable))\n      );\n  }\n\n  public caseSearchEntries(term: string, sandboxId: number, appId: string, typeId: string, force: boolean, skip: number, top: number, stateId: number, select?: string, hidePurgeable?: boolean): Observable<CaseSearchResults> {\n      let url = '/case/v1/cases' + '?$sandbox=' + sandboxId + '&$filter=applicationId eq '\n        + appId + ' and typeId eq ' + typeId;\n      if (stateId) {\n        url = url + ' and stateId eq ' + stateId;\n      }\n      if (hidePurgeable) {\n        url = url + ' and purgeable eq FALSE';\n      }\n      url = url + '&$skip=' + skip + '&$top=' + top;\n      if (select) {\n        url = url + '&$select=' + select;\n      } else {\n        url = url + '&$select=cr';\n      }\n      if (term || (!term && !force)) {\n        url = url + '&$search=' + term;\n      }\n\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(caseinfos => {\n          const caserefs: string[] = [];\n            const caseinfolist = new CaseInfoList().deserialize(caseinfos);\n            caseinfolist.caseinfos.forEach(caseinfo => {\n              caserefs.push(caseinfo.caseReference);\n            })\n            return new CaseSearchResults().deserialize({\n              caserefs: caserefs,\n              caseinfos: caseinfolist.caseinfos,\n              searchString: term });\n          }\n        )\n      );\n  }\n\n  private combinedSearch = (appId: string[], sandboxId: number, term: string, force: boolean, skip: number, top: number, stateId: number): Observable<CaseSearchResults> => {\n    // for each appId create an obervable\n    const forkJoinArray$ = [];\n    appId.forEach(app => {\n      forkJoinArray$.push(this.caseSearchEntries(term, sandboxId, app, '1', force, skip, top, stateId));\n    })\n\n    // run all three calls in parallel\n    return forkJoin(forkJoinArray$).pipe(\n      map(resultArr => {\n        const results = new CaseSearchResults();\n        results.searchString = term;\n        // combine results into a single array\n        resultArr.forEach((res: CaseSearchResults) => {\n            results.caserefs = results.caserefs.concat(res.caserefs);\n        });\n        return results;\n      })\n    );\n  }\n\n  public getCaseTypes(sandboxId: number, appId: string, top: number, allData?: boolean): Observable<CaseTypesList> {\n    let select = 'b,s,sa,a';\n    if (allData) {\n      select = 'b,a,sa,s,js,c,ac';\n    }\n    let url = '/case/v1/types?$sandbox=' + sandboxId + '&$select=' + select + '&$top=' + top;\n    if (appId != null) {\n      url = url + '&$filter=applicationId eq ' + appId;\n    }\n\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(casetypes => new CaseTypesList().deserialize(casetypes)));\n  }\n\n  public getCaseTypeSchema(sandboxId: number, appId: string, top: number): Observable<CaseTypesList> {\n    // https://eu.liveapps.cloud.tibco.com/case/v1/types?$sandbox=25&&$filter=applicationName eq 'Customer Complaint'&$select=b,js,c,ac\n    const select = 'b,js,c,ac,a';\n    let url = '/case/v1/types?$sandbox=' + sandboxId + '&$select=' + select + '&$top=' + top;\n    if (appId != null) {\n      url = url + '&$filter=applicationId eq ' + appId;\n    }\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(casetypes => {\n          const ct = new CaseTypesList().deserialize(casetypes);\n          ct.casetypes.forEach(ctype => {\n            if (ctype.actions) {\n              ctype.actions.forEach(action => {\n                // Format of ref is <applicationName>.<applicationInternalName>.<processType>.<processName>\n                action.formTag = ctype.applicationName + '.' + ctype.applicationInternalName + '.action.' + action.name;\n                action.processType = 'action';\n              });\n            }\n            if (ctype.creators) {\n              ctype.creators.forEach(creator => {\n                // Format of ref is <applicationName>.<applicationInternalName>.<processType>.<processName>\n                creator.formTag = ctype.applicationName + '.' + ctype.applicationInternalName + '.creator.' + creator.name;\n                creator.processType = 'creator';\n              });\n            }\n          })\n          return ct;\n        }\n        )\n        );\n  }\n\n    public getCaseTypeStates(sandboxId: number, appId: string, top: number): Observable<CaseTypeStatesList> {\n        const select = 's';\n        let url = '/case/v1/types?$sandbox=' + sandboxId + '&$select=' + select  + '&$top=' + top;\n        if (appId != null) {\n            url = url + '&$filter=applicationId eq ' + appId;\n        }\n        const headers = new HttpHeaders().set('cacheResponse', 'true');\n        return this.http.get(url, { headers: headers })\n        // return this.http.get(url)\n            .pipe(\n                tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n                map(casetypestates => {\n                  // const x = new CaseTypeStatesList().deserialize(casetypestates[0].states);\n                  // return x;\n\n                  const casetypelist = new CaseTypeStatesListList().deserialize(casetypestates);\n                  let states: CaseTypeStatesList;\n                  casetypelist.casetypes.forEach((casetype) => {\n                    if (casetype.states !== undefined) {\n                      states = new CaseTypeStatesList().deserialize(casetype.states);\n                    }\n                  });\n                  return states;\n                }\n                ));\n    }\n\n    public getCaseTypeBasicInfo(sandboxId: number, appId: string, typeId: string, top: number): Observable<CaseType> {\n        const select = 'b';\n      let url = '/case/v1/types?$sandbox=' + sandboxId + '&$select=' + select + '&$top=' + top;\n      if (appId != null) {\n        url = url + '&$filter=applicationId eq ' + appId;\n      }\n\n      if (!this.caseTypesCacheMap.get(url)) {\n        const cacheEntry$ = this.getCaseTypeBasicInfoCached(url, typeId)\n          .pipe(\n            shareReplay(1)\n          );\n        this.caseTypesCacheMap.set(url, cacheEntry$);\n      }\n      return this.caseTypesCacheMap.get(url);\n    }\n\n    private getCaseTypeBasicInfoCached(url, typeId) {\n      const headers = new HttpHeaders().set('cacheResponse', 'true');\n      return this.http.get(url, { headers: headers })\n        .pipe(\n          tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n          map(casetypes => {\n            const caseTypesList: CaseTypesList = new CaseTypesList().deserialize(casetypes);\n            let requestedType: CaseType;\n            caseTypesList.casetypes.forEach((casetype) => {\n              if (casetype.id === typeId) {\n                requestedType = casetype;\n              }\n            });\n            return requestedType;\n          })\n        );\n    }\n\n    public clearFromIconSVGTextCache(url) {\n      if (this.iconSVGTextCacheMap.get(url)) {\n        this.iconSVGTextCacheMap.delete(url);\n      }\n    }\n\n    public getIconSVGText(url: string): Observable<string> {\n      // todo: revisit the base href issue\n      if (url.substr(0, 2) === '//') {\n        url = url.substr(1, url.length - 1);\n      }\n      url = url;\n      if (!this.iconSVGTextCacheMap.get(url)) {\n        // const fixedUrl = window.location.protocol + '//' + window.location.host  + url;\n        const cacheEntry$ = this.getIconSVGTextCache(url)\n          .pipe(\n            shareReplay(1)\n          );\n        this.iconSVGTextCacheMap.set(url, cacheEntry$);\n      }\n      return this.iconSVGTextCacheMap.get(url);\n    }\n\n    private getIconSVGTextCache(url) {\n      const headers = new HttpHeaders().set('cacheResponse', 'true');\n      return this.http.get(url, {responseType: 'text', headers: headers })\n        .pipe(\n          map(val => {\n              const svgContents = val.toString();\n              return svgContents;\n            }\n          )\n        );\n    }\n\n  private updateCasesRecord(casesContent: SharedStateContent, caseRef: string, toggle: Boolean): SharedStateContent {\n    const sharedStateContent: SharedStateContent = new SharedStateContent().deserialize(casesContent);\n    const casesRec: CaseList = JSON.parse(sharedStateContent.json);\n    let existing = false;\n      // check if already exists\n\n    if (caseRef === '-1') {\n      // clear list\n        casesRec.caseRefs.length = 0;\n    } else {\n      if (casesRec.caseRefs.indexOf(caseRef) !== -1) {\n        // remove it if it is already in the array\n        casesRec.caseRefs.splice(casesRec.caseRefs.indexOf(caseRef), 1);\n        existing = true;\n      }\n      if (!toggle || existing === false) {\n        // only add it if we are not in toggle mode (favorites) or if the caseRef didnt already exist in the list\n        // now add case to front of array\n        casesRec.caseRefs.unshift(caseRef);\n        // check if we are > max size\n        if (casesRec.maxSize !== -1 && casesRec.caseRefs.length > casesRec.maxSize) {\n          // remove oldest entry\n          casesRec.caseRefs.pop();\n        }\n      }\n    }\n    sharedStateContent.json = TcCoreCommonFunctions.escapeString(JSON.stringify(casesRec));\n    return sharedStateContent;\n  }\n\n  private newCasesRecord(caseRef: string, maxSize: number): SharedStateContent {\n    const casesRec: CaseList = new CaseList();\n    casesRec.maxSize = maxSize;\n    if (caseRef === '-1') {\n      casesRec.caseRefs = [ ];\n    } else {\n      casesRec.caseRefs = [caseRef];\n    }\n    casesRec.uniqueKey = 'caseReference';\n    const sharedStateContent: SharedStateContent = new SharedStateContent();\n    sharedStateContent.json = TcCoreCommonFunctions.escapeString(JSON.stringify(casesRec));\n    return sharedStateContent;\n  }\n\n  public getRecentCases(uiAppId: string, sandboxId: number): Observable<CaseList> {\n    const ssName = uiAppId + '.recentcases.tibcolabs.client.context.PRIVATE';\n    return this.getSSCasesList(ssName, sandboxId);\n  }\n\n  private getSSCasesList(ssName: string, sandboxId: number): Observable<CaseList> {\n    return this.sharedStateService.getSharedState(ssName, 'PRIVATE', false, false)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(sharedStateList => {\n          if (sharedStateList.sharedStateEntries.length > 0) {\n            return new CaseList().deserialize(JSON.parse(sharedStateList.sharedStateEntries[0].content.json));\n          } else {\n            return new CaseList();\n          }\n        }\n        )\n      );\n  }\n\n  public unsetRecentCase(caseRef: string, uiAppId: string, sandboxId: number) {\n    // NOTE: Use '-1' as caseRef to clear recent cases list\n    const ssName = uiAppId + '.recentcases.tibcolabs.client.context.PRIVATE';\n    this.setCasesRecord(ssName, caseRef, uiAppId, sandboxId, 10, true);\n  }\n\n  public setRecentCase(caseRef: string, uiAppId: string, sandboxId: number) {\n    // NOTE: Use '-1' as caseRef to clear recent cases list\n    const ssName = uiAppId + '.recentcases.tibcolabs.client.context.PRIVATE';\n    this.setCasesRecord(ssName, caseRef, uiAppId, sandboxId, 10, false);\n  }\n\n  private setCasesRecord(ssName: string, caseRef: string, uiAppId: string, sandboxId: number, maxSize: number, toggle: boolean) {\n    // get cases list from shared state if any\n    // update cases data removing oldest if > maxsize\n    // set shared state\n    let casesEntry: SharedStateEntry;\n    this.sharedStateService.getSharedState(ssName, 'PRIVATE', false, false)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(sharedStateList => {\n            casesEntry = sharedStateList.sharedStateEntries[0] || undefined;\n            let content: SharedStateContent;\n            if (casesEntry) {\n              content = this.updateCasesRecord(casesEntry.content, caseRef, toggle);\n              casesEntry.content = content;\n              sharedStateList.sharedStateEntries[0] = casesEntry;\n              this.sharedStateService.updateSharedState(sharedStateList.sharedStateEntries).subscribe();\n            } else {\n              content = this.newCasesRecord(caseRef, maxSize);\n              this.sharedStateService.createSharedState(ssName, 'PRIVATE', '', sandboxId, undefined, undefined, undefined, content).subscribe();\n            }\n            return casesEntry;\n          }\n        )\n      ).subscribe(null, error => console.log('Unable to set recent cases: ' + error));\n  }\n\n  public getFavoriteCases(uiAppId: string, sandboxId: number): Observable<CaseList> {\n    const ssName = uiAppId + '.favoritecases.tibcolabs.client.context.PRIVATE';\n    return this.sharedStateService.getSharedState(ssName, 'PRIVATE', false, false)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(sharedStateList => {\n          if (sharedStateList.sharedStateEntries.length > 0) {\n            return new CaseList().deserialize(JSON.parse(sharedStateList.sharedStateEntries[0].content.json));\n          } else {\n            return new CaseList();\n          }\n        }\n        )\n      );\n  }\n\n  public setFavoriteCase(caseRef: string, uiAppId: string, sandboxId: number) {\n    // NOTE: Use '-1' as caseRef to clear recent cases list\n    const ssName = uiAppId + '.favoritecases.tibcolabs.client.context.PRIVATE';\n    this.setCasesRecord(ssName, caseRef, uiAppId, sandboxId, -1, true);\n  }\n\n  public isFavoriteCase(caseRef: string, uiAppId: string, sandboxId: number): Observable<boolean> {\n    const ssName = uiAppId + '.favoritecases.tibcolabs.client.context.PRIVATE';\n    return this.getSSCasesList(ssName, sandboxId)\n      .pipe(\n        map(caselist => {\n          return caselist.caseRefs ? (caselist.caseRefs.indexOf(caseRef) !== -1) : false;\n        })\n      );\n  }\n\n  public runProcess(sandboxId: number, appId: string, processId: string, caseReference: string, data: any): Observable<any> {\n    const url = '/process/v1/processes';\n    // convert data to an escaped JSON string\n    let dataJson;\n    if (data) {\n      dataJson = TcCoreCommonFunctions.escapeString(JSON.stringify(data));\n    } else {\n      dataJson = TcCoreCommonFunctions.escapeString(JSON.stringify({}));\n    }\n    const body = {\n      'id': processId,\n      'sandboxId': sandboxId,\n      'applicationId': appId,\n      'data': dataJson\n    };\n\n    if (caseReference) {\n      body['caseReference'] = caseReference;\n    }\n\n\n    const bodyStr = JSON.stringify(body);\n    const headers = new HttpHeaders()\n      .set('Content-Type', 'application/json');\n    return this.http.post(url, bodyStr, { headers })\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(response => response)\n      );\n  }\n\n  // Since we call get userinfo a lot - and the data doesn't tend to change - I will cache it for the session\n  public getUserInfo(userId: string): Observable<UserInfo> {\n    const url = '/organisation/v1/users/' + userId;\n    if (userId === undefined) {\n      return of(new UserInfo().deserialize({\n        externalId: 'system',\n        firstName: 'system',\n        lastName: 'user',\n        username: 'system',\n        email: 'system',\n        type: 'system',\n        id: 'system'\n      }));\n    } else {\n      if (!this.userInfoCacheMap.get(userId)) {\n        const cacheEntry$ = this.getUserCached(url)\n          .pipe(\n            shareReplay(1)\n          );\n        this.userInfoCacheMap.set(userId, cacheEntry$);\n      }\n      return this.userInfoCacheMap.get(userId);\n    }\n  }\n\n  private getUserCached(url) {\n    const headers = new HttpHeaders().set('cacheResponse', 'true');\n    return this.http.get(url, { headers: headers })\n      .pipe(\n        map(userinfo => new UserInfo().deserialize(userinfo))\n      );\n  }\n\n  /* notes service */\n\n  public getThreads(relatedItemType: string, itemTypeId: string, skip: number, top: number): Observable<ThreadList> {\n    // https://liveapps.tenant-integration.tcie.pro/collaboration/notes?$relatedItemCollection=CASE_APP_15441&$orderby=createdDate%20ASC\n    const url = '/collaboration/v1/notes?$relatedItemCollection=' + relatedItemType + '_' + itemTypeId\n      + '&$orderby=createdDate desc'\n      + '&$top=' + top + '&$skip=' + skip;\n    return this.http.get(url, { withCredentials: true })\n      .pipe(\n        map(notes => {\n          const returnedNotes = new NotesList().deserialize(notes);\n          const threadList: ThreadList = new ThreadList();\n          threadList.threads = [];\n          // create threads\n          returnedNotes.notes.forEach(function(note) {\n              if (note.level === 1) {\n                const noteThread = new NoteThread(note.thread.id, false, false, false, undefined, [], note);\n                // get other threads for this id\n                returnedNotes.notes.forEach(function (threadNote) {\n                  if (threadNote.level > 1 && threadNote.threadId === note.thread.id) {\n                    // add to the thread\n                    noteThread.thread.push(threadNote);\n                  }\n                });\n                threadList.threads.push(noteThread);\n              }\n            });\n          return threadList;\n        })\n      );\n  }\n\n  public getNotesForCollections(collectionIds): Observable<NotesList> {\n    if (collectionIds) {\n      const url = '/collaboration/v1/notes?$relatedItemCollection=' + collectionIds +\n        '&$orderby=createdDate ASC';\n      return this.http.get(url, { withCredentials: true })\n        .pipe(\n          map(notes => new NotesList().deserialize(notes))\n        );\n    }\n  }\n\n  public deleteAllNotes() {\n  }\n\n  public updateNote(note: Note, noteId: string): Observable<Note> {\n    let url = '/collaboration/v1/notes/' + noteId;\n    const body = note;\n    const bodyStr = JSON.stringify(body);\n    const headers = new HttpHeaders()\n      .set('Content-Type', 'application/json');\n    return this.http.put(url, bodyStr, { headers })\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map( result => new Note().deserialize(result))\n      );\n  }\n\n  public createNote(relatedItemType: string,\n                    uiAppSource: string,\n                    relatedItemId: string,\n                    notificationLabel: string,\n                    notificationUrl: string,\n                    title: string,\n                    noteText: string): Observable<number> {\n    let url = '/collaboration/v1/notes';\n    const note = new Note().deserialize(\n      {\n        attributes: [],\n        notificationLabel: notificationLabel,\n        notificationUrl: notificationUrl,\n        text: noteText,\n        title: title\n      }\n    );\n    const body = {\n      note: note,\n      relatedItemCollection: [\n        (relatedItemType + '_' + relatedItemId)\n      ],\n      relatedItemId: relatedItemId,\n      relatedItemType: uiAppSource,\n      roles: undefined\n    };\n    const bodyStr = JSON.stringify(body);\n    const headers = new HttpHeaders()\n      .set('Content-Type', 'application/json');\n    return this.http.post(url, bodyStr, { headers })\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(result => Number(result))\n      );\n  }\n\n  public getNote(noteId: number): Observable<Note> {\n    let url = '/collaboration/v1/notes/' + noteId;\n    return this.http.get(url, { withCredentials: true })\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(note => new Note().deserialize(note)\n        )\n      );\n  }\n\n  public getThread(relatedItemType: string, relatedItemId: string, threadId: number) {\n    let url = '/collaboration/v1/notes/?$relatedItemType=' + relatedItemType\n      + '&relatedItemId=' + relatedItemId\n      + '&filter=threadId=' + threadId\n      + '&orderby=createdDate ASC';\n      return this.http.get(url, { withCredentials: true })\n        .pipe(\n          tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n          map(notes => new NotesList().deserialize(notes)\n          )\n        );\n  }\n\n  public createReplyNote(originalNote: Note, reply: string, noteId: string): Observable<number> {\n    let url = '/collaboration/v1/notes/' + noteId;\n    const body = {\n      notificationLabel: originalNote.notificationLabel,\n      notificationUrl: originalNote.notificationUrl,\n      text: reply\n    };\n    const bodyStr = JSON.stringify(body);\n    const headers = new HttpHeaders()\n      .set('Content-Type', 'application/json');\n    return this.http.post(url, bodyStr, { headers })\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(value => Number(value))\n      );\n  }\n\n  public subscribeToNotes(relatedItemType, relatedTypeId) {\n    const url = '/collaboration/v1/notifications';\n    const body = {\n      topicId: undefined,\n      threadId: undefined,\n      notifyCollection: {\n        collectionName: relatedItemType + '_' + relatedTypeId,\n        lifecycledWithType: 'RT_CASE',\n        lifecycledWithId: true\n      }\n    };\n    const bodyStr = JSON.stringify(body);\n    const headers = new HttpHeaders()\n      .set('Content-Type', 'application/json');\n    return this.http.post(url, bodyStr, { headers, withCredentials: true })\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString()))\n      );\n  }\n\n  public unsubscribeToNotes(relatedItemType, relatedTypeId, userId) {\n    let url = '/collaboration/v1/notifications?$filter=collectionName=';\n    url = url + '\\'' + relatedItemType + '_' + relatedTypeId + '\\' and entityId=' + userId;\n    return this.http.delete(url, { withCredentials: true })\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString()))\n      );\n  }\n\n  public getNotifications(relatedItemType, relatedTypeId, userId): Observable<NotificationList> {\n    let url = '/collaboration/v1/notifications?$filter=collectionName=\\'' + relatedItemType + '_' + relatedTypeId\n            + '\\' and entityId=' + userId;\n    return this.http.get(url, { withCredentials: true })\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(value => new NotificationList().deserialize(value))\n      );\n  }\n\n  public deleteNote(noteId: number) {\n    const url = '/collaboration/v1/notes/' + noteId;\n    return this.http.delete(url, { withCredentials: true })\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString()))\n      );\n  }\n\n  /* end notes service */\n\n  public getUsers(sandboxId: number, top: number): Observable<UserInfo[]> {\n    const url = '/organisation/v1/users?$sandbox=' + sandboxId + '&$top=' + top + '&$filter=type eq Standard';\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map( (users: any) => users)\n      );\n  }\n\n  public getGroups(sandboxId: number, top: number, useCache: boolean): Observable<Groups> {\n    const url = '/organisation/v1/groups?$sandbox=' + sandboxId + '&$top=' + top;\n    let headers;\n    if (useCache) {\n      headers = new HttpHeaders().set('cacheResponse', 'true');\n    } else {\n      headers = new HttpHeaders();\n    }\n\n    return this.http.get(url, { headers, withCredentials: true })\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map( groups => new Groups().deserialize({ groups: groups }))\n      );\n  }\n\n  public getGroupMemberships(sandboxId: number, userId: string, top: number, useCache: boolean): Observable<Groups> {\n    const url = '/organisation/v1/users/' + userId + '/groups' + '?$sandbox=' + sandboxId + '&$top=' + top;\n    let headers;\n    if (useCache) {\n      headers = new HttpHeaders().set('cacheResponse', 'true');\n    } else {\n      headers = new HttpHeaders();\n    }\n\n    return this.http.get(url, { headers, withCredentials: true })\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map( groups => new Groups().deserialize({ groups: groups }))\n      );\n  }\n\n  public getGroupUsers(sandboxId: number, groupId: string, skip: number, top: number, filter: string, useCache: boolean): Observable<UsersInfo>{\n    let url = '/organisation/v1/groups/' + groupId + '/users' + '?$sandbox=' + sandboxId + '&$top=' + top + '&$skip=' + skip\n    if (filter !== '') {\n      url = url + + '&$filter=' + filter;\n    }\n\n    let headers;\n    if (useCache) {\n      headers = new HttpHeaders().set('cacheResponse', 'true');\n    } else {\n      headers = new HttpHeaders();\n    }\n\n    return this.http.get(url, { headers, withCredentials: true })\n      .pipe(\n        tap(val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(users => new UsersInfo().deserialize({ usersInfo: users }))\n      );\n  }\n}\n","\n\nimport {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {CaseInfo, CaseType, CaseTypesList} from '../../models/liveappsdata';\nimport {map, take, takeUntil} from 'rxjs/operators';\nimport {Subject} from 'rxjs';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\n\n\n/**\n * Lists live apps applications in drop down list allowing selection of app\n *\n * ![alt-text](../live-apps-applications.png \"Image\")\n *\n *@example <tcla-live-apps-applications></tcla-live-apps-applications>\n */\n\n@Component({\n  selector: 'tcla-live-apps-applications',\n  templateUrl: './live-apps-applications.component.html',\n  styleUrls: ['./live-apps-applications.component.css']\n})\n\nexport class LiveAppsApplicationsComponent extends LiveAppsComponent implements OnInit {\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The list of LA Application IDs you want to handle\n   */\n  @Input() appIds: string[];\n\n  /**\n   * Whether to auto select the first app in dropdown selector (eg search)\n   */\n  @Input() selectFirstApp: boolean;\n\n  /**\n   * Application selected from dropdown (output)\n   */\n  public selectedApp: CaseType = new CaseType();\n  @Input('selectedApp') set SelectedApp(selectedApp: CaseType) {\n    if (selectedApp){\n      this.selectedApp = selectedApp;\n    }\n  }\n\n  /**\n   * Use Form field rendering around the selection box\n   */\n  public formFieldRendering: boolean = false;\n  @Input('formFieldRendering') set FormFieldRendering(formFieldRendering: boolean) {\n    if (formFieldRendering){\n      this.formFieldRendering = formFieldRendering;\n    }\n  }\n\n  /**\n   * Pre-select specified appId\n   */\n\n  @Input() selectedAppId: string;\n\n  /**\n   * Label for the application selector\n   */\n  public label: string = 'Applications';\n  @Input('label') set Label(label: string) {\n    if (label){\n      this.label = label;\n    }\n  }\n\n  /**\n   * ~event selection : Value selected in child component\n   * ~payload CaseType : type varies.  but is when something is selected in a drop down it is passed back to the caller\n   */\n  @Output() selection: EventEmitter<CaseType> = new EventEmitter<CaseType>();\n\n  applications: CaseTypesList = new CaseTypesList();\n  // selectedApp: CaseType = new CaseType();\n  errorMessage: string;\n\n  constructor(protected liveapps: LiveAppsService) {\n    super();\n  }\n\n  changeAppSelection = (appSelected: CaseType) => {\n    this.selectedApp = this.applications.casetypes.find((casetype) => {\n      return casetype.applicationId === appSelected.applicationId;\n    });\n  }\n\n  selectApplication = (selectionEvent) => {\n    this.selectedApp = selectionEvent.source.value;\n    this.selection.emit(selectionEvent.source.value);\n  }\n\n  public refresh = (bypassCache: boolean) => {\n    this.liveapps.getApplications(this.sandboxId, this.appIds, 100, bypassCache)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      )\n      .subscribe(applicationList => {\n        this.applications = applicationList;\n        if (this.selectedApp.applicationId) {\n          this.selectedApp = applicationList.casetypes.find((casetype) => {\n            return casetype.applicationId === this.selectedApp.applicationId;\n          });\n          // this.selection.emit(this.selectedApp);\n        } else\n        // select first as default\n        if (applicationList.casetypes.length > 0 && this.selectFirstApp) {\n          this.selectedApp = applicationList.casetypes[0];\n          this.selection.emit(applicationList.casetypes[0]);\n        }\n      }, error => { this.errorMessage = 'Error retrieving applications: ' + error.error.errorMsg; });\n  }\n\n  public compareProcessId = (o1: any, o2: any): boolean => {\n    return o1.applicationId === this.selectedAppId;\n  }\n\n  ngOnInit(): void {\n    this.refresh(false);\n  }\n\n}\n","<div *ngIf=\"!formFieldRendering\" class=\"tcs-application-selector\" fxFlex style=\"margin-left: 10px;\">\n  <mat-label></mat-label>\n  <mat-select *ngIf=\"selectedApp\" class=\"tcs-application-selector-option\" [disableOptionCentering]=\"true\"\n              placeholder=\"{{label}}\" [(value)]=\"selectedApp\" [compareWith]=\"compareProcessId\"\n              (selectionChange)=\"selectApplication($event)\" matTooltip=\"{{selectedApp.applicationName}}\"\n              matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\">\n    <mat-option matInput *ngFor=\"let application of applications.casetypes\" [value]=\"application\">\n      {{application.label | ellipsis : 20}}\n    </mat-option>\n  </mat-select>\n</div>\n<div *ngIf=\"formFieldRendering\" fxFlex>\n  <mat-form-field style=\"width:100%\">\n    <mat-label>{{label}}</mat-label>\n    <mat-select *ngIf=\"selectedApp\" [disableOptionCentering]=\"true\" placeholder=\"{{label}}\" [(value)]=\"selectedApp\"\n                (selectionChange)=\"selectApplication($event)\" [compareWith]=\"compareProcessId\"\n                matTooltip=\"{{selectedApp.applicationName}}\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\">\n      <mat-option matInput *ngFor=\"let application of applications.casetypes\" [value]=\"application\">\n        {{application.label}}\n      </mat-option>\n    </mat-select>\n  </mat-form-field>\n</div>\n\n\n<!--div *ngIf=\"errorMessage\">{{errorMessage}}</div>\n<div *ngIf=\"applications\" class=\"la-applications-div\" fxLayoutAlign=\"space-around start\">\n  <div class=\"la-applications-card\" fxLayout=\"column\">\n    <h3>Select application:</h3>\n    <div class=\"la-application-selection\">\n      <div class=\"la-available-sub\" (click)=\"selectApplication(application)\" *ngFor=\"let application of applications.casetypes\">\n        <div class=\"la-application-name\">{{application.applicationName}}</div>\n        <div fxLayout=\"column\" class=\"la-application-selection-dtl\" fxLayoutAlign=\"start start\">\n          <div>Application Id: {{application.applicationId}}</div>\n          <div>Type Id: {{application.id}}</div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div-->\n","import {Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {CaseInfoList, CaseSearchResults, CaseType} from '../../models/liveappsdata';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {LiveAppsApplicationsComponent} from '../live-apps-applications/live-apps-applications.component';\nimport {map, tap} from 'rxjs/operators';\n\n/**\n * Selection of app + searching for cases\n *\n *  ![alt-text](../live-apps-case-search.png \"Image\")\n *\n *@example <tcla-live-apps-case-search></tcla-live-apps-case-search>\n */\n@Component({\n  selector: 'tcla-live-apps-case-search',\n  templateUrl: './live-apps-case-search.component.html',\n  styleUrls: ['./live-apps-case-search.component.css']\n})\n\nexport class LiveAppsCaseSearchComponent extends LiveAppsComponent {\n  @ViewChild('searchBox', {static: false}) searchBox: ElementRef;\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The list of LA Application IDs you want to handle\n   */\n  @Input() appIds: string[];\n\n\n  /**\n   * ~event foundRefs : Search completed (caseRefs returned)\n   * ~payload CaseSearchResults : caseRefs matching the search (so parent can display them in case list component)\n   */\n  @Output() foundRefs: EventEmitter<CaseSearchResults> = new EventEmitter<CaseSearchResults>();\n\n  @ViewChild(LiveAppsApplicationsComponent, {static: false}) applicationsComponent: LiveAppsApplicationsComponent;\n\n  searchTerm$: Subject<string>;\n  searchValue: Observable<String>;\n  searchString: string;\n  forcedSearch = false;\n  public selectedStateId: number;\n  public selectedStateLabel: string;\n\n  // case type selector\n  public selectedApp: CaseType = new CaseType();\n\n  constructor(protected liveapps: LiveAppsService) {\n    super();\n  }\n\n  public refresh = () => {\n    if (this.applicationsComponent) {\n      this.applicationsComponent.refresh(true);\n    }\n  }\n\n\n  public setCaseType = (caseType: CaseType) => {\n    this.selectedApp = caseType;\n    this.doSearch();\n    this.applicationsComponent.changeAppSelection(caseType);\n  }\n\n  public setSelectedStateId = (stateId: number, stateLabel: string) => {\n    this.selectedStateId = stateId;\n    this.selectedStateLabel = stateLabel;\n    // not currently supported to limit search by stateId\n    // this.doSearch(stateId);\n  }\n\n  // handle search app selection\n  public handleSearchAppSelection = (application: CaseType) => {\n    this.selectedApp = application;\n    this.doSearch();\n  }\n\n  // clear search results\n  public clearResults = () => {\n    this.searchString = '';\n    this.selectedStateId = undefined;\n    this.selectedStateLabel = undefined;\n    this.doSearch();\n  }\n\n  public forceSearch = () => {\n    this.forcedSearch = true;\n    this.liveapps.caseSearchEntries(this.searchBox.nativeElement.value, this.sandboxId, this.selectedApp.applicationId, this.selectedApp.id, true, 0, 1000, null).subscribe(\n      results => {\n        this.foundRefs.emit(results);\n      }\n    );\n  }\n\n  public doSearch = (stateId?: number) => {\n    this.forcedSearch = false;\n    this.searchBox.nativeElement.value = '';\n    const result = new CaseSearchResults().deserialize({ caserefs: [], searchString: '' });\n    this.foundRefs.emit(result);\n    this.searchTerm$ = new Subject<string>();\n    this.searchTerm$.subscribe(next => {\n      this.searchString = next;\n      return next;\n    })\n    this.searchValue = this.searchTerm$.asObservable();\n    if (this.selectedApp.applicationId && this.selectedApp.id && this.sandboxId) {\n      const skip = 0;\n      const top = 1000;\n      // Note: The API limits searches to 1000 items\n      // The service is configured to optimize performance by only returning case references at this stage\n      // The case details will only be loaded when the item is rendered (for example in the case-list component)\n      // Any case list component should use cdk virtual scroll to ensure 1000 case details are not loaded in one go\n      // (from the API or to the DOM)\n      this.liveapps.caseSearch(this.searchTerm$, this.sandboxId, this.selectedApp.applicationId, this.selectedApp.id, skip, top, stateId ? stateId : null)\n        .subscribe(results => {\n          this.foundRefs.emit(results);\n        });\n    }\n  }\n\n}\n","<div fxLayout=\"row\" fxLayout=\"center center\" style=\"max-width: 700px; width: 100%;\">\n  <div class=\"tcs-search-box\" fxlayout=\"row\" fxLayoutAlign=\"space-around center\" fxFlex>\n    <tcla-live-apps-applications fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"tcs-search-application-selector\" [appIds]=\"appIds\" [sandboxId]=\"sandboxId\" [selectFirstApp]=\"true\" (selection)=\"handleSearchAppSelection($event)\"></tcla-live-apps-applications>\n    <div class=\"tcs-search-input-container\" fxFlex>\n      <!-- free search by state with state filter currently not supported -->\n      <!--div class=\"tcs-state-filter-marker\" *ngIf=\"selectedStateLabel\" fxLayout=\"row\">[<div class=\"tcs-type-filter-text-highlight\">{{selectedStateLabel}}</div>]&nbsp;</div-->\n      <input #searchBox class=\"tcs-search-input\" placeholder=\"{{ selectedApp.applicationName ? 'Search within ' + selectedApp.applicationName + ' cases' : 'Select a case type to search cases' }}\" (keyup)=\"searchTerm$.next($event.target.value)\" [disabled]=\"!selectedApp.applicationId\" fxFlex>\n      <div fxLayoutAlign=\"center end\">\n        <mat-icon *ngIf=\"forcedSearch || searchString\" class=\"tcs-icon tcs-close-icon\" svgIcon=\"tcs-close-icon\" (click)=\"clearResults()\"></mat-icon>\n        <mat-icon *ngIf=\"!forcedSearch && !searchString\" class=\"tcs-icon tcs-search-icon\" svgIcon=\"tcs-search-icon\" (click)=\"forceSearch()\"></mat-icon>\n      </div>\n    </div>\n  </div>\n</div>\n","import {Deserializable} from '@tibco-tcstk/tc-core-lib';\nimport {CardConfig, CaseTypeState} from './liveappsdata';\n\nexport class CaseCardConfig implements Deserializable {\n  states: CaseTypeState[];\n  cardConfig: CardConfig;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class StateColorMapRec implements Deserializable {\n  state: string;\n  color: string;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class StateColorMap implements Deserializable {\n  stateColorRecs: StateColorMapRec[];\n  caseTypeColor: string;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n","import {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {LiveAppsService} from '../services/live-apps.service';\nimport {Observable, of, ReplaySubject} from 'rxjs';\nimport {Claim, TcCoreCommonFunctions, TcCoreConfigService, UiAppIdConfig} from '@tibco-tcstk/tc-core-lib';\nimport {catchError, map, switchMap, tap} from 'rxjs/operators';\nimport {CaseType, CaseTypesList, CaseTypeState, Process, UserInfo} from '../models/liveappsdata';\nimport {Location} from '@angular/common';\nimport {Group, Groups} from '../models/tc-groups-data';\nimport {AppConfig} from '../models/appConfig';\n\nexport const maxGroups = 1000;\nexport const maxUsers = 1000;\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TcAppDefinitionService {\n\n  // This service provides access to common Live Apps definitions such as claims and types data\n\n  // uiAppId config\n  private _uiAppId = new ReplaySubject<string>(1);\n  private currentUiAppId: string = undefined;\n\n  // application config\n  private _appConfig = new ReplaySubject<AppConfig>(1);\n  private currentAppConfig: AppConfig = undefined;\n\n  private maxCaseTypes = 1000;\n  // claims\n  private _claims = new ReplaySubject<Claim>(1);\n  private currentClaim: Claim = undefined;\n  private isAdminUser: boolean;\n  readonly _claims$ = this._claims.asObservable();\n\n  // types\n  private _caseTypes = new ReplaySubject<CaseType[]>(1);\n  private currentCaseTypes: CaseType[] = undefined;\n  readonly _caseTypes$ = this._caseTypes.asObservable();\n\n  // users\n  private _users = new ReplaySubject<UserInfo[]>();\n  private currentUsers: UserInfo[] = undefined;\n\n  // groups\n  private _groups = new ReplaySubject<Group[]>(1);\n  private currentGroups: Group[] = undefined;\n  private currentUsersGroups: Group[] = undefined;\n  readonly _groups$ = this._groups.asObservable();\n\n  constructor(private http: HttpClient, private liveAppsService: LiveAppsService, private location: Location, private tcConfig: TcCoreConfigService) {\n  }\n\n  private getUiAppId(): Observable<UiAppIdConfig> {\n    return this.http.get('assets/config/uiAppId.json').pipe(\n      map((config: UiAppIdConfig) => config)\n    );\n  }\n\n  private getConfig(): Observable<AppConfig> {\n    return this.http.get('assets/config/appConfig.json').pipe(\n      map((config: AppConfig) => config)\n    );\n  }\n\n  private getCaseTypeData(sandboxId: number): Observable<CaseTypesList> {\n    return this.liveAppsService.getCaseTypes(sandboxId, undefined, this.maxCaseTypes, true).pipe(\n      tap(resTypes => {\n        // add formTags\n        // Format of tag is <applicationName>.<applicationInternalName>.<processType>.<processName>\n        resTypes.casetypes.map((type: CaseType) => {\n          if (type.creators) {\n            type.creators.map((process: Process) => {\n              process.formTag = type.applicationName + '.' + type.applicationInternalName + '.creator.' + process.name;\n            });\n          }\n          if (type.actions) {\n            type.actions.map((process: Process) => {\n              process.formTag = type.applicationName + '.' + type.applicationInternalName + '.action.' + process.name;\n            });\n          }\n        });\n      })\n    );\n  }\n\n  private getUsersData(sandboxId: number): Observable<UserInfo[]> {\n    return this.liveAppsService.getUsers(sandboxId, maxUsers).pipe(\n      map((users: UserInfo[]) => {\n        return users;\n      })\n    );\n  }\n\n  private getGroupsData(sandboxId: number): Observable<Group[]> {\n    return this.liveAppsService.getGroups(sandboxId, maxGroups, false).pipe(\n      map((groups: Groups) => {\n        return groups.groups;\n      })\n    );\n  }\n\n  public loadFormResources = () => {\n    if (!this.tcConfig.getConfig().disableFormLibs) {\n      const frameworkJS = document.createElement('script');\n      frameworkJS.id = 'frameworkJS';\n      frameworkJS.src = '/apps/app-cdn/tibco/framework_ext/1.0.0/framework_ext.nocache.js';\n      frameworkJS.type = 'text/javascript';\n      frameworkJS.async = true;\n      frameworkJS.charset = 'utf-8';\n      document.getElementsByTagName('head')[0].appendChild(frameworkJS);\n\n      const elementsEs5JS = document.createElement('script');\n      elementsEs5JS.id = 'elementsEs5JS';\n      elementsEs5JS.src = '/apps/app-cdn/tibco/elements/elements-es5.js';\n      // elementsEs5JS.src = TcCoreCommonFunctions.prepareUrlForStaticResource(this.location, 'assets/forms/elements-es5.js');\n      elementsEs5JS.noModule = true;\n      elementsEs5JS.defer = true;\n      elementsEs5JS.async = true;\n      elementsEs5JS.charset = 'utf-8';\n      document.getElementsByTagName('head')[0].appendChild(elementsEs5JS);\n\n      const elementsEs2015JS = document.createElement('script');\n      elementsEs2015JS.id = 'elementsEs2015JS';\n      elementsEs2015JS.src = '/apps/app-cdn/tibco/elements/elements-es2015.js';\n      // elementsEs2015JS.src = TcCoreCommonFunctions.prepareUrlForStaticResource(this.location, 'assets/forms/elements-es2015.js');\n      elementsEs2015JS.type = 'module';\n      elementsEs2015JS.async = true;\n      elementsEs2015JS.charset = 'utf-8';\n      document.getElementsByTagName('head')[0].appendChild(elementsEs2015JS);\n\n      const elementsCSS = document.createElement('link');\n      elementsCSS.id = 'elementsCSS';\n      elementsCSS.href = '/apps/app-cdn/tibco/elements/elements.css';\n      // elementsCSS.href = TcCoreCommonFunctions.prepareUrlForStaticResource(this.location, 'assets/forms/elements.css');\n      elementsCSS.rel = 'stylesheet';\n      elementsCSS.charset = 'utf-8';\n      document.getElementsByTagName('head')[0].appendChild(elementsCSS);\n\n      const fontCSS = document.createElement('link');\n      fontCSS.id = 'fontCSS';\n      fontCSS.href = '/apps/app-cdn/tibco/fonts/Source_Sans_Pro/font.css';\n      fontCSS.rel = 'stylesheet';\n      fontCSS.charset = 'utf-8';\n      document.getElementsByTagName('head')[0].appendChild(fontCSS);\n\n      const TfMaterial = document.createElement('link');\n      TfMaterial.id = 'tfMaterial'\n      TfMaterial.href = '/apps/app-cdn/tibco/framework_ext/1.0.0/TfMaterial.min.css';\n      TfMaterial.rel = 'stylesheet';\n      TfMaterial.charset = 'utf-8';\n      document.getElementsByTagName('head')[0].appendChild(TfMaterial);\n    }\n  }\n\n  public refresh(): Observable<any> {\n    const claims$ = this.liveAppsService.getClaims().pipe(\n      map(claimVal => {\n        claimVal.sandboxes.forEach(sandbox => {\n          if (sandbox.type === 'Production') {\n            claimVal.primaryProductionSandbox = sandbox;\n          }\n        });\n        const adminGrp = claimVal.primaryProductionSandbox.groups.find(grp => grp.type === 'Administrator');\n        this.isAdminUser = adminGrp ? true : false;\n        // only load OOTB form lib if not using oauth\n        // const oauthKey = localStorage.getItem((this.tcConfig.getConfig().oAuthLocalStorageKey));\n        // if (!oauthKey) {\n          /* no ootb forms if using oauth */\n        if (claimVal && claimVal.primaryProductionSandbox) {\n          this.loadFormResources();\n        }\n        // }\n        return claimVal;\n      })\n    );\n\n    // initialize all data\n    return claims$.pipe(\n      tap((response: Claim) => {\n        this.currentClaim = response;\n        this._claims.next(response);\n      }),\n      switchMap((response: Claim) => {\n        return this.getUiAppId().pipe(\n          map((appIdConfig: UiAppIdConfig) => {\n            this.currentUiAppId = appIdConfig.uiAppId;\n            this._uiAppId.next(appIdConfig.uiAppId);\n            return response;\n          }),\n          catchError(error => {\n            // continue if no config file\n            return of(this.currentClaim);\n          })\n        );\n      }),\n      switchMap((response: Claim) => {\n        return this.getConfig().pipe(\n          map(config => {\n            this.currentAppConfig = config;\n            this._appConfig.next(config);\n            return response;\n          }),\n          catchError(error => {\n            // continue if no config file\n            return of(this.currentClaim);\n          })\n        );\n      }),\n      switchMap((response: Claim) => {\n        return this.getCaseTypeData(Number(response.primaryProductionSandbox.id)).pipe(\n          map(resTypes => {\n            this.currentCaseTypes = resTypes.casetypes;\n            this._caseTypes.next(resTypes.casetypes);\n            return response;\n          })\n        );\n      }),\n      switchMap((response: Claim) => {\n        return this.getUsersData(Number(response.primaryProductionSandbox.id)).pipe(\n          map(users => {\n              this.currentUsers = users;\n              this._users.next(users);\n              return response;\n            }\n          )\n        );\n      }),\n      switchMap((response: Claim) => {\n        return this.getGroupsData(Number(response.primaryProductionSandbox.id)).pipe(\n          map(resGroups => {\n            this.currentGroups = resGroups;\n            this._groups.next(resGroups);\n            // calculate users groups\n            this.currentUsersGroups = [];\n            this.currentGroups.forEach((group: Group) => {\n              // look to see if we are a member\n              const idx = this.claims.primaryProductionSandbox.groups.findIndex(grp => {\n                return grp.id === group.id;\n              });\n              if (idx !== -1) {\n                // add it as we are a member\n                this.currentUsersGroups.push(group);\n              }\n            })\n            return response;\n          })\n        );\n      }),\n      catchError(err => {\n        // todo: currently on error - I am allowing the page to continue to load page so that login can be displayed\n        // this could cause an issue with other resolvers failing.\n        return of(undefined);\n      })\n    );\n  }\n\n  // public getters\n\n  // uiAppId\n  public get uiAppId() {\n    return this.currentUiAppId;\n  }\n\n  // config\n  public get appConfig() {\n    return this.currentAppConfig;\n  }\n\n  // claims\n  public get claims$() {\n    return this._claims.asObservable();\n  }\n\n  public get isAdmin() {\n    return this.isAdminUser;\n  }\n\n  public get claims() {\n      return this.currentClaim;\n  }\n\n  public get sandboxId() {\n    return Number(this.currentClaim.primaryProductionSandbox.id);\n  }\n\n  public get userId() {\n    return this.currentClaim.username;\n  }\n\n  public get email() {\n    return this.currentClaim.email;\n  }\n\n  public get firstName() {\n    return this.currentClaim.firstName;\n  }\n\n  public get lastName() {\n    return this.currentClaim.lastName;\n  }\n\n  public get subscriptionId() {\n    return this.currentClaim.subscriptionId;\n  }\n\n  // users\n  public get users() {\n    return this.currentUsers;\n  }\n\n  public getUserById(id: string) {\n    return this.currentUsers.find((user: UserInfo) => {\n      return user.id === id;\n    });\n  }\n\n  public getUserByUserName(username: string) {\n    return this.currentUsers.find((user: UserInfo) => {\n      return user.username === username;\n    });\n  }\n\n  public getUserByEmail(email: string) {\n    return this.currentUsers.find((user: UserInfo) => {\n      return user.email === email;\n    });\n  }\n\n  // groups\n  public get groups() {\n    return this.currentGroups;\n  }\n\n  public get usersGroups() {\n    return this.currentUsersGroups;\n  }\n\n  public isMemberOfByName(name: string): boolean {\n    // note: names of system groups are prefixed with 'System: '\n    const idx = this.currentUsersGroups.findIndex((grp: Group) => {\n      return grp.name.toLowerCase() === name.toLowerCase();\n    });\n    return (idx !== -1);\n  }\n\n  public isMemberOfById(id: string): boolean {\n    const idx = this.currentUsersGroups.findIndex((grp: Group) => {\n      return grp.id === id;\n    });\n    return (idx !== -1);\n  }\n\n  // caseTypes\n  public get caseTypes$() {\n    return this._caseTypes.asObservable();\n  }\n\n  public get caseTypes(): CaseType[] {\n    return this.currentCaseTypes;\n  }\n\n  public getCaseTypeByAppId(appId: string): CaseType {\n    return this.currentCaseTypes.find((ctype: CaseType) => {\n      return ctype.applicationId === appId && ctype.id === '1';\n    });\n  }\n\n  public getCaseTypeByName(name: string): CaseType {\n    return this.currentCaseTypes.find((ctype: CaseType) => {\n      return ctype.name === name && ctype.id === '1';\n    });\n  }\n\n  public getCaseTypeByApplicationName(applicationName: string): CaseType {\n    return this.currentCaseTypes.find((ctype: CaseType) => {\n      return ctype.applicationName === applicationName && ctype.id === '1';\n    });\n  }\n\n  public getCaseTypeByInternalName(applicationInternalName: string): CaseType {\n    return this.currentCaseTypes.find((ctype: CaseType) => {\n      return ctype.applicationInternalName === applicationInternalName && ctype.id === '1';\n    });\n  }\n\n  public getStateByName(appId: string, name: string): CaseTypeState {\n    return this.getCaseTypeByAppId(appId).states.find((state: CaseTypeState) => {\n      return state.value === name;\n    });\n  }\n\n  public getStateById(appId: string, id: string): CaseTypeState {\n    return this.getCaseTypeByAppId(appId).states.find((state: CaseTypeState) => {\n      return state.id === id;\n    });\n  }\n\n  public getCreatorById(appId: string, id: string): Process {\n    return this.getCaseTypeByAppId(appId).creators.find((creator: Process) => {\n      return creator.id === id;\n    });\n  }\n\n  public getCreatorByName(appId: string, name: string): Process {\n    return this.getCaseTypeByAppId(appId).creators.find((creator: Process) => {\n      return creator.name === name;\n    });\n  }\n\n  public getCreatorByFormTag(appId: string, formTag: string): Process {\n    return this.getCaseTypeByAppId(appId).creators.find((creator: Process) => {\n      return creator.formTag === formTag;\n    });\n  }\n\n  public getActionById(appId: string, id: string): Process {\n    return this.getCaseTypeByAppId(appId).actions.find((action: Process) => {\n      return action.id === id;\n    });\n  }\n\n  public getActionByName(appId: string, name: string): Process {\n    return this.getCaseTypeByAppId(appId).actions.find((action: Process) => {\n      return action.name === name;\n    });\n  }\n\n  public getActionByFormTag(appId: string, formTag: string): Process {\n    return this.getCaseTypeByAppId(appId).actions.find((action: Process) => {\n      return action.formTag === formTag;\n    });\n  }\n\n}\n\n","import {Injectable} from '@angular/core';\nimport {\n  SharedStateContent,\n  SharedStateEntry,\n  SharedStateList,\n  TcCoreCommonFunctions,\n  TcSharedStateService,\n  UiAppConfig\n} from '@tibco-tcstk/tc-core-lib';\nimport {forkJoin, Observable, of, throwError} from 'rxjs';\nimport {ApiResponseError, CardConfig, CaseInfo, CaseTypeState, CaseTypeStatesList, IconMap, UserInfo} from '../models/liveappsdata';\nimport {LiveAppsService} from './live-apps.service';\nimport {CaseCardConfig, StateColorMap, StateColorMapRec} from '../models/tc-case-card-config';\nimport {catchError, flatMap, map, mergeMap, tap} from 'rxjs/operators';\nimport {flush} from '@angular/core/testing';\nimport {HttpClient} from '@angular/common/http';\nimport {Location} from '@angular/common';\nimport {TcAppDefinitionService} from './tc-app-definition.service';\n\nexport const DEFAULT_COLORS: string[] = [\n  '#3E94C0', '#49B3D3', '#76C6CF', '#A9DACD', '#DCECC9',\n  '#FFAB40', '#FFD180', '#FFE0B2', '#FFF3E0', '#81D4FA',\n  '#B3E5FC', '#8AF2F2', '#91A3AE', '#CED8DD', '#EBEFF1',\n  '#6A1B9A', '#AD1457', '#EC407A', '#C4469E', '#BA68C8',\n  '#8C9EFF', '#FF8A80', '#546F7A', '#263237'\n];\n\nexport const DEFAULT_TYPE_COLOR = '#8197c0';\n\nexport const DEFAULT_STATE_COLOR = '#8197c0';\n\nexport const GENERIC_STATE_ICON_SVG = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\">\\n' +\n  '    <path fill=\"<DYNAMICFILL>\" fill-rule=\"nonzero\" d=\"M.045 1.154h13.91v2.133H.045V1.154zM.8 4.75h12.364v8.19c0 .596-.487 1.083-1.082 1.083h-10.2A1.085 1.085 0 0 1 .8 12.94V4.75zm7.978 2.447V5.776H5.222v1.421h3.556z\"/>\\n' +\n  '</svg>\\n';\n\nexport const GENERIC_CASETYPE_ICON_SVG = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 48 48\">\\n' +\n  '    <path fill=\"<DYNAMICFILL>\" fill-rule=\"evenodd\" d=\"M42 42H6c-1.103 0-2-.898-2-2V26.61c4.43 2.623 10.208 3.96 15.729 4.422v1.504c0 1.326.948 2.4 2.118 2.4h4.764c1.17 0 2.118-1.074 2.118-2.4V31.04c6.16-.503 11.505-2.008 15.271-4.264v13.223c0 1.103-.897 2-2 2zM6 15.995h36c1.103 0 2 .898 2 2v3.583c-2.798 2.727-8.447 4.664-15.271 5.268v-1.511c0-1.326-.948-2.4-2.117-2.4h-4.765c-1.17 0-2.118 1.074-2.118 2.4v1.51c-6.651-.6-12.41-2.518-15.729-5.348v-3.501c0-1.103.897-2 2-2zm10.655-8.89c0-.063.023-.098.016-.106l14.944-.011s.04.033.04.117v4.89h-15v-4.89zM42 11.996h-6.345v-4.89C35.655 4.842 33.861 3 31.657 3H16.653c-2.204 0-3.998 1.842-3.998 4.106v4.89H6c-3.308 0-6 2.692-6 6V40c0 3.31 2.692 6 6 6h36c3.309 0 6-2.69 6-6V17.997c0-3.31-2.691-6.001-6-6.001z\"/>\\n' +\n  '</svg>\\n';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TcCaseCardConfigService {\n\n  constructor(private http: HttpClient, private liveAppsService: LiveAppsService, private sharedStateService: TcSharedStateService, private appDefinitionService: TcAppDefinitionService, private location: Location) {\n  }\n\n  public createCardConfig(sandboxId: number, appId: string, uiAppId: string): Observable<string> {\n    const ssName = uiAppId + '.' + appId + '.stateconfig.tibcolabs.client.context.PUBLIC';\n    const content: SharedStateContent = new SharedStateContent();\n    content.json = TcCoreCommonFunctions.escapeString(JSON.stringify({}));\n    return this.sharedStateService.createSharedState(ssName, 'PUBLIC', '', sandboxId, undefined, undefined, undefined, content)\n      .pipe(\n        map(value => {\n            return value;\n          }\n        )\n      );\n  }\n\n  public updateCardConfig(sandboxId: number, appId: string, uiAppId: string, config: CardConfig, id: string): Observable<CardConfig> {\n    const ssName = uiAppId + '.' + appId + '.stateconfig.tibcolabs.client.context.PUBLIC';\n    const content: SharedStateContent = new SharedStateContent();\n    content.json = TcCoreCommonFunctions.escapeString(JSON.stringify(config));\n    const entry: SharedStateEntry = new SharedStateEntry();\n    entry.content = content;\n    entry.sandboxId = sandboxId;\n    entry.name = ssName;\n    entry.type = 'PUBLIC';\n    entry.id = id;\n    const ssList: SharedStateList = new SharedStateList();\n    ssList.sharedStateEntries = [];\n    ssList.sharedStateEntries.push(entry);\n    return this.sharedStateService.updateSharedState(ssList.sharedStateEntries)\n      .pipe(\n        flatMap(value => {\n          // flush the cache and return new value\n          // return new CardConfig().deserialize((JSON.parse(value.sharedStateEntries[0].content.json)));\n          return this.getCardConfig(uiAppId, appId, true, true);\n        })\n      );\n  }\n\n  public createNewCardConfig(states: CaseTypeState[], sandboxId: number, appId: string, uiAppId: string, caseTypeId: string, defaultCaseTypeColor: string, defaultCaseTypeIcon: string, defaultStateColor: string, defaultStateIcon: string): Observable<CaseCardConfig> {\n    // create new config and return it\n    const newConfig$ = this.createCardConfig(sandboxId, appId, uiAppId);\n    const updatedConfig$ = newConfig$.pipe(\n      flatMap(id => {\n        const stateMap: IconMap[] = [];\n        // one record for the case type icon config\n        stateMap.push(new IconMap(true, caseTypeId, defaultCaseTypeColor, defaultCaseTypeIcon));\n        states.forEach(state => {\n          stateMap.push(new IconMap(false, state.value, defaultStateColor, defaultStateIcon));\n        });\n        const newCardConfig = new CardConfig().deserialize({id: id, useCaseTypeColor: true, stateMap: stateMap});\n        return this.updateCardConfig(sandboxId, appId, uiAppId, newCardConfig, id).pipe(\n          tap(config => {\n            // trigger update of the cache\n            this.getCardConfig(uiAppId, appId, true, true);\n          }),\n          map(newcard => {\n            return new CaseCardConfig().deserialize(\n              {states: states, cardConfig: newcard}\n            );\n          })\n        );\n      })\n    );\n    return updatedConfig$;\n  }\n\n  public getCaseCardConfig(sandboxId: number, appId: string, uiAppId: string, caseTypeId: string, defaultCaseTypeColor: string, defaultCaseTypeIcon: string, defaultStateColor: string, defaultStateIcon: string): Observable<CaseCardConfig> {\n\n    const states = this.appDefinitionService.getCaseTypeByAppId(appId).states;\n    const cardConfig$ = this.getCardConfig(uiAppId, appId, true, false);\n    return cardConfig$.pipe(\n      flatMap((config: CardConfig) => {\n          if (config) {\n            const cardConfig = new CaseCardConfig().deserialize(\n              {states: states, cardConfig: config}\n            );\n            return of(cardConfig);\n          } else {\n            // create new one\n            return this.createNewCardConfig(states, sandboxId, appId, uiAppId, caseTypeId, defaultCaseTypeColor, defaultCaseTypeIcon, defaultStateColor, defaultStateIcon).pipe(\n              map((newCardConfig: CaseCardConfig) => {\n                return newCardConfig;\n              })\n            );\n          }\n        }\n      )\n    );\n  }\n\n  public updateCaseCardConfig(sandboxId: number, appId: string, uiAppId: string, updatedConfig: CaseCardConfig): Observable<CaseCardConfig> {\n    return this.updateCardConfig(sandboxId, appId, uiAppId, updatedConfig.cardConfig, updatedConfig.cardConfig.id).pipe(\n      map(cardconfig => {\n        updatedConfig.cardConfig = cardconfig;\n        // remember to flush cache\n        this.getCardConfig(uiAppId, appId, true, true).subscribe();\n        return updatedConfig;\n      })\n    );\n  }\n\n  public getCardConfig(uiAppId: string, appId: string, useCache: boolean, flushCache: boolean): Observable<CardConfig> {\n    const ssName = uiAppId + '.' + appId + '.stateconfig.tibcolabs.client.context.PUBLIC';\n    return this.sharedStateService.getSharedState(ssName, 'PUBLIC', useCache, flushCache).pipe(\n      map(value => {\n          if (value.sharedStateEntries.length > 0) {\n            const ssresult = new CardConfig().deserialize(JSON.parse(value.sharedStateEntries[0].content.json));\n            ssresult.id = value.sharedStateEntries[0].id;\n            return ssresult;\n          } else {\n            return undefined;\n          }\n        }\n      )\n    );\n  }\n\n  public getStateColorInfo(appId: string, uiAppId: string): Observable<StateColorMap> {\n    return this.getCardConfig(uiAppId, appId, true, false).pipe(\n      map(val => {\n        if (val) {\n          const config: CardConfig = val;\n          const stateColorMap = new StateColorMap();\n          stateColorMap.stateColorRecs = [];\n          config.stateMap.forEach((stateMapRec) => {\n            const stateColorMapRec = new StateColorMapRec().deserialize({state: stateMapRec.state, color: stateMapRec.fill});\n            if (stateMapRec.isCaseType) {\n              stateColorMap.caseTypeColor = stateMapRec.fill;\n            }\n            stateColorMap.stateColorRecs.push(stateColorMapRec);\n          });\n          return stateColorMap;\n        } else {\n          return new StateColorMap();\n        }\n      })\n    );\n  }\n\n  public getColorForState(appId: string, uiAppId: string, state: string): Observable<string> {\n    return this.getCardConfig(uiAppId, appId, true, false).pipe(\n      map(val => {\n        const stateMap = val.stateMap.find((stateRec) => {\n          return stateRec.state === state;\n        });\n        return (stateMap ? stateMap.fill : undefined);\n      })\n    );\n  }\n\n  public parseCaseInfo(caseinfo: CaseInfo, sandboxId: number, appId: string, typeId: string, uiAppId): Observable<CaseInfo> {\n    // in order to get all the info we need we actually need to call up to 4 observables in parallel\n    const caseInfo$ = this.liveAppsService.getCaseTypeBasicInfo(sandboxId, appId, typeId, 100).pipe(\n      map(val => caseinfo.metadata.applicationLabel = val.label)\n    );\n    const cardConfig$ = this.getCardConfig(uiAppId, appId, true, false).pipe(\n      map(val => {\n          const stateId = caseinfo.summaryObj.state;\n          let stateConfig: IconMap;\n          if (val !== undefined && val.stateMap) {\n            val.stateMap.forEach((state) => {\n              if (state.state === stateId) {\n                stateConfig = state;\n                caseinfo.metadata.stateColor = stateConfig.fill;\n                caseinfo.metadata.stateIcon = stateConfig.icon;\n              }\n              if (state.isCaseType) {\n                stateConfig = state;\n                caseinfo.metadata.caseTypeColor = stateConfig.fill;\n                caseinfo.metadata.caseTypeIcon = stateConfig.icon;\n              }\n              caseinfo.metadata.useCaseTypeColor = val.useCaseTypeColor ? val.useCaseTypeColor : false;\n            });\n          }\n          // defaults\n          if (!caseinfo.metadata.stateColor) {\n            caseinfo.metadata.stateColor = DEFAULT_STATE_COLOR;\n          }\n          if (!caseinfo.metadata.stateIcon) {\n            caseinfo.metadata.stateIcon = 'assets/icons/ic-generic-state.svg';\n          }\n          if (!caseinfo.metadata.caseTypeColor) {\n            caseinfo.metadata.caseTypeColor = DEFAULT_TYPE_COLOR;\n          }\n          if (!caseinfo.metadata.caseTypeIcon) {\n            caseinfo.metadata.caseTypeIcon = 'assets/icons/ic-generic-casetype.svg';\n          }\n        }\n      ));\n    const forkJoinArray = [caseInfo$, cardConfig$];\n    let creatorInfo$;\n    let modifiedInfo$;\n    if (caseinfo.metadata.createdBy) {\n      creatorInfo$ = this.liveAppsService.getUserInfo(caseinfo.metadata.createdBy).pipe(\n        map(val => caseinfo.metadata.createdByDetails = val ? val : new UserInfo())\n      );\n      forkJoinArray.push(creatorInfo$);\n    } else {\n      caseinfo.metadata.createdByDetails = new UserInfo();\n    }\n    if (caseinfo.metadata.modifiedBy) {\n      modifiedInfo$ = this.liveAppsService.getUserInfo(caseinfo.metadata.modifiedBy).pipe(\n        map(val => caseinfo.metadata.modifiedByDetails = val ? val : new UserInfo())\n      );\n      forkJoinArray.push(modifiedInfo$);\n    } else {\n      caseinfo.metadata.modifiedByDetails = new UserInfo();\n    }\n\n    // call all the observables at once and return the Observable to the parsed CaseInfo\n    return forkJoin(forkJoinArray).pipe(\n      map(resultArr => {\n        return caseinfo;\n      })\n    );\n  }\n\n  public getCaseWithSummary(caseRef: string, sandboxId: number, uiAppId: string): Observable<CaseInfo> {\n    // get the base caseinfo from the API, then call parseCaseInfo to create an Observable with all the extra data we need\n    const url = '/case/v1/cases/' + caseRef + '/' + '?$sandbox=' + sandboxId + '&$select=cr, uc, m, s';\n\n    return this.http.get(url).pipe(\n      mergeMap(caseinfo => {\n          const caseinf = new CaseInfo().deserialize(caseinfo);\n          if (caseinf.caseReference === undefined) {\n            // case is likely no longer visible to this user so handle as deleted\n            return of(new CaseInfo().deserialize({deleted: true}));\n          }\n          return this.parseCaseInfo(caseinf, sandboxId, caseinf.metadata.applicationId, caseinf.metadata.typeId, uiAppId);\n        }\n      ),\n      catchError(err => {\n        if (err.error.errorCode === 'CM_CASEREF_NOTEXIST') {\n          // case deleted\n          return of(new CaseInfo().deserialize({deleted: true}));\n        }\n        return throwError(err);\n      })\n    );\n  }\n}\n","import {Component, Input, OnChanges, OnDestroy, OnInit, SecurityContext, SimpleChanges} from '@angular/core';\nimport {Subject} from 'rxjs';\nimport {DomSanitizer, SafeHtml} from '@angular/platform-browser';\nimport {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';\nimport {map, take, takeUntil} from 'rxjs/operators';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {Location} from '@angular/common';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {TcCoreCommonFunctions} from '@tibco-tcstk/tc-core-lib';\nimport {GENERIC_CASETYPE_ICON_SVG, GENERIC_STATE_ICON_SVG} from '../../services/tc-case-card-config.service';\n\n/**\n * renders a single icon for a state\n *\n * ![alt-text](../live-apps-state-icon.png \"\")\n *\n *@example <tcla-live-apps-state-icon></tcla-live-apps-state-icon>\n */\n\n@Component({\n  selector: 'tcla-live-apps-state-icon',\n  templateUrl: './live-apps-state-icon.component.html',\n  styleUrls: ['./live-apps-state-icon.component.css']\n})\nexport class LiveAppsStateIconComponent extends LiveAppsComponent implements OnInit, OnChanges {\n  @Input() id: string;\n  @Input() iconPath: string;\n  @Input() color: string;\n  @Input() iconHostURL: string;\n  @Input() appId: string;\n\n  public iconSVG: SafeHtml;\n  public svgcontents: string = undefined;\n\n  constructor(protected sanitizer: DomSanitizer, protected http: HttpClient, protected liveapps: LiveAppsService, protected location: Location) {\n    super();\n  }\n\n  public refillSVG = function(fill) {\n    const updatedsvg = this.svgcontents.replace('fill=\"<DYNAMICFILL>\"', 'fill=\"' + fill + '\"');\n    const newval = this.sanitizer.bypassSecurityTrustHtml(updatedsvg);\n    this.iconSVG = newval;\n  };\n\n  public refresh = (icon, fill) => {\n    let url: string;\n    if (icon && icon !== 'assets/icons/ic-generic-casetype.svg' && icon !== 'assets/icons/ic-generic-state.svg') {\n      if (icon.slice(0, 13) === 'assets/icons/') {\n        // if icon is in assets folder we need to prepare the Url\n        url = TcCoreCommonFunctions.prepareUrlForStaticResource(this.location, icon);\n      } else {\n        url = '/' + icon;\n      }\n      this.liveapps.getIconSVGText(url)\n        .pipe(\n          take(1),\n          takeUntil(this._destroyed$)\n        )\n        .subscribe(val => {\n            this.svgcontents = val;\n            val = val.toString().replace('fill=\"<DYNAMICFILL>\"', 'fill=\"' + fill + '\"');\n            const newval = this.sanitizer.bypassSecurityTrustHtml(val);\n            this.iconSVG = newval;\n          }\n          , error => {\n            console.log('Unable to retrieve icon: ' + error.errorMsg);\n          }\n        );\n    } else {\n      // use generic icon\n      let svgcontents: string;\n      if (icon === 'assets/icons/ic-generic-casetype.svg') {\n        svgcontents = GENERIC_CASETYPE_ICON_SVG;\n      } else {\n        svgcontents = GENERIC_STATE_ICON_SVG;\n      }\n      this.svgcontents = svgcontents;\n      svgcontents = svgcontents.replace('fill=\"<DYNAMICFILL>\"', 'fill=\"' + fill + '\"');\n      const newval = this.sanitizer.bypassSecurityTrustHtml(svgcontents);\n      this.iconSVG = newval;\n    }\n  }\n\n\n  ngOnInit() {\n    // this.refresh(this.iconPath, this.color);\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    if ((changes.iconPath && (changes.iconPath.currentValue !== changes.iconPath.previousValue)) || (changes.color && (changes.color.currentValue !== changes.color.previousValue))) {\n      this.refresh(this.iconPath, this.color);\n    }\n  }\n\n}\n","<div class=\"la-state-icon-svg\" [innerHtml]=\"iconSVG\" fxLayoutAlign=\"start center\"></div>\n","import {\n  AfterViewInit,\n  Component, ElementRef,\n  EventEmitter,\n  Input, OnChanges,\n  OnDestroy,\n  OnInit,\n  Output,\n  QueryList, SimpleChanges,\n  ViewChild,\n  ViewChildren,\n  ViewEncapsulation\n} from '@angular/core';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {CardConfig, CaseInfo, CaseRoute, Metadata} from '../../models/liveappsdata';\nimport {map, take, takeUntil} from 'rxjs/operators';\nimport {Subject} from 'rxjs';\nimport {DomSanitizer, Meta, SafeHtml} from '@angular/platform-browser';\nimport {LiveAppsStateIconComponent} from '../live-apps-state-icon/live-apps-state-icon.component';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {TcCaseCardConfigService} from '../../services/tc-case-card-config.service';\nimport {TcComponent, TcCoreCommonFunctions} from '@tibco-tcstk/tc-core-lib';\nimport {ActivatedRoute, Router} from '@angular/router';\n\n/**\n * Renders case summary cards\n *\n * ![alt-text](../live-apps-case-summary.png \"Image\")\n *\n * ![alt-text](../live-apps-case-summary-2.png \"Image\")\n *\n *@example <tcla-live-apps-case-summary></tcla-live-apps-case-summary>\n */\n\n@Component({\n  selector: 'tcla-live-apps-case-summary',\n  templateUrl: './live-apps-case-summary.component.html',\n  styleUrls: ['./live-apps-case-summary.component.css']\n})\n\nexport class LiveAppsCaseSummaryComponent extends LiveAppsComponent implements OnInit, OnChanges, AfterViewInit {\n  // The ViewChild declarations give access to components marked on the template so that I can call public functions like refresh\n  @ViewChild('caseStateIcon', {static: false}) stateIconComponent: LiveAppsStateIconComponent;\n  @ViewChild('caseTypeIcon', {static: false}) caseTypeIconComponent: LiveAppsStateIconComponent;\n  @ViewChild('componentDiv', {static: false}) componentDiv: ElementRef;\n\n  /**\n   * Whether to use static data (ie. when in app config box)\n   */\n  @Input() configMode: boolean;\n\n  /**\n   * static data for app config box\n   */\n  @Input() configModeColor: string;\n\n  /**\n   * static data for app config box\n   */\n  @Input() configModeIcon: string;\n\n  /**\n   * static data for app config box\n   */\n  @Input() configModeCaseTypeColor: string;\n\n  /**\n   * static data for app config box\n   */\n  @Input() configModeCaseTypeIcon: string;\n\n  /**\n   * static data for app config box\n   */\n  @Input() configModeAppTypeLabel: string;\n\n  /**\n   * whether to use case type color for header bar\n   */\n  @Input() configModeUseCaseTypeColor: boolean;\n\n  /**\n   * The case reference\n   */\n  @Input() caseRef: string;\n\n  /**\n   * Card Description\n   */\n  @Input() description: string;\n\n  /**\n   * Workitem Id\n   */\n  @Input() workitemId: string;\n\n  /**\n   * Workitem Name\n   */\n  @Input() workitemName: string;\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * case card format - list, card, miniCard, staticList (no click event)\n   */\n  @Input() displayType: string; // miniCard, card, list\n\n  /**\n   * Whether to display a border around the card\n   */\n  @Input() borderCard: boolean;\n\n  /**\n   * Whether to display the colored \"bar\" on a summary card (on left or top)\n   */\n  @Input() typeBar: boolean;\n\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * Text to highlight in the list of cases (normall text that was searched)\n   */\n  @Input() highlight: string;\n\n\n  /**\n   * ~event clickCase : Case clicked\n   * ~payload CaseRoute : CaseRoute object output when case is clicked so calling component can route accordingly - ie. route to case\n   */\n  @Output() clickCase: EventEmitter<CaseRoute> = new EventEmitter<CaseRoute>();\n\n  /**\n   * ~event deleted : Case Displayed has been deleted\n   * ~payload string : string emitted when summary tries to load data for a case that has been deleted (so it can be hidden.removed from - for example recent cases list)\n   */\n  @Output() deleted: EventEmitter<string> = new EventEmitter<string>();\n\n  public casedata: any;\n  public summary: any;\n  public summaryKeys: string[];\n  public summaryValues: string[];\n  public metadata: Metadata;\n  public appStateConfig: CardConfig;\n  public errorMessage;\n  public appId: string;\n  public typeId: string;\n  color: string;\n\n  public clickCaseAction = () => {\n    const caseRoute = new CaseRoute().deserialize({ caseRef: this.caseRef, appId: this.appId, typeId: this.typeId, workitemId: this.workitemId, workitemName: this.workitemName});\n    this.clickCase.emit(caseRoute);\n  }\n\n  public restylePreview = (icon, fill) => {\n    this.metadata.stateIcon = icon;\n    this.metadata.stateColor = fill;\n    this.stateIconComponent.refresh(icon, fill);\n  }\n\n  public restylePreviewCaseType = (icon, fill) => {\n    this.metadata.caseTypeIcon = icon;\n    this.metadata.caseTypeColor = fill;\n    this.caseTypeIconComponent.refresh(icon, fill);\n  }\n\n  public togglePreviewUseCaseTypeColor = (useCaseTypeColor: boolean) => {\n    this.metadata.useCaseTypeColor = useCaseTypeColor;\n  }\n\n  public refresh = () => {\n    if (!this.configMode) {\n      this.caseCardConfigService.getCaseWithSummary(this.caseRef, this.sandboxId, this.uiAppId)\n        .pipe(\n          take(1),\n          takeUntil(this._destroyed$),\n        ).subscribe(\n        caseinfo => {\n          if (!caseinfo.deleted) {\n            this.appId = caseinfo.metadata.applicationId;\n            this.typeId = caseinfo.metadata.typeId;\n            this.casedata = caseinfo.untaggedCasedataObj;\n            this.metadata = caseinfo.metadata;\n            this.summary = caseinfo.summaryObj;\n            this.summaryKeys = Object.keys(this.summary);\n            this.summaryValues = Object.values(this.summary);\n          } else {\n            // notify parent case has been deleted\n            this.deleted.emit(this.caseRef);\n          }\n        }, error => {\n          this.errorMessage = 'Error retrieving case data: ' + error.error.errorMsg;\n        });\n    } else {\n      const sampleCaseInfoJSON = '{\\n' +\n        '  \"untaggedCasedata\": \"\",\\n' +\n        '  \"summary\": \"{\\\\\"state\\\\\":\\\\\"Current State\\\\\",\\\\\"Summary1\\\\\":\\\\\"000001\\\\\",\\\\\"Summary2\\\\\":\\\\\"summary data\\\\\",\\\\\"Summary3\\\\\":\\\\\"summary data\\\\\"}\",\\n' +\n        '  \"metadata\": {\\n' +\n        '    \"createdBy\": \"-1\",\\n' +\n        '    \"creationTimestamp\": \"2018-11-27T08:40:03.404Z\",\\n' +\n        '    \"createdByDetails\": {\\n' +\n        '      \"username\": \"creator@mycompany.com\"\\n' +\n        '    },\\n' +\n        '    \"modifiedBy\": \"-1\",\\n' +\n        '    \"modificationTimestamp\": \"2018-11-27T08:40:22.010Z\",\\n' +\n        '    \"lockType\": \"1\",\\n' +\n        '    \"msLockExpiry\": \"1543308022271\",\\n' +\n        '    \"msSystemTime\": \"1545127800839\",\\n' +\n        '    \"applicationId\": \"934\",\\n' +\n        '    \"typeId\": \"1\"\\n' +\n        '  },\\n' +\n        '  \"summaryObj\": {\\n' +\n        '    \"state\": \"Current State\",\\n' +\n        '    \"Summary 1\": \"000001\",\\n' +\n        '    \"Summary 2\": \"The case name\",\\n' +\n        '    \"Summary 3\": \"The case description\"\\n' +\n        '  },\\n' +\n        '  \"untaggedCasedataObj\": {\\n' +\n        '  }\\n' +\n        '}'\n      const caseinfo = new CaseInfo().deserialize(JSON.parse(sampleCaseInfoJSON));\n      this.casedata = caseinfo.untaggedCasedataObj;\n      this.metadata = caseinfo.metadata;\n      this.summary = caseinfo.summaryObj;\n      this.summaryKeys = Object.keys(this.summary);\n      this.summaryValues = Object.values(this.summary);\n      this.metadata.stateIcon = this.configModeIcon;\n      this.metadata.stateColor = this.configModeColor;\n      this.metadata.caseTypeColor = this.configModeCaseTypeColor;\n      this.metadata.caseTypeIcon = this.configModeCaseTypeIcon;\n      this.metadata.applicationLabel = this.configModeAppTypeLabel;\n      this.metadata.useCaseTypeColor = this.configModeUseCaseTypeColor;\n    }\n  }\n\n  constructor(protected liveapps: LiveAppsService, protected caseCardConfigService: TcCaseCardConfigService, protected sanitizer: DomSanitizer) {\n    super();\n  }\n\n  ngAfterViewInit() {\n    super.ngAfterViewInit();\n    this.containerChanges$.subscribe();\n  }\n\n  ngOnInit() {\n    super.ngOnInit();\n    this.refresh();\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    if (changes.configModeAppTypeLabel && !changes.configModeAppTypeLabel.isFirstChange() && (changes.configModeAppTypeLabel.currentValue !== changes.configModeAppTypeLabel.previousValue)) {\n      this.refresh();\n    } else if (changes.configModelColor && changes.configModeColor.currentValue && !changes.configModeColor.isFirstChange()) {\n      this.refresh();\n    }\n  }\n\n}\n","<div #componentDiv fxFill>\n  <div *ngIf=\"displayType === 'miniCard'\" (click)=\"clickCaseAction()\" style=\"height: 100%\">\n    <mat-card *ngIf=\"configMode || (metadata && metadata.applicationLabel && metadata.createdByDetails && metadata.stateColor && metadata.stateIcon && metadata.caseTypeIcon && metadata.caseTypeColor)\" class=\"tcs-case-summary-mini-card\" [ngClass]=\"{border: borderCard}\" fxLayout=\"row\" fxLayoutAlign=\"start stretch\">\n      <div *ngIf=\"typeBar\" class=\"tcs-case-summary-mini-card-side-bar\" [style.background-color]=\"metadata.useCaseTypeColor ? metadata.caseTypeColor : metadata.stateColor\"></div>\n      <div class=\"tcs-case-summary-mini-card-right-content\" fxFlex>\n        <div class=\"tcs-case-summary-mini-card-left\" fxLayout=\"column\" fxLayoutAlign=\"space-between start\" fxFlex>\n          <div *ngIf=\"description\" class=\"tcs-case-summary-summary1-text mini\" matTooltip=\"{{description}}\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"above\">{{description | ellipsis: 45}}</div>\n          <div *ngIf=\"!description && summaryValues[1]\" class=\"tcs-case-summary-summary1-text mini\" matTooltip=\"{{summaryKeys[1]}}\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"above\">{{summaryValues[1]  | ellipsis: 45}}</div>\n          <div class=\"tcs-case-summary-creation-text\" fxLayout=\"row\">\n            <div *ngIf=\"metadata.createdByDetails\">Created {{metadata.creationTimestamp | durationSince}} by {{metadata.createdByDetails.username ? metadata.createdByDetails.username: 'system'}}</div>\n          </div>\n          <div *ngIf=\"summaryValues[2]\" class=\"tcs-case-summary-summary2-text mini\" matTooltip=\"{{summaryValues[2]}}\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\">{{summaryValues[2] | ellipsis: 45}}</div>\n          <div class=\"tcs-case-summary-mini-card-state-box\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n            <tcla-live-apps-state-icon #caseTypeIcon class=\"tcs-case-summary-state-icon\" [iconPath]=\"metadata.caseTypeIcon\" [color]=\"metadata.caseTypeColor\" matTooltipShowDelay=\"1000\" matTooltip=\"Case type: {{metadata.applicationLabel}}\"></tcla-live-apps-state-icon>\n            <div class=\"tcs-case-summary-state-text\" matTooltip=\"{{summaryValues[1]}}\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"above\">{{metadata.applicationLabel}}</div>\n            <div fxLayout=\"row\" fxLayoutAlign=\"end center\" fxFlex>\n              <tcla-live-apps-state-icon #caseStateIcon class=\"tcs-case-summary-state-icon\" [iconPath]=\"metadata.stateIcon\" [color]=\"metadata.stateColor\" [appId]=\"appId\"></tcla-live-apps-state-icon>\n              <div class=\"tcs-case-summary-state-text\">{{summaryValues[0]}}</div>\n            </div>\n          </div>\n        </div>\n        <div class=\"tcs-case-summary-mini-card-right\" fxLayout=\"row\" fxLayoutAlign=\"end center\" matTooltipPosition=\"left\" matTooltipShowDelay=\"1000\" matTooltip=\"Open Case\">\n          <mat-icon class=\"tcs-icon tcs-case-summary-details-icon\" svgIcon=\"tcs-summary-details-button\"></mat-icon>\n        </div>\n      </div>\n    </mat-card>\n  </div>\n\n  <div *ngIf=\"displayType === 'wiMiniCard'\" (click)=\"clickCaseAction()\" style=\"height: 100%\">\n    <mat-card *ngIf=\"configMode || (metadata && metadata.applicationLabel && metadata.createdByDetails && metadata.stateColor && metadata.stateIcon && metadata.caseTypeIcon && metadata.caseTypeColor)\" class=\"tcs-case-summary-mini-card\" [ngClass]=\"{border: borderCard}\" fxLayout=\"row\" fxLayoutAlign=\"start stretch\">\n      <div *ngIf=\"typeBar\" class=\"tcs-case-summary-mini-card-side-bar\" [style.background-color]=\"metadata.useCaseTypeColor ? metadata.caseTypeColor : metadata.stateColor\"></div>\n      <div class=\"tcs-case-summary-mini-card-right-content\" fxFlex>\n        <div class=\"tcs-case-summary-mini-card-left\" fxLayout=\"column\" fxLayoutAlign=\"space-between start\" fxFlex>\n          <div fxLayout=\"row\">\n            <div *ngIf=\"workitemId\" class=\"tcs-case-summary-summary1-text mini\">{{workitemId}}:&nbsp;</div>\n            <div *ngIf=\"description\" class=\"tcs-case-summary-summary1-text mini\" matTooltip=\"{{description}}\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"above\">{{description | ellipsis: 45}}</div>\n          </div>\n          <div class=\"tcs-case-summary-creation-text\" fxLayout=\"row\">\n            <div *ngIf=\"metadata.createdByDetails\">Created {{metadata.creationTimestamp | durationSince}} by {{metadata.createdByDetails.username ? metadata.createdByDetails.username: 'system'}}</div>\n          </div>\n          <div *ngIf=\"summaryValues[2]\" class=\"tcs-case-summary-summary2-text mini\" matTooltip=\"{{summaryValues[2]}}\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\">{{summaryValues[2] | ellipsis: 45}}</div>\n          <div class=\"tcs-case-summary-mini-card-state-box\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n            <tcla-live-apps-state-icon #caseTypeIcon class=\"tcs-case-summary-state-icon\" [iconPath]=\"metadata.caseTypeIcon\" [color]=\"metadata.caseTypeColor\" matTooltipShowDelay=\"1000\" matTooltip=\"Case type: {{metadata.applicationLabel}}\"></tcla-live-apps-state-icon>\n            <div class=\"tcs-case-summary-state-text\" matTooltip=\"{{summaryValues[1]}}\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"above\">{{metadata.applicationLabel}}</div>\n            <div fxLayout=\"row\" fxLayoutAlign=\"end center\" fxFlex>\n              <tcla-live-apps-state-icon #caseStateIcon class=\"tcs-case-summary-state-icon\" [iconPath]=\"metadata.stateIcon\" [color]=\"metadata.stateColor\" [appId]=\"appId\"></tcla-live-apps-state-icon>\n              <div class=\"tcs-case-summary-state-text\">{{summaryValues[0]}}</div>\n            </div>\n          </div>\n        </div>\n        <div class=\"tcs-case-summary-mini-card-right\" fxLayout=\"row\" fxLayoutAlign=\"end center\" matTooltipPosition=\"left\" matTooltipShowDelay=\"1000\" matTooltip=\"Open Case\">\n          <mat-icon class=\"tcs-icon tcs-case-summary-details-icon\" svgIcon=\"tcs-summary-details-button\"></mat-icon>\n        </div>\n      </div>\n    </mat-card>\n  </div>\n\n  <div *ngIf=\"displayType === 'card'\" style=\"height: 100%\">\n  <mat-card *ngIf=\"configMode || (metadata && metadata.applicationLabel && metadata.createdByDetails && metadata.stateColor && metadata.stateIcon && metadata.caseTypeIcon && metadata.caseTypeColor)\" class=\"tcs-case-summary-card\" fxLayout=\"column\" fxLayoutAlign=\"start start\" (click)=\"clickCaseAction()\">\n    <div *ngIf=\"typeBar\" class=\"tcs-case-summary-header\" [style.background-color]=\"metadata.useCaseTypeColor ? metadata.caseTypeColor : metadata.stateColor\"></div>\n    <div class=\"tcs-case-summary-card-contents\" fxFlex fxLayout=\"column\" fxLayoutAlign=\"center center\">\n      <div fxFlex>\n        <div class=\"tcs-case-summary-case-type-text\">{{metadata.applicationLabel}}</div>\n      </div>\n      <div fxFlex>\n        <div *ngIf=\"summaryValues[1]\" class=\"tcs-case-summary-summary1-text\" matTooltip=\"{{summaryKeys[1]}}\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"above\">{{summaryValues[1] | ellipsis: 45}}</div>\n      </div>\n      <div fxFlex>\n        <div class=\"tcs-case-summary-creation-text\">\n          <div *ngIf=\"metadata.createdByDetails\">Created {{metadata.creationTimestamp | durationSince}} by {{metadata.createdByDetails.username ? metadata.createdByDetails.username : 'system'}}</div>\n        </div>\n      </div>\n      <div fxFlex>\n        <div class=\"tcs-case-summary-line\"></div>\n      </div>\n      <div fxFlex>\n        <div *ngIf=\"summaryValues[2]\" class=\"tcs-case-summary-summary2-text\">{{summaryValues[2]}}</div>\n      </div>\n    </div>\n    <div class=\"tcs-case-summary-case-footer\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n      <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n        <tcla-live-apps-state-icon #caseTypeIcon class=\"tcs-case-summary-state-icon\" [iconPath]=\"metadata.caseTypeIcon\" [color]=\"metadata.caseTypeColor\" matTooltipShowDelay=\"1000\" matTooltip=\"Case type: {{metadata.applicationLabel}}\"></tcla-live-apps-state-icon>\n        <tcla-live-apps-state-icon #caseStateIcon class=\"tcs-case-summary-state-icon\" [iconPath]=\"metadata.stateIcon\" [color]=\"metadata.stateColor\" [appId]=\"appId\"></tcla-live-apps-state-icon>\n        <div class=\"tcs-case-summary-state-text\">{{summaryValues[0]}}</div>\n      </div>\n      <div class=\"tcs-case-summary-view-details\" fxLayout=\"row\" fxLayoutAlign=\"end center\" matTooltipPosition=\"above\" matTooltip=\"Open Case\" matTooltipShowDelay=\"1000\">\n        <div class=\"tcs-case-summary-view-details-text\">View Details</div>\n        <mat-icon class=\"tcs-icon tcs-case-summary-details-icon\" svgIcon=\"tcs-summary-details-button\"></mat-icon>\n      </div>\n    </div>\n  </mat-card>\n  </div>\n  <div class=\"summary-card-list-format\" *ngIf=\"displayType === 'list'\" style=\"min-height: 50px; height: 100%; background-color: white\">\n    <mat-card *ngIf=\"configMode || (metadata && metadata.applicationLabel && metadata.createdByDetails && metadata.stateColor && metadata.stateIcon && metadata.caseTypeIcon && metadata.caseTypeColor)\" class=\"tcs-case-summary-list-card\" [ngClass]=\"{border: borderCard}\" fxLayout=\"row\" fxLayoutAlign=\"start stretch\" (click)=\"clickCaseAction()\">\n      <div *ngIf=\"typeBar\" class=\"tcs-case-summary-mini-card-side-bar\" [style.background-color]=\"metadata.useCaseTypeColor ? metadata.caseTypeColor : metadata.stateColor\"></div>\n      <div class=\"tcs-case-summary-mini-card-right-content\" fxFlex>\n        <div class=\"tcs-case-summary-list-card-left\" fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFlex fxLayoutGap=\"10px\">\n          <div class=\"tcs-case-summary-list-summary1-text tcs-case-summary-list-details-box\">\n            <div fxFlex=\"nogrow\" *ngIf=\"summaryValues[1]\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"above\" [innerHTML]=\"summaryValues[1] | ellipsis : 20 | highlight : highlight : 'Multi-Match' : false : 'tcs-case-summary-highlight'\" matTooltipShowDelay=\"1000\" matTooltip=\"{{summaryValues[1]}}\"></div>\n          </div>\n          <div *ngIf=\"widget.gtXs\">\n            <div *ngIf=\"widget.ltMd\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"5px\">\n              <!-- App Icon and label -->\n              <div fxFlex fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"tcs-case-summary-list-details-box\">\n                <tcla-live-apps-state-icon #caseTypeIcon class=\"tcs-case-summary-state-icon\" [iconPath]=\"metadata.caseTypeIcon\" [color]=\"metadata.caseTypeColor\" matTooltipShowDelay=\"1000\" matTooltip=\"Case type: {{metadata.applicationLabel}}\"></tcla-live-apps-state-icon>\n                <div class=\"tcs-case-summary-state-text\">{{metadata.applicationLabel |  ellipsis: 20}}</div>\n              </div>\n              <!-- State Icon and Label -->\n              <div fxFlex fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"tcs-case-summary-list-details-box\">\n                <tcla-live-apps-state-icon #caseStateIcon class=\"tcs-case-summary-state-icon\" [iconPath]=\"metadata.stateIcon\" [color]=\"metadata.stateColor\" [appId]=\"appId\"></tcla-live-apps-state-icon>\n                <div class=\"tcs-case-summary-state-text\">{{summaryValues[0]}}</div>\n              </div>\n            </div>\n            <div *ngIf=\"widget.gtSm\" fxFlex fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"tcs-case-summary-list-details-box\">\n              <tcla-live-apps-state-icon #caseTypeIcon class=\"tcs-case-summary-state-icon\" [iconPath]=\"metadata.caseTypeIcon\" [color]=\"metadata.caseTypeColor\" matTooltipShowDelay=\"1000\" matTooltip=\"Case type: {{metadata.applicationLabel}}\"></tcla-live-apps-state-icon>\n              <div class=\"tcs-case-summary-state-text\">{{metadata.applicationLabel |  ellipsis: 20}}</div>\n            </div>\n            <div *ngIf=\"widget.gtSm\" fxFlex fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"tcs-case-summary-list-details-box\">\n              <tcla-live-apps-state-icon #caseStateIcon class=\"tcs-case-summary-state-icon\" [iconPath]=\"metadata.stateIcon\" [color]=\"metadata.stateColor\" [appId]=\"appId\"></tcla-live-apps-state-icon>\n              <div class=\"tcs-case-summary-state-text\">{{summaryValues[0]}}</div>\n            </div>\n          </div>\n          <div *ngIf=\"widget.ltMd\" class=\"summary-text-ltmd\" fxLayout=\"column\" fxLayoutAlign=\"center start\" fxLayoutGap=\"5px\" style=\"max-width: 180px;width: 180px\">\n            <div class=\"tcs-case-summary-list-summary2-text tcs-case-summary-list-large-details-box\">\n              <div fxFlex *ngIf=\"summaryValues[2]\" [innerHTML]=\"summaryValues[2] | highlight : highlight : 'Multi-Match' : false : 'tcs-case-summary-highlight'\" matTooltipShowDelay=\"1000\" matTooltip=\"{{summaryValues[2]}}\"></div>\n            </div>\n            <div class=\"tcs-case-summary-list-summary3-text tcs-case-summary-list-details-box\">\n              <div fxFlex=\"nogrow\" *ngIf=\"summaryValues[3]\" [innerHTML]=\"summaryValues[3] | ellipsis : 20 | highlight : highlight : 'Multi-Match' : false : 'tcs-case-summary-highlight'\" matTooltipShowDelay=\"1000\" matTooltip=\"{{summaryValues[3]}}\"></div>\n            </div>\n          </div>\n          <div *ngIf=\"widget.gtSm\" class=\"tcs-case-summary-list-summary2-text tcs-case-summary-list-large-details-box\">\n            <div fxFlex *ngIf=\"summaryValues[2]\" [innerHTML]=\"summaryValues[2] | highlight : highlight : 'Multi-Match' : false : 'tcs-case-summary-highlight'\" matTooltipShowDelay=\"1000\" matTooltip=\"{{summaryValues[2]}}\"></div>\n          </div>\n          <div *ngIf=\"widget.gtSm\" fxFlex=\"nogrow\" class=\"tcs-case-summary-list-summary3-text tcs-case-summary-list-details-box\">\n            <div fxFlex=\"nogrow\" *ngIf=\"summaryValues[3]\" [innerHTML]=\"summaryValues[3] | ellipsis : 20 | highlight : highlight : 'Multi-Match' : false : 'tcs-case-summary-highlight'\" matTooltipShowDelay=\"1000\" matTooltip=\"{{summaryValues[3]}}\"></div>\n          </div>\n          <div fxFlex class=\"tcs-case-summary-list-details-box tcs-case-summary-creation-text\" fxLayoutAlign=\"center center\">\n            <div *ngIf=\"metadata.createdByDetails\">Created {{metadata.creationTimestamp | durationSince}} by {{metadata.createdByDetails.username ? metadata.createdByDetails.username : 'system'}}</div>\n          </div>\n        </div>\n\n        <div class=\"tcs-case-summary-mini-card-right\" fxLayout=\"row\" fxLayoutAlign=\"end center\" matTooltipPosition=\"left\" matTooltipShowDelay=\"1000\" matTooltip=\"Open Case\">\n          <mat-icon class=\"tcs-icon tcs-case-summary-details-icon\" svgIcon=\"tcs-summary-details-button\"></mat-icon>\n        </div>\n      </div>\n    </mat-card>\n  </div>\n\n  <div *ngIf=\"displayType === 'miniList'\" style=\"min-height: 50px; background-color: white\">\n    <mat-card *ngIf=\"configMode || (metadata && metadata.applicationLabel && metadata.createdByDetails && metadata.stateColor && metadata.stateIcon && metadata.caseTypeIcon && metadata.caseTypeColor)\" class=\"tcs-case-summary-list-card\" [ngClass]=\"{border: borderCard}\" fxLayout=\"row\" fxLayoutAlign=\"start stretch\" (click)=\"clickCaseAction()\">\n      <div *ngIf=\"typeBar\" class=\"tcs-case-summary-mini-card-side-bar\" [style.background-color]=\"metadata.useCaseTypeColor ? metadata.caseTypeColor : metadata.stateColor\"></div>\n      <div class=\"tcs-case-summary-mini-card-right-content\" fxFlex>\n        <div class=\"tcs-case-summary-list-card-left\" fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFlex fxLayoutGap=\"10px\">\n          <div class=\"tcs-case-summary-list-summary1-text tcs-case-summary-list-details-box\">\n            <div fxFlex=\"nogrow\" *ngIf=\"summaryValues[1]\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"above\" [innerHTML]=\"summaryValues[1] | ellipsis : 20 | highlight : highlight : 'Multi-Match' : false : 'tcs-case-summary-highlight'\" matTooltipShowDelay=\"1000\" matTooltip=\"{{summaryValues[1]}}\"></div>\n          </div>\n        </div>\n        <div class=\"tcs-case-summary-mini-card-right\" fxLayout=\"row\" fxLayoutAlign=\"end center\" matTooltipPosition=\"left\" matTooltipShowDelay=\"1000\" matTooltip=\"Open Case\">\n          <mat-icon class=\"tcs-icon tcs-case-summary-details-icon\" svgIcon=\"tcs-summary-details-button\"></mat-icon>\n        </div>\n      </div>\n    </mat-card>\n  </div>\n\n\n  <div *ngIf=\"displayType === 'staticlist'\" style=\"min-height: 50px;  height: 100%; background-color: white\">\n    <mat-card *ngIf=\"configMode || (metadata && metadata.applicationLabel && metadata.createdByDetails && metadata.stateColor && metadata.stateIcon && metadata.caseTypeIcon && metadata.caseTypeColor)\" class=\"tcs-case-summary-static-list-card\" [ngClass]=\"{border: borderCard}\" fxLayout=\"row\" fxLayoutAlign=\"start stretch\">\n      <div *ngIf=\"typeBar\" class=\"tcs-case-summary-mini-card-side-bar\" [style.background-color]=\"metadata.useCaseTypeColor ? metadata.caseTypeColor : metadata.stateColor\"></div>\n      <div class=\"tcs-case-summary-mini-card-right-content\" fxFlex>\n        <div class=\"tcs-case-summary-list-card-left\" fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFlex fxLayoutGap=\"10px\">\n          <div class=\"tcs-case-summary-list-summary1-text tcs-case-summary-list-details-box\">\n            <div fxFlex=\"nogrow\" *ngIf=\"summaryValues[1]\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"above\" [innerHTML]=\"summaryValues[1] | ellipsis : 20 | highlight : highlight : 'Multi-Match' : false : 'tcs-case-summary-highlight'\" matTooltipShowDelay=\"1000\" matTooltip=\"{{summaryValues[1]}}\"></div>\n          </div>\n          <div *ngIf=\"widget.ltMd\" class=\"summary-text-ltmd\" fxLayout=\"column\" fxLayoutAlign=\"center start\" fxLayoutGap=\"5px\" style=\"max-width: 180px;width: 180px\">\n            <div class=\"tcs-case-summary-list-summary2-text tcs-case-summary-list-large-details-box\">\n              <div fxFlex *ngIf=\"summaryValues[2]\" [innerHTML]=\"summaryValues[2] | highlight : highlight : 'Multi-Match' : false : 'tcs-case-summary-highlight'\" matTooltipShowDelay=\"1000\" matTooltip=\"{{summaryValues[2]}}\"></div>\n            </div>\n            <div class=\"tcs-case-summary-list-summary3-text tcs-case-summary-list-details-box\">\n              <div fxFlex=\"nogrow\" *ngIf=\"summaryValues[3]\" [innerHTML]=\"summaryValues[3] | ellipsis : 20 | highlight : highlight : 'Multi-Match' : false : 'tcs-case-summary-highlight'\" matTooltipShowDelay=\"1000\" matTooltip=\"{{summaryValues[3]}}\"></div>\n            </div>\n          </div>\n          <div *ngIf=\"widget.gtSm\" class=\"tcs-case-summary-list-summary2-text tcs-case-summary-list-large-details-box\">\n            <div fxFlex *ngIf=\"summaryValues[2]\" [innerHTML]=\"summaryValues[2] | highlight : highlight : 'Multi-Match' : false : 'tcs-case-summary-highlight'\" matTooltipShowDelay=\"1000\" matTooltip=\"{{summaryValues[2]}}\"></div>\n          </div>\n          <div *ngIf=\"widget.gtSm\" fxFlex=\"nogrow\" class=\"tcs-case-summary-list-summary3-text tcs-case-summary-list-details-box\">\n            <div fxFlex=\"nogrow\" *ngIf=\"summaryValues[3]\" [innerHTML]=\"summaryValues[3] | ellipsis : 20 | highlight : highlight : 'Multi-Match' : false : 'tcs-case-summary-highlight'\" matTooltipShowDelay=\"1000\" matTooltip=\"{{summaryValues[3]}}\"></div>\n          </div>\n          <div *ngIf=\"widget.gtXs\">\n            <div *ngIf=\"widget.ltMd\" fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"5px\">\n              <!-- App Icon and label -->\n              <div fxFlex fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"tcs-case-summary-list-details-box\">\n                <tcla-live-apps-state-icon #caseTypeIcon class=\"tcs-case-summary-state-icon\" [iconPath]=\"metadata.caseTypeIcon\" [color]=\"metadata.caseTypeColor\" matTooltipShowDelay=\"1000\" matTooltip=\"Case type: {{metadata.applicationLabel}}\"></tcla-live-apps-state-icon>\n                <div class=\"tcs-case-summary-state-text\">{{metadata.applicationLabel |  ellipsis: 20}}</div>\n              </div>\n              <!-- State Icon and Label -->\n              <div fxFlex fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"tcs-case-summary-list-details-box\">\n                <tcla-live-apps-state-icon #caseStateIcon class=\"tcs-case-summary-state-icon\" [iconPath]=\"metadata.stateIcon\" [color]=\"metadata.stateColor\" [appId]=\"appId\"></tcla-live-apps-state-icon>\n                <div class=\"tcs-case-summary-state-text\">{{summaryValues[0]}}</div>\n              </div>\n            </div>\n            <div *ngIf=\"widget.gtSm\" fxFlex fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"tcs-case-summary-list-details-box\">\n              <tcla-live-apps-state-icon #caseTypeIcon class=\"tcs-case-summary-state-icon\" [iconPath]=\"metadata.caseTypeIcon\" [color]=\"metadata.caseTypeColor\" matTooltipShowDelay=\"1000\" matTooltip=\"Case type: {{metadata.applicationLabel}}\"></tcla-live-apps-state-icon>\n              <div class=\"tcs-case-summary-state-text\">{{metadata.applicationLabel |  ellipsis: 20}}</div>\n            </div>\n            <div *ngIf=\"widget.gtSm\" fxFlex fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"tcs-case-summary-list-details-box\">\n              <tcla-live-apps-state-icon #caseStateIcon class=\"tcs-case-summary-state-icon\" [iconPath]=\"metadata.stateIcon\" [color]=\"metadata.stateColor\" [appId]=\"appId\"></tcla-live-apps-state-icon>\n              <div class=\"tcs-case-summary-state-text\">{{summaryValues[0]}}</div>\n            </div>\n          </div>\n          <div fxFlex class=\"tcs-case-summary-list-details-box tcs-case-summary-creation-text\" fxLayoutAlign=\"center center\">\n            <div *ngIf=\"metadata.createdByDetails\">Created {{metadata.creationTimestamp | durationSince}} by {{metadata.createdByDetails.username ? metadata.createdByDetails.username : 'system'}}</div>\n          </div>\n        </div>\n      </div>\n    </mat-card>\n  </div>\n</div>\n","import {Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild} from '@angular/core';\nimport {Subject} from 'rxjs';\nimport {map, take, takeUntil} from 'rxjs/operators';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport { LiveAppsComponent } from '../live-apps-component/live-apps-component.component';\nimport {CaseRoute} from '../../models/liveappsdata';\n\n/**\n * Renders list of cases for caserefs\n *\n * ![alt-text](../live-apps-case-list.png \"Image\")\n *\n *@example <tcla-live-apps-case-list></tcla-live-apps-case-list>\n */\n@Component({\n  selector: 'tcla-live-apps-case-list',\n  templateUrl: './live-apps-case-list.component.html',\n  styleUrls: ['./live-apps-case-list.component.css']\n})\n\nexport class LiveAppsCaseListComponent extends LiveAppsComponent implements OnInit {\n  /**\n   * Text shown in menu bar\n   */\n  @Input() headerText: string;\n\n  /**\n   * case card format - list, card, miniCard, staticList (no click event)\n   */\n  @Input() displayType: string;\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * List of case references to display in the list\n   */\n  @Input() caseRefs: string[];\n\n  /**\n   * Text to highlight in the list of cases (normall text that was searched)\n   */\n  @Input() highlight: string;\n\n  /**\n   * Filter text displayed when listing cases after selecting case type and state via report widget\n   */\n  @Input() headerMessage: string;\n\n\n  /**\n   * ~event clickCase : Case clicked\n   * ~payload CaseRoute : CaseRoute object output when case is clicked so calling component can route accordingly - ie. route to case\n   */\n  @Output() clickCase: EventEmitter<CaseRoute> = new EventEmitter<CaseRoute>();\n\n  /**\n   * ~event clearMatches : Clear Matches button clicked\n   *\n   */\n  @Output() clearMatches = new EventEmitter();\n\n  public errorMessage: string;\n\n  public clickCaseAction = (caseRoute: CaseRoute) => {\n    this.clickCase.emit(caseRoute);\n  }\n\n  public clearMatchingCases = () => {\n    this.clearMatches.emit();\n  }\n\n  constructor(protected liveapps: LiveAppsService) {\n    super();\n  }\n\n  ngOnInit() {\n  }\n\n}\n","<div class=\"tcs-case-list-box\" fxLayout=\"column\" fxFill>\n  <div class=\"tcs-case-list-header\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n    <div fxFlex fxLayoutAlign=\"start center\">\n      <mat-icon class=\"tcs-icon tcs-caselist-icon\" svgIcon=\"tcs-caselist-icon\"></mat-icon>\n      <div class=\"tcs-case-list-header-text\">{{headerText}}</div>\n      <div fxFlex class=\"tcs-type-filter-text\" fxLayoutAlign=\"end center\">\n        <div *ngIf=\"headerMessage\" fxLayout=\"row\">\n          [\n          <div class=\"tcs-type-filter-text-highlight\">{{headerMessage}}</div>\n          ]\n        </div>\n        <mat-icon (click)=\"clearMatchingCases()\" class=\"tcs-icon tcs-icon-active tcs-clear-cases-icon\" svgIcon=\"tcs-clear-icon\" matTooltip=\"Clear Matching Cases\" matTooltipPosition=\"left\" matTooltipShowDelay=\"1000\"></mat-icon>\n      </div>\n    </div>\n  </div>\n\n  <div style=\"height: 100%;\" fxLayout=\"row\">\n    <cdk-virtual-scroll-viewport fxFlex class=\"tcs-case-list-flow-list\" itemSize=\"56\">\n      <div class=\"tcs-case-list-item-box\" *cdkVirtualFor=\"let caseRef of caseRefs; templateCacheSize: 0; let index = index\">\n        <tcla-live-apps-case-summary #componentChildDiv [uiAppId]=\"uiAppId\" [typeBar]=\"true\" [borderCard]=\"false\" [displayType]=\"displayType\" [sandboxId]=\"sandboxId\" [caseRef]=\"caseRef\" [highlight]=\"highlight\" (clickCase)=\"clickCaseAction($event)\"></tcla-live-apps-case-summary>\n        <div class=\"tcs-case-summary-line\"></div>\n      </div>\n    </cdk-virtual-scroll-viewport>\n  </div>\n\n</div>\n","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\n\n\n/**\n * Editor component to edit a note\n *\n * ![alt-text](../live-apps-notes-editor.png \"\")\n *\n *@example <tcla-live-apps-notes-editor></tcla-live-apps-notes-editor>\n */\n@Component({\n  selector: 'tcla-live-apps-notes-editor',\n  templateUrl: './live-apps-notes-editor.component.html',\n  styleUrls: ['./live-apps-notes-editor.component.css']\n})\nexport class LiveAppsNotesEditorComponent extends LiveAppsComponent {\n  @Input() noteText: string; // use 'CASE_APP' to share notes with case manager\n  @Input() isReply = false;\n\n  /**\n   * ~event noteSubmitted : Internal\n   */\n\n  @Output() noteSubmitted = new EventEmitter(); // notify text submitted\n\n  constructor() {\n    super();\n  }\n\n  public submitNote = (noteText) => {\n    this.noteSubmitted.emit(noteText);\n    this.noteText = undefined;\n  }\n\n}\n","<div class=\"tcs-collaboration-new-thread\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\" fxFlex>\n  <mat-icon *ngIf=\"isReply\" class=\"tcs-icon tcs-collaboration-reply-item-icon\" svgIcon=\"tcs-collaboration-reply\"></mat-icon>\n  <form class=\"tcs-collaboration-new-thread-form\" #newThreadForm=\"ngForm\" fxFlex>\n    <textarea fxFlex class=\"tcs-collaboration-input\" [(ngModel)]=\"noteText\" name=\"noteText\" md-maxlength=\"10000\" placeholder=\"New Note... \" rows=\"2\"></textarea>\n  </form>\n  <mat-icon class=\"tcs-icon tcs-collaboration-send-icon\" svgIcon=\"tcs-collaboration-send\" (click)=\"submitNote(noteText)\"></mat-icon>\n</div>\n","import {Component, Input, OnDestroy, OnInit} from '@angular/core';\nimport {Subject} from 'rxjs';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {map, take, takeUntil} from 'rxjs/operators';\nimport {Note, NoteThread, NotificationList, ThreadList} from '../../models/liveappsdata';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {ToolbarButton} from '@tibco-tcstk/tc-core-lib';\nimport {TcButtonsHelperService} from '@tibco-tcstk/tc-core-lib';\n\n\n/**\n * This Component allows to list, and add Notes to a Case-Instance or other Context e.g. a whole Application.\n * Any Note can have Sub-Notes to allow real collaboration.\n *\n * Note that since this component uses a virtual scroll the parent container must have height set or the notes won't appear\n *\n * ![alt-text](../live-apps-notes.png \"Notes Component Image\")\n *\n *@example <tcla-live-apps-notes></tcla-live-apps-notes>\n */\n@Component({\n  selector: 'tcla-live-apps-notes',\n  templateUrl: './live-apps-notes.component.html',\n  styleUrls: ['./live-apps-notes.component.css']\n})\n\nexport class LiveAppsNotesComponent extends LiveAppsComponent implements OnInit {\n  /**\n   * itemType for notes collection\n   */\n  @Input() relatedItemType: string; // use 'CASE_APP' to share notes with case manager\n\n  /**\n   * itemId for notes collection\n   */\n  @Input() relatedItemId: string; // 'caseRef' for case related\n\n  /**\n   * The ID of the logged user\n   */\n  @Input() userId: string;\n\n  /**\n   * Whether to show the header bar in the widget - eg. favorites on home page (contains icon etc) - if off icons still appear without bar\n   */\n  public showHeader: boolean = true;\n  @Input('showHeader') set ShowHeader(showHeader: boolean) {\n    if (showHeader){\n      this.showHeader = showHeader;\n    }\n  }\n\n  /**\n   * The header text as input, defaults to 'Notes'\n   */\n  public header: string = 'Notes';\n  @Input('header') set Header(header: string) {\n    if (header){\n      this.header = header;\n    }\n  }\n\n  public notes: Note[];\n  public errorMessage: string;\n  public newNote: any = {};\n  public newNoteId: number;\n  public delNoteId: number;\n  public threads: ThreadList;\n  public subscribed: Boolean;\n  public skip = 0;\n  public top = 20;\n  public end = false;\n  public toolbarButtons: ToolbarButton[] = [];\n\n  constructor(protected liveapps: LiveAppsService, protected buttonsHelper: TcButtonsHelperService) {\n    super();\n  }\n\n  public refresh = () => {\n    this.skip = 0;\n    this.top = 20;\n    this.end = false;\n    if (this.threads && this.threads.threads) {\n      this.threads.threads.length = 0;\n    }\n    this.getBatch();\n    this.getNotifications();\n  }\n\n  public getBatch = () => {\n    if (!this.end) {\n      this.liveapps.getThreads(this.relatedItemType, this.relatedItemId, this.skip, this.top)\n        .pipe(\n          take(1),\n          takeUntil(this._destroyed$)\n        ).subscribe(threadList => {\n        if (!this.threads) {\n          this.threads = threadList;\n        } else {\n          // this will strip any duplicates that may have been retrieved due to fast scrolling\n          const filteredEvents = threadList.threads.filter(x => this.threads.threads.every(y => y.note.id !== x.note.id));\n          this.threads.threads = this.threads.threads.concat(filteredEvents);\n        }\n        if (threadList.threads.length < this.top) {\n          this.end = true;\n        } else {\n          this.skip = this.skip + threadList.threads.length - 1;\n        }\n      }, error => {\n        this.errorMessage = 'Error retrieving notes: ' + error.error.errorMsg;\n      });\n    }\n  }\n\n  public toggleReplies = (thread) => {\n    thread.showReplies = !thread.showReplies;\n  }\n\n  public toggleNewReply = (thread) => {\n    if (!thread.newReply) {\n      thread.newReply = {};\n    }\n    if (thread.showReplies && !thread.showNewReply) {\n      thread.newReply = {};\n      thread.showNewReply = true;\n    } else {\n      thread.showNewReply = !thread.showNewReply;\n      thread.showReplies = !thread.showReplies;\n    }\n\n  }\n\n  public createReply = (thread, replyText) => {\n    this.liveapps.createReplyNote(thread.note, replyText, thread.note.id)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      )\n      .subscribe(result => {\n        this.newNoteId = result;\n        thread.newReply.text = undefined;\n        this.refresh();\n      }, error => this.errorMessage = 'Error creating new note: ' + error.error.errorMessage);\n  }\n\n  public createThread = (noteText) => {\n    if (noteText !== undefined) {\n      this.liveapps.createNote(this.relatedItemType, 'RT_CASE', this.relatedItemId, 'comments update', '', '', noteText)\n        .pipe(\n          take(1),\n          takeUntil(this._destroyed$)\n        )\n        .subscribe(result => {\n          this.newNoteId = result;\n          this.newNote.text = undefined;\n          this.refresh();\n        }, error => this.errorMessage = 'Error creating new note: ' + error.error.errorMessage);\n    }\n  }\n\n\n  protected createToolbarButtons = (subscribed): ToolbarButton[] => {\n    const subscribeButton: ToolbarButton = this.buttonsHelper.createButton(\n      'subscribe', 'tcs-collaboration-unsubscribed', true, 'Enable Notifications', !subscribed, !subscribed);\n    const unSubscribeButton: ToolbarButton = this.buttonsHelper.createButton(\n      'unsubscribe', 'tcs-collaboration-subscribed', true, 'Disable Notifications', subscribed, subscribed);\n    const buttons = [ subscribeButton, unSubscribeButton ];\n    return buttons;\n  }\n\n  public setupNotificationButtons = (subscribed: boolean) => {\n    const buttons: ToolbarButton[] = this.createToolbarButtons(subscribed);\n    this.buttonsHelper.updateButtons(buttons, this.toolbarButtons);\n  }\n\n  public updateButtonDef = (updatedToolbarButtons: ToolbarButton[]) => {\n    updatedToolbarButtons.forEach( updatedButton => {\n      const idx = this.toolbarButtons.findIndex(item => item.id === updatedButton.id);\n      this.toolbarButtons[idx] = updatedButton;\n    });\n  }\n\n  public handleToolbarButtonEvent = (id) => {\n    if (id === 'subscribe') {\n      this.subscribe();\n    } else if (id === 'unsubscribe') {\n      this.unsubscribe();\n    }\n  }\n\n  public recreateButtonsForNotifications = (subscribed) => {\n      const buttons: ToolbarButton[] = this.createToolbarButtons(subscribed);\n      this.buttonsHelper.updateButtons(buttons, this.toolbarButtons);\n  }\n\n  public getNotifications = () => {\n    this.liveapps.getNotifications(this.relatedItemType, this.relatedItemId, this.userId)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      )\n      .subscribe(result => {\n        const notificationList: NotificationList = result;\n        if (notificationList.notifications.length > 0) {\n          this.subscribed = true;\n          this.setupNotificationButtons(true);\n        } else {\n          this.subscribed = false;\n          this.setupNotificationButtons(false);\n        }\n      }, error => this.errorMessage = 'Error creating new note: ' + error.error.errorMessage);\n  }\n\n  public subscribe = () => {\n    this.liveapps.subscribeToNotes(this.relatedItemType, this.relatedItemId)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      )\n      .subscribe(result => {\n        if (result) {\n          this.subscribed = true;\n          this.recreateButtonsForNotifications(true);\n        }\n      }, error => this.errorMessage = 'Error creating new note: ' + error.error.errorMessage);\n  }\n\n  public unsubscribe = () => {\n    this.liveapps.unsubscribeToNotes(this.relatedItemType, this.relatedItemId, this.userId)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      )\n      .subscribe(result => {\n        this.subscribed = false;\n        this.recreateButtonsForNotifications(false);\n      }, error => this.errorMessage = 'Error creating new note: ' + error.error.errorMessage);\n  }\n\n  public editNote = (thread) => {\n    thread.editMode = !thread.editMode;\n  }\n\n  public updateNote = (note, updatedText) => {\n    console.log('Updating note');\n    note.text = updatedText;\n    this.liveapps.updateNote(note, note.id)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      )\n      .subscribe(result => {\n        console.log('Note updated');\n        this.refresh();\n      }, error => this.errorMessage = 'Error updating note: ' + error.error.errorMessage);\n  }\n\n  public deleteNote = (id) => {\n    console.log('Deleting note');\n    this.liveapps.deleteNote(id)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      )\n      .subscribe(result => {\n        console.log('Note deleted: ' + result);\n        this.refresh();\n      }, error => this.errorMessage = 'Error creating new note: ' + error.error.errorMessage);\n  }\n\n  ngOnInit() {\n    // this.refresh();\n    this.newNote.text = '';\n\n  }\n\n}\n","<div class=\"tcs-notes-pane\" fxLayout=\"column\" fxFill style=\"overflow: hidden;\">\n  <tc-tibco-cloud-widget-header fxFlex=\"nogrow\" [headerText]=\"header\" [icon]=\"'tcs-collaboration-feed'\"\n                                [toolbarButtons]=\"toolbarButtons\" [showHeader]=\"showHeader\"\n                                (toolbarButtonEvent)=\"handleToolbarButtonEvent($event)\"></tc-tibco-cloud-widget-header>\n  <div class=\"tcs-collaboration-pane\" fxLayout=\"column\" fxFlex=\"grow\" style=\"\">\n    <div class=\"tcs-collaboration-existing-threads\" fxLayout=\"column\" fxFlex>\n      <!--div *ngIf=\"threads && threads.threads.length > 0\"-->\n      <div style=\"height: 100%;\">\n        <cdk-virtual-scroll-viewport style=\"height: 100%\" itemSize=\"50\" (scrolledIndexChange)=\"getBatch()\">\n\n          <!--div class=\"tcs-collaboration-detail-box tcs-collaboration-thread\" [ngClass]=\"{ editing: thread.editMode }\" *ngFor=\"let thread of threads.threads | reverse\" fxLayout=\"column\"-->\n          <div *ngIf=\"threads && threads.threads\">\n            <div class=\"tcs-collaboration-detail-box tcs-collaboration-thread\" [ngClass]=\"{ editing: thread.editMode }\"\n                 *cdkVirtualFor=\"let thread of threads.threads\" fxLayout=\"column\">\n              <div class=\"tcs-thread-box\">\n                <!-- collaboration threads -->\n                <div class=\"tcs-collaboration-entry\">\n                  <div *ngIf=\"!thread.editMode\">\n                    <div fxLayout=\"row\" fxLayoutAlign=\"space-between start\">\n                      <span class=\"tcs-collaboration-thread-author\">{{thread.note.createdByName}}</span>\n                      <div fxLayoutAlign=\"row\">\n                      <span *ngIf=\"thread.note.modifiedDate > thread.note.createdDate\" class=\"tcs-collaboration-edited\">Edited\n                      </span>\n                        <span class=\"tcs-collaboration-thread-date\">{{thread.note.modifiedDate | durationSince}}</span>\n                      </div>\n                    </div>\n                    <span class=\"tcs-collaboration-thread-text\" matTooltip=\"{{thread.note.text}}\"\n                          matTooltipShowDelay=\"1000\"\n                          matTooltipPosition=\"below\">{{thread.note.text | ellipsis: 70}}</span>\n                  </div>\n                  <tcla-live-apps-notes-editor *ngIf=\"thread.editMode\" [noteText]=\"thread.note.text\"\n                                               (noteSubmitted)=\"updateNote(thread.note, $event)\"></tcla-live-apps-notes-editor>\n                </div>\n                <div class=\"tcs-icon-row\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n                  <div class=\"tcs-collaboration-thread-icon-left\">\n                    <mat-icon (click)=\"deleteNote(thread.note.id)\"\n                              class=\"tcs-icon tcs-icon-active tcs-collaboration-edit-buttons tcs-collaboration-delete-icon\"\n                              svgIcon=\"tcs-collaboration-delete\"></mat-icon>\n                    <mat-icon (click)=\"editNote(thread)\"\n                              class=\"tcs-icon tcs-icon-active tcs-collaboration-edit-buttons tcs-collaboration-edit-icon\"\n                              svgIcon=\"tcs-collaboration-edit\"></mat-icon>\n                  </div>\n                  <div class=\"tcs-collaboration-thread-icon-right\" fxLayoutAlign=\"end center\" fxLayoutGap=\"8px\">\n                    <span *ngIf=\"thread.note.thread.totalCount > 1\" class=\"tcs-collaboration-thread-replies\"\n                          (click)=\"toggleReplies(thread)\">{{thread.note.thread.totalCount - 1}} replies</span>\n                    <mat-icon (click)=\"toggleNewReply(thread)\" class=\"tcs-icon tcs-collaboration-reply-icon\"\n                              svgIcon=\"tcs-collaboration-reply\"></mat-icon>\n                  </div>\n                </div>\n              </div>\n              <div class=\"tcs-collaboration-line\"></div>\n              <!-- replies -->\n              <div class=\"tcs-collaboration-reply-box\" *ngIf=\"thread.showReplies\">\n                <div fxLayout=\"column\">\n                  <tcla-live-apps-notes-editor class=\"tcs-collaboration-new-reply-component\" *ngIf=\"thread.showNewReply\"\n                                               [isReply]=\"true\" [noteText]=\"thread.newReply.text\"\n                                               (noteSubmitted)=\"createReply(thread, $event)\"></tcla-live-apps-notes-editor>\n                  <div class=\"tcs-collaboration-line\"></div>\n                </div>\n                <div class=\"tcs-collaboration-detail-box tcs-collaboration-reply\"\n                     [ngClass]=\"{ editing: reply.editMode }\" *ngFor=\"let reply of thread.thread | reverse\"\n                     fxLayout=\"column\">\n                  <div class=\"tcs-thread-box\" fxLayout=\"row\">\n                    <mat-icon class=\"tcs-icon tcs-collaboration-reply-item-icon\"\n                              svgIcon=\"tcs-collaboration-reply\"></mat-icon>\n                    <div fxLayout=\"column\" class=\"tcs-collaboration-reply-details\">\n                      <div class=\"tcs-collaboration-entry\">\n                        <div *ngIf=\"!reply.editMode\">\n                          <div fxLayout=\"row\" fxLayoutAlign=\"space-between start\">\n                            <span class=\"tcs-collaboration-thread-author\">{{reply.createdByName}}</span>\n                            <span class=\"tcs-collaboration-thread-date\">{{reply.modifiedDate | durationSince}}</span>\n                          </div>\n                          <span class=\"tcs-collaboration-thread-text\" matTooltip=\"{{reply.text}}\"\n                                matTooltipShowDelay=\"1000\"\n                                matTooltipPosition=\"below\">{{reply.text | ellipsis: 60}}</span>\n                        </div>\n                        <tcla-live-apps-notes-editor *ngIf=\"reply.editMode\" [noteText]=\"reply.text\"\n                                                     (noteSubmitted)=\"updateNote(reply, $event)\"></tcla-live-apps-notes-editor>\n                      </div>\n                      <div class=\"tcs-icon-row\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n                        <div class=\"tcs-collaboration-thread-icon-left\">\n                          <mat-icon (click)=\"deleteNote(reply.id)\"\n                                    class=\"tcs-icon tcs-icon-active tcs-collaboration-edit-buttons tcs-collaboration-delete-icon\"\n                                    svgIcon=\"tcs-collaboration-delete\"></mat-icon>\n                          <mat-icon (click)=\"editNote(reply)\"\n                                    class=\"tcs-icon tcs-icon-active tcs-collaboration-edit-buttons tcs-collaboration-edit-icon\"\n                                    svgIcon=\"tcs-collaboration-edit\"></mat-icon>\n                        </div>\n                      </div>\n                    </div>\n                  </div>\n                  <div class=\"tcs-collaboration-reply-line\"></div>\n                </div>\n              </div>\n            </div>\n          </div>\n          <div *ngIf=\"!(threads?.threads?.length > 0)\" fxLayout=\"row\" fxLayoutAlign=\"center start\" fxLayoutGap=\"10px\"\n               style=\"margin-top: 20px;\">\n            <mat-icon [svgIcon]=\"'ic-no-notes-icon'\" style=\"height: 48px; width: 48px;\"></mat-icon>\n            <div style=\"height: 100%\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n              <span class=\"tcs-no-item-text\">No notes found</span>\n            </div>\n          </div>\n        </cdk-virtual-scroll-viewport>\n      </div>\n    </div>\n    <tcla-live-apps-notes-editor class=\"tcs-collaboration-new-note-component\" [noteText]=\"newNote.text\"\n                                 (noteSubmitted)=\"createThread($event)\"></tcla-live-apps-notes-editor>\n  </div>\n</div>\n","import {Deserializable} from '@tibco-tcstk/tc-core-lib';\nimport {UserInfo} from './liveappsdata';\n\nexport class DocumentAction implements Deserializable {\n  action: string;\n  document: Document;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class Document implements Deserializable {\n  artifactCheckSum: string;\n  artifactRef: string;\n  artifactVersion: string;\n  author: number;\n  authorDetails: UserInfo;\n  creationDate: Date;\n  description: string;\n  id: string;\n  lastModifiedBy: string;\n  lastModifiedByDetails: UserInfo;\n  lastModifiedDate: Date;\n  mimeType: string;\n  name: string;\n  ownerApp: string;\n  size: string;\n  fileSize: string;\n  extension: string;\n  fileIcon: string;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class DocumentList implements Deserializable {\n  documents: Document[];\n  deserialize(input: any): this {\n    this.documents = [];\n    Object.assign(this.documents, input);\n    return this;\n  }\n}\n\nexport class OrgFolder implements Deserializable {\n  id: string;\n  name: string;\n  owner: string;\n  ownerSub: string;\n  ownerSandbox: string;\n  creationDate: string;\n  lastModifiedDate: string;\n  lastModifiedBy: string;\n  publishedVersion: string;\n  latestVersion: string;\n  publisedVersionId: string;\n  latestVersionId: string;\n  checksum: string;\n  extRef: string;\n  tags: DocTags[];\n  descriptor: string;\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class DocTags implements Deserializable {\n  id: string;\n  name: string;\n  ownerSub: string;\n  deserialize(input: any): this {\n    return this;\n  }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {Observable, throwError} from 'rxjs';\nimport {HttpClient, HttpHeaders} from '@angular/common/http';\nimport {ApiResponseError, ApiResponseText} from '../models/liveappsdata';\nimport {LiveAppsService} from './live-apps.service';\nimport {Document, DocumentList, OrgFolder} from '../models/tc-document';\nimport {catchError, flatMap, map, tap} from 'rxjs/operators';\nimport {TcCoreCommonFunctions, TcCoreConfigService} from '@tibco-tcstk/tc-core-lib';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TcDocumentService {\n\n  constructor(private http: HttpClient, private liveapps: LiveAppsService, @Inject(TcCoreConfigService) private tcCoreConfig: TcCoreConfigService ) {\n  }\n\n  public createOrgFolder(name: string): Observable<ApiResponseText> {\n    const url = '/webresource/v1/orgFolders/';\n    const body = new OrgFolder().deserialize({ name: name });\n    const bodyStr = JSON.stringify(body);\n    const headers = new HttpHeaders()\n      .set('Content-Type', 'application/json');\n    return this.http.post(url, bodyStr, { headers }).pipe(\n      tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n      map(response => new ApiResponseText().deserialize(response))\n    );\n  }\n\n  public getOrgFolder(name: string, useCache: boolean, flushCache: boolean): Observable<OrgFolder> {\n    const url = '/webresource/v1/orgFolders/' + name + '/';\n    let headers: HttpHeaders = new HttpHeaders();\n    if (useCache) {\n      headers = headers.set('cacheResponse', 'true');\n    }\n    if (flushCache) {\n      headers = headers.set('flushCache', 'true');\n    }\n    const options = {headers: headers };\n    return this.http.get(url, options).pipe(\n      map(response => {\n        return new OrgFolder().deserialize(response);\n      }),\n      catchError(error => {\n        const apiError = new ApiResponseError().deserialize(error.error);\n        if (apiError.errorCode === 'WR_FOLDER_DOES_NOT_EXIST') {\n          return this.createOrgFolder(name).pipe(\n            flatMap(newOrgFolder => {\n              // trigger cache flush\n              return this.getOrgFolder(name, true, true);\n            })\n          );\n        } else {\n          throwError(error);\n        }\n      })\n    );\n  }\n\n  public deleteOrgFolder(name: string): Observable<ApiResponseText> {\n    const url = '/webresource/v1/orgFolders/' + name;\n    const headers = new HttpHeaders()\n      .set('Content-Type', 'application/json');\n    return this.http.delete(url, { headers }).pipe(\n      tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n      map(response => new ApiResponseText().deserialize(response))\n    );\n  }\n\n  public initOrgFolder(name: string): Observable<ApiResponseText> {\n    const orgFolder$ = this.getOrgFolder(name, true, false).pipe(\n      map(orgFolderResp => {\n        return new ApiResponseText().deserialize({ message: 'orgFolder ok'});\n      }),\n      catchError(error => {\n        const apiError = new ApiResponseError().deserialize(error.error);\n        if (apiError.errorCode === 'WR_FOLDER_DOES_NOT_EXIST') {\n          return this.createOrgFolder(name).pipe(\n            map(newOrgFolder => {\n              // trigger cache flush\n              this.getOrgFolder(name, true, true).subscribe();\n              return newOrgFolder;\n            })\n          );\n        } else {\n          throwError(error);\n        }\n      })\n    );\n    return orgFolder$;\n  }\n\n  public listDocuments(folderType: string, folderId: string, sandboxId: number, filter: string): Observable<DocumentList> {\n    let url = '/webresource/v1/' + folderType + '/' + folderId + '/artifacts/';\n    if (sandboxId) {\n      url = url + '?$sandbox=' + sandboxId;\n    }\n    if (filter) {\n      url = url + '&$filter=contains(name,\\'' + filter + '\\')';\n    }\n\n    return this.http.get(url)\n      .pipe(\n        map(docs => {\n            const docList = new DocumentList().deserialize(docs);\n            for (let x = 0; x < docList.documents.length; x++) {\n              docList.documents[x] = this.parseDocument(docList.documents[x]);\n            }\n            return docList;\n          }\n        )\n      );\n  }\n\n  private parseDocument(document): Document {\n    const splitDocName = document.name.split('.');\n    if (splitDocName.length > 1) {\n      document.extension = splitDocName[splitDocName.length - 1];\n    } else {\n      document.extension = '';\n    }\n    document.fileIcon = this.getIcon(document.extension);\n    document.fileSize = TcCoreCommonFunctions.fileSizeToHuman(Number(document.size));\n    this.liveapps.getUserInfo(document.author).subscribe(val => {\n      document.authorDetails = val;\n      return document;\n    }, error => { console.log('Unable to retrieve user details for user: ' + error.errorMsg); });\n    this.liveapps.getUserInfo(document.lastModifiedBy).subscribe(val => {\n      document.lastModifiedByDetails = val;\n      return document;\n    }, error => { console.log('Unable to retrieve user details for user: ' + error.errorMsg); });\n    return document;\n  }\n\n  public deleteDocument(folderType: string, folderId: string, documentName: string, sandboxId: number): Observable<ApiResponseText> {\n    const url = '/webresource/v1/' + folderType + '/' + folderId + '/artifacts/' + documentName + '?$sandbox=' + sandboxId;\n    return this.http.delete(url)\n      .pipe(\n        map( val => new ApiResponseText().deserialize(val))\n      );\n  }\n\n  public getUrlForDocument(folderType: string, folderId: string, docId: string, docVersion: string, sandboxId: number, checkProxy?: boolean): string {\n    let url = '/webresource/';\n    if (folderType === 'orgFolders') {\n      url = url + 'orgFolders/' + folderId;\n    } else {\n      url = url + 'folders/' + folderId;\n    }\n    if (sandboxId && folderType !== 'orgFolders') {\n      url = url + '/' + sandboxId;\n    }\n    url = url + '/' + docId;\n    if (docVersion) {\n      url = url + '?$version=' + docVersion;\n    }\n\n    // need to check for proxy since this wont be intercepted (used on HTML template)\n    if (checkProxy && this.tcCoreConfig) {\n      const tcCoreConfig = this.tcCoreConfig.getConfig();\n      const tenantPath = tcCoreConfig.proxy_liveapps_path;\n      if (tcCoreConfig.proxy_url && tcCoreConfig.proxy_url !== '') {\n        if (tenantPath && tenantPath !== '') {\n          url = tcCoreConfig.proxy_url + '/' + tenantPath + url;\n        } else {\n          url = tcCoreConfig.proxy_url + url;\n        }\n\n        if (docVersion) {\n          url = url + '&' + tcCoreConfig.api_key_param + '=' + tcCoreConfig.api_key;\n        } else {\n          url = url + '?' + tcCoreConfig.api_key_param + '=' + tcCoreConfig.api_key;\n        }\n      }\n    }\n    return url;\n  }\n\n  public downloadDocument(folderType: string, folderId: string, docId: string, docVersion: string, sandboxId: number, disableCache?: boolean): Observable<any> {\n    let url = '/webresource/';\n    if (folderType === 'orgFolders') {\n      url = url + 'orgFolders/' + folderId;\n    } else {\n      url = url + 'folders/' + folderId;\n    }\n    if (sandboxId && folderType !== 'orgFolders') {\n      url = url + '/' + sandboxId;\n    }\n    url = url + '/' + docId + '?$download=true';\n    if (docVersion) {\n      url = url + '&$version=' + docVersion;\n    }\n    \n    let headers = new HttpHeaders({\n      'Content-Type': 'application/octet-stream',\n    });\n    if (disableCache) {\n      headers = headers.append('Cache-Control',  'no-cache, no-store, must-revalidate, post-check=0, pre-check=0')\n                       .append('Pragma', 'no-cache')\n                       .append('Expires', '0');\n    }\n    return this.http.get(url, { headers, responseType: 'blob' as 'json' });\n  }\n\n  public uploadDocument(folderType: string, folderId: string, sandboxId: number,\n                        fileToUpload: File, fileName: string, description: string): Observable<any> {\n    let url = '/webresource/v1/' + folderType\n      + '/' + folderId\n      + '/artifacts/' + fileName + '/upload/';\n\n    if (sandboxId) {\n      url = url + '?$sandbox=' + sandboxId;\n    }\n\n    if (description) {\n      url = url + '&description=' + description;\n    }\n    const headers = new HttpHeaders({\n      'accept': 'application/json',\n      'Content-Type': 'multipart/form-data',\n      'filename': fileName,\n      'enctype': 'multipart/form-data'\n    });\n    const formData: FormData = new FormData();\n    formData.append('artifactContents', fileToUpload);\n    return this.http.post(url, formData, { headers: headers, reportProgress: true, observe: 'events' });\n  }\n\n  private getIcon(extension: string): string {\n    if (extension === 'txt') {\n      return('doc');\n    } else if (extension === 'css') {\n      return('doc');\n    } else if (extension === 'js') {\n      return('doc');\n    } else if (extension === 'pdf') {\n      return('doc');\n    } else if (extension === 'xml') {\n      return('doc');\n    } else if (extension === 'doc') {\n      return('doc');\n    } else if (extension === 'zip') {\n      return('zip');\n    } else if (extension === 'ppt') {\n      return('doc');\n    } else if (extension === 'png') {\n      return('image');\n    } else {\n      return('doc');\n    }\n  }\n\n}\n","import {Component, Input, OnInit} from '@angular/core';\nimport {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';\nimport {Document} from '../../models/tc-document';\nimport {TcDocumentService} from '../../services/tc-document.service';\nimport {TcCoreCommonFunctions} from '@tibco-tcstk/tc-core-lib';\nimport {Location} from '@angular/common';\n\n/**\n * Display document\n *\n *@example <tcla-live-apps-document-viewer></tcla-live-apps-document-viewer>\n */\n\n@Component({\n  selector: 'tcla-live-apps-document-viewer',\n  templateUrl: './live-apps-document-viewer.component.html',\n  styleUrls: ['./live-apps-document-viewer.component.css']\n})\nexport class LiveAppsDocumentViewerComponent implements OnInit {\n  /**\n   * Document metadata object from API - describes the document to display\n   */\n  @Input() document: Document;\n\n  /**\n   * orgFolders' or 'caseFolders' - different API calls made according to which one this is\n   */\n  @Input() folderType: string;\n\n  /**\n   * The organisation folder to store/retrieve documents\n   */\n  @Input() folderId: string;\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  public sanitizedResourceUrl: SafeResourceUrl;\n\n  constructor(protected sanitizer: DomSanitizer, protected documentsService: TcDocumentService, protected location: Location) { }\n\n  ngOnInit() {\n    const preparedUrl = TcCoreCommonFunctions.prepareUrlForNonStaticResource(this.location, this.documentsService.getUrlForDocument(this.folderType, this.folderId, this.document.name, this.document.artifactVersion, this.sandboxId, true));\n    this.sanitizedResourceUrl = this.sanitizer.bypassSecurityTrustResourceUrl(preparedUrl);\n  }\n\n}\n","<div fxFill>\n  <iframe name=\"DocViewerFrame\" class=\"md-dialog-content\" fxFill [src]=\"sanitizedResourceUrl\">\n  </iframe>\n</div>\n","import {Component, EventEmitter, Inject, Input, OnDestroy, OnInit, Output} from '@angular/core';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport { take, takeUntil} from 'rxjs/operators';\nimport { Document, DocumentAction} from '../../models/tc-document';\nimport {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material/dialog';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {TcDocumentService} from '../../services/tc-document.service';\nimport {HttpEventType} from '@angular/common/http';\n\n\n/**\n * Document List and upload Component\n *\n * This Component allows to list, upload, download, Documents attached to a Case-Instance or a whole Application.\n * In the Upload Dialog the User is able to select a local File and enter a short Description.\n *\n * The Component stores also the following Data\n * - uploading User\n * - Timestamp\n * - File Size\n *\n * Document List<br>\n * ![alt-text](../live-apps-documents.png \"Documents Component Image\")\n * Document Upload Dialog <br>\n * ![alt-text](../Docs-Upload.png \"Documents Component Image\")\n *\n *@example <tcla-live-apps-documents></tcla-live-apps-documents>\n */\n\n@Component({\n  selector: 'tcla-live-apps-documents',\n  templateUrl: './live-apps-documents.component.html',\n  styleUrls: ['./live-apps-documents.component.css']\n})\nexport class LiveAppsDocumentsComponent extends LiveAppsComponent implements OnInit {\n\n  constructor(protected liveapps: LiveAppsService, protected documentsService: TcDocumentService, public dialog: MatDialog) {\n    super();\n  }\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * orgFolders' or 'caseFolders' - different API calls made according to which one this is\n   */\n  @Input() folderType: string; // 'orgFolders' or 'caseFolders'\n\n  /**\n   * The organisation folder to store/retrieve documents\n   */\n  @Input() folderId: string;   // caseRef for caseFolder\n\n  /**\n   * NOT used but would allow a search filter on documents\n   */\n  @Input() filter: string;\n\n  /**\n   * header text on component (defaults to documents)\n   */\n  @Input() folderDescription: string;\n\n  /**\n   * Whether to show the header bar in the widget - eg. favorites on home page (contains icon etc) - if off icons still appear without bar\n   */\n  public showHeader: boolean = true;\n  @Input('showHeader') set ShowHeader(showHeader: boolean) {\n    if (showHeader){\n      this.showHeader = showHeader;\n    }\n  }\n\n  /**\n   * Custom Document Buttons (array of text)\n   */\n  @Input() customActions: string[]\n\n  /**\n   * Custom Document Action Event: fired when a custom action is clicked for a document (outputs the action name and a document (DocumentAction))\n   */\n  @Output() customActionClicked: EventEmitter<DocumentAction> = new EventEmitter<DocumentAction>()\n\n  public errorMessage: string;\n  public documents: Document[];\n  public fileToUpload: File = undefined;\n  public fileDescription: string;\n  uploadMessage: string;\n  public uploadProgress: number;\n\n  public refresh = () => {\n    this.listDocuments();\n  }\n\n  public customActionClick = (action: string, document: Document) => {\n    this.customActionClicked.emit(new DocumentAction().deserialize(\n      {\n        action,\n        document\n      }\n    ));\n  }\n\n  public listDocuments = () => {\n    this.documentsService.listDocuments(this.folderType, this.folderId, this.sandboxId, this.filter)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      )\n      .subscribe(documentslist => {\n        this.documents = documentslist.documents;\n      }, error => { this.errorMessage = 'Error retrieving case states: ' + error.error.errorMsg; });\n    }\n\n  public uploadDocument = (doc) => {\n  }\n\n  public removeDocument = (doc) => {\n    this.documentsService.deleteDocument(this.folderType, this.folderId, doc.name, this.sandboxId)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      )\n      .subscribe(\n        val => {\n          console.log(val);\n          this.refresh();\n        }, error => { this.errorMessage = 'Error removing document: ' + error.errorMsg; });\n  }\n\n  public viewDocument = (doc) => {\n    const viewDocDialogRef = this.dialog.open(LiveAppsDocumentViewerDialogComponent, {\n      width: '75%',\n      height: '75%',\n      data: {\n        doc: doc,\n        folderType: this.folderType,\n        folderId: this.folderId,\n        sandboxId: this.sandboxId\n      }\n    });\n\n    viewDocDialogRef.afterClosed().subscribe(result => {\n    });\n  }\n\n  public downloadDocument = (doc) => {\n    this.documentsService.downloadDocument(this.folderType, this.folderId, doc.name, doc.artifactVersion, this.sandboxId)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      )\n      .subscribe(\n        data => {\n          // todo: check if this works on all browsers\n          const downloadURL = window.URL.createObjectURL(data);\n          const link = document.createElement('a');\n          link.href = downloadURL;\n          link.download = doc.name;\n          link.click();\n        }, error => { this.errorMessage = 'Error downloading document: ' + error.errorMsg; });\n  }\n\n  attachFile(files: FileList) {\n    this.uploadMessage = '';\n    this.fileToUpload = files.item(0);\n  }\n\n  setFileDescription(description: string) {\n    this.fileDescription = description;\n  }\n\n  uploadFile(fileToUpload, description) {\n    this.fileToUpload = fileToUpload;\n    this.uploadMessage = 'Uploading: ' + fileToUpload.name;\n    this.fileDescription = description;\n    this.uploadProgress = 0;\n    if (this.fileToUpload) {\n      this.documentsService.uploadDocument(this.folderType, this.folderId, this.sandboxId,\n        this.fileToUpload, this.fileToUpload.name, this.fileDescription)\n        .subscribe(\n          (response: any) => {\n            if (response.type === HttpEventType.UploadProgress) {\n              this.uploadProgress = Math.round(100 * response.loaded / response.total);\n              if (this.uploadProgress === 100) {\n                this.fileToUpload = undefined;\n                this.uploadMessage = 'Uploaded: ' + fileToUpload.name;\n                // api seems not to show new documents straight away sometimes - so this minimizes the chances of that\n                setTimeout(() => { this.refresh(); }, 1000);\n                setTimeout(() => { this.uploadMessage = ''; this.uploadProgress = undefined; }, 5000);\n              }\n            }\n          },\n          error => { console.log('error'); this.errorMessage = 'Error uploading document: ' + error.errorMsg; });\n    }\n  }\n\n  openDialog(): void {\n    // only allow if upload not in progress\n    if (!this.uploadProgress || this.uploadProgress === 100) {\n      const dialogRef = this.dialog.open(LiveAppsDocumentUploadDialogComponent, {\n        width: '500px',\n        data: {}\n      });\n\n      dialogRef.componentInstance.fileevent.subscribe(($e) => {\n        this.uploadFile($e.file, $e.description);\n      })\n\n      dialogRef.afterClosed().subscribe(result => {\n      });\n    }\n  }\n\n  ngOnInit() {\n    this.refresh();\n  }\n}\n\n@Component({\n  selector: 'tcla-live-apps-document-upload-dialog',\n  templateUrl: 'app-live-apps-document-upload-dialog.html',\n  styleUrls: [ 'app-live-apps-document-upload-dialog.css']\n})\nexport class LiveAppsDocumentUploadDialogComponent {\n\n  @Output() fileevent = new EventEmitter<any>();\n  public fileToUpload: File = undefined;\n  public description: string = undefined;\n\n  constructor(\n    public dialogRef: MatDialogRef<LiveAppsDocumentUploadDialogComponent>) {}\n\n\n  public uploadFile = () => {\n    if (this.fileToUpload) {\n      this.fileevent.emit({ file: this.fileToUpload, description: this.description });\n      this.dialogRef.close();\n    }\n  }\n\n  setFileDescription(description: string) {\n    this.description = description;\n  }\n\n  attachFile(files: FileList) {\n    // this.uploadMessage = '';\n    this.fileToUpload = files.item(0);\n  }\n\n  onNoClick(): void {\n    this.dialogRef.close();\n  }\n\n}\n\n@Component({\n  selector: 'tcla-live-apps-document-viewer-dialog',\n  templateUrl: 'app-live-apps-document-viewer-dialog.html',\n  styleUrls: [ 'app-live-apps-document-viewer-dialog.css']\n})\nexport class LiveAppsDocumentViewerDialogComponent {\n  public doc: Document;\n  public folderType: string;\n  public folderId: string;\n  public sandboxId: number;\n\n  constructor(\n    public dialogRef: MatDialogRef<LiveAppsDocumentUploadDialogComponent>,\n    @Inject(MAT_DIALOG_DATA) public data: any) {\n    this.doc = this.data.doc;\n    this.folderType = this.data.folderType;\n    this.folderId = this.data.folderId;\n    this.sandboxId = this.data.sandboxId;\n  }\n\n  onNoClick(): void {\n    this.dialogRef.close();\n  }\n\n}\n\n","<div class=\"tcs-documents-pane\" fxFill fxLayout=\"column\">\n  <div *ngIf=\"showHeader\" class=\"tcs-documents-header\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n    <div fxLayoutAlign=\"start center\">\n      <mat-icon class=\"tcs-icon tcs-icon-active tcs-collaboration-feed\" svgIcon=\"tcs-document-library\"></mat-icon>\n      <div class=\"tcs-documents-header-text\">{{folderDescription ? folderDescription : 'Documents'}}</div>\n    </div>\n    <mat-icon (click)=\"openDialog()\" [ngClass]=\"{'tcs-icon-disabled' : uploadProgress < 100}\" class=\"tcs-icon tcs-icon-active tcs-document-edit-buttons tcs-document-upload-icon\" [matTooltip]=\"(uploadProgress && uploadProgress !== 100) ? 'Please wait for existing document to upload' : 'Upload Document'\" matTooltipPosition=\"left\" matTooltipShowDelay=\"1000\" svgIcon=\"tcs-document-upload\"></mat-icon>\n  </div>\n  <div *ngIf=\"!showHeader\" fxLayout=\"row\" fxLayoutAlign=\"end center\">\n    <mat-icon style=\"margin: 5px\" [ngClass]=\"{'tcs-icon-disabled' : uploadProgress < 100}\" (click)=\"openDialog()\" class=\"tcs-icon tcs-icon-active tcs-document-edit-buttons tcs-document-upload-icon\" [matTooltip]=\"(uploadProgress && uploadProgress !== 100) ? 'Please wait for existing document to upload' : 'Upload Document'\" matTooltipPosition=\"left\" matTooltipShowDelay=\"1000\" svgIcon=\"tcs-document-upload\"></mat-icon>\n  </div>\n  <div fxLayout=\"column\" style=\"overflow: auto\">\n    <div *ngIf=\"uploadProgress\">\n      <div>{{uploadMessage}}</div>\n      <mat-progress-bar\n        mode=\"determinate\"\n        [value]=\"uploadProgress\"\n      >\n      </mat-progress-bar>\n    </div>\n    <div class=\"tcs-document-list\" fxLayout=\"column\">\n      <div *ngIf=\"documents && documents.length > 0\">\n        <div class=\"tcs-document-detail-box tcs-document\" *ngFor=\"let document of documents | orderByDate: 'lastModifiedDate'\" fxLayout=\"column\">\n          <div class=\"tcs-document-box\" fxLayoutAlign=\"space-between center\" fxLayout=\"row\" fxFlex>\n            <div fxLayoutAlign=\"start center\">\n              <mat-icon class=\"tcs-icon tcs-icon-active tcs-document-type-icon\" svgIcon=\"tcs-document-{{document.fileIcon}}\"></mat-icon>\n            </div>\n            <div class=\"tcs-document-details-text-box\" fxLayout=\"column\" fxLayoutAlign=\"center start\" fxFlex>\n                <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFill>\n                  <div class=\"tcs-document-name-text\" matTooltip=\"{{document.name}}\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\">{{document.name | ellipsis: 30}}</div>\n                  <div fxLayout=\"row\" fxLayoutAlign=\"end center\" fxFlex>\n                    <div class=\"tcs-document-filesize-text\">&nbsp;({{document.fileSize}})</div>\n                  </div>\n                </div>\n                <div class=\"tcs-document-comment-text\" matTooltip=\"{{document.description}}\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\">{{document.description | ellipsis: 50}}</div>\n              <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n                <div class=\"tcs-document-modified-text\">{{document.lastModifiedDate | durationSince}}</div>\n                <div *ngIf=\"document.lastModifiedByDetails\" class=\"tcs-document-modified-text\" matTooltip=\"{{document.lastModifiedByDetails.username}}\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\">&nbsp;by {{document.lastModifiedByDetails.username | ellipsis: 40}}</div>\n              </div>\n            </div>\n\n            <div fxLayoutAlign=\"end center\">\n              <mat-icon [matMenuTriggerFor]=\"docActionMenu\" class=\"tcs-icon tcs-icon-active tcs-document-action-icon\" svgIcon=\"tcs-document-action\"></mat-icon>\n              <mat-menu #docActionMenu=\"matMenu\" class=\"tcs-icon tcs-icon-active tcs-document-action-icon\">\n                <button class=\"tcs-document-action-text\" mat-menu-item (click)=\"viewDocument(document)\">View</button>\n                <button class=\"tcs-document-action-text\" mat-menu-item (click)=\"downloadDocument(document)\">Download</button>\n                <button class=\"tcs-document-action-text\" mat-menu-item (click)=\"removeDocument(document)\">Delete</button>\n                <button *ngFor=\"let customAction of customActions\" class=\"tcs-document-action-text\" mat-menu-item (click)=\"customActionClick(customAction, document)\">{{customAction}}</button>\n              </mat-menu>\n\n\n            </div>\n          </div>\n          <div class=\"tcs-document-line\"></div>\n        </div>\n      </div>\n      <div *ngIf=\"!(documents?.length > 0)\" fxLayout=\"row\" fxLayoutAlign=\"center start\" fxLayoutGap=\"10px\" style=\"margin-top: 20px;\">\n        <mat-icon [svgIcon]=\"'ic-no-docs-icon'\" style=\"height: 48px; width: 48px;\"></mat-icon>\n        <div style=\"height: 100%\" fxLayoutAlign=\"start center\">\n          <span class=\"tcs-no-item-text\">No documents found</span>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n\n","<h1 mat-dialog-title>Upload New File</h1>\n<div mat-dialog-content>\n  <form #fileUploadForm=\"ngForm\" fxFlex fxLayout=\"column\">\n    <div fxLayout=\"row\">\n      <button type=\"button\" mat-raised-button (click)=\"fileInput.click()\">Choose File To Upload</button>\n      <div *ngIf=\"fileToUpload\">{{fileToUpload.name}}</div>\n      <!-- below input is hidden and enabled by above button -->\n      <input class=\"tcs-hidden-input\" (change)=\"attachFile($event.target.files)\" #fileInput type=\"file\" id=\"file\">\n    </div>\n    <mat-form-field fxFlex>\n      <input matInput name=\"description\" type=\"text\" placeholder=\"Comments\" [(ngModel)]=\"description\"/>\n    </mat-form-field>\n\n  </form>\n</div>\n<div mat-dialog-actions>\n  <button mat-button (click)=\"uploadFile()\" type=\"submit\" [disabled]=\"!fileToUpload\">Upload</button>\n  <button mat-button (click)=\"onNoClick()\">Cancel</button>\n</div>\n","<div fxFill fxLayout=\"column\">\n<h1 mat-dialog-title>View Document</h1>\n<div mat-dialog-content fxFlex=\"grow\" style=\"overflow: hidden\">\n  <tcla-live-apps-document-viewer [document]=\"doc\" [folderId]=\"folderId\" [folderType]=\"folderType\" [sandboxId]=\"sandboxId\"></tcla-live-apps-document-viewer>\n</div>\n<div mat-dialog-actions>\n  <button mat-button (click)=\"onNoClick()\">Close</button>\n</div>\n</div>\n","import {Deserializable} from '@tibco-tcstk/tc-core-lib';\nimport {CaseTypeStatesList} from './liveappsdata';\nimport {AuditEventAttribute, AuditEventList} from './tc-case-audit';\n\nexport class StateAuditEvent implements Deserializable {\n  caseState: AuditEventAttribute;\n  type: AuditEventAttribute;\n  phaseLabel: AuditEventAttribute;\n  previousPhaseLabel: AuditEventAttribute;\n  messageId: AuditEventAttribute;\n  principalName: AuditEventAttribute;\n  creationTime: AuditEventAttribute;\n  isTerminal: boolean;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class StateAuditEventList implements Deserializable {\n  auditEvents: StateAuditEvent[];\n  deserialize(input: any) {\n    this.auditEvents = [];\n    Object.assign(this.auditEvents, input);\n    return this;\n  }\n}\n\nexport class StateTrackerData implements Deserializable {\n  possibleStates: CaseTypeStatesList;\n  currentState: string;\n  phase: string;\n  caseAudit: StateAuditEvent[];\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class TrackerState implements Deserializable {\n  name: string;\n  label: string;\n  phase: string;\n  previousPhase: string;\n  isTerminal: boolean;\n  status: string;\n  user: string;\n  changed: string;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class StateTracker implements Deserializable {\n  states: TrackerState[];\n  valid: boolean;\n  deserialize(input: any) {\n    this.states = [];\n    Object.assign(this.states, input);\n    return this;\n  }\n}\n","import {Deserializable} from '@tibco-tcstk/tc-core-lib';\nimport {CaseInfo, JsonSchema} from './liveappsdata';\n\nexport class CaseInfoWithSchema implements Deserializable {\n  caseInfo: CaseInfo;\n  caseSchema: JsonSchema;\n  applicationName: string;\n  applicationInternalName: string;\n  name: string;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class PurgeResult implements Deserializable {\n  mfpCount: number;\n\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\n","import { Injectable } from '@angular/core';\nimport {forkJoin, Observable, of, zip} from 'rxjs';\nimport {CaseInfo, CaseType, JsonSchema} from '../models/liveappsdata';\nimport {LiveAppsService} from './live-apps.service';\nimport {HttpClient} from '@angular/common/http';\nimport {CaseInfoWithSchema, PurgeResult} from '../models/tc-case-data';\nimport {map, mergeMap, tap} from 'rxjs/operators';\nimport {TcCaseCardConfigService} from './tc-case-card-config.service';\nimport {LaProcessSelection} from '../models/tc-case-processes';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TcCaseDataService {\n\n  constructor(private http: HttpClient, private liveAppsService: LiveAppsService, private caseCardConfigService: TcCaseCardConfigService) { }\n\n  public getMainCaseTypeFromSchema(typeId: string, process: LaProcessSelection): CaseType {\n    let requestedType: CaseType;\n    process.appSchema.casetypes.forEach((cType) => {\n      if (cType.id === typeId) {\n        requestedType = cType;\n      }\n    });\n    return requestedType;\n  }\n\n  public getCaseState(caseRef: string, sandboxId: number): Observable<string> {\n    const url = '/case/v1/cases/' + caseRef + '/' + '?$sandbox=' + sandboxId + '&$select=s';\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(caseinfo => {\n          const caseinf = new CaseInfo().deserialize(caseinfo);\n          const state: string = caseinf.summaryObj.state;\n          return state;\n        })\n      );\n  }\n\n\n  public purgeAllCases(applicationId: string, typeId: string, sandboxId: number): Observable<PurgeResult> {\n    const url = '/case/v1/cases/?$sandbox=1930&$filter=applicationId eq 2550 and typeId eq 1 and purgeable eq TRUE';\n    return this.http.delete(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(result => {\n          return new PurgeResult().deserialize(result);\n        })\n      );\n  }\n\n  public getCaseWithSchema(\n    caseRef: string, sandboxId: number, appId: string, typeId: string, uiAppId: string): Observable<CaseInfoWithSchema> {\n    const url = '/case/v1/cases/' + caseRef + '/' + '?$sandbox=' + sandboxId + '&$select=uc, m, s';\n    // Make the two required API calls\n\n    const caseSchema = this.liveAppsService.getCaseTypeSchema(sandboxId, appId, 100).pipe(\n      tap(val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n      map(typesList => {\n        // get schema for case type\n        let requestedType: CaseType;\n        typesList.casetypes.forEach((cType) => {\n          if (cType.id === typeId) {\n            requestedType = cType;\n          }\n        });\n        return requestedType;\n      })\n    );\n\n    const caseData = this.http.get(url)\n      .pipe(\n        tap(val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(caseinfo => {\n          const caseinf = new CaseInfo().deserialize(caseinfo);\n          this.caseCardConfigService.parseCaseInfo(\n            caseinf,\n            sandboxId,\n            caseinf.metadata.applicationId,\n            caseinf.metadata.typeId,\n            uiAppId\n          );\n          return caseinf;\n        })\n      );\n\n    // Combine the results of both calls into a single response\n    const test1 = zip(caseSchema, caseData).pipe(\n      map(caseInfoArray => {\n        return new CaseInfoWithSchema().deserialize({ caseInfo: caseInfoArray[1], caseSchema: caseInfoArray[0].jsonSchema, applicationName: caseInfoArray[0].applicationName, applicationInternalName: caseInfoArray[0].applicationInternalName, name: caseInfoArray[0].name });\n      })\n    );\n    return test1;\n  }\n\n  public getCaseDataByRefs(sandboxId: number, caseRefs: string[]): Observable<CaseInfo[]> {\n    const caseRefsList = caseRefs.join(',');\n    const url = '/case/v1/cases' + '?$sandbox=' + sandboxId\n      + '&$select=cr,uc,m,s'\n      + '&$filter=caseReference in('\n      + caseRefs + ')';\n    return this.http.get(url).pipe(\n      map((result: CaseInfo[]) => {\n        const cases = [];\n        result.forEach(res => {\n          cases.push(new CaseInfo().deserialize(res));\n        })\n        return cases;\n      })\n    );\n  }\n\n}\n","import { Injectable } from '@angular/core';\nimport {forkJoin, Observable} from 'rxjs';\nimport {LiveAppsService} from './live-apps.service';\nimport {TcCaseDataService} from './tc-case-data.service';\nimport {map, tap} from 'rxjs/operators';\nimport {HttpClient} from '@angular/common/http';\nimport {StateTrackerData, StateTracker, TrackerState, StateAuditEventList, StateAuditEvent} from '../models/tc-case-states';\nimport {DomSanitizer, SafeHtml} from '@angular/platform-browser';\nimport {Location} from '@angular/common';\nimport {TcAppDefinitionService} from '../services/tc-app-definition.service';\nimport {CaseTypeStatesList} from '../models/liveappsdata';\n\nconst MILESTONE_SVG = {\n  END_SECTION_COMPLETED_SVG: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"94\" height=\"36\" viewBox=\"0 0 94 36\">\\n' +\n  '    <path class=\"{{milestoneBgClass}}\" fill=\"none\" fill-rule=\"evenodd\" d=\"M0 0h76c9.941 0 18 8.059 18 18s-8.059 18-18 18H0c6.095-3.675 10.172-10.361 10.172-18C10.172 10.361 6.095 3.675 0 0z\"/>\\n' +\n  '    <text fill=\"#FFF\" font-family=\"SourceSansPro-Regular, Source Sans Pro\" font-size=\"{{fontSize}}\">\\n' +\n  '        <tspan x=\"16\" y=\"23\" class=\"{{milestoneLabelClass}}\">{{milestoneLabel}}</tspan>\\n' +\n  '    </text>\\n' +\n  '</svg>\\n',\n  END_SECTION_INPROGESS_SVG: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"94\" height=\"36\" viewBox=\"0 0 94 36\">\\n' +\n  '    <path class=\"{{milestoneBgClass}}\" fill=\"none\" fill-rule=\"evenodd\" d=\"M0 0h76c9.941 0 18 8.059 18 18s-8.059 18-18 18H0c6.095-3.675 10.172-10.361 10.172-18C10.172 10.361 6.095 3.675 0 0z\"/>\\n' +\n  '    <text fill=\"#FFF\" font-family=\"SourceSansPro-Regular, Source Sans Pro\" font-size=\"{{fontSize}}\">\\n' +\n  '        <tspan x=\"16\" y=\"23\" class=\"{{milestoneLabelClass}}\">{{milestoneLabel}}</tspan>\\n' +\n  '    </text>\\n' +\n  '</svg>\\n',\n  END_SECTION_PENDING_SVG: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"94\" height=\"36\" viewBox=\"0 0 94 36\">\\n' +\n  '    <path class=\"{{milestoneBgClass}}\" fill=\"none\" fill-rule=\"evenodd\" d=\"M0 0h76c9.941 0 18 8.059 18 18s-8.059 18-18 18H0c6.095-3.675 10.172-10.361 10.172-18C10.172 10.361 6.095 3.675 0 0z\"/>\\n' +\n  '    <text class=\"pending-text\" fill=\"#FFF\" font-family=\"SourceSansPro-Regular, Source Sans Pro\" font-size=\"{{fontSize}}\">\\n' +\n  '        <tspan x=\"16\" y=\"23\" class=\"{{milestoneLabelClass}}\">{{milestoneLabel}}</tspan>\\n' +\n  '    </text>\\n' +\n  '</svg>\\n',\n  FIRST_SECTION_COMPLETED_SVG: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"94\" height=\"36\" viewBox=\"0 0 94 36\">\\n' +\n  '<path class=\"{{milestoneBgClass}}\" fill=\"none\" fill-rule=\"evenodd\" d=\"M93.42 0C87.176 3.675 83 10.361 83 18c0 7.639 4.176 14.325 10.42 18H0c6.36-3.675 10.614-10.361 10.614-18C10.614 10.361 6.36 3.675 0 0h93.42z\"/>\\n' +\n  '<text fill=\"#FFF\" font-family=\"SourceSansPro-Regular, Source Sans Pro\" font-size=\"{{fontSize}}\">\\n' +\n  '    <tspan x=\"16\" y=\"23\" class=\"{{milestoneLabelClass}}\">{{milestoneLabel}}</tspan>\\n' +\n  '</text>\\n' +\n  '</svg>\\n',\n  FIRST_SECTION_INPROGRESS_SVG: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"94\" height=\"36\" viewBox=\"0 0 94 36\">\\n' +\n  '    <path class=\"{{milestoneBgClass}}\" fill=\"none\" fill-rule=\"evenodd\" d=\"M93.42 0C87.176 3.675 83 10.361 83 18c0 7.639 4.176 14.325 10.42 18H0c6.36-3.675 10.614-10.361 10.614-18C10.614 10.361 6.36 3.675 0 0h93.42z\"/>\\n' +\n  '    <text fill=\"#FFF\" font-family=\"SourceSansPro-Regular, Source Sans Pro\" font-size=\"{{fontSize}}\">\\n' +\n  '        <tspan x=\"16\" y=\"23\" class=\"{{milestoneLabelClass}}\">{{milestoneLabel}}</tspan>\\n' +\n  '    </text>\\n' +\n  '</svg>',\n  FIRST_SECTION_PENDING_SVG: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"94\" height=\"36\" viewBox=\"0 0 94 36\">\\n' +\n  '    <path class=\"{{milestoneBgClass}}\" fill=\"none\" fill-rule=\"evenodd\" d=\"M93.42 0C87.176 3.675 83 10.361 83 18c0 7.639 4.176 14.325 10.42 18H0c6.36-3.675 10.614-10.361 10.614-18C10.614 10.361 6.36 3.675 0 0h93.42z\"/>\\n' +\n  '    <text fill=\"#FFF\" font-family=\"SourceSansPro-Regular, Source Sans Pro\" font-size=\"{{fontSize}}\">\\n' +\n  '        <tspan x=\"16\" y=\"23\" class=\"{{milestoneLabelClass}}\">{{milestoneLabel}}</tspan>\\n' +\n  '    </text>\\n' +\n  '</svg>\\n',\n  MIDDLE_SECTION_COMPLETED_SVG: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"164\" height=\"36\" viewBox=\"0 0 164 36\">\\n' +\n  '    <path class=\"{{milestoneBgClass}}\" fill=\"none\" fill-rule=\"evenodd\" d=\"M164 0c-6.09 3.675-10.163 10.361-10.163 18 0 7.639 4.073 14.325 10.163 18H0c6.095-3.675 10.172-10.361 10.172-18C10.172 10.361 6.095 3.675 0 0h164z\"/>\\n' +\n  '    <text fill=\"#FFF\" font-family=\"SourceSansPro-Regular, Source Sans Pro\" font-size=\"{{fontSize}}\">\\n' +\n  '        <tspan x=\"16\" y=\"23\" class=\"{{milestoneLabelClass}}\">{{milestoneLabel}}</tspan>\\n' +\n  '    </text>\\n' +\n  '</svg>\\n',\n  MIDDLE_SECTION_INPROGRESS_SVG: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"164\" height=\"36\" viewBox=\"0 0 164 36\">\\n' +\n  '    <path class=\"{{milestoneBgClass}}\" fill=\"none\" fill-rule=\"evenodd\" d=\"M164 0c-6.09 3.675-10.163 10.361-10.163 18 0 7.639 4.073 14.325 10.163 18H0c6.095-3.675 10.172-10.361 10.172-18C10.172 10.361 6.095 3.675 0 0h164z\"/>\\n' +\n  '    <text fill=\"#FFF\" font-family=\"SourceSansPro-Regular, Source Sans Pro\" font-size=\"{{fontSize}}\">\\n' +\n  '        <tspan x=\"16\" y=\"23\" class=\"{{milestoneLabelClass}}\">{{milestoneLabel}}</tspan>\\n' +\n  '    </text>\\n' +\n  '</svg>\\n',\n  MIDDLE_SECTION_PENDING_SVG: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"164\" height=\"36\" viewBox=\"0 0 164 36\">\\n' +\n  '    <path class=\"{{milestoneBgClass}}\" fill=\"none\" fill-rule=\"evenodd\" d=\"M164 0c-6.09 3.675-10.163 10.361-10.163 18 0 7.639 4.073 14.325 10.163 18H0c6.095-3.675 10.172-10.361 10.172-18C10.172 10.361 6.095 3.675 0 0h164z\"/>\\n' +\n  '    <text class=\"pending-text\" fill=\"#FFF\" font-family=\"SourceSansPro-Regular, Source Sans Pro\" font-size=\"{{fontSize}}\">\\n' +\n  '        <tspan x=\"16\" y=\"23\" class=\"{{milestoneLabelClass}}\">{{milestoneLabel}}</tspan>\\n' +\n  '    </text>\\n' +\n  '</svg>\\n'\n}\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TcCaseStatesService {\n\n  constructor(private http: HttpClient,\n              private liveAppsService: LiveAppsService,\n              private caseDataService: TcCaseDataService,\n              private appDefinitionService: TcAppDefinitionService,\n              private sanitizer: DomSanitizer,\n              private location: Location) { }\n\n  private getTrackerData = (caseRef: string, sandboxId: number, appId: string): Observable<StateTrackerData> => {\n    const possibleStates = new CaseTypeStatesList().deserialize(this.appDefinitionService.getCaseTypeByAppId(appId).states);\n    // merge the result of these two API calls into one object\n    const caseState$ = this.caseDataService.getCaseState(caseRef, sandboxId);\n    const stateAudit$ = this.getCaseStateAudit(caseRef, sandboxId);\n    return forkJoin([caseState$, stateAudit$]).pipe(\n      map(resultArr => {\n        return new StateTrackerData().deserialize(\n          { possibleStates: possibleStates, currentState: resultArr[0], caseAudit: resultArr[1].auditEvents }\n          );\n      })\n    );\n  }\n\n  private buildTracker = (trackerData: StateTrackerData): StateTracker => {\n    const tracker = new StateTracker();\n    tracker.states = [];\n    if (trackerData.caseAudit.length <= 0) {\n      // if no audit it has likely been deleted and we cannot create a milestone trailer\n      tracker.valid = false;\n    } else {\n      // work out the status of each state\n      // possible states: 'pending', 'inprogress', 'completed'\n      trackerData.possibleStates.states.forEach(state => {\n        const stateLabel = state.label;\n        const stateName = state.value;\n        const trackerState = new TrackerState();\n        trackerState.phase = '';\n        trackerState.previousPhase = '';\n        // no specific name coming from API so use label.\n        trackerState.name = state.label;\n        trackerState.label = state.label;\n        trackerState.isTerminal = state.isTerminal ? state.isTerminal : false;\n        // find last event for this state\n        const reversedEvents = [];\n        Object.assign(reversedEvents, trackerData.caseAudit);\n        reversedEvents.reverse();\n        const idx = reversedEvents.findIndex(auditEvent => auditEvent.caseState.value === state.value);\n        const origIdx = (trackerData.caseAudit.length - 1) - idx;\n        let thisEvent: StateAuditEvent;\n        if (idx === -1) {\n          // no audit events so we haven't reached this state yet\n          trackerState.status = 'pending';\n        } else {\n          thisEvent = trackerData.caseAudit[origIdx];\n          trackerState.user = thisEvent.principalName ? thisEvent.principalName.value : 'system';\n          trackerState.changed = thisEvent.creationTime ? thisEvent.creationTime.value : '';\n          trackerState.phase = thisEvent.phaseLabel ? thisEvent.phaseLabel.value : undefined;\n          trackerState.previousPhase = thisEvent.previousPhaseLabel ? thisEvent.previousPhaseLabel.value : undefined;\n          if (state.isTerminal) {\n            // if we have audit for this state and it is terminal it must be completed\n            trackerState.status = 'completed';\n          } else if ((trackerData.caseAudit.length - 1) === origIdx) {\n            // if this is the last audit entry then it is in progress\n            trackerState.status = 'inprogress';\n          } else {\n            // otherwise it must be completed\n            trackerState.status = 'completed';\n          }\n        }\n        tracker.states.push(trackerState);\n        tracker.valid = true;\n      });\n    }\n    return tracker;\n  }\n\n  public getTracker = (caseRef: string, sandboxId: number, appId: string): Observable<StateTracker> => {\n    const tracker$ = this.getTrackerData(caseRef, sandboxId, appId).pipe(\n      map(trackerData => {\n        return this.buildTracker(trackerData);\n      })\n    );\n    return tracker$;\n  }\n\n  public getCaseStateAuditWithTerminal(caseRef: string, sandboxId: number, appId: string): Observable<StateAuditEventList> {\n    const possibleStates = new CaseTypeStatesList().deserialize(this.appDefinitionService.getCaseTypeByAppId(appId).states);\n    const caseStateAudit$ = this.getCaseStateAudit(caseRef, sandboxId);\n    return caseStateAudit$.pipe(\n      map(result => {\n        const caseStateAudit = result;\n        // mark if any are terminal states\n        caseStateAudit.auditEvents.forEach(auditEvent => {\n          const foundState = possibleStates.states.find(state => state.value === auditEvent.caseState.value);\n          auditEvent.isTerminal = foundState.isTerminal ? foundState.isTerminal : false;\n        });\n        return caseStateAudit;\n      })\n    );\n  }\n\n  public getCaseStateAudit(caseRef: string, sandboxId: number): Observable<StateAuditEventList> {\n\n    const url = '/event/v1/auditEvents?$sandbox=' + sandboxId\n      + '&$filter=type eq \\'casestate\\''\n      + ' and id eq \\'' + caseRef + '\\'';\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(caseaudit => new StateAuditEventList().deserialize(caseaudit)));\n  }\n\n  public getMilestoneSectionSvg(stateLabel: string, labelClass: string, bgClass: string, svgFileName: string, fontSize?: string): SafeHtml {\n    /*return this.liveAppsService.getIconSVGText(TcCoreCommonFunctions.prepareUrlForStaticResource(this.location, 'assets/icons/milestones/' + svgFileName)).pipe(\n      map(svgcontents => {\n        let updatedsvg = svgcontents.replace('{{milestoneLabel}}', stateLabel);\n        updatedsvg = updatedsvg.replace('{{milestoneBgClass}}', bgClass);\n        updatedsvg = updatedsvg.replace('{{milestoneLabelClass}}', labelClass);\n        const newval = this.sanitizer.bypassSecurityTrustHtml(updatedsvg);\n        return newval;\n      })\n    );*/\n    // convert svgFileName to the inline property name\n    svgFileName = svgFileName.toUpperCase();\n    const regEx = /-|\\./gi;\n    svgFileName = svgFileName.replace(regEx, '_');\n    const svgcontents = MILESTONE_SVG[svgFileName];\n    if (svgcontents) {\n      let updatedsvg = svgcontents.replace('{{milestoneLabel}}', stateLabel);\n      updatedsvg = updatedsvg.replace('{{milestoneBgClass}}', bgClass);\n      updatedsvg = updatedsvg.replace('{{milestoneLabelClass}}', labelClass);\n      updatedsvg = updatedsvg.replace('{{fontSize}}', fontSize ? fontSize : '14px');\n      const newval = this.sanitizer.bypassSecurityTrustHtml(updatedsvg);\n      return newval;\n    } else {\n      return undefined;\n    }\n  }\n}\n","import {Component, Input, OnInit} from '@angular/core';\nimport {SafeHtml} from '@angular/platform-browser';\nimport {TcCaseStatesService} from '../../services/tc-case-states.service';\n\n/**\n * Render a dynamic milestone SVG\n *\n * ![alt-text](../live-apps-milestone.png \"Documents Component Image\")\n *\n *@example <tcla-live-apps-milestone></tcla-live-apps-milestone>\n */\n@Component({\n  selector: 'tcla-live-apps-milestone',\n  templateUrl: './live-apps-milestone.component.html',\n  styleUrls: ['./live-apps-milestone.component.css']\n})\nexport class LiveAppsMilestoneComponent implements OnInit {\n  @Input() isFirst: boolean;\n  @Input() isLast: boolean;\n  @Input() status: string;\n  @Input() label: string;\n\n  /**\n   * Small rendering vs normal - defaults to normal\n   */\n  @Input() small: boolean;\n  @Input() isTerminal: boolean;\n  @Input() phase: string;\n  @Input() previousPhase: string;\n\n  public sectionSVG: SafeHtml;\n  public milestoneSvg: string;\n  public type: string;\n\n  constructor(protected caseStatesService: TcCaseStatesService) { }\n\n  ngOnInit() {\n    // work out which section the MS trailer is (first/middle/end)\n    const section = this.isFirst ? 'first' : (this.isLast ? 'end' : 'middle');\n    // construct the icon filename\n    const svgFileName = section + '-section-' + this.status + '.svg';\n    // work out correct class\n    let bgClass;\n    if (this.status === 'completed' && this.isTerminal) {\n      bgClass = 'tc-ms-' + 'completed-terminal' + '-bg';\n    } else {\n      bgClass = 'tc-ms-' + this.status + '-bg';\n    }\n    if (this.isFirst || this.isLast) {\n      this.type = 'end-ms';\n    } else {\n      this.type = 'middle-ms';\n    }\n    this.milestoneSvg = 'tcs-milestone-' + this.status + (this.isTerminal ? '-terminal' : '');\n\n    this.sectionSVG = this.caseStatesService.getMilestoneSectionSvg(this.label, 'tc-ms-label', bgClass, svgFileName, this.small ? '16px' : undefined);\n  }\n\n}\n","<div class=\"tcs-milestone-block\" fxLayout=\"row\" fxLayoutAlign=\"center start\">\n  <mat-icon class=\"tc-ms-circle-icon\" [ngClass]=\"{'small': small}\" [svgIcon]=\"milestoneSvg\"></mat-icon>\n  <div class=\"tc-ms-detail {{type}}\" [ngClass]=\"{'small': small}\" [innerHtml]=\"sectionSVG\" fxLayoutAlign=\"start center\"></div>\n</div>\n","import {Component, Input, OnDestroy, OnInit} from '@angular/core';\nimport {CaseTypeState, CaseTypeStatesList, Metadata} from '../../models/liveappsdata';\nimport {Subject} from 'rxjs';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {map, take, takeUntil} from 'rxjs/operators';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {StateTracker, TrackerState} from '../../models/tc-case-states';\nimport {TcCaseStatesService} from '../../services/tc-case-states.service';\nimport {DurationSincePipe} from '@tibco-tcstk/tc-core-lib';\n\n\n/**\n * Case States/Milestone view\n *\n * ![alt-text](../live-apps-case-states.png \"Image\")\n *\n *@example <tcla-live-apps-case-states></tcla-live-apps-case-states>\n */\n@Component({\n  selector: 'tcla-live-apps-case-states',\n  templateUrl: './live-apps-case-states.component.html',\n  styleUrls: ['./live-apps-case-states.component.css']\n})\nexport class LiveAppsCaseStatesComponent extends LiveAppsComponent implements OnInit {\n  /**\n   * The LA Application Id\n   */\n  @Input() appId: string;\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The case reference\n   */\n  @Input() caseRef: string;\n\n  /**\n   * Small rendering vs normal - defaults to normal\n   */\n  @Input() small: boolean;\n\n  /**\n   * Hide milestone title - default false\n   */\n  @Input() hideTitle: boolean;\n\n\n  public states: CaseTypeState[];\n  public tracker: StateTracker;\n  public errorMessage: string;\n\n  public getToolTipText = (trackerState: TrackerState): string => {\n    let toolTipText = '';\n    if (trackerState.status !== 'pending') {\n      toolTipText = toolTipText + trackerState.user + ' ' + this.durationSince.transform(trackerState.changed);\n    }\n    return toolTipText;\n  }\n\n  public refresh = () => {\n    this.caseStatesService.getTracker(this.caseRef, this.sandboxId, this.appId).pipe(\n      take(1),\n      takeUntil(this._destroyed$)\n    ).subscribe(\n      tracker => {\n        this.tracker = tracker;\n        if (!tracker.valid) {\n          console.error('Unable to create milestone trailer. Case Audit likely removed due to subscription retention period.');\n        }\n        return tracker;\n      }, error => { this.errorMessage = 'Error constructing state tracker: ' + error.error.errorMsg; });\n  }\n\n  constructor(protected caseStatesService: TcCaseStatesService, protected durationSince: DurationSincePipe) {\n    super();\n  }\n\n  ngOnInit() {\n    this.refresh();\n  }\n\n}\n","<div fxFlex class=\"starters-case-states-container\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n  <div *ngIf=\"tracker && tracker.valid\">\n    <span *ngIf=\"!hideTitle\" class=\"tc-milestone-title\" fxLayoutAlign=\"start center\">Milestones</span>\n    <div style=\"padding-left: 10px\"></div>\n    <div fxFlex class=\"starters-milestone-trailer\" fxLayout=\"row wrap\">\n      <div class=\"starters-ms-wrapper\" *ngFor=\"let trackerState of tracker.states; first as isFirst; last as isLast\" ngclass=\"{'starters-milestone-first-section': isFirst, 'starters-milestone-mid-section': (!isFirst && !isLast), 'starters-milestone-end-section': isLast}\">\n        <tcla-live-apps-milestone [small]=\"small\" [isFirst]=\"isFirst\" [isLast]=\"isLast\" [isTerminal]=\"trackerState.isTerminal\" [label]=\"trackerState.label\" [phase]=\"trackerState.phase\" [previousPhase]=\"trackerState.previousPhase\" [status]=\"trackerState.status\" [matTooltip]=\"getToolTipText(trackerState)\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\"></tcla-live-apps-milestone>\n      </div>\n    </div>\n  </div>\n  <div *ngIf=\"tracker && !tracker.valid\">\n    <span class=\"tc-milestone-title\">Milestone data not available</span>\n  </div>\n</div>\n\n\n","\n/*\n*     Case Type icons are stored in an orgFolder specified in liveAppsConfig.json (pushed to shared state)\n*     Icon Name will be appId.filename.svg\n*     Icon svg should contain <DYNAMICFILL> this will be set according to the color selected in this component\n*\n*     eg: 1742.ic-created.svg for Partner Portal Live Apps App (appId: 1742) 'Created' state\n*\n*     <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\">\n*        <path fill=\"<DYNAMICFILL>\" class=\"svg-content\" fill-rule=\"evenodd\" d=\"M7 14A7 7 0 1 1 7 0a7 7 0 0 1 0 14zm3.474-6.472a.527.527 0 0 0 0-1.053H7.526V3.527a.525.525 0 1 0-1.052 0v2.948H3.526a.527.527 0 0 0 0 1.053h2.948v2.948a.525.525 0 0 0 .898.373.525.525 0 0 0 .154-.373V7.528h2.948z\"/>\n*      </svg>\n*\n*\n */\nimport {\n  Component,\n  EventEmitter,\n  Inject,\n  Input,\n  OnChanges,\n  Output,\n  QueryList, SimpleChanges,\n  ViewChildren\n} from '@angular/core';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {CaseTypeState, IconMap} from '../../models/liveappsdata';\nimport { take, takeUntil} from 'rxjs/operators';\nimport {HttpClient} from '@angular/common/http';\nimport {DomSanitizer} from '@angular/platform-browser';\nimport {LiveAppsStateIconComponent} from '../live-apps-state-icon/live-apps-state-icon.component';\nimport {LiveAppsCaseSummaryComponent} from '../live-apps-case-summary/live-apps-case-summary.component';\nimport {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material/dialog';\nimport { Location } from '@angular/common';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {CaseCardConfig} from '../../models/tc-case-card-config';\nimport {DEFAULT_COLORS, DEFAULT_STATE_COLOR, DEFAULT_TYPE_COLOR, TcCaseCardConfigService} from '../../services/tc-case-card-config.service';\nimport {TcDocumentService} from '../../services/tc-document.service';\n\n\n\n/**\n * Manages summary card configuration\n *\n *@example <tcla-live-apps-application-configuration></tcla-live-apps-application-configuration>\n */\n\n@Component({\n  selector: 'tcla-live-apps-application-configuration',\n  templateUrl: './live-apps-application-configuration.component.html',\n  styleUrls: ['./live-apps-application-configuration.component.css']\n})\nexport class LiveAppsApplicationConfigurationComponent extends LiveAppsComponent implements OnChanges {\n  // The ViewChild declarations give access to components marked on the template so that I can call public functions like refresh\n  @ViewChildren('iconcomp') stateIconComponents: QueryList<LiveAppsStateIconComponent>;\n  @ViewChildren(LiveAppsCaseSummaryComponent) caseSummaryComponent: QueryList<LiveAppsCaseSummaryComponent>;\n\n  /**\n   * The LA Application Id\n   */\n  @Input() appId: string;\n\n  /**\n   * The label shown above the case type in the configuration widget\n   */\n  @Input() appTypeLabel: string;\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * The organisation folder to store/retrieve documents\n   */\n  @Input() folderId: string;\n\n  /**\n   * ~event configChanged : Configuration values changed\n   * ~payload CaseCardConfig : CaseCardConfig object when configuration is changed (so called can do a save with data)\n   */\n  @Output() configChanged: EventEmitter<CaseCardConfig> = new EventEmitter<CaseCardConfig>();\n\n  public errorMessage: string;\n  public caseCardConfig: CaseCardConfig;\n  public selectedStateConfig: IconMap;\n  public selectedCaseTypeConfig: IconMap;\n  public caseTypeIcon: string;\n  public caseTypeColor: string;\n\n  // prepareExternalUrl will add the base href\n  public DEFAULT_CASE_TYPE_ICON = 'assets/icons/ic-generic-casetype.svg';\n  public DEFAULT_CASE_TYPE_COLOR = DEFAULT_TYPE_COLOR;\n  public DEFAULT_CASE_STATE_ICON = 'assets/icons/ic-generic-state.svg';\n  public DEFAULT_CASE_STATE_COLOR = DEFAULT_STATE_COLOR;\n  public DEFAULT_COLOR_PALETTE = DEFAULT_COLORS;\n\n  public getConfigForState = (state: CaseTypeState): IconMap => {\n    let reqIconMap: IconMap;\n    if (this.caseCardConfig.cardConfig && this.caseCardConfig.cardConfig.stateMap) {\n      this.caseCardConfig.cardConfig.stateMap.forEach((stateMap) => {\n        if (stateMap.state === state.value) {\n          reqIconMap = stateMap;\n        }\n      });\n    }\n    return reqIconMap ? reqIconMap : new IconMap(false, state.value, this.DEFAULT_CASE_STATE_COLOR, this.DEFAULT_CASE_STATE_ICON);\n  }\n\n  public getConfigForCaseType = (caseTypeId: string): IconMap => {\n    let reqIconMap: IconMap;\n    if (this.caseCardConfig.cardConfig && this.caseCardConfig.cardConfig.stateMap) {\n      this.caseCardConfig.cardConfig.stateMap.forEach((stateMap) => {\n        if (stateMap.isCaseType) {\n          reqIconMap = stateMap;\n        }\n      });\n    }\n    return reqIconMap ? reqIconMap : new IconMap(true, caseTypeId, this.DEFAULT_CASE_TYPE_COLOR, this.DEFAULT_CASE_TYPE_ICON);\n  }\n\n  public updateIconMap = (stateConfig: IconMap) => {\n    let foundMap: IconMap;\n    if (this.caseCardConfig.cardConfig && this.caseCardConfig.cardConfig.stateMap) {\n      this.caseCardConfig.cardConfig.stateMap.forEach(function(stateMap) {\n        if (stateMap.state === stateConfig.state) {\n          foundMap = stateConfig;\n          stateMap.state = stateConfig.state;\n          stateMap.icon = stateConfig.icon;\n          stateMap.fill = stateConfig.fill;\n        }\n      });\n      if (foundMap) {\n        foundMap = stateConfig;\n      } else {\n        this.caseCardConfig.cardConfig.stateMap.push(stateConfig);\n      }\n    } else {\n      this.caseCardConfig.cardConfig.stateMap = [];\n      this.caseCardConfig.cardConfig.stateMap.push(stateConfig);\n    }\n    this.configChanged.emit(this.caseCardConfig);\n  }\n\n  public handleCaseTypeColorToggleChange = (changes) => {\n    this.caseCardConfig.cardConfig.useCaseTypeColor = changes.checked ? changes.checked : false;\n\n    // if (changes.checked) {\n      this.caseSummaryComponent.forEach((comp: LiveAppsCaseSummaryComponent) => {\n        // comp.restylePreview(this.selectedStateConfig.icon, this.caseTypeColor);\n        comp.togglePreviewUseCaseTypeColor(changes.checked);\n      });\n    // }\n    this.configChanged.emit(this.caseCardConfig);\n  }\n\n  public setFill = (fill, stateConfig: IconMap) => {\n    this.caseSummaryComponent.forEach((comp: LiveAppsCaseSummaryComponent) => {\n      comp.restylePreview(stateConfig.icon, fill);\n    });\n    this.stateIconComponents.find(function(comp) {\n      return comp.id === stateConfig.state;\n    }).refillSVG(fill);\n    this.configChanged.emit(this.caseCardConfig);\n  }\n\n  public setCaseTypeFill = (fill, stateConfig: IconMap) => {\n    this.caseSummaryComponent.forEach((comp: LiveAppsCaseSummaryComponent) => {\n      comp.restylePreviewCaseType(stateConfig.icon, fill);\n    });\n    this.stateIconComponents.find(function(comp) {\n      return (comp.id === stateConfig.state && stateConfig.isCaseType);\n    }).refillSVG(fill);\n    this.configChanged.emit(this.caseCardConfig);\n  }\n\n  public selectState = (state: CaseTypeState) => {\n    this.selectedStateConfig = this.getConfigForState(state);\n    if (!this.caseCardConfig.cardConfig.useCaseTypeColor) {\n      this.caseSummaryComponent.forEach((comp: LiveAppsCaseSummaryComponent) => {\n        comp.restylePreview(this.selectedStateConfig.icon, this.selectedStateConfig.fill);\n      });\n    }\n  }\n\n  /*public saveConfig = () => {\n    this.caseCardConfigService.updateCaseCardConfig(this.sandboxId, this.appId, this.uiAppId, this.caseCardConfig)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$),\n        map(caseCardConfig => {\n          this.caseCardConfig = caseCardConfig;\n        })\n      ).subscribe(null, error => { console.log('Unable to update case card config: ' + error.errorMsg); }\n    );\n  }*/\n\n  public openDialog(state: CaseTypeState, isCaseType: boolean): void {\n\n    if (!isCaseType) {\n      this.selectState(state);\n    } else {\n      state = new CaseTypeState().deserialize({ value: this.appTypeLabel });\n    }\n    const dialogRef = this.dialog.open(LiveAppsStateIconUploadDialogComponent, {\n      width: '500px',\n      data: { state: state, isCaseType: isCaseType }\n    });\n\n    dialogRef.componentInstance.fileevent.subscribe(($e) => {\n      this.uploadFile($e.file, $e.state, $e.isCaseType);\n    })\n\n    dialogRef.afterClosed().subscribe(result => {\n    });\n  }\n\n  public setNewStateIcon = (url) => {\n    this.selectedStateConfig.icon = url;\n    this.stateIconComponents.find((comp: LiveAppsStateIconComponent) => {\n      return (comp.id === this.selectedStateConfig.state);\n    }).refresh(this.selectedStateConfig.icon, this.selectedStateConfig.fill);\n    this.caseSummaryComponent.forEach((comp: LiveAppsCaseSummaryComponent) => {\n      comp.restylePreview(this.selectedStateConfig.icon, this.selectedStateConfig.fill);\n    });\n    this.updateIconMap(this.selectedStateConfig);\n  }\n\n  public setNewCaseTypeIcon = (url) => {\n    this.caseTypeIcon = url;\n    this.stateIconComponents.find((comp: LiveAppsStateIconComponent) => {\n      return (comp.id === this.appTypeLabel);\n    }).refresh(this.caseTypeIcon, this.caseTypeColor);\n    this.caseSummaryComponent.forEach((comp: LiveAppsCaseSummaryComponent) => {\n      comp.restylePreviewCaseType(this.caseTypeIcon, this.caseTypeColor);\n    });\n    this.updateIconMap(new IconMap(true, this.appTypeLabel, this.caseTypeColor, this.caseTypeIcon));\n  }\n\n  public uploadFile(file: File, state: CaseTypeState, isStateIcon: boolean) {\n    if (file) {\n      const url = 'webresource/v1/orgFolders/' + this.folderId + '/' + this.appId + '.' + file.name;\n      const dlUrl = 'webresource/orgFolders/' + this.folderId + '/' + this.appId + '.' + file.name;\n      this.liveapps.clearFromIconSVGTextCache(url);\n      this.documentsService.uploadDocument('orgFolders', this.folderId, this.sandboxId,\n        file, (this.appId + '.' + file.name), '')\n        .subscribe(\n          val => {\n            if (!isStateIcon) {\n              this.setNewStateIcon(dlUrl);\n            } else {\n              this.setNewCaseTypeIcon(dlUrl);\n            }\n          },\n          error => { console.log('error'); this.errorMessage = 'Error uploading state icon: ' + error.errorMsg; });\n    }\n  }\n\n  public refresh = () => {\n    // need states & cardConfig\n    this.selectedCaseTypeConfig = null;\n    this.caseCardConfigService.getCaseCardConfig(this.sandboxId, this.appId, this.uiAppId, this.appTypeLabel, this.DEFAULT_CASE_TYPE_COLOR, this.DEFAULT_CASE_TYPE_ICON, this.DEFAULT_CASE_STATE_COLOR, this.DEFAULT_CASE_STATE_ICON).pipe(\n      take(1),\n      takeUntil(this._destroyed$)\n    ).subscribe(\n      caseCardConfig => {\n        this.caseCardConfig = caseCardConfig;\n        // set default selected to first state for this case type (0 is case type)\n        this.selectedStateConfig = this.caseCardConfig.cardConfig.stateMap[1];\n        const caseTypeRec = this.caseCardConfig.cardConfig.stateMap.find(function(stateMap) {\n          return stateMap.isCaseType;\n        });\n\n        this.caseTypeIcon = caseTypeRec.icon;\n        this.caseTypeColor = caseTypeRec.fill;\n        this.selectedCaseTypeConfig = this.getConfigForCaseType(this.appTypeLabel);\n      }, error => { this.errorMessage = 'Error retrieving case card config: ' + error.error.errorMsg; });\n  }\n\n  constructor(protected http: HttpClient, protected sanitizer: DomSanitizer,\n              protected liveapps: LiveAppsService, public caseCardConfigService: TcCaseCardConfigService, protected documentsService: TcDocumentService, public dialog: MatDialog, protected location: Location) {\n    super();\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    if (changes.appId && (changes.appId.currentValue !== changes.appId.previousValue)) {\n      this.refresh();\n    }\n  }\n\n\n}\n\n@Component({\n  selector: 'tcla-live-apps-state-icon-upload-dialog',\n  templateUrl: 'upload-file-dialog/app-live-apps-state-icon-upload-dialog.html',\n  styleUrls: [ 'upload-file-dialog/app-live-apps-state-icon-upload-dialog.css']\n})\nexport class LiveAppsStateIconUploadDialogComponent {\n  @Output() fileevent = new EventEmitter<any>();\n  public fileToUpload: File = undefined;\n  public description: string = undefined;\n  public fileText: string;\n\n  constructor(\n    public dialogRef: MatDialogRef<LiveAppsStateIconUploadDialogComponent>, @Inject(MAT_DIALOG_DATA) public data: any) {}\n\n  public uploadFile = () => {\n    if (this.fileToUpload) {\n      this.fileevent.emit({ file: this.fileToUpload, state: this.data.state, isCaseType: this.data.isCaseType } );\n      this.dialogRef.close();\n    }\n  }\n\n  setFileDescription(description: string) {\n    this.description = description;\n  }\n\n  attachFile(files: FileList) {\n    this.fileToUpload = files.item(0);\n    /*const myReader: FileReader = new FileReader();\n    myReader.readAsText(this.fileToUpload);\n    this.fileText = myReader.result.toString();*/\n  }\n\n  onNoClick(): void {\n    this.dialogRef.close();\n  }\n\n}\n\n","<div *ngIf=\"appId\" class=\"tcs-case-card-customization\" fxLayout=\"column\">\n    <div fxLayout=\"row\" fxLayoutAlign=\"space-around stretch\" fxFlex>\n      <div fxLayout=\"column\" fxLayoutAlign=\"start center\" fxFlex>\n        <div fxLayout=\"column\" fxLayoutAlign=\"start center\">\n          <div class=\"tcs-case-card-customization-section-text\">Preview</div>\n        </div>\n        <div class=\"tcs-case-card-customization-preview\" fxLayout=\"column\" fxLayoutAlign=\"start center\" fxFlex>\n          <div *ngIf=\"selectedStateConfig && caseTypeColor && caseTypeIcon\" style=\"border-radius: 3px; margin: 5px;\" fxLayout=\"column\" fxLayoutAlign=\"space-around center\">\n            <tcla-live-apps-case-summary style=\"margin: 5px;\" [displayType]=\"'card'\" [typeBar]=\"true\" [configMode]=\"true\" [configModeColor]=\"selectedStateConfig.fill\" [configModeIcon]=\"selectedStateConfig.icon\" [configModeCaseTypeColor]=\"caseTypeColor\" [configModeCaseTypeIcon]=\"caseTypeIcon\" [configModeAppTypeLabel]=\"appTypeLabel\" [configModeUseCaseTypeColor]=\"caseCardConfig.cardConfig.useCaseTypeColor\"></tcla-live-apps-case-summary>\n            <tcla-live-apps-case-summary style=\"margin: 5px;\" [displayType]=\"'miniCard'\" [typeBar]=\"true\" [configMode]=\"true\" [configModeColor]=\"selectedStateConfig.fill\" [configModeIcon]=\"selectedStateConfig.icon\" [configModeCaseTypeColor]=\"caseTypeColor\" [configModeCaseTypeIcon]=\"caseTypeIcon\" [configModeAppTypeLabel]=\"appTypeLabel\" [configModeUseCaseTypeColor]=\"caseCardConfig.cardConfig.useCaseTypeColor\"></tcla-live-apps-case-summary>\n          </div>\n        </div>\n      </div>\n      <div class=\"tcs-case-card-customization-divider\"></div>\n      <div fxLayout=\"column\" fxLayoutAlign=\"start center\" fxFlex>\n        <div fxLayout=\"column\" fxLayoutAlign=\"start center\">\n          <div class=\"tcs-case-card-customization-section-text\">Configure Icons</div>\n        </div>\n        <div fxFlex>\n          <div fxFlex class=\"tcs-case-states-list\" *ngIf=\"caseCardConfig && caseCardConfig.cardConfig && caseCardConfig.states\" fxLayout=\"column\" fxLayoutAlign=\"start center\">\n            <div class=\"tcs-case-states-list-inner\">\n              <div class=\"case-type-color-toggle\">\n                <div fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n                  <mat-slide-toggle\n                  class=\"use-case-type-color\"\n                  [labelPosition]=\"'before'\"\n                  [checked]=\"caseCardConfig.cardConfig.useCaseTypeColor\"\n                  (change)=\"handleCaseTypeColorToggleChange($event)\">\n                  Use Case Type Color for color bar\n                  </mat-slide-toggle>\n                </div>\n              </div>\n              <div class=\"tcs-case-states-list-row\">\n                  <div fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n                    <div fxLayoutAlign=\"start center\" style=\"min-width: 170px;\">Case Type Icon</div>\n                    <tcla-live-apps-state-icon style=\"margin-left: 10px; margin-right: 10px; min-width: 14px;\" #iconcomp [id]=\"appTypeLabel\" [iconPath]=\"selectedCaseTypeConfig.icon\" [color]=\"selectedCaseTypeConfig.fill\"\n                                               [appId]=\"appId\" [(colorPicker)]=\"selectedCaseTypeConfig.fill\" (colorPickerChange)=\"setCaseTypeFill($event, selectedCaseTypeConfig)\" [cpPresetColors]=\"DEFAULT_COLOR_PALETTE\" [cpPositionOffset]=\"'-40%'\"\n                                              matTooltip=\"Click to change color\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\">\n                    </tcla-live-apps-state-icon>\n                    <mat-icon (click)=\"openDialog(null, true)\" class=\"tcs-icon tcs-icon-active tcs-config-button tcs-document-upload-button\" svgIcon=\"tcs-document-upload\"\n                              matTooltip=\"Click to upload new icon\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\">\n                    </mat-icon>\n                    <mat-icon class=\"tcs-icon tcs-icon-active tcs-config-button-placeholder\"></mat-icon>\n                  </div>\n              </div>\n              <div class=\"tcs-case-states-icon-divider\"></div>\n              <!-- case state icons -->\n              <div *ngFor=\"let state of caseCardConfig.states\" class=\"tcs-case-states-list-row\" (click)=\"selectState(state)\">\n                <div *ngIf=\"getConfigForState(state); let stateConfig;\">\n                  <div fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n                    <div fxLayoutAlign=\"start center\" style=\"min-width: 170px;\">{{state.label | ellipsis: 25}}</div>\n                    <tcla-live-apps-state-icon style=\"margin-left: 10px; margin-right: 10px; min-width: 14px;\" #iconcomp [id]=\"state.value\" [iconPath]=\"stateConfig.icon\" [color]=\"stateConfig.fill\"\n                                               [appId]=\"appId\" [(colorPicker)]=\"stateConfig.fill\" (colorPickerChange)=\"setFill($event, stateConfig)\" [cpPresetColors]=\"DEFAULT_COLOR_PALETTE\" [cpPositionOffset]=\"'-40%'\"\n                                              matTooltip=\"Click to change color\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\">\n                    </tcla-live-apps-state-icon>\n                    <mat-icon (click)=\"openDialog(state, false)\" class=\"tcs-icon tcs-icon-active tcs-config-button tcs-document-upload-button\" svgIcon=\"tcs-document-upload\"\n                              matTooltip=\"Click to upload new icon\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\">\n                    </mat-icon>\n                    <mat-icon class=\"tcs-icon tcs-icon-active tcs-config-button-placeholder\"></mat-icon>\n                  </div>\n                </div>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n\n  <!--div class=\"tcs-case-card-customization-footer\" fxLayout=\"column\" fxLayoutAlign=\"end stretch\">\n    <div class=\"tcs-case-card-customization-action-buttons\" fxLayout=\"row\" fxLayoutAlign=\"center center\">\n      <button class=\"tcs-save-app-config-button\" mat-button (click)=\"saveConfig()\" type=\"submit\">Save Configuration</button>\n    </div>\n  </div-->\n</div>\n","  <h1 mat-dialog-title>Upload New Icon (svg) for '{{data.state.value}}'</h1>\n  <div mat-dialog-content class=\"tcs-state-icon-upload-dialog\">\n    <form #fileUploadForm=\"ngForm\" fxFlex fxLayout=\"column\">\n      <div fxLayout=\"row\" fxLayoutAlign=\"start space-between\">\n        <button type=\"button\" mat-raised-button (click)=\"fileInput.click()\">Choose File To Upload</button>\n        <div *ngIf=\"fileToUpload\">{{fileToUpload.name}}</div>\n        <!-- below input is hidden and enabled by above button -->\n        <input class=\"tcs-hidden-input\" (change)=\"attachFile($event.target.files)\" accept=\"image/svg+xml\" #fileInput type=\"file\" id=\"file\">\n      </div>\n    </form>\n  </div>\n  <div mat-dialog-actions>\n    <button mat-button (click)=\"uploadFile()\" type=\"submit\" [disabled]=\"!fileToUpload\">Upload</button>\n    <button mat-button (click)=\"onNoClick()\">Cancel</button>\n  </div>\n","import {\n  AfterViewInit,\n  Component,\n  EventEmitter,\n  Input,\n  OnInit,\n  Output,\n} from '@angular/core';\nimport { take, takeUntil} from 'rxjs/operators';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {CaseRoute} from '../../models/liveappsdata';\nimport { TcCoreCommonFunctions} from '@tibco-tcstk/tc-core-lib';\n\n\n/**\n * This Component allows to list your Favorite Cases.\n *\n * ![alt-text](../live-apps-favorite-cases.png \"Documents Component Image\")\n *\n *@example <tcla-live-apps-favorite-cases></tcla-live-apps-favorite-cases>\n */\n@Component({\n  selector: 'tcla-live-apps-favorite-cases',\n  templateUrl: './live-apps-favorite-cases.component.html',\n  styleUrls: ['./live-apps-favorite-cases.component.css']\n})\nexport class LiveAppsFavoriteCasesComponent extends LiveAppsComponent implements OnInit, AfterViewInit {\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * case card format - list, card, miniCard, staticList (no click event)\n   */\n  public displayType: string = 'miniCard';\n  @Input('displayType') set DisplayType(displayType: string) {\n    if (displayType){\n      this.displayType = displayType;\n    }\n  }\n\n  /**\n   * Whether to show the header bar in the widget - eg. favorites on home page (contains icon etc) - if off icons still appear without bar\n   */\n  public showHeader: boolean = true;\n  @Input('showHeader') set ShowHeader(showHeader: boolean) {\n    if (showHeader){\n      this.showHeader = showHeader;\n    }\n  }\n\n  /**\n   * ~event clickCase : Case clicked\n   * ~payload CaseRoute : CaseRoute object output when case is clicked so calling component can route accordingly - ie. route to case\n   */\n  @Output() clickCase: EventEmitter<CaseRoute> = new EventEmitter<CaseRoute>();\n\n  public favoriteCases: string[];\n  public errorMessage: string;\n  public cardWidthPct: Number;\n\n  public clickCaseAction = (caseRoute: CaseRoute) => {\n    this.clickCase.emit(caseRoute);\n  }\n\n  public refresh = () => {\n    this.favoriteCases = [];\n    this.liveapps.getFavoriteCases(this.uiAppId, this.sandboxId)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      ).subscribe(\n      favoriteCases => {\n        this.favoriteCases = favoriteCases.caseRefs || [];\n      }, error => { this.errorMessage = 'Error retrieving favorite cases: ' + error.error.errorMsg; });\n  }\n\n  public clearFavoriteCases = () => {\n    this.liveapps.setFavoriteCase('-1', this.uiAppId, this.sandboxId);\n    this.favoriteCases = [];\n  }\n\n  public handleDeleted = (caseRef: string) => {\n    this.favoriteCases.splice(this.favoriteCases.indexOf(caseRef), 1);\n    this.liveapps.setFavoriteCase(caseRef, this.uiAppId, this.sandboxId);\n  }\n\n\n  constructor(protected liveapps: LiveAppsService) {\n    super();\n  }\n\n  ngAfterViewInit() {\n    super.ngAfterViewInit();\n    this.containerChanges$.subscribe(widget => {\n      this.cardWidthPct = TcCoreCommonFunctions.calcSummaryCardPct(widget);\n    });\n  }\n\n  ngOnInit() {\n    super.ngOnInit();\n    this.refresh();\n  }\n\n}\n","<div #componentDiv class=\"tcs-case-favorites-box\" fxLayout=\"column\" fxFill>\n  <div *ngIf=\"showHeader\" class=\"tcs-case-favorites-header\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n    <div fxLayoutAlign=\"start center\">\n      <mat-icon class=\"tcs-icon tcs-favorites-icon\" svgIcon=\"tcs-favorites-icon\"></mat-icon>\n      <div class=\"tcs-case-favorites-header-text\">Favorites</div>\n    </div>\n    <mat-icon (click)=\"clearFavoriteCases()\" class=\"tcs-icon tcs-icon-active tcs-clear-favorite-icon\" svgIcon=\"tcs-clear-icon\" matTooltip=\"Clear Favorites\" matTooltipPosition=\"left\" matTooltipShowDelay=\"1000\"></mat-icon>\n  </div>\n  <div *ngIf=\"!showHeader\" fxLayout=\"row\" fxLayoutAlign=\"end center\">\n    <mat-icon style=\"margin: 5px\" (click)=\"clearFavoriteCases()\" class=\"tcs-icon tcs-icon-active tcs-clear-favorite-icon\" svgIcon=\"tcs-clear-icon\" matTooltip=\"Clear Favorites\" matTooltipPosition=\"left\" matTooltipShowDelay=\"1000\"></mat-icon>\n  </div>\n  <div *ngIf=\"favoriteCases.length > 0\" class=\"tcs-case-favorites-flow-list\" fxLayout=\"column\" fxLayout=\"row wrap\">\n    <div class=\"tcs-case-favorite-item-box\" *ngFor=\"let case of favoriteCases\" [fxFlex]=\"cardWidthPct\">\n      <tcla-live-apps-case-summary [uiAppId]=\"uiAppId\" [typeBar]=\"true\" [borderCard]=\"false\" [displayType]=\"displayType\" [sandboxId]=\"sandboxId\" [caseRef]=\"case\" (clickCase)=\"clickCaseAction($event)\" (deleted)=\"handleDeleted($event)\"></tcla-live-apps-case-summary>\n      <div class=\"tcs-case-summary-line\"></div>\n    </div>\n  </div>\n  <div *ngIf=\"!(favoriteCases.length > 0)\" fxLayout=\"row\" fxLayoutAlign=\"center start\" fxLayoutGap=\"10px\" style=\"margin: 20px;\">\n    <mat-icon [svgIcon]=\"'ic-no-cases-icon'\" style=\"height: 48px; width: 48px;\"></mat-icon>\n    <div style=\"height: 100%; margin: 5px\" fxLayoutAlign=\"start center\">\n      <span class=\"tcs-no-item-text\">No cases found</span>\n    </div>\n  </div>\n</div>\n","import {Deserializable} from '@tibco-tcstk/tc-core-lib';\n\nexport class AuditEventAttribute implements Deserializable {\n  type: string;\n  value: string;\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class AuditEvent implements Deserializable {\n  // value: string;\n  // type: string;\n  messageId: AuditEventAttribute;\n  creationTime: AuditEventAttribute;\n  delayTime: AuditEventAttribute;\n  procName: AuditEventAttribute;\n  principalName: AuditEventAttribute;\n  taskType: AuditEventAttribute;\n  taskName: AuditEventAttribute;\n  label: AuditEventAttribute;\n  caseState: AuditEventAttribute;\n  artifactPath: AuditEventAttribute;\n  artifactName: AuditEventAttribute;\n  severity: AuditEventAttribute;\n  message: AuditEventAttribute;\n  param0: AuditEventAttribute;\n  param1: AuditEventAttribute;\n\n  key: AuditEventAttribute;\n  deserialize(input: any): this {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class AuditEventList implements Deserializable {\n  auditevents: AuditEvent[];\n  deserialize(input: any): this {\n    this.auditevents = [];\n    Object.assign(this.auditevents, input);\n    return this;\n  }\n}\n","import { Injectable } from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {map, tap} from 'rxjs/operators';\nimport {HttpClient} from '@angular/common/http';\nimport {AuditEventList} from '../models/tc-case-audit';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TcCaseAuditService {\n\n  constructor(private http: HttpClient) { }\n\n  public getCaseAudit(caseRef: string, sandboxId: number, startAt: string, top: number,\n    creationTime?: string, caseType?: CaseTypeAudit, orderBy?: OrderBy): Observable<AuditEventList> {\n\n    const select = 's';\n    let url = '/event/v1/auditEvents?$sandbox=' + sandboxId\n      + '&$filter=type eq \\'' + (caseType ? caseType : 'case') + '\\''\n      + ' and id eq \\'' + caseRef + '\\'';\n    url = creationTime ? (url + ' and creationTime gt ' + creationTime) : url;\n    url = startAt ? (url + '&$startat=' + startAt) : url;\n    url = top ? (url + '&$top=' + top) : url;\n    url = orderBy ? (url + '&orderby=creationTime ' + orderBy) : url;\n\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(caseaudit => new AuditEventList().deserialize(caseaudit)));\n  }\n}\n\nexport enum OrderBy {\n  asc = 'asc',\n  desc = 'desc'\n}\n\nexport enum CaseTypeAudit {\n  case,\n  casestate,\n  casedata\n}","import { Pipe, PipeTransform } from '@angular/core';\nimport {AuditEvent} from '../models/tc-case-audit';\n\n@Pipe({\n  name: 'parseAuditMessage'\n})\nexport class ParseAuditMessagePipe implements PipeTransform {\n\n  transform(value: any, item: AuditEvent): any {\n    // replace any {{paramX}} with the value in the item\n    value = value.replace('{{param0}}', item.param0.value);\n    value = value.replace('{{param1}}', item.param1.value);\n    return value;\n  }\n\n}\n","import {Component, Input, OnDestroy, OnInit} from '@angular/core';\nimport {map, take, takeUntil} from 'rxjs/operators';\nimport {AuditEvent} from '../../models/tc-case-audit';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport { TcCaseAuditService, OrderBy, CaseTypeAudit} from '../../services/tc-case-audit.service';\n\n/**\n * Render audit trail for a case\n *\n *  ![alt-text](../live-apps-case-audit.png \"Image\")\n *\n *@example <tcla-live-apps-case-audit></tcla-live-apps-case-audit>\n */\n@Component({\n  selector: 'tcla-live-apps-case-audit',\n  templateUrl: './live-apps-case-audit.component.html',\n  styleUrls: ['./live-apps-case-audit.component.css']\n})\nexport class LiveAppsCaseAuditComponent extends LiveAppsComponent implements OnDestroy {\n\n  /**\n   * The case reference\n   */\n  @Input() caseRef: string;\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * creationTime - specify the date to include cases from using the format yyyy-mm-ddTHH:MM:SS.sssZ\n   */\n  @Input() creationTime: string;\n\n  /**\n   * caseType - speficy the type of the case\n   */\n  @Input() caseType: CaseTypeAudit;\n\n  /**\n   * orderBy - specify ascending or descending order\n   */\n  @Input() orderby: OrderBy;\n\n  public auditEvents: AuditEvent[] = [];\n  public errorMessage: string;\n  public startat = undefined;\n  public top = 20;\n  public end = false;\n\n  public refresh = () => {\n    this.startat = undefined;\n    this.top = 20;\n    this.end = false;\n    this.auditEvents = [];\n    this.getAuditEvents(this.caseRef, this.sandboxId, this.startat, this.top, this.creationTime, this.caseType, this.orderby);\n  }\n\n  public getAuditEvents = (caseRef: string, sandboxId: number, startAt: number, top: number,\n    creationTime: string, caseType: CaseTypeAudit, orderBy: OrderBy) => {\n    this.caseAuditService.getCaseAudit(this.caseRef, this.sandboxId, this.startat, this.top, this.creationTime, this.caseType, this.orderby)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      ).subscribe(\n      auditeventlist => {\n        // this will strip any duplicates that may have been retrieved due to fast scrolling\n        const filteredEvents = auditeventlist.auditevents.filter(x => this.auditEvents.every(y => y.key.value !== x.key.value))\n        this.auditEvents = this.auditEvents.concat(filteredEvents);\n        if (auditeventlist.auditevents.length < this.top) {\n          this.end = true;\n        } else {\n          this.startat = auditeventlist.auditevents[auditeventlist.auditevents.length - 1].key.value;\n        }\n      }, error => {\n        this.errorMessage = 'Error retrieving case audit: ' + error.error.errorMsg;\n      });\n  }\n\n  public getNextBatch = (event) => {\n    if (!this.end) {\n      this.getAuditEvents(this.caseRef, this.sandboxId, this.startat, this.top, this.creationTime, this.caseType, this.orderby);\n    }\n  }\n\n  constructor(protected caseAuditService: TcCaseAuditService) {\n    super();\n  }\n\n}","<div class=\"tcs-case-audit-pane\" fxLayout=\"column\" fxFill style=\"overflow: hidden;\">\n  <tc-tibco-cloud-widget-header fxFlex=\"nogrow\" [headerText]=\"'Audit'\"\n                                [icon]=\"'tcs-recent-icon'\"></tc-tibco-cloud-widget-header>\n\n\n  <!--div *ngIf=\"auditEvents && auditEvents.length > 0\" class=\"tcs-case-audit-container\">\n\n  </div-->\n  <div class=\"audit-template\" fxFlex>\n    <cdk-virtual-scroll-viewport style=\"height: 100%\" itemSize=\"50\" (scrolledIndexChange)=\"getNextBatch($event)\">\n      <ul style=\"\"\n          *cdkVirtualFor=\"let item of auditEvents; let i = index\">\n        <div class=\"tcs-case-audit-dtl\" *ngIf=\"item.messageId.value === 'BP_INSTANCE_CREATED'\">\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"BP_INSTANCE_CREATED\"></mat-icon>\n          </div>\n          <div class=\"audit-details\">\n            <li>\n              <span *ngIf=\"item.principalName\">{{item.principalName.value}} </span>\n              <span>\n                      <span> started </span>\n                      <b>{{item.procName.value}}</b>\n                      <span> on {{item.creationTime.value | date:'full'}}</span>\n                  </span>\n            </li>\n          </div>\n          <div class=\"audit-line\"></div>\n        </div>\n        <div class=\"tcs-case-audit-dtl\" *ngIf=\"item.messageId.value === 'BP_AUTO_STARTED_INSTANCE'\">\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"BP_AUTO_STARTED_INSTANCE\"></mat-icon>\n          </div>\n          <li>\n            <!--span *ngIf=\"item.principalName\">{{item.principalName.value}} </span-->\n            <span>\n                    <b>{{item.procName.value}}</b>\n                    <span> auto initiated on {{item.creationTime.value | date:'full'}}</span>\n                </span>\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n        <div class=\"tcs-case-audit-dtl\" *ngIf=\"item.messageId.value === 'BP_DELAYED_AUTO_STARTED_INSTANCE'\">\n          <!-- todo: JS fix this -->\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"BP_DELAYED_AUTO_STARTED_INSTANCE\"></mat-icon>\n          </div>\n          <li>\n          <span>\n                    <b>{{item.procName.value}}</b>\n\t\t\t\t\t<span> deadline auto initiated on {{item.creationTime.value | date:'full'}}</span>\n          <span>. </span>\n          <span> Time to deadline {{item.delayTime.value}}></span>. </span>\n            <!--span class=\"skip-delay\" *ngIf=\"isInstanceDelayed(item)\" ng-click=\"skipDelay(item)\" skip\"></span>\n                  </span-->\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n        <div class=\"tcs-case-audit-dtl\" *ngIf=\"item.messageId.value === 'BP_DELAYED_AUTO_START_TIMER_EXPIRED'\">\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"BP_DELAYED_AUTO_START_TIMER_EXPIRED\"></mat-icon>\n          </div>\n          <li>\n          <span>\n            <b>{{item.procName.value}}</b>\n\t\t\t\t\t  <span> deadline reached {{item.creationTime.value | date: 'full'}}></span>\n          </span>\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n        <div class=\"tcs-case-audit-dtl\"\n             *ngIf=\"item.messageId.value === 'BP_DELAYED_AUTO_STARTED_INSTANCE_CANCELLED_DUE_TO_STATE_CHANGE'\">\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"BP_DELAYED_AUTO_STARTED_INSTANCE_CANCELLED_DUE_TO_STATE_CHANGE\"></mat-icon>\n          </div>\n          <li>\n            <!--span *ngIf=\"item.principalName\">{{item.principalName.value}} </span-->\n            <span>\n                    <b>{{item.procName.value}}</b>\n            <span> deadline cancelled {{item.creationTime.value | date: 'full'}}</span>\n          </span>\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n        <div class=\"tcs-case-audit-dtl\"\n             *ngIf=\"item.messageId.value === 'BP_TASK_CREATED' && ['User Task','Email Task','Calculation Task','TCI Task','AuditSafe Task'].indexOf(item.taskType.value) > -1\">\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"{{item.taskType.value}}\"></mat-icon>\n          </div>\n          <li>\n                <span>\n                    <b>{{item.taskName.value}}</b>\n                    <span> initiated on {{item.creationTime.value | date: 'full'}}</span>\n                </span>\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n\n        <div class=\"tcs-case-audit-dtl\" *ngIf=\"item.messageId.value === 'CM_CASE_CREATED'\">\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"CM_CASE_CREATED\"></mat-icon>\n          </div>\n          <li>\n            <span *ngIf=\"item.principalName\">{{item.principalName.value}}</span>\n            <span class=\"spanPadding\">\n                    <span> created </span>\n                    <b> {{item.label.value}}</b>\n                    <span> in state</span>\n                    <span class=\"audit-state\">\"{{item.caseState.value}}\"</span>\n                    <span> on {{item.creationTime.value | date: 'full'}}</span>\n                </span>\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n\n        <div class=\"tcs-case-audit-dtl\" *ngIf=\"item.messageId.value === 'CM_CASE_UPDATED_STATE_CHANGED'\">\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"CM_CASE_UPDATED_STATE_CHANGED\"></mat-icon>\n          </div>\n          <li>\n            <span *ngIf=\"item.principalName\">{{item.principalName.value}}</span>\n            <span class=\"spanPadding\">\n                    <span> updated </span>\n                    <b> {{item.label.value}}</b>\n                    <span>, new state is></span>\n                    <span class=\"audit-state\"> \"{{item.caseState.value}}\" </span>\n                    <span> on {{item.creationTime.value | date: 'full'}}</span>\n                </span>\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n\n        <div class=\"tcs-case-audit-dtl\" *ngIf=\"item.messageId.value === 'CM_CASE_UPDATED'\">\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"CM_CASE_UPDATED\"></mat-icon>\n          </div>\n          <li>\n            <span *ngIf=\"item.principalName\">{{item.principalName.value}}</span>\n            <span class=\"spanPadding\">\n                    <span> updated </span>\n                    <b> {{item.label.value}} </b>\n                    <span> on {{item.creationTime.value | date: 'full'}}</span>\n                </span>\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n\n        <div class=\"tcs-case-audit-dtl\" *ngIf=\"item.messageId.value === 'WR_FOLDER_ARTIFACT_CREATED'\">\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"WR_FOLDER_ARTIFACT_CREATED\"></mat-icon>\n          </div>\n          <li>\n            <span *ngIf=\"item.principalName\">{{item.principalName.value}}</span>\n            <span class=\"spanPadding\">\n                    <span> uploaded </span>\n                    <span>{{item.artifactName.value}}</span>\n                    <span> on {{item.creationTime.value | date:'full'}}</span>\n                </span>\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n\n        <div class=\"tcs-case-audit-dtl\" *ngIf=\"item.messageId.value === 'WR_FOLDER_ARTIFACT_UPDATED'\">\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"WR_FOLDER_ARTIFACT_UPDATED\"></mat-icon>\n          </div>\n          <li>\n            <span *ngIf=\"item.principalName\">{{item.principalName.value}}</span>\n            <span class=\"spanPadding\">\n                    <span> updated </span>\n                    <span>{{item.artifactName.value}}</span>\n                    <span> on {{item.creationTime.value | date:'full'}}</span>\n                </span>\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n\n        <div class=\"tcs-case-audit-dtl\" *ngIf=\"item.messageId.value === 'WR_FOLDER_ARTIFACT_DELETED'\">\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"WR_FOLDER_ARTIFACT_DELETED\"></mat-icon>\n          </div>\n          <li>\n            <span *ngIf=\"item.principalName\">{{item.principalName.value}}</span>\n            <span class=\"spanPadding\">\n                    <span> deleted </span>\n                    <span>{{item.artifactName.value}}</span>\n                    <span> on {{item.creationTime.value | date:'full'}}</span>\n                </span>\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n\n        <div class=\"tcs-case-audit-dtl\"\n             *ngIf=\"item.messageId.value === 'BP_TASK_COMPLETED' && ['User Task','Email Task','Calculation Task','TCI Task','AuditSafe Task'].indexOf(item.taskType.value) > -1\">\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"{{item.taskType.value}}\"></mat-icon>\n          </div>\n          <li>\n            <span *ngIf=\"item.principalName\">{{item.principalName.value}} </span>\n            <span>\n                    <span> completed </span>\n                    <b> {{item.taskName.value}} </b>\n                    <span> on {{item.creationTime.value | date: 'full'}}</span>\n                </span>\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n        <div class=\"tcs-case-audit-dtl\" *ngIf=\"item.messageId.value === 'BP_INSTANCE_COMPLETED'\">\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"BP_INSTANCE_COMPLETED\"></mat-icon>\n          </div>\n          <li>\n                <span>\n                    <b>{{item.procName.value}} </b>\n                    <span> on {{item.creationTime.value | date: 'full'}}</span>\n                </span>\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n        <div class=\"tcs-case-audit-dtl\" *ngIf=\"item.severity.value === 'ERROR'\">\n          <div class=\"audit-icon-container\">\n            <mat-icon svgIcon=\"ERROR\"></mat-icon>\n          </div>\n          <li>\n                <span *ngIf=\"item.principalName\">{{item.principalName.value}} has error at {{item.taskName.value}}\n                </span>\n            <b> {{item.message.value | parseAuditMessage : item }}</b>\n            <span> on {{item.creationTime.value | date: 'full'}}</span>\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n        <div class=\"tcs-case-audit-dtl\" *ngIf=\"item.severity.value === 'WARN'\">\n          <div class=\"audit-icon-container warn-icon\">\n            <mat-icon svgIcon=\"ERROR\"></mat-icon>\n          </div>\n          <li>\n                <span *ngIf=\"item.principalName\">{{item.principalName.value}} has warning at {{item.taskName.value}}>\n                </span>\n            <b> {{item.message.value | parseAuditMessage : item }}</b>\n            <span> on {{item.creationTime.value | date: 'full'}}</span>\n          </li>\n          <div class=\"audit-line\"></div>\n        </div>\n\n\n      </ul>\n    </cdk-virtual-scroll-viewport>\n  </div>\n</div>\n","import {Deserializable, GeneralConfig} from '@tibco-tcstk/tc-core-lib';\n\nexport class LiveAppsConfig implements Deserializable {\n  id: string;\n  applicationIds: string[];\n  recentExcludedAppIds: string[];\n  caseIconsFolderId: string;\n  documentAppId: string;\n  legacyCreators: boolean;\n  legacyActions: boolean;\n  legacyWorkitems: boolean;\n  formsFramework: string;\n  collaborationAppId: string;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class FormConfig implements Deserializable {\n  id: string;\n  processFormConfigs: ProcessFormConfig[];\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class ProcessFormConfig implements Deserializable {\n  formTag: string;\n  processId: string;\n  externalForm?: boolean;\n  processType: string;\n  layout: any;\n  data: string;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class LiveAppsConfigHolder implements Deserializable {\n  public generalConfig: GeneralConfig;\n  public liveAppsConfig: LiveAppsConfig;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class FormRef implements Deserializable {\n  applicationName: string;\n  applicationInternalName: string;\n  processType: string;\n  processName: string;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n","import { Injectable } from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {flatMap, map} from 'rxjs/operators';\nimport {Location} from '@angular/common';\nimport {TcSharedStateService, TcCoreCommonFunctions, SharedStateContent, SharedStateEntry, SharedStateList} from '@tibco-tcstk/tc-core-lib';\nimport {FormConfig, FormRef, ProcessFormConfig} from '../models/tc-liveapps-config';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TcFormConfigService {\n\n  constructor(private location: Location, private sharedStateService: TcSharedStateService) {\n  }\n\n  static parseFormTag(formTag: FormRef): string {\n    return formTag.applicationName + '.' + formTag.applicationInternalName + '.' + formTag.processType + '.' + formTag.processName;\n  }\n\n  static buildFormTag(applicationName: string, applicationInternalName: string, processType: string, processName: string): FormRef {\n    return new FormRef().deserialize(\n      {\n        applicationName,\n        applicationInternalName,\n        processType,\n        processName\n      }\n    );\n  }\n\n  static getProcessFormConfig(formTag: string, formConfig: FormConfig): ProcessFormConfig {\n    let pfc;\n    if (formConfig && formConfig.processFormConfigs) {\n      pfc = formConfig.processFormConfigs.filter(fc => {\n        return fc.formTag === formTag;\n      });\n    }\n    return (pfc && pfc.length > 0) ? pfc[0] : undefined;\n  }\n\n  public static getCustomFormTags(formConfig: FormConfig): string[] {\n    const formRefs = [];\n    formConfig.processFormConfigs.forEach((processFormConfig: ProcessFormConfig) => {\n      if (processFormConfig.externalForm) {\n        formRefs.push(processFormConfig.formTag);\n      }\n    });\n    return formRefs;\n  }\n\n  public static setCustomFormTag(formRef: FormRef, formConfig: FormConfig): FormConfig {\n    // set processFormConfigs externalForm to true or add a new one\n    const formTag: string = TcFormConfigService.parseFormTag(formRef);\n    let found = false;\n    if (!formConfig.processFormConfigs) {\n      formConfig.processFormConfigs = [];\n    }\n    const foundConfigs = formConfig.processFormConfigs.forEach((processFormConfig: ProcessFormConfig) => {\n      if (processFormConfig.formTag === formTag) {\n        processFormConfig.externalForm = true;\n        found = true;\n      }\n    });\n    if (!found) {\n      formConfig.processFormConfigs.push(new ProcessFormConfig().deserialize(\n        {\n          formTag,\n          processId: 'custom',\n          processType: 'custom',\n          layout: undefined,\n          data: undefined,\n          externalForm: true\n        }\n      )\n      );\n    }\n    return formConfig;\n  }\n\n  public static unsetCustomFormTag(formTag: string, formConfig: FormConfig): FormConfig {\n    // set processFormConfigs externalForm to false\n    // removes it if type is custom\n    const toRemove: ProcessFormConfig[] = [];\n    formConfig.processFormConfigs.forEach((processFormConfig: ProcessFormConfig) => {\n        if (processFormConfig.formTag === formTag) {\n          if (processFormConfig.processType === 'custom' && processFormConfig.processId === 'custom') {\n            toRemove.push(processFormConfig);\n          } else {\n            processFormConfig.externalForm = false;\n          }\n        }\n      });\n    // return without the ones we want to delete\n    if (toRemove.length > 0) {\n      formConfig.processFormConfigs = formConfig.processFormConfigs.filter((config: ProcessFormConfig) => {\n        return !toRemove.find((candidate: ProcessFormConfig) => {\n          return candidate.formTag === config.formTag;\n        });\n      });\n    }\n    return formConfig;\n  }\n\n  public getLayoutFromConfig(formTag: string, formConfig: FormConfig): any[] {\n    let layout: any[];\n    if (formConfig && formConfig.processFormConfigs) {\n      const foundConfigs = formConfig.processFormConfigs.filter(pfc => {\n        return pfc.formTag === formTag;\n      });\n      if (foundConfigs && foundConfigs.length > 0) {\n        layout = foundConfigs[0].layout ? TcCoreCommonFunctions.parseLayoutString(foundConfigs[0].layout) : undefined;\n      }\n    }\n    return layout;\n  }\n\n  public createFormConfig(sandboxId: number, uiAppId: string, formConfig: FormConfig) {\n    const ssName = uiAppId + '.form.config.tibcolabs.client.context.PUBLIC';\n    const content: SharedStateContent = new SharedStateContent();\n    content.json = TcCoreCommonFunctions.escapeString(JSON.stringify(formConfig));\n\n    return this.sharedStateService.createSharedState(ssName, 'PUBLIC', '', sandboxId, undefined, undefined, undefined, content)\n      .pipe(\n        map(value => value)\n      );\n  }\n\n  public getFormConfig(uiAppId: string, useCache: boolean, flushCache: boolean): Observable<FormConfig> {\n    // if useCache is false this will trigger the service to update the cached version with latest\n    const ssName = uiAppId + '.form.config.tibcolabs.client.context.PUBLIC';\n\n    return this.sharedStateService.getSharedState(ssName, 'PUBLIC', useCache, flushCache)\n      .pipe(\n        map(value => {\n            if (value.sharedStateEntries.length > 0) {\n              const ssresult = new FormConfig().deserialize(JSON.parse(value.sharedStateEntries[0].content.json));\n              ssresult.id = value.sharedStateEntries[0].id;\n              return ssresult;\n            } else {\n              return undefined;\n            }\n          }\n        )\n      );\n  }\n\n  public updateFormConfig(sandboxId: number, uiAppId: string, formConfig: FormConfig, id: string) {\n    const ssName = uiAppId + '.form.config.tibcolabs.client.context.PUBLIC';\n    const content: SharedStateContent = new SharedStateContent();\n    content.json = TcCoreCommonFunctions.escapeString(JSON.stringify(formConfig));\n    const entry: SharedStateEntry = new SharedStateEntry();\n    entry.content = content;\n    entry.sandboxId = sandboxId;\n    entry.name = ssName;\n    entry.type = 'PUBLIC';\n    entry.id = id;\n    const ssList: SharedStateList = new SharedStateList();\n    ssList.sharedStateEntries = [];\n    ssList.sharedStateEntries.push(entry);\n\n    return this.sharedStateService.updateSharedState(ssList.sharedStateEntries)\n      .pipe(\n        flatMap(value => {\n          // flush the cache and return new value\n          return this.getFormConfig(uiAppId, true, true);\n          // return new FormConfig().deserialize((JSON.parse(value.sharedStateEntries[0].content.json)));\n        })\n      );\n  }\n}\n\n","import {Deserializable} from '@tibco-tcstk/tc-core-lib';\nimport {CaseAction, CaseAttribute, CaseCreator, CaseTypesList, Process} from './liveappsdata';\n\nexport class LaProcessSelection {\n  // Format of ref is <applicationName>.<applicationInternalName>.<processType>.<processName>\n  constructor(public type: string,\n              public appSchema: CaseTypesList,\n              public caseIdAttribute: CaseAttribute,\n              public process: Process,\n              public ref: string,\n              public caseReference: string,\n              public creator: CaseCreator,\n              public action: CaseAction\n  ) {\n  }\n}\n\n","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {\n  CaseAction,\n  CaseActionsList,\n  CaseCreator,\n  CaseCreatorsList,\n  CaseType,\n  CaseTypesList,\n  JsonSchema,\n  Process\n} from '../models/liveappsdata';\nimport {LaProcessSelection} from '../models/tc-case-processes';\nimport {LiveAppsService} from './live-apps.service';\nimport {Observable, throwError} from 'rxjs';\nimport {flatMap, map, tap} from 'rxjs/operators';\nimport {TcCaseDataService} from './tc-case-data.service';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TcCaseProcessesService {\n\n  constructor(private http: HttpClient, private liveAppsService: LiveAppsService, private caseDataService: TcCaseDataService) { }\n\n  //  This service gets the case state then uses that and the caseRef to get the available actions.\n  public getCaseActionsForCaseRef(caseRef: string, sandboxId: number, appId: string, typeId: string): Observable<CaseActionsList> {\n    const caseState$ = this.caseDataService.getCaseState(caseRef, sandboxId);\n    const caseActions$ = caseState$.pipe(\n      flatMap(caseState => {\n        return this.getCaseActions(caseRef, sandboxId, appId, typeId, caseState);\n      })\n    );\n    return caseActions$;\n  }\n\n\n// todo: Note this is not a public API - update when Public API available\n  public getCaseActions(caseRef: string, sandboxId: number, appId: string, typeId: string, caseState: string): Observable<CaseActionsList> {\n    // https://eu.liveapps.cloud.tibco.com/pageflow/caseActions?$sandbox=31&\n    // $filter=applicationId%20eq%201742%20and%20caseType%20eq%201%20and%20caseState%20eq%20Responded%20and%20caseRef%20eq%20150491\n    const url = '/pageflow/v1/caseActions?$sandbox=' + sandboxId\n      + '&$filter=applicationId eq ' + appId\n      + ' and caseType eq ' + typeId\n      + ' and caseState eq ' + caseState\n      + ' and caseRef eq ' + caseRef;\n    return this.http.get(url\n    )\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(caseactions => {\n          const caList = new CaseActionsList().deserialize(caseactions);\n          // non public API returns action Id as number, switch to string to match other APIs\n          caList.actions.forEach(action => {\n            if (typeof action.id === 'number') {\n              action.id = String(action.id);\n            }\n          })\n          return caList;\n        })\n      );\n    }\n\n  // todo: Note this is not a public API - update when Public API available\n  public getCaseCreators(sandboxId: number, appId: string, typeId: string): Observable<CaseCreatorsList> {\n    const url = '/pageflow/v1/caseCreators?$sandbox=' + sandboxId\n      + '&$filter=applicationId eq ' + appId\n      + ' and caseType eq ' + typeId\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map(casecreators => {\n          const ccList = new CaseCreatorsList().deserialize(casecreators);\n          // non public API returns creator Id as number, switch to string to match other APIs\n          ccList.creators.forEach(creator => {\n            if (typeof creator.id === 'number') {\n              creator.id = String(creator.id);\n            }\n          })\n          return ccList;\n        })\n      );\n  }\n\n  public getProcess(sandboxId: number, appId: string, typeId: string, processName: string, processType: string): Observable<Process> {\n    let url = '/case/v1/types?$sandbox=' + sandboxId;\n    url = url + '&$filter=applicationId eq ' + appId;\n    url = url + '&$select=b,c,ac';\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map((casetypes: CaseType[]) => {\n          if (casetypes && casetypes.length > 0) {\n            const ctype = casetypes.filter(casetype => {\n              return casetype.id === '1';\n            });\n            if (ctype.length > 0) {\n              const matches = ctype[0][processType + 's'].filter((process: Process) => {\n                return process.name === processName;\n              });\n              if (matches && matches.length > 0) {\n                // Format of ref is <applicationName>.<applicationInternalName>.<processType>.<processName>\n                matches[0].formTag = casetypes[0].applicationName + '.' + casetypes[0].applicationInternalName + '.' + processType + '.' + matches[0].name;\n                return matches[0];\n              }\n            } else {\n              throwError('Unable to find process schema for processName: ' + processName);\n            }\n          } else {\n            throwError('Unable to find casetype for appId: ' + appId);\n          }\n        }\n      )\n      );\n  }\n\n  private getCaseIDAttributeName = (caseType: CaseType) => {\n    let caseIdAttrib: any;\n    caseType.attributes.forEach((attribute) => {\n      if (attribute.isIdentifier) {\n        caseIdAttrib = attribute;\n      }\n    });\n    return caseIdAttrib;\n  }\n\n  // this is a helper function that given a case type 'schema' for the whole application will create an LaProcessSelection object\n  // containing both the appSchema and particular details for this action\n  // this object is required to submit the process later.\n  private createLaProcessSelection = (\n    schema: CaseTypesList,\n    appId: string,\n    typeId: string,\n    action: CaseAction,\n    creator: CaseCreator,\n    caseRef: string): LaProcessSelection => {\n      let processSelection: LaProcessSelection;\n      schema.casetypes.forEach((casetype) => {\n          // the schema will contain definitions for both the 'case' and any defined types in that case.\n          // We want the schema for this 'case'.\n          if (casetype.applicationId === appId && casetype.id === typeId) {\n            // if ( casetype.jsonSchema !== undefined) {\n              if (action) {\n                const caseActionList = casetype.actions ? casetype.actions : [];\n                // now find the selected action\n                caseActionList.forEach((actionDef) => {\n                  if (action.id === actionDef.id) {\n                    if (!actionDef.jsonSchema) {\n                      // create blank form schema\n                      actionDef.jsonSchema = new JsonSchema();\n                      actionDef.jsonSchema.type = 'object';\n                      actionDef.jsonSchema.properties = [];\n                    }\n                    processSelection = new LaProcessSelection(\n                      'action', schema, this.getCaseIDAttributeName(casetype), actionDef,\n                      // Format of ref is <applicationName>.<applicationInternalName>.<processType>.<processName>\n                      (casetype.applicationName + '.' + casetype.applicationInternalName + '.' + 'action' + '.' + actionDef.name),\n                      caseRef, undefined, action\n                    );\n                  }\n                });\n                if (!processSelection) {\n                  // no schema for this process\n                  const process: Process = new Process().deserialize({ jsonSchema: { $schema: 'NOSCHEMA' }, name: action.name, id: action.id });\n                  processSelection = new LaProcessSelection(\n                    'action', schema, this.getCaseIDAttributeName(casetype), process,\n                    // Format of ref is <applicationName>.<applicationInternalName>.<processType>.<processName>\n                    (casetype.applicationName + '.' + casetype.applicationInternalName + '.' + 'action' + '.' + action.name),\n                    caseRef, undefined, action\n                  );\n                }\n              } else if (creator) {\n                const caseCreatorList = casetype.creators ? casetype.creators : [];\n                // now find the selected action\n                caseCreatorList.forEach((creatorDef) => {\n                  if (creator.id === creatorDef.id) {\n                    if (!creatorDef.jsonSchema) {\n                      // create blank form schema\n                      creatorDef.jsonSchema = new JsonSchema();\n                      creatorDef.jsonSchema.type = 'object';\n                      creatorDef.jsonSchema.properties = [];\n                    }\n                    processSelection = new LaProcessSelection(\n                      'creator', schema, this.getCaseIDAttributeName(casetype), creatorDef,\n                      // Format of ref is <applicationName>.<applicationInternalName>.<processType>.<processName>\n                      (casetype.applicationName + '.' + casetype.applicationInternalName + '.' + 'creator' + '.' + creatorDef.name),\n                      null, creator, undefined\n                    );\n                  }\n                });\n                if (!processSelection) {\n                  // no schema for this process\n                  const process: Process = new Process().deserialize({ jsonSchema: { $schema: 'NOSCHEMA' }, name: creator.name, id: creator.id });\n                  processSelection = new LaProcessSelection(\n                    'creator', schema, this.getCaseIDAttributeName(casetype), process,\n                    // Format of ref is <applicationName>.<applicationInternalName>.<processType>.<processName>\n                    (casetype.applicationName + '.' + casetype.applicationInternalName + '.' + 'creator' + '.' + creator.name),\n                    null, creator, undefined\n                  );\n                }\n              }\n            }\n          // }\n        }\n      );\n      return processSelection;\n  }\n\n    public getProcessDetails(\n      caseRef: string,\n      appId: string,\n      typeId: string,\n      sandboxId: number,\n      action: CaseAction,\n      creator: CaseCreator,\n      top: number): Observable<LaProcessSelection> {\n        return this.liveAppsService.getCaseTypeSchema(sandboxId, appId, top).pipe(\n          map(schema => {\n            return this.createLaProcessSelection(schema, appId, typeId, action ? action : null, creator ? creator : null, caseRef);\n            }\n          )\n        );\n    }\n\n    public caseDataFormUpdate(\n      caseRef: string,\n      appId: string,\n      typeId: string,\n      sandboxId: number,\n      updateActionLabel: string,\n      data: any\n    ): Observable<any> {\n\n    // get the creator details\n      const creators$ = this.getCaseActionsForCaseRef(caseRef, sandboxId, appId, typeId);\n      return creators$.pipe(\n        flatMap((actions: CaseActionsList) => {\n          const updateAction = actions.actions.find(act => {\n            return act.label === updateActionLabel;\n          });\n          if (updateAction) {\n            return this.liveAppsService.runProcess(sandboxId, appId, updateAction.id, caseRef, data);\n          } else {\n            console.error('No update action found with label:', updateActionLabel)\n            throwError('No update action found with label: ' + updateActionLabel);\n          }\n        })\n      );\n    }\n}\n","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport { JsonSchema} from '../../models/liveappsdata';\nimport {CustomFormDefs} from '@tibco-tcstk/tc-forms-lib';\nimport {TcCaseProcessesService} from '../../services/tc-case-processes.service';\n\n/**\n * Renders case data in a form\n *\n * ![alt-text](../live-apps-case-data-display.png \"Image\")\n *\n *@example <tcla-live-apps-case-data-display></tcla-live-apps-case-data-display>\n */\n\n@Component({\n  selector: 'tcla-live-apps-case-data-display',\n  templateUrl: './live-apps-case-data-display.component.html',\n  styleUrls: ['./live-apps-case-data-display.component.css']\n})\nexport class LiveAppsCaseDataDisplayComponent implements OnInit {\n\n  DEFAULT_CASE_DATA_LAYOUT = [\n    '*',\n    { type: 'submit', title: 'Save', condition: '1===2' },\n    { type: 'actions', title: 'hello', condition: '1===2' }\n\n  ];\n\n  /**\n   * SandboxId\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The case data\n   */\n  @Input() caseData: string;\n\n  /**\n   * The case reference\n   */\n\n  @Input() appId: string\n  /**\n   * The applicationId\n   */\n\n  @Input() typeId: string\n  /**\n   * The typeId\n   */\n\n  @Input() caseRef: string;\n\n  /**\n   * The 'name' of the main case type\n   */\n\n  @Input() name: string;\n\n  /**\n   * The schema of the case type\n   */\n  @Input() schema: JsonSchema;\n\n  /**\n   * Allow override of forms framework\n   * Options: bootstrap-4 or material-design\n   */\n  public formsFramework: string = 'material-design';\n  @Input('formsFramework') set FormsFramework(formsFramework: string) {\n    if (formsFramework){\n      this.formsFramework = formsFramework;\n    }\n  }\n\n  /**\n   * Layout object that can be passed to override default layout of the form renderer\n   */\n  public layout: any[] = this.DEFAULT_CASE_DATA_LAYOUT;;\n  @Input('layout') set Layout(layout: any[]) {\n    if (layout){\n      this.layout = layout;\n    }\n  }\n\n  /**\n   * Custom Form configuration file\n   */\n  @Input() customFormDefs: CustomFormDefs;\n\n  /**\n   * Custom Form Reference\n   */\n  @Input() formRef: string;\n\n  /**\n   * Emit event to cause refresh of page\n   * **/\n  @Output() refreshEvent = new EventEmitter();\n\n  options;\n\n  constructor(protected caseProcessService: TcCaseProcessesService) { }\n\n  public updateDataAction(data: any) {\n    data = {\n      [this.name]: data\n    }\n\n    this.caseProcessService.caseDataFormUpdate(this.caseRef, this.appId, this.typeId, this.sandboxId, '$Update', data).subscribe(\n      next => {\n        this.refreshEvent.emit();\n      },\n      error1 => {\n        console.error('Unable to trigger update of case data');\n      }\n    );\n  }\n\n  ngOnInit() {\n    // since this is the 'display' of case data we set to readonly and no validation\n    // legacy makes the labels appear above the data\n    this.options = {\n      defaultOptions: {\n        'readonly': true,\n        'appearance': 'legacy'\n      },\n      'validateOnRender': false\n    };\n    console.log(this.schema);\n  }\n\n}\n","<tcfrm-rendered-form *ngIf=\"schema && caseData && options\" [schema]=\"schema\" [layout]=\"layout\" [data]=\"caseData\" [caseRef]=\"caseRef\" [appId]=\"appId\" [options]=\"options\" [customFormDefs]=\"customFormDefs\" [formsFramework]=\"formsFramework\" [formRef]=\"formRef\" (formSubmit)=\"updateDataAction($event)\"></tcfrm-rendered-form>\n","import {Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild} from '@angular/core';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {CaseInfo, JsonSchema, Metadata} from '../../models/liveappsdata';\nimport {map, take, takeUntil} from 'rxjs/operators';\nimport {ReplaySubject} from 'rxjs';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {TcCaseDataService} from '../../services/tc-case-data.service';\nimport {CustomFormDefs} from '@tibco-tcstk/tc-forms-lib';\nimport {FormConfig} from '../../models/tc-liveapps-config';\nimport {TcFormConfigService} from '../../services/tc-form-config.service';\n\n\n/**\n * Displays data for a case in a widget (high level)\n *\n * ![alt-text](../live-apps-case-data.png \"Image\")\n *\n *@example <tcla-live-apps-case-data></tcla-live-apps-case-data>\n */\n@Component({\n  selector: 'tcla-live-apps-case-data',\n  templateUrl: './live-apps-case-data.component.html',\n  styleUrls: ['./live-apps-case-data.component.css']\n})\nexport class LiveAppsCaseDataComponent extends LiveAppsComponent implements OnInit {\n  /**\n   * The case reference\n   */\n  @Input() caseRef: string;\n\n  /**\n   * The LA Application Id\n   */\n  @Input() appId: string;\n\n  /**\n   * The LA Application Type Id (generally 1)\n   */\n  @Input() typeId: string;\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * Whether to show the header bar in the widget - eg. favorites on home page (contains icon etc) - if off icons still appear without bar\n   */\n  @Input() showHeader: boolean;\n\n  /**\n   * Custom Form Layout Configuration\n   */\n  public formConfig: FormConfig = new FormConfig();\n  @Input('formConfig') set FormConfig(formConfig: FormConfig) {\n    if (formConfig){\n      this.formConfig = formConfig;\n    }\n  }\n\n  /**\n   * Layout object that can be passed to override default layout of the form renderer\n   */\n  @Input() layout: any[];\n\n  /**\n   * Allow override of forms framework\n   * Options: bootstrap-4 or material-design\n   */\n  public formsFramework: string = 'material-design';\n  @Input('formsFramework') set FormsFramework(formsFramework: string) {\n    if (formsFramework){\n      this.formsFramework = formsFramework;\n    }\n  }\n\n  /**\n   * Custom Form configuration file\n   */\n  @Input() customFormDefs: CustomFormDefs;\n\n  /**\n   * not used\n   */\n  public customDataId: string = 'default';\n  @Input('customDataId') set CustomDataId(customDataId: string) {\n    if (customDataId){\n      this.customDataId = customDataId;\n    }\n  }\n\n  /**\n   * Emit event to cause refresh of page\n   * **/\n  @Output() refreshEvent = new EventEmitter();\n\n  public casedata: any;\n  protected casedata$ = new ReplaySubject<any>();\n  protected summary$ = new ReplaySubject<any>();\n  protected metadata$ = new ReplaySubject<Metadata>();\n  protected schema$ = new ReplaySubject<JsonSchema>();\n  public summary: any;\n  public metadata: Metadata;\n  public errorMessage: string;\n  public schema: JsonSchema;\n  public formRef: string;\n  public name: string;\n\n  constructor(protected caseDataService: TcCaseDataService, protected formConfigService: TcFormConfigService) {\n    super();\n  }\n\n  public triggerRefresh = () => {\n    this.refreshEvent.emit();\n  }\n\n  public refresh = () => {\n    this.caseDataService.getCaseWithSchema(this.caseRef, this.sandboxId, this.appId, this.typeId, this.uiAppId)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      ).subscribe(\n      result => {\n        this.casedata = result.caseInfo.untaggedCasedataObj;\n        this.metadata = result.caseInfo.metadata;\n        this.summary = result.caseInfo.summaryObj;\n        this.schema = result.caseSchema;\n        this.name = result.name;\n        // Format of ref is <applicationName>.<applicationInternalName>.<processType>.<processName>\n        this.formRef = result.applicationName + '.' + result.applicationInternalName + '.casedata.' + this.customDataId;\n        if (this.formConfig) {\n          this.layout = this.formConfigService.getLayoutFromConfig(this.formRef, this.formConfig);\n        }\n        this.casedata$.next(this.casedata);\n        this.summary$.next(this.summary);\n        this.metadata$.next(this.metadata);\n        this.schema$.next(this.schema);\n      }, error => { this.errorMessage = 'Error retrieving case data: ' + error.error.errorMsg; });\n  }\n\n  ngOnInit() {\n    this.refresh();\n  }\n\n}\n","<div class=\"tcs-case-data-pane\" fxLayout=\"column\" fxFill style=\"overflow: hidden;\">\n  <tc-tibco-cloud-widget-header *ngIf=\"showHeader\" fxFlex=\"nogrow\" [headerText]=\"'Case Data'\" [icon]=\"'tcs-case-data-icon'\"></tc-tibco-cloud-widget-header>\n  <tcla-live-apps-case-data-display fxFlex=\"grow\" id=\"readOnlyDiv\" style=\"overflow:auto\" *ngIf=\"casedata && schema\" [schema]=\"schema\" [sandboxId]=\"sandboxId\" [caseRef]=\"caseRef\" [appId]=\"appId\" [typeId]=\"typeId\" [caseData]=\"casedata\" [layout]=\"layout\" [customFormDefs]=\"customFormDefs\" [formsFramework]=\"formsFramework\" [formRef]=\"formRef\" [name]=\"name\" (refreshEvent)=\"triggerRefresh()\"></tcla-live-apps-case-data-display>\n</div>\n","\nimport {Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild} from '@angular/core';\nimport {Subject} from 'rxjs';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {map, take, takeUntil, tap} from 'rxjs/operators';\nimport {CaseAction, CaseType, CaseTypesList, Process} from '../../models/liveappsdata';\nimport {LaProcessSelection} from '../../models/tc-case-processes';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {TcCaseProcessesService} from '../../services/tc-case-processes.service';\nimport {CustomFormDefs} from '@tibco-tcstk/tc-forms-lib';\n\n\n/**\n * Renders case action buttons\n *\n * ![alt-text](../live-apps-case-actions.png \"Image\")\n *\n *@example <tcla-live-apps-case-actions></tcla-live-apps-case-actions>\n */\n@Component({\n  selector: 'tcla-live-apps-case-actions',\n  templateUrl: './live-apps-case-actions.component.html',\n  styleUrls: ['./live-apps-case-actions.component.css']\n})\nexport class LiveAppsCaseActionsComponent extends LiveAppsComponent implements OnInit {\n  /**\n   * The case reference\n   */\n  @Input() caseRef: string;\n\n  /**\n   * The LA Application Id\n   */\n  @Input() appId: string;\n\n  /**\n   * Whether to load actions on component load. Default false.\n   */\n  public loadOnDemand: boolean = false;\n  @Input('loadOnDemand') set LoadOnDemand(loadOnDemand: boolean) {\n    if (loadOnDemand){\n      this.loadOnDemand = loadOnDemand;\n    }\n  }\n\n  /**\n   * The LA Application Type Id (generally 1)\n   */\n  public typeId: string = '1';\n  @Input('typeId') set TypeId(typeId: string) {\n    if (typeId){\n      this.typeId = typeId;\n    }\n  }\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * Max Actions that can be run simultaneously\n   */\n  @Input() maxActions = 1;\n\n  /**\n   * Dont show buttons for any actions that start with this string.\n   * eg: '$' will remove the action $Update\n   */\n  @Input() actionFilter: string[];\n\n  /**\n   * ~event actionClicked : Case Action selected\n   * ~payload LaProcessSelection : LaProcessSelection object output when an action is clicked (ie. message to parent to run action component)\n   */\n  @Output() actionClicked: EventEmitter<LaProcessSelection> = new EventEmitter<LaProcessSelection>();\n\n  public caseactions: CaseAction[];\n  public errorMessage: string;\n  public disabled = false;\n  public isLoading = true;\n\n  appSchema: CaseTypesList;\n  caseType: CaseType;\n  caseActionList: Process[];\n\n  constructor(protected liveapps: LiveAppsService, protected caseProcessesService: TcCaseProcessesService) {\n    super();\n  }\n\n  public refresh = () => {\n    this.isLoading = true;\n    this.caseProcessesService.getCaseActionsForCaseRef(this.caseRef, this.sandboxId, this.appId, this.typeId)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      ).subscribe(\n      caseactions => {\n        this.caseactions = [];\n        if (this.actionFilter) {\n          caseactions.actions = caseactions.actions.filter(act => {\n            // check if it matches any of the actionFilters\n            let test = true;\n            this.actionFilter.forEach(actfilter => {\n              if (test && act.label.substr(0, actfilter.length) === actfilter) {\n                test = false;\n              }\n            });\n            return test;\n          });\n        }\n        this.caseactions = caseactions.actions;\n        this.isLoading = false;\n      }, error => { this.errorMessage = 'Error retrieving case actions: ' + error.error.errorMsg; });\n  }\n\n  public toggleEnable = () => {\n    this.disabled = !this.disabled;\n  }\n\n  public selectAction(action: CaseAction) {\n\n    this.caseProcessesService.getProcessDetails(this.caseRef, this.appId, this.typeId, this.sandboxId, action, null, 100).pipe(\n      take(1),\n      takeUntil(this._destroyed$),\n      tap(processDetails => {\n        if (!processDetails || !processDetails.process || (processDetails.process.jsonSchema.$schema === 'NOSCHEMA')) {\n          // This will be triggered when no form schema is available\n          // Typically happens when:\n          // 1) The form has elements that are not supported by the Live Apps API for form schemas such as participant selectors\n          // 2) The Live Apps application is legacy and has no form schema at all, redeploying the live apps application would fix this.\n            console.error('No schema available for this case type: The form may not be supported or you may need to update/re-deploy the live apps application');\n          }\n        }\n      )\n    )\n    .subscribe(processSchema => {\n      this.actionClicked.emit(processSchema);\n      return processSchema;\n    }, error => { this.errorMessage = 'Error retrieving case actions: ' + error.error.errorMsg; });\n  }\n\n  ngOnInit() {\n    if (!this.loadOnDemand) {\n      this.refresh();\n    }\n  }\n\n  loadActions(event) {\n    if (event) {\n      this.refresh();\n    }\n  }\n\n}\n","<div *ngIf=\"loadOnDemand\">\n  <div fxLayout=\"row\" fxLayoutAlign=\"center center\" style=\"width: 100px\">\n    <mat-select fxFlex class=\"tcs-case-action-option\" panelClass=\"tcs-dynamic-action-list\" (openedChange)=\"loadActions($event)\" [disableOptionCentering]=\"false\" placeholder=\"Actions\" matTooltip=\"\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\">\n      <mat-option disabled *ngIf=\"isLoading\">\n        <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n          <span>Loading</span>\n          <div fxFlex fxLayoutAlign=\"end center\">\n            <mat-spinner class=\"spinner\" diameter=\"20\"></mat-spinner>\n          </div>\n        </div>\n      </mat-option>\n      <mat-option *ngFor=\"let action of caseactions\" [value]=\"\" (click)=\"selectAction(action)\">\n        <span>{{action.label}}</span>\n      </mat-option>\n    </mat-select>\n  </div>\n</div>\n<div *ngIf=\"!loadOnDemand\" fxLayout=\"row\">\n  <button [disabled]=\"disabled\" [ngClass]=\"disabled ? 'disabled' : ''\" mat-button class=\"tcs-case-action-button\" *ngFor=\"let action of caseactions| slice:0:maxActions\"\n          matTooltip=\"{{action.label}}\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"above\"\n          (click)=\"selectAction(action)\">\n    {{action.label | ellipsis: 30 }}\n  </button>\n  <div fxLayout=\"row\" fxLayoutAlign=\"center center\" style=\"width: 75px\" *ngIf=\"caseactions && caseactions.length > maxActions\">\n    <mat-select class=\"tcs-case-action-option\" [disableOptionCentering]=\"true\" placeholder=\"More\" matTooltip=\"\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\">\n      <mat-option *ngFor=\"let action of caseactions | slice:maxActions:caseactions.length\" [value]=\"\" (click)=\"selectAction(action)\">\n        <span>{{action.label}}</span>\n      </mat-option>\n    </mat-select>\n  </div>\n</div>\n","import {\n  AfterViewInit,\n  Component,\n  ElementRef,\n  EventEmitter,\n  Input,\n  OnInit,\n  Output,\n  ViewChild\n} from '@angular/core';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport { take, takeUntil} from 'rxjs/operators';\nimport { CaseRoute} from '../../models/liveappsdata';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {TcComponent, TcCoreCommonFunctions} from '@tibco-tcstk/tc-core-lib';\n\n/**\n * Recent cases widget, this Component list recent visited Cases.\n *\n * ![alt-text](../live-apps-recent-cases.png \"\")\n *\n *@example <tcla-live-apps-recent-cases></tcla-live-apps-recent-cases>\n */\n@Component({\n  selector: 'tcla-live-apps-recent-cases',\n  templateUrl: './live-apps-recent-cases.component.html',\n  styleUrls: ['./live-apps-recent-cases.component.css']\n})\nexport class LiveAppsRecentCasesComponent extends LiveAppsComponent implements OnInit, AfterViewInit {\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * case card format - list, card, miniCard, staticList (no click event):  miniCard, card, list\n   */\n  public displayType: string = 'miniCard';\n  @Input('displayType') set DisplayType(displayType: string) {\n    if (displayType){\n      this.displayType = displayType;\n    }\n  }\n\n  /**\n   * Whether to show the header bar in the widget - eg. favorites on home page (contains icon etc) - if off icons still appear without bar\n   */\n  public showHeader: boolean = true;\n  @Input('showHeader') set ShowHeader(showHeader: boolean) {\n    if (showHeader){\n      this.showHeader = showHeader;\n    }\n  }\n\n  /**\n   * ~event clickCase : Case clicked\n   * ~payload CaseRoute : CaseRoute object output when case is clicked so calling component can route accordingly - ie. route to case\n   */\n  @Output() clickCase: EventEmitter<CaseRoute> = new EventEmitter<CaseRoute>();\n\n  @ViewChild('componentDiv', {static: false}) componentDiv: ElementRef;\n\n  public recentCases: string[];\n  public errorMessage: string;\n  public widget: TcComponent;\n  public cardWidthPct: Number;\n\n  public clickCaseAction = (caseRoute: CaseRoute) => {\n    this.clickCase.emit(caseRoute);\n  }\n\n  public refresh = () => {\n    this.recentCases = [];\n    this.liveapps.getRecentCases(this.uiAppId, this.sandboxId)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      ).subscribe(\n      next => {\n        this.recentCases = next.caseRefs || [];\n      }, error => { this.errorMessage = 'Error retrieving recent cases: ' + error.error.errorMsg; });\n  }\n\n  public clearRecentCases = () => {\n    // -1 will clear recent cases\n    this.liveapps.setRecentCase('-1', this.uiAppId, this.sandboxId);\n    this.recentCases = [];\n  }\n\n  public handleDeleted = (caseRef: string) => {\n    this.recentCases.splice(this.recentCases.indexOf(caseRef), 1);\n    this.liveapps.unsetRecentCase(caseRef, this.uiAppId, this.sandboxId);\n  }\n\n  constructor(protected liveapps: LiveAppsService) {\n    super();\n  }\n\n\n  ngAfterViewInit() {\n    super.ngAfterViewInit();\n    this.cardWidthPct = TcCoreCommonFunctions.calcSummaryCardPct(this.widget);\n    this.containerChanges$.subscribe(widget => {\n      this.cardWidthPct = TcCoreCommonFunctions.calcSummaryCardPct(widget);\n    });\n  }\n\n  ngOnInit() {\n    super.ngOnInit();\n    this.refresh();\n  }\n\n}\n","<div #componentDiv class=\"tcs-case-recent-box\" fxLayout=\"column\" fxFill>\n  <div *ngIf=\"showHeader\" class=\"tcs-case-recent-header\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n    <div fxLayoutAlign=\"start center\">\n      <mat-icon class=\"tcs-icon tcs-recent-icon\" svgIcon=\"tcs-recent-icon\"></mat-icon>\n      <div class=\"tcs-case-recent-header-text\">Recent</div>\n    </div>\n    <mat-icon (click)=\"clearRecentCases()\" class=\"tcs-icon tcs-icon-active tcs-clear-recent-icon\" svgIcon=\"tcs-clear-icon\" matTooltip=\"Clear Recent Cases\" matTooltipPosition=\"left\" matTooltipShowDelay=\"1000\"></mat-icon>\n  </div>\n  <div *ngIf=\"!showHeader\" fxLayout=\"row\" fxLayoutAlign=\"end center\">\n    <mat-icon style=\"margin: 5px\" (click)=\"clearRecentCases()\" class=\"tcs-icon tcs-icon-active tcs-clear-recent-icon\" svgIcon=\"tcs-clear-icon\" matTooltip=\"Clear Recent Cases\" matTooltipPosition=\"left\" matTooltipShowDelay=\"1000\"></mat-icon>\n  </div>\n  <div *ngIf=\"recentCases.length > 0\"class=\"tcs-case-recent-flow-list\" fxLayout=\"column\" fxLayout=\"row wrap\">\n    <div class=\"tcs-case-recent-item-box\" *ngFor=\"let case of recentCases\" [fxFlex]=\"cardWidthPct\">\n      <tcla-live-apps-case-summary [uiAppId]=\"uiAppId\" [typeBar]=\"true\" [borderCard]=\"false\" [displayType]=\"displayType\" [sandboxId]=\"sandboxId\" [caseRef]=\"case\" (clickCase)=\"clickCaseAction($event)\" (deleted)=\"handleDeleted($event)\"></tcla-live-apps-case-summary>\n      <div class=\"tcs-case-recent-line\"></div>\n    </div>\n  </div>\n  <div *ngIf=\"!(recentCases.length > 0)\" fxLayout=\"row\" fxLayoutAlign=\"center start\" fxLayoutGap=\"10px\" style=\"margin: 20px;\">\n    <mat-icon [svgIcon]=\"'ic-no-cases-icon'\" style=\"height: 48px; width: 48px;\"></mat-icon>\n    <div style=\"height: 100%\" fxLayoutAlign=\"start center\">\n      <span class=\"tcs-no-item-text\">No cases found</span>\n    </div>\n  </div>\n</div>\n","import {Component, Input, OnDestroy, OnInit} from '@angular/core';\nimport {Subject} from 'rxjs';\nimport {map, take, takeUntil} from 'rxjs/operators';\nimport {AuditEvent} from '../../models/tc-case-audit';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {TcCaseStatesService} from '../../services/tc-case-states.service';\nimport {StateAuditEvent} from '../../models/tc-case-states';\n\n\n/**\n * Provides case audit summary for states\n *\n * ![alt-text](../live-apps-case-state-audit.png \"Image\")\n *\n *@example <tcla-live-apps-case-state-audit></tcla-live-apps-case-state-audit>\n */\n@Component({\n  selector: 'tcla-live-apps-case-state-audit',\n  templateUrl: './live-apps-case-state-audit.component.html',\n  styleUrls: ['./live-apps-case-state-audit.component.css']\n})\nexport class LiveAppsCaseStateAuditComponent extends LiveAppsComponent implements OnInit {\n\n  /**\n   * The case reference\n   */\n  @Input() caseRef: string;\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The LA Application Id\n   */\n  @Input() appId: string;\n\n  public auditEvents: StateAuditEvent[];\n  public errorMessage: string;\n\n\n  constructor(protected caseStatesService: TcCaseStatesService) {\n    super();\n  }\n\n  public refresh = () => {\n    this.caseStatesService.getCaseStateAuditWithTerminal(this.caseRef, this.sandboxId, this.appId)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      ).subscribe(\n      auditeventlist => {\n        this.auditEvents = auditeventlist.auditEvents;\n        if (!this.auditEvents || this.auditEvents.length <= 0) {\n          console.error('Unable to create states audit view. Case Audit likely removed due to subscription retention period.');\n        }\n      }, error => { this.errorMessage = 'Error retrieving case audit: ' + error.error.errorMsg; });\n  }\n\n  ngOnInit() {\n    this.refresh();\n  }\n}\n","<div class=\"tcs-state-audit-pane\" fxLayout=\"column\" fxFill style=\"overflow: hidden;\">\n  <tc-tibco-cloud-widget-header [headerText]=\"'States'\" [icon]=\"'tcs-case-state-audit-icon'\"></tc-tibco-cloud-widget-header>\n  <div *ngIf=\"auditEvents && auditEvents.length > 0\" class=\"tcs-state-audit-container\">\n    <div class=\"tcs-state-audit-details\" fxLayout=\"column\" fxLayoutAlign=\"start start\">\n      <div *ngFor=\"let state of auditEvents; first as isFirst; last as isLast\"\n           [ngClass]=\"isFirst ? 'tcs-mini-state-item-first' : (isLast ? 'tcs-mini-state-item-last' : 'tcs-mini-state-item-middle')\">\n        <div fxLayout=\"row\">\n          <mat-icon class=\"tcs-mini-state-icon\"\n                    [svgIcon]=\"isLast ? (state.isTerminal ? 'tcs-mini-state-terminal-completed' : 'tcs-mini-state-current') : 'tcs-mini-state-completed'\"></mat-icon>\n          <li class=\"tcs-mini-state-details\" fxLayout=\"column\" fxLayoutAlign=\"start start\"\n              ng-class=\"{'underline':smallContainer}\">\n            <div class=\"tcs-mini-state-primary-label\"><span>{{state.caseState.value}}</span></div>\n            <div class=\"tcs-mini-state-secondary-label\">\n              <span *ngIf=\"state.principalName\">By {{state.principalName.value}}</span>\n              <span class=\"tcs-mini-state-spanPadding\"> on {{state.creationTime.value | date: \"medium\"}}</span>\n            </div>\n          </li>\n        </div>\n      </div>\n    </div>\n  </div>\n  <div *ngIf=\"!auditEvents || auditEvents.length <= 0\">\n    <span class=\"tc-no-audit-data\">Audit data not available</span>\n  </div>\n</div>\n","import {Inject, Injectable} from '@angular/core';\nimport {LiveAppsService} from '../services/live-apps.service';\nimport {TcCoreConfigService} from '@tibco-tcstk/tc-core-lib';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CredentialsService {\n\n  private TIBCO_CLOUD_DOMAIN = 'cloud.tibco.com';\n  private TIBCO_TEST_DOMAIN = 'tenant-integration.tcie.pro';\n  private TIBCO_DEV_DOMAIN = 'emea.tibco.com';\n\n  private _AUTHKEY: string;\n  private _MODE: string;\n\n  constructor(private liveAppsService: LiveAppsService, @Inject(TcCoreConfigService) protected tcCoreConfig: TcCoreConfigService) {\n    const host = window.location.hostname.split('.');\n    const hostDomain = host[host.length - 3] + '.' + host[host.length - 2] + '.' + host[host.length - 1];\n    if (hostDomain === this.TIBCO_CLOUD_DOMAIN || hostDomain === this.TIBCO_TEST_DOMAIN || hostDomain === this.TIBCO_DEV_DOMAIN) {\n      // on Tibco Cloud - using cookies\n      this._MODE = 'cloud';\n    } else {\n      if (this.tcCoreConfig.getConfig().oAuthLocalStorageKey) {\n        // using oauth key within app\n        this._MODE = 'oauth';\n      } else {\n        // Either using cookies or an external proxy with hardcoded oauth key\n        this._MODE = 'cookies';\n      }\n    }\n  }\n\n  public setMode(mode) {\n    this._MODE = mode;\n  }\n\n  public isCookies(): boolean {\n    if (this._MODE) {\n      if (this._MODE.toLowerCase() === 'cookies') {\n        return true;\n      }\n    } else {\n      return undefined;\n    }\n  }\n\n  public isOauth(): boolean {\n    if (this._MODE) {\n      if (this._MODE.toLowerCase() === 'oauth') {\n        return true;\n      }\n    } else {\n      return undefined;\n    }\n  }\n\n  public isCloud(): boolean {\n    if (this._MODE) {\n      if (this._MODE.toLowerCase() === 'cloud') {\n        return true;\n      } else {\n        return false;\n      }\n    } else {\n      return undefined;\n    }\n  }\n\n  get authkey(): string {\n      return this._AUTHKEY;\n  }\n\n  get mode(): string {\n    return this._MODE;\n  }\n\n  getKey(): string {\n    if (this._AUTHKEY) {\n      return this._AUTHKEY;\n    } else {\n      const oauthKey = localStorage.getItem( this.tcCoreConfig.getConfig().oAuthLocalStorageKey );\n      this._AUTHKEY = oauthKey;\n      if (!this._AUTHKEY) {\n        console.warn('No auth key in local storage');\n      }\n      return this._AUTHKEY;\n    }\n  }\n\n  createCookie(key: string) {\n    // create a secure cookie with oauth key so a proxy can convert this to oauth token when accessing static resources\n    let expires = '';\n    const date = new Date();\n    date.setTime(date.getTime() + (180 * 24 * 60 * 60 * 1000));\n    expires = ';expires=' + date.toUTCString();\n    const cookie = 'TCSTKSESSION' + '=' + (key || '')  + expires + ';path=/;secure;';\n    console.log(cookie);\n    document.cookie = cookie;\n  }\n\n  removeCookie() {\n    document.cookie = 'TCSTKSESSION' + '=' + '; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; secure;';\n  }\n\n  setKey(key: string) {\n    this._AUTHKEY = key;\n    if (key) {\n      localStorage.setItem( this.tcCoreConfig.getConfig().oAuthLocalStorageKey, key);\n      this.createCookie(key);\n    } else {\n      localStorage.removeItem(this.tcCoreConfig.getConfig().oAuthLocalStorageKey);\n      this.removeCookie();\n    }\n  }\n}\n","// Note: This may move to the core library\n\nimport {Component, EventEmitter, Input, Output} from '@angular/core';\nimport {LoginContext} from '../../models/liveappsdata';\nimport {LoginPrefill, TcCoreConfigService} from '@tibco-tcstk/tc-core-lib';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport { LiveAppsComponent } from '../live-apps-component/live-apps-component.component';\nimport {TcAppDefinitionService} from '../../services/tc-app-definition.service';\nimport {take} from 'rxjs/operators';\nimport {CredentialsService} from '../../services/credentials.service';\n\n/**\n * Component perform a Login in case there is no valid Session yet.\n *\n * If the user is not logged in the login component will be displayed automatically.\n *\n * ![alt-text](../Login.png \"Image\")\n */\n@Component({\n  selector: 'tcla-live-apps-login',\n  templateUrl: './live-apps-login.component.html',\n  styleUrls: ['./live-apps-login.component.css']\n})\nexport class LiveAppsLoginComponent extends LiveAppsComponent {\n\n  @Output() loginContext: EventEmitter<LoginContext> = new EventEmitter<LoginContext>();\n  @Input() loginPrefill: LoginPrefill;\n  /**\n   * Output useOauth event\n   */\n  @Output() useOauth = new EventEmitter();\n  /**\n   * Output signUp event\n   */\n  @Output() signUp = new EventEmitter();\n  public appName = 'Cloud Starters';\n  @Input('appName') set AppName(appName: string) {\n    if (appName) {\n      this.appName = appName;\n    }\n  }\n\n  constructor(protected tcAppDefinitionService: TcAppDefinitionService, protected configService: TcCoreConfigService, protected credentialsService: CredentialsService) {\n    super();\n  }\n\n  handleUseOauth() {\n    this.useOauth.emit();\n  }\n\n  handleSignUp() {\n    this.signUp.emit();\n  }\n\n  // run when logged in\n  handleLoggedIn = (loginInfo) => {\n    // remove any stored oauth token/cookie\n    this.credentialsService.setKey(undefined);\n    // update claims first\n    this.tcAppDefinitionService.refresh().pipe(\n      take(1)\n    ).subscribe(\n      next => {\n        sessionStorage.setItem('loggedIn', Date.now().toString());\n        // emit useful details about the login and session/claims\n\n        // clear any oauth keys stored\n        /*if (this.configService && this.configService.getConfig() && this.configService.getConfig().oAuthLocalStorageKey\n        && this.configService.getConfig().oAuthLocalStorageKey !== '') {\n          localStorage.removeItem(this.configService.getConfig().oAuthLocalStorageKey);\n        }*/\n        this.credentialsService.setMode('cookies');\n        this.loginContext.emit(new LoginContext().deserialize(\n          {\n            authInfo: loginInfo.authInfo,\n            accessToken: loginInfo.accessToken\n          }));\n    });\n  }\n\n}\n","<tc-tibco-cloud-login fxFill (loggedIn)=\"handleLoggedIn($event)\" [appName]=\"appName\" [loginPrefill]=\"loginPrefill\" (signUp)=\"handleSignUp()\" (useOauth)=\"handleUseOauth()\"></tc-tibco-cloud-login>\n","import {\n  AfterViewChecked,\n  AfterViewInit,\n  Component,\n  ElementRef,\n  EventEmitter,\n  Input,\n  OnInit,\n  Output,\n  ViewChild,\n  ViewChildren\n} from '@angular/core';\nimport {CaseSearchResults, CaseType} from '../../models/liveappsdata';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {LiveAppsCaseSearchComponent} from '../live-apps-case-search/live-apps-case-search.component';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {Subject} from 'rxjs';\nimport {TcComponent, TcCoreCommonFunctions} from '@tibco-tcstk/tc-core-lib';\n\n/**\n * High Level search widget component (wraps others)\n * This Component allows to search for existing Cases and list Case Cards.\n *\n * ![alt-text](../live-apps-search-widget.png \"\")\n *\n *@example <tcla-live-apps-search-widget></tcla-live-apps-search-widget>\n */\n\n@Component({\n  selector: 'tcla-live-apps-search-widget',\n  templateUrl: './live-apps-search-widget.component.html',\n  styleUrls: ['./live-apps-search-widget.component.css']\n})\nexport class LiveAppsSearchWidgetComponent extends LiveAppsComponent implements OnInit, AfterViewInit {\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * The list of LA Application IDs you want to handle\n   */\n  @Input() appIds: string[];\n\n  /**\n   * The fixed height of the case list results pane\n   */\n  public resultsHeight: string = '400px';\n  @Input('resultsHeight') set ResultsHeight(resultsHeight: string) {\n    if (resultsHeight){\n      this.resultsHeight = resultsHeight;\n    }\n  }\n\n  /**\n   * ~event caseSelected : Case Clicked\n   * ~payload string : emits case reference when a case is clicked (so parent can navigate to case)\n   */\n  @Output() caseSelected: EventEmitter<string> = new EventEmitter<string>();\n\n\n  @ViewChild(LiveAppsCaseSearchComponent, {static: false}) caseSearchComponent: LiveAppsCaseSearchComponent;\n  @ViewChild('componentDiv', { static: false }) componentDiv: ElementRef;\n  @ViewChildren ('componentDiv') componentDivs: LiveAppsComponent[];\n\n  widget: TcComponent;\n  // case search\n  matchedRefs: string[] = [];\n  searchString: string;\n  message: string;\n\n  constructor(protected liveapps: LiveAppsService) {\n    super();\n  }\n\n  // handle case search results\n  public handleSearchResults = (data: CaseSearchResults) => {\n    this.message = undefined;\n    this.matchedRefs = data.caserefs;\n    this.searchString = data.searchString;\n  }\n\n  public handleClearMatches = () => {\n    this.caseSearchComponent.clearResults();\n    this.matchedRefs = [];\n    this.message = undefined;\n  }\n\n  // case clicked\n  public clickCaseAction = (caseReference) => {\n    this.caseSelected.emit(caseReference);\n  }\n\n  public refresh = () => {\n    if (this.caseSearchComponent) {\n      this.caseSearchComponent.refresh();\n    }\n  }\n\n  public searchCasesByState = (stateId: number, stateLabel: string, appId: string, typeId: string, message: string, select?: string) => {\n    this.caseSearchComponent.setCaseType(new CaseType().deserialize( { applicationId : appId, id: typeId }));\n    this.caseSearchComponent.setSelectedStateId(stateId, stateLabel);\n    this.message = message;\n    this.liveapps.caseSearchEntries('', this.sandboxId, appId, typeId, true, 0, 1000, stateId, select).subscribe(\n      results => {\n        this.matchedRefs = results.caserefs;\n      }\n    );\n  }\n\n  ngAfterViewInit() {\n    super.ngAfterViewInit();\n    this.containerChanges$.subscribe();\n  }\n\n  ngOnInit() {\n    super.ngOnInit();\n  }\n\n}\n","<div fxFill fxLayout=\"column\" #componentDiv>\n  <div fxLayout=\"row\" style=\"margin-top: 10px; margin-bottom: 10px;\">\n    <tcla-live-apps-case-search fxFlex fxLayoutAlign=\"center center\" [sandboxId]=\"sandboxId\" [appIds]=\"appIds\" (foundRefs)=\"handleSearchResults($event)\"></tcla-live-apps-case-search>\n  </div>\n  <div *ngIf=\"matchedRefs.length>0\" fxLayout=\"row\" fxLayoutAlign=\"space-around start\" [ngStyle]=\"{'min-height' : resultsHeight}\" style=\"margin-left: 50px; margin-right: 50px; margin-top: 20px; margin-bottom: 20px; height: 100%;\">\n    <tcla-live-apps-case-list #componentChildDiv fxFlex style=\"height: 100%\" [sandboxId]=\"sandboxId\" [uiAppId]=\"uiAppId\" [caseRefs]=\"matchedRefs\" [displayType]=\"widget.gtXs ? 'list' : 'miniCard'\" [headerText]=\"'Matching Cases'\" [headerMessage]=\"message\" [highlight]=\"searchString\" (clickCase)=\"clickCaseAction($event)\" (clearMatches)=\"handleClearMatches()\"></tcla-live-apps-case-list>\n    <!--tcla-live-apps-case-list #componentChildDiv fxFlex style=\"height: 100%\" [sandboxId]=\"sandboxId\" [uiAppId]=\"uiAppId\" [caseRefs]=\"matchedRefs\" [displayType]=\"'list'\" [headerText]=\"'Matching Cases'\" [headerMessage]=\"message\" [highlight]=\"searchString\" (clickCase)=\"clickCaseAction($event)\" (clearMatches)=\"handleClearMatches()\"></tcla-live-apps-case-list-->\n  </div>\n</div>\n\n","import {Component, EventEmitter, Input, OnInit, Output, OnDestroy, SimpleChanges, OnChanges} from '@angular/core';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {ProcessId} from '../../models/liveappsdata';\nimport {LaProcessSelection} from '../../models/tc-case-processes';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {map, take, takeUntil} from 'rxjs/operators';\nimport {Subject} from 'rxjs';\nimport {CustomFormDefs} from '@tibco-tcstk/tc-forms-lib';\nimport {FormConfig} from '../../models/tc-liveapps-config';\nimport {TcFormConfigService} from '../../services/tc-form-config.service';\nimport {TcCoreCommonFunctions} from '@tibco-tcstk/tc-core-lib';\n\n/**\n * Handles rendering of case creator form.\n *\n *@example <tcla-live-apps-case-creator></tcla-live-apps-case-creator>\n */\n@Component({\n  selector: 'tcla-live-apps-case-creator',\n  templateUrl: './live-apps-case-creator.component.html',\n  styleUrls: ['./live-apps-case-creator.component.css']\n})\nexport class LiveAppsCaseCreatorComponent extends LiveAppsComponent implements OnInit, OnChanges {\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * LA application ID\n   */\n  @Input() applicationId: string;\n\n  /**\n   * The LA Application Type Id (generally 1)\n   */\n  @Input() typeId: string;\n\n  /**\n   * The process definition of the action or creator to execute\n   */\n  @Input() process: LaProcessSelection;\n\n  /**\n   * Data object that will be displayed on the form. Allows overriding over form data (eg. when selecting data in spotfire)\n   */\n  @Input() dataOverride: any;\n\n  /**\n   * Custom Form Layout Configuration\n   */\n  public formConfig: FormConfig = new FormConfig();\n  @Input('formConfig') set FormConfig(formConfig: FormConfig) {\n    if (formConfig){\n      this.formConfig = formConfig;\n    }\n  }\n\n  /**\n   * Custom Form configuration file\n   */\n  @Input() customFormDefs: CustomFormDefs;\n\n  /**\n   * Enable legacy creators\n   */\n  public legacyCreators: boolean = false;\n  @Input('legacyCreators') set LegacyCreators(legacyCreators: boolean) {\n    if (legacyCreators){\n      this.legacyCreators = legacyCreators;\n    }\n  }\n\n  /**\n   * Allow override of forms framework\n   * Options: bootstrap-4 or material-design\n   */\n  public formsFramework: string = 'material-design';\n  @Input('formsFramework') set FormsFramework(formsFramework: string) {\n    if (formsFramework){\n      this.formsFramework = formsFramework;\n    }\n  }\n\n  /**\n   * ~event caseChanged : Case action started (process started)\n   * ~payload ProcessId : ProcessId object passed when a case has been updated or created by a process (action/creator)\n   */\n  @Output() caseChanged: EventEmitter<ProcessId> = new EventEmitter<ProcessId>();\n\n  data: any;\n  schema: any;\n  layout: any[];\n  options: any;\n  isCustomForm = false;\n  formRef: any;\n\n  public handleFormOpen = (event) => {\n    this.formRef = event;\n  }\n\n  handleSubmit = (data, caseRef) => {\n    // if no_process_submit then no need to run process as this was done inside a custom form app\n    if (data !== 'NO_PROCESS_SUBMIT') {\n      // run the process\n      this.liveapps.runProcess(this.sandboxId, this.applicationId, this.process.process.id, caseRef, data)\n        .pipe(\n          take(1),\n          takeUntil(this._destroyed$)\n        )\n        .subscribe(response => {\n          if (response) {\n            if (!response.data.errorMsg) {\n              // parse data to object\n              response.data = JSON.parse(response.data);\n              // case created send back response including caseIdentifier if one is present\n              let caseIdentifier;\n              let caseReference;\n              if (response.caseIdentifier) {\n                caseIdentifier = response.caseIdentifier;\n              }\n              if (response.caseReference) {\n                caseReference = response.caseReference;\n              }\n              const processResponse = new ProcessId().deserialize({'caseIdentifier': caseIdentifier, 'caseReference': caseReference});\n              this.caseChanged.emit(processResponse);\n              this.schema = undefined;\n              this.data = undefined;\n              this.layout = undefined;\n            } else {\n              console.error('Unable to run case creator');\n              console.error(response.data.errorMsg);\n            }\n          }\n        }, error => {\n            console.error('Unable to run case creator');\n            console.error(error);\n          }\n        );\n    } else {\n      const processResponse = new ProcessId().deserialize({'caseIdentifier': undefined, 'caseReference': undefined});\n      this.caseChanged.emit(processResponse);\n      this.schema = undefined;\n      this.data = undefined;\n      this.layout = undefined;\n    }\n  }\n\n  handleLegacyProcessComplete = (event) => {\n    // event.detail.destroy();\n    const processResponse = new ProcessId().deserialize({'caseIdentifier': undefined, 'caseReference': undefined});\n    this.formRef = undefined;\n    this.caseChanged.emit(processResponse);\n  }\n\n  handleLegacyProcessCancelled = (event) => {\n    // event.detail.destroy();\n    // -1 for caseReference means cancelled\n    const processResponse = new ProcessId().deserialize({'caseIdentifier': undefined, 'caseReference': '-1'});\n    this.formRef.detail.form.destroy();\n    this.formRef = undefined;\n    this.caseChanged.emit(processResponse);\n  }\n\n  constructor(protected liveapps: LiveAppsService, protected formConfigService: TcFormConfigService) {\n    super();\n  }\n\n  ngOnInit() {\n    this.options = {\n      defaultOptions: {\n        'appearance': 'legacy'\n      }\n    };\n  }\n\n  initialize() {\n    if (this.formConfig) {\n      this.layout = this.formConfigService.getLayoutFromConfig(this.process.ref, this.formConfig);\n    }\n    if (this.customFormDefs && this.customFormDefs.customForms) {\n      this.isCustomForm = (this.customFormDefs.customForms.findIndex((form) => {\n        return (form === this.process.ref);\n      }) !== -1);\n    } else {\n      this.isCustomForm = false;\n    }\n    if (this.process.process.jsonSchema.$schema === 'NOSCHEMA') {\n      this.schema = undefined;\n    } else {\n      this.schema = this.process.process.jsonSchema;\n    }\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    // handle input param changes\n    /* if (changes.process && changes.process.currentValue && (changes.process.currentValue !== changes.process.previousValue)) {\n      this.initialize(changes.process.currentValue);\n    } else if (changes.applicationId && (changes.applicationId.currentValue !== changes.applicationId.previousValue)) {\n      // appId has changed: make sure no process selected/form displayed\n      this.process = undefined;\n    }*/\n    /*if (changes.layout && (changes.layout.currentValue !== changes.layout.previousValue)) {\n      this.layout = changes.layout.currentValue;\n    }*/\n    if (changes.dataOverride && (changes.dataOverride.currentValue !== changes.dataOverride.previousValue)) {\n      this.data = this.dataOverride;\n    }\n\n    if (this.process) {\n      this.initialize();\n    }\n\n  }\n\n}\n","<div fxFill>\n  <tcfrm-rendered-form *ngIf=\"process && (!legacyCreators || isCustomForm)\" style=\"overflow: auto;\"\n                       [formsFramework]=\"formsFramework\" [layout]=\"layout\" [customFormDefs]=customFormDefs\n                       [formRef]=\"process.ref\" [appId]=\"applicationId\" [customFormDefs]=\"customFormDefs\"\n                       [schema]=\"schema\" [layout]=\"layout\" [data]=\"data\" [options]=\"options\"\n                       (formSubmit)=\"handleSubmit($event, undefined)\"></tcfrm-rendered-form>\n  <!--tcla-live-apps-legacy-process *ngIf=\"process && legacyCreators && !isCustomForm\" [process]=\"process\" [type]=\"'creator'\" [applicationId]=\"applicationId\" [typeId]=\"typeId\" (processCancelled)=\"handleLegacyProcessCancelled()\" (processComplete)=\"handleLegacyProcessComplete()\" class=\"live-apps-widget\" fxFill></tcla-live-apps-legacy-process-->\n  <!--tcla-live-apps-legacy-process *ngIf=\"process && legacyCreators && !isCustomForm\" [process]=\"process\" [type]=\"'creator'\" [applicationId]=\"applicationId\" [typeId]=\"typeId\" (processCancelled)=\"handleLegacyProcessCancelled()\" (processComplete)=\"handleLegacyProcessComplete()\" class=\"live-apps-widget\" fxFill></tcla-live-apps-legacy-process-->\n  <div *ngIf=\"process && legacyCreators && !isCustomForm\">\n    <div class=\"live-apps-form\" id=\"creatorFormDiv\"></div>\n    <tib-la-casecreator-form\n      [sandbox]=\"sandboxId\"\n      [formDivId]=\"'creatorFormDiv'\"\n      [id]=\"process.process.id\"\n      [name]=\"process.creator.name\"\n      [label]=\"process.creator.label\"\n      [version]=\"process.creator.version\"\n      [applicationId]=\"process.creator.applicationId\"\n      [applicationName]=\"process.creator.applicationName\"\n      [activityId]=\"process.creator.activityId\"\n      [activityName]=\"process.creator.activityName\"\n      (formLoad) =\"handleFormOpen($event)\"\n      (formSubmit)=\"handleLegacyProcessComplete($event)\"\n      (formCancel)=\"handleLegacyProcessCancelled($event)\"\n    >\n    </tib-la-casecreator-form>\n  </div>\n</div>\n\n","// todo: JS deprecate this since now using private API to allow only listing of enabled creators\n\nimport {Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild} from '@angular/core';\nimport {CaseType, CaseTypesList, Process} from '../../models/liveappsdata';\nimport {LaProcessSelection} from '../../models/tc-case-processes';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {MatSelect} from '@angular/material/select';\n\n@Component({\n  selector: 'tcla-live-apps-creator-selector',\n  templateUrl: './live-apps-creator-selector.component.html',\n  styleUrls: ['./live-apps-creator-selector.component.css']\n})\nexport class LiveAppsCreatorSelectorComponent extends LiveAppsComponent implements OnChanges {\n  @ViewChild('creatorSelector', {static: false}) creatorSelector: MatSelect;\n  @Input() sandboxId: number;\n  @Input() appId: string;\n  public typeId: string = '1';\n  @Input('typeId') set TypeId(typeId: string) {\n    if (typeId){\n      this.typeId = typeId;\n    }\n  }\n\n  /**\n   * ~event creatorSelection : Case Creator selected\n   * ~payload LaProcessSelection : LaProcessSelection object output when a creator is selected from a drop down\n   */\n\n  /**\n   * Pre-select specified creatorId\n   */\n  @Input() seletedCreatorId: string;\n\n  /**\n   * Use Form field rendering around the selection box\n   */\n  public formFieldRendering: boolean = false;\n  @Input('formFieldRendering') set FormFieldRendering(formFieldRendering: boolean) {\n    if (formFieldRendering){\n      this.formFieldRendering = formFieldRendering;\n    }\n  }\n\n  /**\n   * Label for the actions selector\n   */\n  public label: string = 'Case Creators';\n  @Input('label') set Label(label: string) {\n    if (label){\n      this.label = label;\n    }\n  }\n\n  @Output() creatorSelection = new EventEmitter<LaProcessSelection>();\n\n  appSchema: CaseTypesList;\n  caseType: CaseType;\n  caseCreatorList: Process[];\n\n  // run when the user clicks on a case creator\n  public selectProcess = (process) => {\n    this.creatorSelection.emit(new LaProcessSelection('creator', this.appSchema, this.getCaseIDAttributeName(), process,\n      // Format of ref is <applicationName>.<applicationInternalName>.<processType>.<processName>\n      (this.caseType.applicationName + '.' + this.caseType.applicationInternalName + '.' + 'creator' + '.' + process.name),\n      undefined, undefined, undefined\n    ));\n  }\n\n  public reset = () => {\n    this.creatorSelector.value = undefined;\n  }\n\n  private getCaseIDAttributeName = () => {\n    let caseIdAttrib: any;\n    this.caseType.attributes.forEach((attribute) => {\n      if (attribute.isIdentifier) {\n        caseIdAttrib = attribute;\n      }\n    });\n    return caseIdAttrib;\n  }\n\n  public refresh = () => {\n    // retrieve the schema for this case type so we can display case creators and case actions for this case type\n    this.liveapps.getCaseTypeSchema(this.sandboxId, this.appId, 100)\n    .subscribe(schema => {\n      this.appSchema = schema;\n      schema.casetypes.forEach((casetype) => {\n          // the schema will contain definitions for both the 'case' and any defined types in that case.\n          // We want the schema for this 'case'.\n          if (casetype.applicationId === this.appId && casetype.id === this.typeId) {\n            if (casetype.jsonSchema !== undefined) {\n              this.caseType = casetype;\n              this.caseCreatorList = casetype.creators ? casetype.creators : [];\n              if (this.caseCreatorList.length === 1) {\n                this.selectProcess(this.caseCreatorList[0]);\n              }\n            } else {\n              console.error('No schema returned for this case type: You may need to update/re-deploy the live apps application');\n            }\n          }\n        }\n      );\n    }\n    );\n  }\n\n  public compareProcessId = (o1: any, o2: any): boolean => {\n    return o1.id === this.seletedCreatorId;\n  }\n\n  constructor(protected liveapps: LiveAppsService) {\n    super();\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    if (changes.appId && (changes.appId.currentValue !== changes.appId.previousValue)) {\n        this.caseCreatorList = [];\n      this.refresh();\n    }\n  }\n}\n","<div *ngIf=\"!formFieldRendering && caseCreatorList && caseCreatorList.length > 1\" fxFlex style=\"margin-left: 10px;\">\n    <span class=\"tcs-case-creation-dialog-instruction\">Select a case creator</span>\n    <mat-select #creatorSelector class=\"tcs-creator-selector-option\" [disableOptionCentering]=\"true\"\n                placeholder=\"{{label}}\" (selectionChange)=\"selectProcess($event.value)\">\n      <mat-option matInput *ngFor=\"let creator of caseCreatorList\" [value]=\"creator\">\n        <span>{{creator.name}}</span>\n      </mat-option>\n    </mat-select>\n</div>\n<div *ngIf=\"formFieldRendering\" fxFlex>\n  <mat-form-field style=\"width:100%\" class=\"tcs-creator-selector-ff\">\n    <mat-label>{{label}}</mat-label>\n    <mat-select #creatorSelector class=\"tcs-creator-selector-option-formfield\" [compareWith]=\"compareProcessId\" [disableOptionCentering]=\"true\"\n                placeholder=\"{{label}}\" (selectionChange)=\"selectProcess($event.value)\">\n      <mat-option matInput *ngFor=\"let creator of caseCreatorList\" [value]=\"creator\">\n        <span>{{creator.name}}</span>\n      </mat-option>\n    </mat-select>\n  </mat-form-field>\n</div>\n","import {Deserializable} from '@tibco-tcstk/tc-core-lib';\n\n/*\n  type can be action/creator or workitem\n */\nexport class LiveAppsFormConfig implements Deserializable {\n  type: string;\n  id: string;\n  user?: string;\n  sandbox: string;\n  formDivId: string;\n  useCustomForm: string;\n  name: string;\n  label: string;\n  version: string;\n  applicationId: string;\n  applicationName: string;\n  activityId: string;\n  activityName: string;\n  caseRef?: string;\n  noData?: string;\n  formRef: string;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n","\n\nimport {Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild} from '@angular/core';\nimport {Subject} from 'rxjs';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {map, take, takeUntil, tap} from 'rxjs/operators';\nimport {CaseCreator, CaseType, CaseTypesList, Process} from '../../models/liveappsdata';\nimport {LaProcessSelection} from '../../models/tc-case-processes';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {TcCaseProcessesService} from '../../services/tc-case-processes.service';\nimport {CustomFormDefs} from '@tibco-tcstk/tc-forms-lib';\n\n\n/**\n * Wraps case creator and case creator list\n *\n *@example <tcla-live-apps-case-creators></tcla-live-apps-case-creators>\n */\n@Component({\n  selector: 'tcla-live-apps-case-creators',\n  templateUrl: './live-apps-case-creators.component.html',\n  styleUrls: ['./live-apps-case-creators.component.css']\n})\nexport class LiveAppsCaseCreatorsComponent extends LiveAppsComponent implements OnInit {\n  /**\n   * The LA Application Id\n   */\n  @Input() appId: string;\n\n  /**\n   * The LA Application Type Id (generally 1)\n   */\n  @Input() typeId: string;\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * ~event creatorClicked : Case Creator selected\n   * ~payload LaProcessSelection : LaProcessSelection object output when an action is clicked (ie. message to parent to run creator component)\n   */\n  @Output() creatorClicked: EventEmitter<LaProcessSelection> = new EventEmitter<LaProcessSelection>();\n\n\n  public casecreators: CaseCreator[];\n  public errorMessage: string;\n\n  appSchema: CaseTypesList;\n  caseType: CaseType;\n  caseActionList: Process[];\n\n  constructor(protected liveapps: LiveAppsService, protected caseProcessesService: TcCaseProcessesService) {\n    super();\n  }\n\n  public refresh = () => {\n    this.caseProcessesService.getCaseCreators(this.sandboxId, this.appId, this.typeId)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      ).subscribe(\n      casecreators => {\n        this.casecreators = casecreators.creators;\n        if (this.casecreators.length === 1) {\n          this.selectCreator(this.casecreators[0]);\n        }\n      }, error => { this.errorMessage = 'Error retrieving case actions: ' + error.error.errorMsg; });\n  }\n\n  public selectCreator(creator: CaseCreator) {\n    this.caseProcessesService.getProcessDetails(null, this.appId, this.typeId, this.sandboxId, null, creator, 100).pipe(\n      take(1),\n      takeUntil(this._destroyed$),\n      tap(processDetails => {\n        if (!processDetails || !processDetails.process || (processDetails.process.jsonSchema.$schema === 'NOSCHEMA')) {\n          // This will be triggered when no form schema is available\n          // Typically happens when:\n          // 1) The form has elements that are not supported by the Live Apps API for form schemas such as participant selectors\n          // 2) The Live Apps application is legacy and has no form schema at all, redeploying the live apps application would fix this.\n            console.error('No schema available for this case type: The form may not be supported or you may need to update/re-deploy the live apps application. Alternatively use a custom form.');\n          }\n        }\n      )\n    )\n    .subscribe(processSchema => {\n        this.creatorClicked.emit(processSchema);\n        return processSchema;\n      }\n      , error => { this.errorMessage = 'Error retrieving case actions: ' + error.error.errorMsg; });\n  }\n\n  ngOnInit() {\n    this.refresh();\n  }\n\n}\n","<div *ngIf=\"casecreators && casecreators.length > 1\" fxFlex style=\"margin-left: 10px;\">\n  <span class=\"tcs-case-creation-dialog-instruction\">Select a case creator</span>\n  <mat-select #creatorSelector class=\"tcs-creator-selector-option\" [disableOptionCentering]=\"true\"\n              placeholder=\"Case Creators\" (selectionChange)=\"selectCreator($event.value)\">\n    <mat-option *ngFor=\"let creator of casecreators\" [value]=\"creator\">\n      <span>{{creator.label}}</span>\n    </mat-option>\n  </mat-select>\n</div>\n","import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';\nimport {LiveAppsFormConfig} from '../../models/tc-liveapps-form';\n\n/**\n * This Component provides access to the OOTB form web component.\n *\n * ![alt-text](../live-apps-form.png \"Live Apps Form Image\")\n *\n *@example <tcla-live-apps-form></tcla-live-apps-form>\n */\n\n@Component({\n  selector: 'tcla-live-apps-form-wc',\n  templateUrl: './live-apps-form-wc.component.html',\n  styleUrls: ['./live-apps-form-wc.component.css']\n})\nexport class LiveAppsFormWcComponent {\n\n  /**\n   * config - configuration of the form web component\n   */\n  @Input() config: LiveAppsFormConfig;\n\n  /**\n   * data - emits data when form is loaded\n   */\n  @Output() data: EventEmitter<any> = new EventEmitter<any>();\n\n  /**\n   * completed - emitted when form is complete\n   */\n  @Output() completed: EventEmitter<any> = new EventEmitter<any>();\n\n  @ViewChild('customFormComponent', { static: false }) customFormComponent: ElementRef<any>;\n\n  private formApi: any;\n\n  constructor() { }\n\n  public submit = (data: any) => {\n    this.formApi.submit(data);\n  }\n\n  public close = (data: any) => {\n    this.formApi.close(data);\n  }\n\n  public cancel = () => {\n    this.formApi.cancel();\n  }\n\n  public handleFormEvent (event) {\n    if (event && event.detail && event.detail) {\n      switch (event.type) {\n        case 'formLoad':\n          this.formApi = event.target;\n          if (event.detail.data) {\n            this.data.emit(event.detail.data);\n          }\n          if (this.config.useCustomForm && this.customFormComponent) {\n            // @ts-ignore\n            if (this.customFormComponent.notifyLoad) {\n              // @ts-ignore\n              this.customFormComponent.notifyLoad(event);\n            }\n          }\n          break;\n        case 'formSubmit':\n          if (this.config.useCustomForm && this.customFormComponent) {\n            // @ts-ignore\n            if (this.customFormComponent.notifySubmit) {\n              // @ts-ignore\n              this.customFormComponent.notifySubmit(event);\n            }\n          }\n          if (event.detail.completed) {\n            this.completed.emit(event);\n          }\n          break;\n        case 'formCancel':\n          if (this.config.useCustomForm && this.customFormComponent) {\n            // @ts-ignore\n            if (this.customFormComponent.notifyCancel) {\n              // @ts-ignore\n              this.customFormComponent.notifyCancel(event);\n            }\n          }\n          this.completed.emit(event);\n          break;\n        case 'formClose':\n          if (this.config.useCustomForm && this.customFormComponent) {\n            // @ts-ignore\n            if (this.customFormComponent.notifyClose) {\n              // @ts-ignore\n              this.customFormComponent.notifyClose(event);\n            }\n          }\n          this.completed.emit(event);\n          break;\n        default:\n          console.warn('Unhandled form event (live-apps-form-wc)');\n          console.warn(event);\n          break;\n      }\n    }\n  }\n}\n","<tib-la-caseaction-form *ngIf=\"config?.type?.toUpperCase() === 'ACTION'\" #actionRef\n                        [caseRef]=\"config.caseRef\"\n                        [useCustomForm]=\"config.useCustomForm\"\n                        [sandbox]=\"config.sandbox\"\n                        [formDivId]=\"config.formDivId\"\n                        [id]=\"config.id\"\n                        [name]=\"config.name\"\n                        [version]=\"config.version\"\n                        [applicationId]=\"config.applicationId\"\n                        [applicationName]=\"config.applicationName\"\n                        [label]=\"config.label\"\n                        [activityName]=\"config.activityName\"\n                        (formLoad)=\"handleFormEvent($event)\"\n                        (formCancel)=\"handleFormEvent($event)\"\n                        (formSubmit)=\"handleFormEvent($event)\">\n</tib-la-caseaction-form>\n<tib-la-openworkitem-form *ngIf=\"config?.type?.toUpperCase() === 'WORKITEM'\" #actionRef\n                          [useCustomForm]=\"config.useCustomForm\"\n                          [id]=\"config.id\"\n                          [sandbox]=\"config.sandbox\"\n                          [formDivId]=\"config.formDivId\"\n                          (formLoad)=\"handleFormEvent($event)\"\n                          (formCancel)=\"handleFormEvent($event)\"\n                          (formClose)=\"handleFormEvent($event)\"\n                          (formSubmit)=\"handleFormEvent($event)\">\n</tib-la-openworkitem-form>\n<tib-la-casecreator-form *ngIf=\"config?.type?.toUpperCase() === 'CREATOR'\" #creatorRef\n                         [useCustomForm]=\"config.useCustomForm\"\n                         [sandbox]=\"config.sandbox\"\n                         [formDivId]=\"config.formDivId\"\n                         [id]=\"config.id\"\n                         [name]=\"config.name\"\n                         [version]=\"config.version\"\n                         [applicationId]=\"config.applicationId\"\n                         [applicationName]=\"config.applicationName\"\n                         [label]=\"config.label\"\n                         [activityName]=\"config.activityName\"\n                         (formLoad)=\"handleFormEvent($event)\"\n                         (formCancel)=\"handleFormEvent($event)\"\n                         (formSubmit)=\"handleFormEvent($event)\">\n</tib-la-casecreator-form>\n<div [id]=\"config.formDivId\"></div>\n<!--div>{{config | json}}</div-->\n<tcla-custom-form-library #customFormComponent *ngIf=\"config.useCustomForm\" [config]=\"config\"\n                                                      (formCancel)=\"cancel()\"\n                                                      (formSubmit)=\"submit($event)\"\n                                                      (formClose)=\"close($event)\"\n></tcla-custom-form-library>\n","import {Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';\nimport {ProcessId} from '../../models/liveappsdata';\nimport {LaProcessSelection} from '../../models/tc-case-processes';\nimport {LiveAppsCreatorSelectorComponent} from '../live-apps-creator-selector/live-apps-creator-selector.component';\nimport {CustomFormDefs} from '@tibco-tcstk/tc-forms-lib';\nimport {FormConfig, ProcessFormConfig} from '../../models/tc-liveapps-config';\nimport {TcFormConfigService} from '../../services/tc-form-config.service';\nimport {LiveAppsFormConfig} from '../../models/tc-liveapps-form';\n\n/**\n * Wraps case creator selection and execution of creator\n *\n *@example <tcla-live-apps-creators></tcla-live-apps-creators>\n */\n\n@Component({\n  selector: 'tcla-live-apps-creators',\n  templateUrl: './live-apps-creators.component.html',\n  styleUrls: ['./live-apps-creators.component.css']\n})\nexport class LiveAppsCreatorsComponent implements OnInit {\n  @ViewChild('creatorSelector', {static: false}) creatorSelector: LiveAppsCreatorSelectorComponent;\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * lA appId ??\n   */\n  @Input() applicationId: string;\n\n  /**\n   * The LA Application Type Id (generally 1)\n   */\n  @Input() typeId: string;\n\n  /**\n   * Data object that will be displayed on the form. Allows overriding over form data (eg. when selecting data in spotfire)\n   */\n  @Input() dataOverride: any;\n\n  /**\n   * Custom Form Layout Configuration\n   */\n  @Input() formConfig: FormConfig;\n\n  /**\n   * Custom Form configuration file\n   */\n  @Input() customFormDefs: CustomFormDefs;\n\n  /**\n   * Enable legacy creators\n   */\n  public legacyCreators: boolean = false;\n  @Input('legacyCreators') set LegacyCreators(legacyCreators: boolean) {\n    if (legacyCreators){\n      this.legacyCreators = legacyCreators;\n    }\n  }\n\n  /**\n   * Allow override of forms framework\n   * Options: bootstrap-4 or material-design\n   */\n  public formsFramework: string = 'material-design';\n  @Input('formsFramework') set FormsFramework(formsFramework: string) {\n    if (formsFramework){\n      this.formsFramework = formsFramework;\n    }\n  }\n\n\n  /**\n   * ~event caseCreated : Case Creator started (process started)\n   * ~payload ProcessId : ProcessId object output on case creation (details of process started)\n   */\n  @Output() caseCreated: EventEmitter<ProcessId> = new EventEmitter<ProcessId>();\n\n  selectedProcess: LaProcessSelection;\n  selectedFormConfig: ProcessFormConfig;\n  wcFormConfig: LiveAppsFormConfig;\n\n  // handle form submit\n  handleSubmit = (event: any) => {\n    this.caseCreated.emit(event);\n    /*if (this.creatorSelector) {\n      this.creatorSelector.reset();\n    }*/\n  }\n\n  // handle case creator selection\n  handleCreatorSelection = (process: LaProcessSelection) => {\n    this.selectedProcess = process;\n    this.selectedFormConfig = TcFormConfigService.getProcessFormConfig(process.ref, this.formConfig);\n    if (this.legacyCreators) {\n      this.wcFormConfig = new LiveAppsFormConfig().deserialize({\n        type: 'creator',\n        id: process.creator.id,\n        sandbox: this.sandboxId.toString(),\n        formDivId: 'creatorDialogDiv',\n        useCustomForm: (this.selectedFormConfig && this.selectedFormConfig.externalForm) ? this.selectedFormConfig.externalForm.toString() : false,\n        name: process.creator.name,\n        label: process.creator.label,\n        version: process.creator.version.toString(),\n        applicationId: process.creator.applicationId,\n        applicationName: process.creator.applicationName,\n        activityId: process.creator.activityId,\n        activityName: process.creator.activityName,\n        formRef: process.ref\n      });\n    }\n  }\n\n  constructor() { }\n\n  ngOnInit() {\n    console.log(this.applicationId);\n  }\n\n}\n","<div fxLayout=\"column\" fxFlexFill>\n  <!--tcla-live-apps-creator-selector #creatorSelector style=\"\" [sandboxId]=\"sandboxId\" [appId]=\"applicationId\" [typeId]=\"typeId\" (creatorSelection)=\"handleCreatorSelection($event)\"></tcla-live-apps-creator-selector-->\n  <tcla-live-apps-case-creators *ngIf=\"!selectedProcess\" #creatorSelector style=\"\" [sandboxId]=\"sandboxId\" [appId]=\"applicationId\" [typeId]=\"typeId\" (creatorClicked)=\"handleCreatorSelection($event)\"></tcla-live-apps-case-creators>\n  <!-- open source forms renderer && legacy custom forms -->\n  <tcla-live-apps-case-creator *ngIf=\"!legacyCreators\" style=\"overflow: auto; height: 100%\" [formsFramework]=\"formsFramework\" [sandboxId]=\"sandboxId\" [applicationId]=\"applicationId\" [typeId]=\"typeId\" [process]=\"selectedProcess\" [dataOverride]=\"dataOverride\" [customFormDefs]=\"customFormDefs\" [formConfig]=\"formConfig\" [legacyCreators]=\"legacyCreators\" (caseChanged)=\"handleSubmit($event)\"></tcla-live-apps-case-creator>\n  <!-- Live Apps WC form renderer && external forms -->\n  <tcla-live-apps-form-wc *ngIf=\"legacyCreators && wcFormConfig\" [config]=\"wcFormConfig\" (completed)=\"handleSubmit($event)\"></tcla-live-apps-form-wc>\n</div>\n","import {\n  AfterViewInit,\n  Component,\n  ElementRef,\n  EventEmitter,\n  Input,\n  OnDestroy,\n  Output\n} from '@angular/core';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {LegacyIframeService} from '@tibco-tcstk/tc-core-lib';\nimport {TcVisibilityService} from '@tibco-tcstk/tc-core-lib';\nimport {LaProcessSelection} from '../../models/tc-case-processes';\n\n/**\n * Wraps legacy angularjs form renderer\n *\n *@example <tcla-live-apps-legacy-form></tcla-live-apps-legacy-form>\n */\n\n@Component({\n  selector: 'tcla-live-apps-legacy-process',\n  templateUrl: './live-apps-legacy-process.component.html',\n  styleUrls: ['./live-apps-legacy-process.component.css']\n})\nexport class LiveAppsLegacyProcessComponent extends LiveAppsComponent implements OnDestroy, OnDestroy, AfterViewInit {\n\n  public legacyIframeId: string = 'legacyProcessFrame';\n  @Input('legacyIframeId') set LegacyIframeId(legacyIframeId: string) {\n    if (legacyIframeId){\n      this.legacyIframeId = legacyIframeId;\n    }\n  }\n\n  @Input() process: LaProcessSelection;\n  @Input() type: string; // creator/process\n  @Input() applicationId: string;\n  @Input() typeId: string;\n  @Input() caseRef: string;\n  @Input() caseState: string;\n  @Output() processComplete = new EventEmitter();\n  @Output() processCancelled = new EventEmitter();\n\n  private target;\n  private formDiv;\n  private processActive = false;\n  private openProcessId;\n\n  constructor (protected visibilityService: TcVisibilityService, protected host: ElementRef, protected legacyIframeService: LegacyIframeService) {\n    super();\n  }\n\n  public isFormActive() {\n    return this.processActive;\n  }\n\n  public changeProcess = (process: LaProcessSelection) => {\n    // process has changed\n    this.renderProcess(process);\n  }\n\n  public renderProcess = (process: LaProcessSelection) => {\n    if (this.processActive && this.openProcessId) {\n      // opening a new process so cancel old one\n      this.cancelProcess(false);\n    }\n\n    // send message to external form app\n    this.formDiv.contentWindow.postMessage({\n      action: this.type === 'creator' ? 'runCreator' : 'runAction',\n      processId: process.process.id,\n      caseRef: this.caseRef,\n      caseState: this.caseState,\n      applicationId: this.applicationId,\n      typeId: this.typeId\n    }, window.location.origin);\n\n    // position the form iframe over the processDiv placeholder\n    this.processActive = true;\n    this.openProcessId = process.process.id;\n    this.resizeProcess();\n  }\n\n  private receiveMessage = (event) => {\n    if (event.data.action === 'processComplete') {\n      this.processActive = false;\n      this.openProcessId = undefined;\n      this.hideProcess();\n      this.processComplete.emit();\n    } else if (event.data.action === 'processCancelled') {\n      this.processActive = false;\n      this.openProcessId = undefined;\n      this.hideProcess();\n      this.processCancelled.emit();\n    }\n  }\n\n  public cancelProcess = (emit?: boolean) => {\n    this.formDiv.contentWindow.postMessage({ 'action': 'cancelProcess' }, window.location.origin);\n    this.processActive = false;\n    this.openProcessId = undefined;\n    this.hideProcess();\n    if (emit) {\n      this.processCancelled.emit();\n    }\n  }\n\n  private hideProcess = () => {\n  // hide the iframe!\n      this.formDiv.style.top = '-1000px';\n      this.formDiv.style.left = '-1000px';\n      this.formDiv.style.zIndex = '1';\n  }\n\n  private resizeProcess = () => {\n    // position the form iframe over the processDiv placeholder\n    setTimeout(handler => {\n      const rect = this.target.getBoundingClientRect();\n      this.formDiv.style.top = rect.top.toString() + 'px';\n      this.formDiv.style.left = rect.left.toString() + 'px';\n      this.formDiv.style.height = rect.height.toString() + 'px';\n      this.formDiv.style.width = rect.width.toString() + 'px';\n      this.formDiv.style.position = 'absolute';\n      // creator needs 1001 so it is over the dialog box\n      this.formDiv.style.zIndex = (this.type === 'creator') ? '1001' : '1000';\n    }, 1000);\n  }\n\n  private initialize = () => {\n    // listen for messages from the iframe\n    window.addEventListener('message', this.receiveMessage, false);\n\n    // we only want to render the process when the element is visible\n    const inSight$ = this.visibilityService.elementInSight(this.host);\n    inSight$.subscribe(next => {\n      if (!next) {\n        // element not visible so hide the process if it is showing\n        if (this.processActive && this.target) {\n          this.hideProcess();\n        }\n      } else {\n        // element is visible\n        if (!this.processActive) {\n          // if process not already showing - show it\n          // first get a handle on the target div and the legacy iframe\n          this.target = document.getElementById('processDiv');\n          this.formDiv = document.getElementById(this.legacyIframeId);\n          if (this.openProcessId) {\n            // trigger display of the process\n            this.renderProcess(this.process);\n          }\n        } else {\n          this.resizeProcess();\n        }\n      }\n    });\n  }\n\n  ngAfterViewInit() {\n    super.ngAfterViewInit();\n    this.openProcessId = this.process.process.id;\n    this.containerChanges$.subscribe(widget => {\n      if (this.processActive && this.target) {\n        this.resizeProcess();\n      }\n    });\n\n    // wait for iframe to load before doing anything else\n    // this observable will emit true once the iFrame is loaded\n    this.legacyIframeService.processStatus.subscribe(loaded => {\n      if (loaded) {\n        // iframe is loaded\n        this.initialize();\n      }\n    });\n  }\n\n  ngOnDestroy() {\n    if (this.openProcessId) {\n      this.cancelProcess();\n    }\n  }\n}\n","<div #componentDiv fxFill id=\"processDiv\" style=\"border: none;\"></div>\n","import {Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild} from '@angular/core';\nimport {LiveAppsCaseCreatorComponent} from '../live-apps-case-creator/live-apps-case-creator.component';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {map, take, takeUntil} from 'rxjs/operators';\nimport {CaseType, ProcessId} from '../../models/liveappsdata';\nimport {LaProcessSelection} from '../../models/tc-case-processes';\nimport {LiveAppsLegacyProcessComponent} from '../live-apps-legacy-process/live-apps-legacy-process.component';\nimport {TcFormConfigService} from '../../services/tc-form-config.service';\nimport {LiveAppsFormConfig} from '../../models/tc-liveapps-form';\nimport {FormConfig, ProcessFormConfig} from '../../models/tc-liveapps-config';\nimport {LiveAppsFormWcComponent} from '../live-apps-form-wc/live-apps-form-wc.component';\n\n\n/**\n * Wraps rendering an execution of an action\n *\n *@example <tcla-live-apps-case-action></tcla-live-apps-case-action>\n */\n\n@Component({\n  selector: 'tcla-live-apps-case-action',\n  templateUrl: './live-apps-case-action.component.html',\n  styleUrls: ['./live-apps-case-action.component.css']\n})\nexport class LiveAppsCaseActionComponent extends LiveAppsCaseCreatorComponent implements OnInit, OnChanges {\n  /**\n   * The case reference\n   */\n  @Input() caseRef: string;\n\n  /**\n   * Whether to show the header bar in the widget - eg. favorites on home page (contains icon etc) - if off icons still appear without bar\n   */\n  @Input() showHeader: boolean;\n\n  /**\n   * Enable legacy actions\n   */\n  public legacyActions: boolean = false;\n  @Input('legacyActions') set LegacyActions(legacyActions: boolean) {\n    if (legacyActions){\n      this.legacyActions = legacyActions;\n    }\n  }\n\n  /**\n   * Allow override of forms framework\n   * Options: bootstrap-4 or material-design\n   */\n  public formsFramework: string = 'material-design';\n  @Input('formsFramework') set FormsFramework(formsFramework: string) {\n    if (formsFramework){\n      this.formsFramework = formsFramework;\n    }\n  }\n\n\n  @ViewChild(LiveAppsLegacyProcessComponent, {static: false}) legacyProcessComponent: LiveAppsLegacyProcessComponent;\n  @ViewChild('actionFormWc', {static: false}) actionFormWc: LiveAppsFormWcComponent;\n\n  originalData: any;\n  caseState: string;\n  wcFormConfig: LiveAppsFormConfig;\n  selectedFormConfig: ProcessFormConfig;\n\n  private getMainCaseTypeFromSchema(typeId: string, process: LaProcessSelection): CaseType {\n    let requestedType: CaseType;\n    process.appSchema.casetypes.forEach((cType) => {\n      if (cType.id === typeId) {\n        requestedType = cType;\n      }\n    });\n    return requestedType;\n  }\n\n  test = (event) => {\n    console.log(event);\n  }\n\n  private getCaseData = (caseRef) => {\n    // retrieve the case data for this case reference\n    this.data = undefined;\n    this.caseState = undefined;\n    this.liveapps.getCase(this.caseRef, this.sandboxId, this.applicationId, this.typeId )\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      )\n      .subscribe(result => {\n        if (result.metadata.applicationId === this.applicationId.toString()) {\n          const casedata = result.untaggedCasedataObj;\n          this.caseState = casedata.state;\n          this.originalData = {\n            [this.process.process.name]: casedata\n          };\n          // JS: use name rather than internalObjectName to handle appliction name change\n          const caseTypeName = this.getMainCaseTypeFromSchema(this.typeId, this.process).name;\n          this.data = {\n            [caseTypeName]: casedata\n          };\n        } else {\n          console.error('The selected case is not the right case type for this action');\n        }\n      }, error => {\n        // Emit any error retrieving case data to the parent\n        console.error('Unable to retrieve case data');\n        console.error(error);\n      });\n  }\n\n  public cancelAction = () => {\n    if (this.legacyProcessComponent) {\n      this.legacyProcessComponent.cancelProcess();\n    }\n    if (this.actionFormWc) {\n      this.actionFormWc.cancel();\n    }\n    if (this.formRef) {\n      // this.formRef.detail.form.destroy();\n      this.formRef.detail.form.invokeAction('cancel');\n      this.formRef = undefined;\n    }\n  }\n\n  constructor(protected lasvc: LiveAppsService, protected tcfcs: TcFormConfigService) {\n    super(lasvc, tcfcs);\n  }\n\n  private buildWcFormConfig = (process: LaProcessSelection, selectedFormConfig: ProcessFormConfig, caseRef: string) => {\n    this.wcFormConfig = new LiveAppsFormConfig().deserialize({\n      type: 'action',\n      id: process.action.id,\n      sandbox: this.sandboxId.toString(),\n      formDivId: 'actionDialogDiv',\n      useCustomForm: (selectedFormConfig && selectedFormConfig.externalForm) ? selectedFormConfig.externalForm.toString() : false,\n      name: process.action.name,\n      label: process.action.label,\n      version: process.action.version.toString(),\n      applicationId: process.action.applicationId,\n      applicationName: process.action.applicationName,\n      activityId: process.action.activityId,\n      activityName: process.action.activityName,\n      caseRef: caseRef,\n      formRef: process.ref\n    });\n  }\n\n  ngOnInit() {\n    // set default layout\n    // this.layout = [];\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    // the extended class will detect change in the process and layout passed\n    super.ngOnChanges(changes);\n\n    // setup form config for WC forms\n    if (this.legacyActions && this.formConfig && this.process && this.caseRef) {\n      this.selectedFormConfig = TcFormConfigService.getProcessFormConfig(this.process.ref, this.formConfig);\n      this.buildWcFormConfig(this.process, this.selectedFormConfig, this.caseRef);\n    } else {\n      // non WC forms:\n      if (this.process && this.caseRef) {\n        this.getCaseData(this.caseRef);\n      }\n    }\n  }\n\n}\n","<div class=\"tcs-case-action-pane\" fxLayout=\"column\" fxFill>\n  <tc-tibco-cloud-widget-header *ngIf=\"showHeader\" fxFlex=\"nogrow\" [headerText]=\"'Action'\" [icon]=\"'tcs-case-action-item'\"></tc-tibco-cloud-widget-header>\n  <tcfrm-rendered-form *ngIf=\"!wcFormConfig && data && process && (!legacyActions || isCustomForm)\" [schema]=\"schema\" [layout]=\"layout\" [data]=\"data\" [caseRef]=\"caseRef\" [appId]=\"applicationId\" [customFormDefs]=\"customFormDefs\" [formsFramework]=\"formsFramework\" [formRef]=\"process.ref\" (formSubmit)=\"handleSubmit($event, caseRef)\"></tcfrm-rendered-form>\n  <!--tcla-live-apps-legacy-process *ngIf=\"data && process && legacyActions && !isCustomForm\" [process]=\"process\" [caseState]=\"caseState\" [type]=\"'action'\" [applicationId]=\"applicationId\" [typeId]=\"typeId\" [caseRef]=\"caseRef\" (processCancelled)=\"handleLegacyProcessCancelled()\" (processComplete)=\"handleLegacyProcessComplete()\" class=\"live-apps-widget\" fxFill></tcla-live-apps-legacy-process-->\n  <!--div *ngIf=\"process && legacyActions && !isCustomForm\">\n    <div class=\"live-apps-form\" id=\"actionFormDiv\"></div>\n    <tib-la-caseaction-form\n      [sandbox]=\"sandboxId\"\n      [formDivId]=\"'actionFormDiv'\"\n      [noData]=\"false\"\n      [chatBotEnabled]=\"false\"\n      [caseRef]=\"caseRef\"\n      [id]=\"process.process.id\"\n      [name]=\"process.action.name\"\n      [label]=\"process.action.label\"\n      [version]=\"process.action.version\"\n      [applicationId]=\"process.action.applicationId\"\n      [applicationName]=\"process.action.applicationName\"\n      [activityId]=\"process.action.activityId\"\n      [activityName]=\"process.action.activityName\"\n      (formLoad) =\"handleFormOpen($event)\"\n      (formSubmit)=\"handleLegacyProcessComplete($event)\"\n      (formCancel)=\"handleLegacyProcessCancelled($event)\"\n    >\n    </tib-la-caseaction-form-->\n  <tcla-live-apps-form-wc #actionFormWc *ngIf=\"process && legacyActions && !isCustomForm && wcFormConfig\" [config]=\"wcFormConfig\" (completed)=\"handleLegacyProcessComplete($event)\"></tcla-live-apps-form-wc>\n</div>\n","import {Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';\nimport {ProcessId} from '../../models/liveappsdata';\nimport {LaProcessSelection} from '../../models/tc-case-processes';\nimport {CustomFormDefs} from '@tibco-tcstk/tc-forms-lib';\nimport {LiveAppsCaseActionsComponent} from '../live-apps-case-actions/live-apps-case-actions.component';\n\n\n/**\n * Not used by app but wraps action list and action execution.\n *\n *@example <tcla-live-apps-actions></tcla-live-apps-actions>\n */\n@Component({\n  selector: 'tcla-live-apps-actions',\n  templateUrl: './live-apps-actions.component.html',\n  styleUrls: ['./live-apps-actions.component.css']\n})\nexport class LiveAppsActionsComponent implements OnInit {\n\n  @ViewChild(LiveAppsCaseActionsComponent, {static: false}) actionSelector: LiveAppsCaseActionsComponent\n\n  /**\n   * The case reference\n   */\n  @Input() caseRef: string;\n\n  /**\n   * The state of the case\n   */\n  @Input() caseState: string;\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * LA Application ID\n   */\n  @Input() applicationId: string;\n\n  /**\n   * The LA Application Type Id (generally 1)\n   */\n  @Input() typeId: string;\n\n  /**\n   * Custom Form configuration file\n   */\n  @Input() customFormDefs: CustomFormDefs;\n\n  /**\n   * Allow override of forms framework\n   * Options: bootstrap-4 or material-design\n   */\n  public formsFramework: string = 'material-design';\n  @Input('formsFramework') set FormsFramework(formsFramework: string) {\n    if (formsFramework){\n      this.formsFramework = formsFramework;\n    }\n  }\n\n  /**\n   * Dont show buttons for any actions that start with this string.\n   * eg: '$' will remove the action $Update\n   */\n  @Input() actionFilter: string[];\n\n\n  /**\n   * ~event caseActioned : Case action starterd (process started)\n   * ~payload ProcessId : processId of started process in live apps (action)\n   */\n  @Output() caseActioned: EventEmitter<ProcessId> = new EventEmitter<ProcessId>();\n\n  selectedAction: LaProcessSelection;\n\n  // action clicked\n  handleActionCompleted = (result: ProcessId) => {\n    this.caseActioned.emit(result);\n    this.actionSelector.toggleEnable();\n  }\n\n\n  handleActionClicked = (action) => {\n    this.actionSelector.toggleEnable();\n    this.selectedAction = action;\n  }\n\n  constructor() { }\n\n\n  ngOnInit() {\n  }\n\n}\n","<div fxLayout=\"column\" fxFlexFill>\n  <tcla-live-apps-case-actions [sandboxId]=\"sandboxId\" [typeId]=\"typeId\" [appId]=\"applicationId\" [caseRef]=\"caseRef\" [maxActions]=\"5\" [actionFilter]=\"actionFilter\" (actionClicked)=\"handleActionClicked($event)\"></tcla-live-apps-case-actions>\n  <tcla-live-apps-case-action *ngIf=\"selectedAction\" [process]=\"selectedAction\" [caseRef]=\"caseRef\" [typeId]=\"typeId\" [applicationId]=\"applicationId\" [sandboxId]=\"sandboxId\" [formsFramework]=\"formsFramework\"></tcla-live-apps-case-action>\n</div>\n","import { Injectable } from '@angular/core';\nimport { Resolve } from '@angular/router';\nimport { Observable, of } from 'rxjs';\nimport {LiveAppsService} from '../services/live-apps.service';\nimport {Claim} from '@tibco-tcstk/tc-core-lib';\nimport {map, mergeMap, take} from 'rxjs/operators';\nimport {TcAppDefinitionService} from '../services/tc-app-definition.service';\n\n@Injectable()\nexport class ClaimsResolver implements Resolve<Observable<Claim>> {\n\n  constructor(public appDefinitionService: TcAppDefinitionService) {}\n\n  resolve(): Observable<Claim> {\n\n    return of(this.appDefinitionService.claims);\n  }\n\n}\n","// This guard is to check case Id is valid before loading route\n// We have to get sandbox Id then pass that to the getCaseByRef call\n// This will return (observable) true if the case exists or false if it doesnt\n\nimport {Inject, Injectable} from '@angular/core';\nimport {Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot} from '@angular/router';\nimport {LiveAppsService} from '../services/live-apps.service';\nimport {HttpClient, HttpHandler} from '@angular/common/http';\nimport {catchError, flatMap, map, mergeMap} from 'rxjs/operators';\nimport {Observable, of, throwError} from 'rxjs';\nimport {ClaimsResolver} from '../resolvers/claims.resolver';\nimport {Claim} from '@tibco-tcstk/tc-core-lib';\nimport {TcAppDefinitionService} from '../services/tc-app-definition.service';\n\n@Injectable()\nexport class CaseGuard implements CanActivate {\n\n  constructor(private liveapps: LiveAppsService, private appDefinitionService: TcAppDefinitionService, private router: Router) {\n  }\n\n  canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n    // get app config\n    const caseRef = route.url[route.url.length - 1].path;\n\n    const claimsResolver = new ClaimsResolver(this.appDefinitionService);\n\n    const decision: Observable<boolean> = claimsResolver.resolve()\n      .pipe(\n        // use flatMap so we can pass the config into the getCaseByRef call)\n        flatMap(\n          claims => {\n            return this.liveapps.getCaseByRef(claims.primaryProductionSandbox.id, caseRef)\n              .pipe(\n                map(caseinfo => {\n                  if (caseinfo) {\n                    return true;\n                  } else {\n                    // TODO: Externalize redirect URL\n                    this.router.navigate(['/starterApp/home'], {});\n                    return false;\n                  }\n                }),\n                catchError(error => {\n                  // if the case is not found (someone tried to manually route to an invalid caseref) then redirect back to home\n                  console.error('Unable to load case ' + caseRef + ' are you sure that is a valid case reference?');\n                  // TODO: Externalize redirect URL\n                  this.router.navigate(['/starterApp/home'], {});\n                  return throwError(error);\n                })\n              );\n          }\n        )\n      );\n\n    return decision;\n  }\n\n}\n","import {\n  AfterViewInit,\n  Component,\n  ElementRef,\n  EventEmitter,\n  Input,\n  OnDestroy,\n  OnInit,\n  Output\n} from '@angular/core';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {LegacyIframeService, TcComponent, TcCoreCommonFunctions} from '@tibco-tcstk/tc-core-lib';\nimport {TcVisibilityService} from '@tibco-tcstk/tc-core-lib';\n\n/**\n * Wraps legacy angularjs form renderer\n *\n *@example <tcla-live-apps-legacy-form></tcla-live-apps-legacy-form>\n */\n\n@Component({\n  selector: 'tcla-live-apps-legacy-form',\n  templateUrl: './live-apps-legacy-form.component.html',\n  styleUrls: ['./live-apps-legacy-form.component.css']\n})\nexport class LiveAppsLegacyFormComponent extends LiveAppsComponent implements OnDestroy, OnDestroy, AfterViewInit {\n\n  public legacyIframeId: string = 'legacyWorkitemFrame';\n  @Input('legacyIframeId') set LegacyIframeId(legacyIframeId: string) {\n    if (legacyIframeId){\n      this.legacyIframeId = legacyIframeId;\n    }\n  }\n\n  @Input() workitemId: number;\n  @Output() workitemComplete = new EventEmitter();\n\n  private target;\n  private formDiv;\n  private wiActive = false;\n  private openWiId;\n\n  constructor (protected visibilityService: TcVisibilityService, protected host: ElementRef, protected legacyIframeService: LegacyIframeService) {\n    super();\n  }\n\n  public isFormActive() {\n    return this.wiActive;\n  }\n\n  public renderWi = (wiId: number) => {\n    if (this.wiActive && this.openWiId) {\n      // opening a new workitem so cancel old one\n      this.cancelWi(wiId);\n    }\n\n    // send message to external form app\n    this.formDiv.contentWindow.postMessage({ 'action': 'openWI', 'wiId': wiId}, window.location.origin);\n    // position the form iframe over the workitemDiv placeholder\n    this.wiActive = true;\n    this.openWiId = wiId;\n    this.resizeWi();\n  }\n\n  private receiveMessage = (event) => {\n    if (event.data.action === 'wiCompleted') {\n      this.wiActive = false;\n      const wiId = this.openWiId;\n      this.openWiId = undefined;\n      this.hideWi();\n      this.workitemComplete.emit(wiId);\n    }\n  }\n\n  public cancelWi = (wiId) => {\n    this.formDiv.contentWindow.postMessage({ 'action': 'cancelWI', 'wiId': this.openWiId}, window.location.origin);\n    this.wiActive = false;\n    this.openWiId = undefined;\n    this.hideWi();\n  }\n\n  private hideWi = () => {\n  // hide the iframe!\n      this.formDiv.style.top = '-1000px';\n      this.formDiv.style.left = '-1000px';\n      this.formDiv.style.zIndex = '1';\n  }\n\n  private resizeWi = () => {\n    // position the form iframe over the workitemDiv placeholder\n    setTimeout(handler => {\n      const rect = this.target.getBoundingClientRect();\n      this.formDiv.style.top = rect.top.toString() + 'px';\n      this.formDiv.style.left = rect.left.toString() + 'px';\n      this.formDiv.style.height = rect.height.toString() + 'px';\n      this.formDiv.style.width = rect.width.toString() + 'px';\n      this.formDiv.style.position = 'absolute';\n      this.formDiv.style.zIndex = '1000';\n    }, 1000);\n  }\n\n  private initialize = () => {\n    // listen for messages from the iframe\n    window.addEventListener('message', this.receiveMessage, false);\n\n    // we only want to render the workitem when the element is visible\n    const inSight$ = this.visibilityService.elementInSight(this.host);\n    inSight$.subscribe(next => {\n      if (!next) {\n        // element not visible so hide the workitem if it is showing\n        if (this.wiActive && this.target) {\n          this.hideWi();\n        }\n      } else {\n        // element is visible\n        if (!this.wiActive) {\n          // if workitem not already showing - show it\n          // first get a handle on the target div and the legacy iframe\n          this.target = document.getElementById('workitemDiv');\n          this.formDiv = document.getElementById(this.legacyIframeId);\n          if (this.workitemId) {\n            // trigger display of the workitem\n            this.renderWi(this.workitemId);\n          }\n        } else {\n          this.resizeWi();\n        }\n      }\n    });\n  }\n\n  ngAfterViewInit() {\n    super.ngAfterViewInit();\n    this.containerChanges$.subscribe(widget => {\n      if (this.wiActive && this.target) {\n        this.resizeWi();\n      }\n    });\n\n    // wait for iframe to load before doing anything else\n    // this observable will emit true once the iFrame is loaded\n    this.legacyIframeService.workitemStatus.subscribe(loaded => {\n      if (loaded) {\n        // iframe is loaded\n        this.initialize();\n      }\n    });\n  }\n\n  ngOnDestroy() {\n    if (this.openWiId) {\n      this.cancelWi(this.workitemId);\n    }\n  }\n}\n","<div #componentDiv fxFill id=\"workitemDiv\" style=\"border: none;\"></div>\n","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {flatMap, map, tap} from 'rxjs/operators';\nimport {Workitem} from '../models/tc-workitems';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TcWorkitemsService {\n\n  constructor(private http: HttpClient) { }\n\n// todo: Note this is not a public API - update when Public API available\n  public getWorkitems(sandboxId: number, appIds: string[], caseRef: string, skip: number, top: number): Observable<Workitem[]> {\n    // https://eu.liveapps.cloud.tibco.com/work/workListItems?$sandbox=31&$skip=0&$top=100\n    // https://eu.liveapps.cloud.tibco.com/work/workListItems?$sandbox=31&$skip=0&$top=100&$filter=caseref%20eq%20275481\n    let url = '/work/workListItems?$sandbox=' + sandboxId\n      + '&$skip=' + skip\n      + '&$top=' + top\n    let filter: string;\n    if (!caseRef) {\n      let filterStr;\n      if (appIds && appIds.length > 0) {\n        // filter using appIds\n        filterStr = 'applicationId eq \\'<appId>\\'';\n        appIds.forEach(appId => {\n          if (!filter) {\n            filter = filterStr.replace('<appId>', appId);\n          } else {\n            filter = filter + ' or ' + filterStr.replace('<appId>', appId);\n          }\n        });\n      }\n    } else {\n      // filter using caseRef\n      filter = 'caseref eq ' + caseRef;\n    }\n    if (filter) {\n      url = url + '&$filter=' + filter;\n    }\n\n\n    return this.http.get(url)\n      .pipe(\n        tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n        map((workitems: Workitem[]) => {\n          return workitems;\n        })\n      );\n    }\n\n}\n","import {\n  AfterViewInit,\n  Component,\n  ElementRef,\n  EventEmitter,\n  Input,\n  OnInit,\n  Output,\n  ViewChild\n} from '@angular/core';\nimport {take, takeUntil} from 'rxjs/operators';\nimport {CaseRoute} from '../../models/liveappsdata';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {TcComponent, TcCoreCommonFunctions} from '@tibco-tcstk/tc-core-lib';\nimport {TcWorkitemsService} from '../../services/tc-workitems.service';\nimport {Workitem} from '../../models/tc-workitems';\n\n/**\n * Workitems widget, this Component lists workitems.\n *\n *\n * ![alt-text](../live-apps-workitems.png \"\")\n *\n *@example <tcla-live-apps-workitems></tcla-live-apps-workitems>\n */\n@Component({\n  selector: 'tcla-live-apps-workitems',\n  templateUrl: './live-apps-workitems.component.html',\n  styleUrls: ['./live-apps-workitems.component.css']\n})\nexport class LiveAppsWorkitemsComponent extends LiveAppsComponent implements OnInit, AfterViewInit {\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * The list of LA Application IDs you want to handle\n   */\n  @Input() appIds: string[];\n\n  /**\n   * The caseRef for which to display workitems\n   */\n  @Input() caseRef: string;\n\n  /**\n   * case card format - list, card, miniCard, staticList (no click event)\n   */\n  public displayType: string = 'wiMiniCard';\n  @Input('displayType') set DisplayType(displayType: string) {\n    if (displayType){\n      this.displayType = displayType;\n    }\n  }\n\n  /**\n   * Whether to show the header bar in the widget - eg. favorites on home page (contains icon etc) - if off icons still appear without bar\n   */\n  public showHeader: boolean = true;\n  @Input('showHeader') set ShowHeader(showHeader: boolean) {\n    if (showHeader){\n      this.showHeader = showHeader;\n    }\n  }\n\n  /**\n   * ~event clickCase : Case clicked\n   * ~payload CaseRoute : CaseRoute object output when case is clicked so calling component can route accordingly - ie. route to case\n   */\n  @Output() clickCase: EventEmitter<CaseRoute> = new EventEmitter<CaseRoute>();\n\n  @ViewChild('componentDiv', {static: false}) componentDiv: ElementRef;\n\n  public workitems: Workitem[];\n  public errorMessage: string;\n  public widget: TcComponent;\n  public cardWidthPct: Number;\n\n  public clickWorkitemAction = (caseRoute: CaseRoute) => {\n    this.clickCase.emit(caseRoute);\n  }\n\n  public refresh = () => {\n    this.workitems = [];\n    this.workitemsService.getWorkitems(this.sandboxId, this.appIds, this.caseRef, 0, 20)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      ).subscribe(\n      next => {\n        this.workitems = next || [];\n      }, error => { this.errorMessage = 'Error retrieving workitems: ' + error.error.errorMsg; });\n  }\n\n  public handleDeleted = (caseRef: string, workitemId: string) => {\n    this.workitems.splice(this.workitems.findIndex((function(wi) {\n        console.warn('Workitem: ', workitemId + ' for case: ' + caseRef + ' not shown as case deleted');\n        return wi.header.itemContext.caseRef === caseRef;\n      })), 1);\n  }\n\n  constructor(protected workitemsService: TcWorkitemsService) {\n    super();\n  }\n\n  ngAfterViewInit() {\n    super.ngAfterViewInit();\n    this.cardWidthPct = TcCoreCommonFunctions.calcSummaryCardPct(this.widget);\n    this.containerChanges$.subscribe(widget => {\n      this.cardWidthPct = TcCoreCommonFunctions.calcSummaryCardPct(widget);\n    });\n  }\n\n  ngOnInit() {\n    super.ngOnInit();\n    this.refresh();\n  }\n\n}\n","<div #componentDiv class=\"tcs-case-recent-box\" fxLayout=\"column\" fxFill>\n  <div *ngIf=\"showHeader\" class=\"tcs-case-recent-header\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n    <div fxLayoutAlign=\"start center\">\n      <mat-icon class=\"tcs-icon tcs-recent-icon\" svgIcon=\"tcs-recent-icon\"></mat-icon>\n      <div class=\"tcs-case-recent-header-text\">Workitems</div>\n    </div>\n  </div>\n  <div *ngIf=\"!showHeader\" fxLayout=\"row\" fxLayoutAlign=\"end center\">\n  </div>\n  <div *ngIf=\"workitems.length > 0\"class=\"tcs-case-recent-flow-list\" fxLayout=\"column\" fxLayout=\"row wrap\">\n    <div class=\"tcs-case-recent-item-box\" *ngFor=\"let workitem of workitems\" [fxFlex]=\"cardWidthPct\">\n      <tcla-live-apps-case-summary [uiAppId]=\"uiAppId\" [typeBar]=\"true\" [borderCard]=\"false\" [displayType]=\"displayType\" [sandboxId]=\"sandboxId\" [caseRef]=\"workitem.header.itemContext.caseRef\" [description]=\"workitem.header.description\" [workitemId]=\"workitem.id\" [workitemName]=\"workitem.header.itemContext.activityName\" (clickCase)=\"clickWorkitemAction($event)\" (deleted)=\"handleDeleted($event, workitem.id)\"></tcla-live-apps-case-summary>\n      <div class=\"tcs-case-recent-line\"></div>\n    </div>\n  </div>\n  <div *ngIf=\"!(workitems.length > 0)\" fxLayout=\"row\" fxLayoutAlign=\"center start\" fxLayoutGap=\"10px\" style=\"margin: 20px;\">\n    <mat-icon [svgIcon]=\"'ic-no-cases-icon'\" style=\"height: 48px; width: 48px;\"></mat-icon>\n    <div style=\"height: 100%\" fxLayoutAlign=\"start center\">\n      <span class=\"tcs-no-item-text\">No workitems found</span>\n    </div>\n  </div>\n</div>\n","import { Injectable } from '@angular/core';\nimport {Roles, RouteAccessControlConfigurationElement} from '../models/tc-groups-data';\nimport { RoleAttribute } from '@tibco-tcstk/tc-core-lib';\n\n@Injectable({\n    providedIn: 'root'\n})\nexport class TcRolesService {\n    \n    constructor() { }\n\n    private currentRole = undefined;\n\n    private hasRoleAccess = (roleReq: string, roles: Roles): boolean => {\n        const reqRole = roles.roles.find(role => {\n            return (role.id === roleReq);\n        })\n        return reqRole ? true : false;\n    }\n\n    private hasButtonAccess = (buttonId: string, access: RouteAccessControlConfigurationElement): boolean => {\n      return access.buttonIds.indexOf(buttonId) > -1;\n    }\n\n    checkRole(roleId: string, roles: Roles): boolean {\n        return this.hasRoleAccess(roleId, roles);\n    }\n\n    checkButton(buttonId: string, access: RouteAccessControlConfigurationElement): boolean {\n        return this.hasButtonAccess(buttonId, access);\n    }\n\n    amIConfigurator = (roles: Roles): boolean => {\n        const reqRole = roles.roles.find(role => {\n            return (role.configuration === true);\n        })\n        return reqRole ? true : false;\n    }\n    getCurrentRole = (): RoleAttribute => {\n        return this.currentRole;\n    }\n\n    setCurrentRole = (role: RoleAttribute): void => {\n        this.currentRole = role;\n    }\n}\n","import {Component, EventEmitter, Input, OnChanges, Output, SimpleChanges} from '@angular/core';\nimport {LiveAppsFormConfig} from '../../models/tc-liveapps-form';\nimport {CaseType} from '../../models/liveappsdata';\nimport {TcAppDefinitionService} from '../../services/tc-app-definition.service';\nimport {FormConfig, FormRef, ProcessFormConfig} from '../../models/tc-liveapps-config';\nimport {TcFormConfigService} from '../../services/tc-form-config.service';\n\n@Component({\n  selector: 'tcla-live-apps-workitem',\n  templateUrl: './live-apps-workitem.component.html',\n  styleUrls: ['./live-apps-workitem.component.css']\n})\nexport class LiveAppsWorkitemComponent implements OnChanges {\n\n  /**\n   * The workitem id to display\n   */\n  @Input() workitemId: number;\n\n  /**\n   * The workitem task name\n   */\n  @Input() workitemName: string;\n\n  /**\n   * The applicationId\n   */\n  @Input() appId: string;\n\n  /**\n   * The sandboxId\n   */\n  @Input() sandboxId: string;\n\n  /**\n   * Custom Form Layout Configuration\n   */\n  public formConfig: FormConfig = new FormConfig();\n  @Input('formConfig') set FormConfig(formConfig: FormConfig) {\n    if (formConfig){\n      this.formConfig = formConfig;\n    }\n  }\n\n  /**\n   * ~event workitemResult : id of completed workitem\n   * ~payload string : workitemId\n   */\n  @Output() workitemComplete: EventEmitter<number> = new EventEmitter<number>();\n\n  wcFormConfig: LiveAppsFormConfig;\n  caseType: CaseType;\n  processFormConfig: ProcessFormConfig;\n  formRef: FormRef;\n\n  constructor(protected appDefinitionService: TcAppDefinitionService) {\n  }\n\n  handleWorkitemComplete = (event) => {\n    this.workitemComplete.emit(this.workitemId);\n  }\n\n  handleWorkitemCancelled = (event) => {\n    this.workitemComplete.emit(this.workitemId);\n  }\n\n  handleWorkitemClosed = (event) => {\n    this.workitemComplete.emit(this.workitemId);\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    if (this.appId && this.formConfig && this.workitemId && this.sandboxId && this.workitemName) {\n      this.caseType = this.appDefinitionService.getCaseTypeByAppId(this.appId);\n      this.formRef = TcFormConfigService.buildFormTag(this.caseType.applicationName, this.caseType.applicationInternalName, 'workitem', this.workitemName);\n      this.processFormConfig = TcFormConfigService.getProcessFormConfig(TcFormConfigService.parseFormTag(this.formRef), this.formConfig);\n      this.wcFormConfig = new LiveAppsFormConfig().deserialize({\n        type: 'workitem',\n        id: this.workitemId,\n        sandbox: this.sandboxId.toString(),\n        formDivId: 'wiDialogDiv',\n        useCustomForm: this.processFormConfig ? this.processFormConfig.externalForm.toString() : 'false',\n        formRef: TcFormConfigService.parseFormTag(this.formRef)\n      });\n    }\n  }\n\n}\n","<div class=\"live-apps-form\" [id]=\"'workitemFormDiv_' + workitemId\">\n<!--tib-la-openworkitem-form\n  [id]=\"workitemId\"\n  [sandbox]=\"sandboxId\"\n  [formDivId]=\"'workitemFormDiv_' + workitemId\"\n  (formSubmit)=\"handleWorkitemComplete($event)\"\n  (formCancel)=\"handleWorkitemCancelled($event)\"\n  (formClose)=\"handleWorkitemClosed($event)\">\n</tib-la-openworkitem-form-->\n<tcla-live-apps-form-wc #wiFormWc *ngIf=\"wcFormConfig\" [config]=\"wcFormConfig\" (completed)=\"handleWorkitemComplete($event)\"></tcla-live-apps-form-wc>\n</div>\n","import {\n  AfterViewInit,\n  Component,\n  ContentChildren,\n  Directive, ElementRef,\n  EventEmitter,\n  Input, OnChanges,\n  OnDestroy,\n  OnInit,\n  Output, SimpleChanges,\n  ViewChild,\n  ViewChildren\n} from '@angular/core';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {map, take, takeUntil} from 'rxjs/operators';\nimport {Subject} from 'rxjs';\nimport {LiveAppsCaseActionsComponent} from '../live-apps-case-actions/live-apps-case-actions.component';\nimport {LiveAppsCaseAuditComponent} from '../live-apps-case-audit/live-apps-case-audit.component';\nimport {LiveAppsCaseDataComponent} from '../live-apps-case-data/live-apps-case-data.component';\nimport {LiveAppsCaseStateAuditComponent} from '../live-apps-case-state-audit/live-apps-case-state-audit.component';\nimport {LiveAppsCaseStatesComponent} from '../live-apps-case-states/live-apps-case-states.component';\nimport {LiveAppsDocumentsComponent} from '../live-apps-documents/live-apps-documents.component';\nimport {LiveAppsNotesComponent} from '../live-apps-notes/live-apps-notes.component';\nimport {LiveAppsCaseSummaryComponent} from '../live-apps-case-summary/live-apps-case-summary.component';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {ToolbarButton, TcButtonsHelperService} from '@tibco-tcstk/tc-core-lib';\nimport {LaProcessSelection} from '../../models/tc-case-processes';\nimport {MatTab, MatTabChangeEvent, MatTabGroup} from '@angular/material/tabs';\nimport {QueryList} from '@angular/core';\nimport { RouteAction } from '@tibco-tcstk/tc-core-lib';\nimport {Roles, RouteAccessControlConfigurationElement} from '../../models/tc-groups-data';\nimport {TcRolesService} from '../../services/tc-roles-service.ts.service';\nimport {CustomFormDefs} from '@tibco-tcstk/tc-forms-lib';\nimport {LiveAppsLegacyFormComponent} from '../live-apps-legacy-form/live-apps-legacy-form.component';\nimport { CaseRoute, FormTab} from '../../models/liveappsdata';\nimport {FormControl} from '@angular/forms';\nimport {LiveAppsCaseActionComponent} from '../live-apps-case-action/live-apps-case-action.component';\nimport {LiveAppsWorkitemsComponent} from '../live-apps-workitems/live-apps-workitems.component';\nimport {FormConfig} from '../../models/tc-liveapps-config';\n\n/**\n * High level component to allow interaction with case.\n *\n *  ![alt-text](../live-apps-case-cockpit.png \"Image\")\n *\n *@example <tcla-live-apps-case-cockpit></tcla-live-apps-case-cockpit>\n */\n@Component({\n  selector: 'tcla-live-apps-case-cockpit',\n  templateUrl: './live-apps-case-cockpit.component.html',\n  styleUrls: ['./live-apps-case-cockpit.component.css']\n})\nexport class LiveAppsCaseCockpitComponent implements OnChanges, OnDestroy, AfterViewInit {\n\n  @ViewChild('contextTabGroup', {static: false}) matTabGroup: MatTabGroup;\n  @ViewChildren('contextTabs') inclusiveTabs: QueryList<MatTab>;\n  @ContentChildren('projectedTab') tabsFromNgContent: QueryList<MatTab>;\n\n  // this default layout displays all data but will hide buttons\n  DEFAULT_CASE_DATA_LAYOUT = [\n    '*',\n    { type: 'submit', title: 'Save', condition: '1===2' },\n    { type: 'actions', title: 'Hidden', condition: '1===2' }\n  ];\n\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * The LA Application Id\n   */\n  @Input() appId: string;\n\n  /**\n   * The LA Application Type Id (generally 1)\n   */\n  @Input() typeId: string;\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The case reference\n   */\n  @Input() caseRef: string;\n\n  /**\n   * The workitem Id\n   */\n  @Input() workitemId: number;\n\n  /**\n   * The workitem Name\n   */\n  @Input() workitemName: number;\n\n  /**\n   * The ID of the logged user\n   */\n  @Input() userId: string;\n\n  /**\n   * The list of LA Application Ids you want to mark as recent cases when accessed\n   */\n  @Input() exclRecentAppIds: string[];\n\n  /**\n   * Roles - The users current roles\n   */\n  @Input() roles: Roles;\n\n  /**\n   * RouteAccessControlConfig - basically the config for access control\n   */\n  @Input() access: RouteAccessControlConfigurationElement;\n\n  /**\n   * Custom Form Layout Configuration\n   */\n  @Input() formConfig: FormConfig;\n\n  /**\n   * Custom Form configuration file\n   */\n  @Input() customFormDefs: CustomFormDefs;\n\n  /**\n   * Enable legacy workitems\n   */\n  public legacyWorkitems: boolean = false;\n  @Input('legacyWorkitems') set LegacyWorkitems(legacyWorkitems: boolean) {\n    if (legacyWorkitems){\n      this.legacyWorkitems = legacyWorkitems;\n    }\n  }\n\n  /**\n   * Enable legacy actions\n   */\n  public legacyActions: boolean = false;\n  @Input('legacyActions') set LegacyActions(legacyActions: boolean) {\n    if (legacyActions){\n      this.legacyActions = legacyActions;\n    }\n  }\n\n  /**\n   * Layout object that can be passed to override default layout of the form renderer\n   */\n  public layout: any[] = this.DEFAULT_CASE_DATA_LAYOUT;\n  @Input('layout') set Layout(layout: any[]) {\n    if (layout){\n      this.layout = layout;\n    }\n  }\n\n  /**\n   * Allow override of forms framework\n   * Options: bootstrap-4 or material-design\n   */\n  public formsFramework: string = 'material-design';\n  @Input('formsFramework') set FormsFramework(formsFramework: string) {\n    if (formsFramework){\n      this.formsFramework = formsFramework;\n    }\n  }\n\n  /**\n   * Whether to show workitems in context panel (default true)\n   */\n  public showWorkitems: boolean = true;\n  @Input('showWorkitems') set ShowWorkitems(showWorkitems: boolean) {\n    if (showWorkitems){\n      this.showWorkitems = showWorkitems;\n    }\n  }\n\n  /**\n   * Whether to show notes in context panel (default true)\n   */\n  public showNotes: boolean = true;\n  @Input('showNotes') set ShowNotes(showNotes: boolean) {\n    if (showNotes){\n      this.showNotes = showNotes;\n    }\n  }\n\n  /**\n   * Whether to show documents in context panel (default true)\n   */\n  public showDocuments: boolean = true;\n  @Input('showDocuments') set ShowDocuments(showDocuments: boolean) {\n    if (showDocuments){\n      this.showDocuments = showDocuments;\n    }\n  }\n\n  /**\n   * Whether to show states in context panel (default true)\n   */\n  public showStates: boolean = true;\n  @Input('showStates') set ShowStates(showStates: boolean) {\n    if (showStates){\n      this.showStates = showStates;\n    }\n  }\n\n  /**\n   * Whether to show audit in context panel (default true)\n   */\n  public showAudit: boolean = true;\n  @Input('showAudit') set ShowAudit(showAudit: boolean) {\n    if (showAudit){\n      this.showAudit = showAudit;\n    }\n  }\n\n  /**\n   * ~event routeAction : Component requests route to another page\n   * ~payload RouteAction : RouteAction object to tell caller to navigate somewhere\n   */\n  @Output() routeAction: EventEmitter<RouteAction> = new EventEmitter<RouteAction>();\n\n// The ViewChild declarations give access to components marked on the template so that I can call public functions like refresh\n  @ViewChild(LiveAppsCaseSummaryComponent, {static: false}) caseSummaryComponent: LiveAppsCaseSummaryComponent;\n  @ViewChild(LiveAppsCaseDataComponent, {static: false}) caseDataComponent: LiveAppsCaseDataComponent;\n  @ViewChild(LiveAppsCaseActionsComponent, {static: false}) caseActionsComponent: LiveAppsCaseActionsComponent;\n  @ViewChild(LiveAppsCaseActionComponent, {static: false}) caseActionComponent: LiveAppsCaseActionComponent;\n  @ViewChild(LiveAppsCaseAuditComponent, {static: false}) caseAuditComponent: LiveAppsCaseAuditComponent;\n  @ViewChild(LiveAppsDocumentsComponent, {static: false}) caseDocumentsComponent: LiveAppsDocumentsComponent;\n  @ViewChild(LiveAppsNotesComponent, {static: false}) caseNotesComponent: LiveAppsNotesComponent;\n  @ViewChild(LiveAppsCaseStatesComponent, {static: false}) caseStatesComponent: LiveAppsCaseStatesComponent;\n  @ViewChild(LiveAppsCaseStateAuditComponent, {static: false}) caseStateAuditComponent: LiveAppsCaseStateAuditComponent;\n  @ViewChild(LiveAppsLegacyFormComponent, {static: false}) workitemComponent: LiveAppsLegacyFormComponent;\n  @ViewChild(LiveAppsWorkitemsComponent, {static: false}) caseWorkitemsComponent: LiveAppsWorkitemsComponent;\n  @ViewChild('dataTabGroup', {static: false}) dataTabGroups: MatTabGroup;\n  @ViewChild('dataTabGroup', {static: false}) dataTabGroupEl: ElementRef;\n\n  isFavorite: boolean;\n  valid = false;\n  toolbarButtons: ToolbarButton[] = [];\n  incConfigButton = true;\n  incFavButton = true;\n  incRefreshButton = true;\n  incHomeButton = true;\n  formTabs: FormTab[] = [];\n  selectedTab: FormTab;\n  actionVisible = false;\n  selected = new FormControl(0);\n\n  // use the _destroyed$/takeUntil pattern to avoid memory leaks if a response was never received\n  protected _destroyed$ = new Subject();\n  protected errorMessage: string;\n\n  constructor(protected liveapps: LiveAppsService, protected buttonsHelper: TcButtonsHelperService, protected router: Router, protected rolesService: TcRolesService) {\n  }\n\n  protected createToolbarButtons = (): ToolbarButton[] => {\n    const buttons = [];\n    if (this.incConfigButton) {\n      const configButton = this.buttonsHelper.createButton('config', 'tcs-capabilities', true, 'Config', (this.access ? this.rolesService.checkButton('configure', this.access) : true), true);\n      buttons.push(configButton);\n    }\n    if (this.incFavButton) {\n      const favButton = this.buttonsHelper.createButton('favorite', 'tcs-favorites-icon', this.isFavorite, 'Toggle Favorite', (this.access ? this.rolesService.checkButton('favorite', this.access) : true), true);\n      buttons.push(favButton);\n    }\n    if (this.incRefreshButton) {\n      const refreshButton = this.buttonsHelper.createButton('refresh', 'tcs-refresh-icon', true, 'Refresh', (this.access ? this.rolesService.checkButton('refresh', this.access) : true), true);\n      buttons.push(refreshButton);\n    }\n    if (this.incHomeButton) {\n      const homeButton = this.buttonsHelper.createButton('close', 'tcs-close-icon', true, 'Close', true, true);\n      buttons.push(homeButton);\n    }\n    return buttons;\n  }\n\n  public handleToolbarButtonEvent = (buttonId: string) => {\n    if (buttonId === 'favorite') {\n      this.toggleFavorite();\n    }\n    if (buttonId === 'refresh') {\n      this.refresh();\n    }\n    if (buttonId === 'close') {\n      this.routeAction.emit(new RouteAction('backClicked', null));\n    }\n    if (buttonId === 'config') {\n      this.routeAction.emit(new RouteAction('configClicked', null));\n    }\n  }\n\n  public handleActionSelection = (actionSelection: LaProcessSelection) => {\n    // this.caseActionsComponent.toggleEnable();\n    // this.actionSelection = actionSelection;\n    this.addActionFormTab(actionSelection);\n  }\n\n  public handleActionCompleted = (formTab: FormTab) => {\n    this.caseActionsComponent.toggleEnable();\n    this.selectedTab = undefined;\n    this.formTabs.splice(this.formTabs.findIndex(tab => {\n      return tab.type === 'actionTab' && tab.action === formTab.action;\n    }), 1);\n    this.selected.setValue(0);\n    // to allow case to update async before we refresh\n    setTimeout(() => {\n      this.refresh();\n    }, 1000);\n  }\n\n  public handleClickWorkitem = (caseroute: CaseRoute) => {\n    console.log(caseroute.workitemId, caseroute.workitemName);\n    // remove any existing WI\n    const exWiTabIdx = this.formTabs.findIndex(tab => {\n      return tab.type === 'wiTab' && tab.workitemId === tab.workitemId;\n    });\n    if (exWiTabIdx && exWiTabIdx !== -1) {\n      this.formTabs.splice(exWiTabIdx, 1);\n    }\n    this.addWiFormTab(caseroute.workitemId, caseroute.workitemName);\n  }\n\n  public refresh() {\n    if (this.caseSummaryComponent) {\n      this.caseSummaryComponent.refresh();\n    }\n    if (this.caseDataComponent) {\n      this.caseDataComponent.refresh();\n    }\n    if (this.caseStatesComponent) {\n      this.caseStatesComponent.refresh();\n    }\n    if (this.caseActionsComponent) {\n      this.caseActionsComponent.refresh();\n    }\n    if (this.caseAuditComponent) {\n      this.caseAuditComponent.refresh();\n    }\n    if (this.caseStateAuditComponent) {\n      this.caseStateAuditComponent.refresh();\n    }\n    if (this.caseStatesComponent) {\n      this.caseStatesComponent.refresh();\n    }\n    if (this.caseDocumentsComponent) {\n      this.caseDocumentsComponent.refresh();\n    }\n    if (this.caseNotesComponent) {\n      this.caseNotesComponent.refresh();\n    }\n    if (this.caseWorkitemsComponent) {\n      this.caseWorkitemsComponent.refresh();\n    }\n  }\n\n  public toggleFavorite = () => {\n    this.liveapps.setFavoriteCase(this.caseRef, this.uiAppId, this.sandboxId);\n    this.isFavorite = !this.isFavorite;\n    const updatedFavButton = this.buttonsHelper.createButton(\n      'favorite', 'tcs-favorites-icon', this.isFavorite, 'Toggle Favorite', true, true);\n    this.toolbarButtons = this.buttonsHelper.updateButtons([updatedFavButton], this.toolbarButtons);\n  }\n\n  public handleWorkitemComplete = (wiId) => {\n    this.formTabs.splice(this.formTabs.findIndex(tab => {\n      return tab.type === 'wiTab' && tab.workitemId === wiId;\n    }), 1);\n    this.selected.setValue(0);\n    setTimeout(() => {\n      this.refresh();\n    }, 1000);\n  }\n\n  public handleTabCancel = (formTab: FormTab) => {\n    if (formTab.type === 'wiTab') {\n      if (this.workitemComponent) {\n        this.workitemComponent.cancelWi(formTab.workitemId);\n      }\n      this.formTabs.splice(this.formTabs.findIndex(tab => {\n        return tab.type === 'wiTab' && tab.workitemId === formTab.workitemId;\n      }), 1);\n\n      // if we are closing the selected tab then switch to the first tab\n      const currentTabIdx = this.dataTabGroups._tabs.toArray().findIndex(tab => {\n        return tab.textLabel === 'wiTab';\n      });\n      if (currentTabIdx === this.dataTabGroups.selectedIndex) {\n        this.selected.setValue(0);\n      }\n    } else if (formTab.type === 'actionTab') {\n      this.formTabs.splice(this.formTabs.findIndex(tab => {\n        return tab.type === 'actionTab' && tab.action === formTab.action;\n      }), 1);\n      // if we are closing the selected tab then switch to the first tab\n      const currentTabIdx = this.dataTabGroups._tabs.toArray().findIndex(tab => {\n        return tab.textLabel === 'actionTab';\n      });\n      if (currentTabIdx === this.dataTabGroups.selectedIndex) {\n        this.selected.setValue(0);\n      }\n      this.caseActionComponent.cancelAction();\n      if (this.caseActionsComponent.disabled) {\n        this.caseActionsComponent.toggleEnable();\n      }\n    }\n  }\n\n  public addWiFormTab = (wiId, wiName) => {\n      this.formTabs.push(\n        new FormTab().deserialize({\n          type: 'wiTab',\n          title: 'WorkItem: ' + wiName,\n          workitemId: wiId,\n          workitemName: wiName\n        }));\n      this.selected.setValue(this.dataTabGroups['_tabs'].length);\n  }\n\n  public addActionFormTab = (actionSelection: LaProcessSelection) => {\n    const newTab = new FormTab().deserialize({\n      type: 'actionTab',\n      title: 'Action: ' + actionSelection.process.name,\n      workitemId: undefined,\n      action: actionSelection\n    });\n    this.formTabs.push(newTab);\n    this.selectedTab = newTab;\n    setTimeout(handler => {\n      this.selected.setValue(this.dataTabGroups['_tabs'].length);\n    })\n    this.caseActionsComponent.toggleEnable();\n  }\n\n  handleTabChange = (tabChange: MatTabChangeEvent) => {\n    if (tabChange.tab.textLabel === 'actionTab') {\n      document.getElementById('dataTabGroup').style.height = '0px';\n      setTimeout(handler => {\n        this.actionVisible = true;\n      });\n    } else {\n      document.getElementById('dataTabGroup').style.height = '100%';\n      this.actionVisible = false;\n    }\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    if (this.caseRef && this.uiAppId && this.appId && this.sandboxId && this.typeId) {\n      this.initialize();\n    }\n  }\n\n  public initialize = () => {\n    if (!isNaN(Number(this.caseRef))) {\n      // dont set recent if it is in the exclude app list\n      if (!this.exclRecentAppIds || (this.exclRecentAppIds.indexOf(this.appId) === -1)) {\n        this.liveapps.setRecentCase(this.caseRef, this.uiAppId, this.sandboxId);\n      }\n      this.valid = true;\n    }\n    if (this.incFavButton) {\n      this.liveapps.isFavoriteCase(this.caseRef, this.uiAppId, this.sandboxId)\n        .pipe(\n          take(1),\n          takeUntil(this._destroyed$)\n        )\n        .subscribe(\n          result => {\n            this.isFavorite = result;\n            this.toolbarButtons = this.toolbarButtons.concat(this.createToolbarButtons());\n            return result;\n          }, error => {\n            this.errorMessage = 'Error retrieving isFavorite: ' + error.error.errorMsg;\n          }\n        );\n    } else {\n      this.toolbarButtons = this.toolbarButtons.concat(this.createToolbarButtons());\n    }\n  }\n\n  ngOnDestroy(): void {\n    this._destroyed$.next();\n  }\n\n  ngAfterViewInit(): void {\n    this.matTabGroup._tabs.reset([...this.inclusiveTabs.toArray(), ...this.tabsFromNgContent.toArray()]);\n    // this.matTabGroup.afterViewInit();\n\n    if (this.workitemId && this.workitemName) {\n      this.addWiFormTab(this.workitemId, this.workitemName);\n    }\n  }\n}\n","<div fxFill fxLayout=\"column\" fxLayoutAlign=\"space-between stretch\" style=\"overflow: hidden\">\n  <tc-tibco-cloud-menu-bar [toolbarButtons]=\"toolbarButtons\" (toolbarButtonEvent)=\"handleToolbarButtonEvent($event)\">\n    <!-- this is content projection. Tibco cloud menu bar contains ng-template and content here is projected inside the ng-content -->\n    <tcla-live-apps-case-summary fxFlex class=\"live-apps-widget\" [uiAppId]=\"uiAppId\" [typeBar]=\"true\" [borderCard]=\"false\" [displayType]=\"'staticlist'\" [sandboxId]=\"sandboxId\" [caseRef]=\"caseRef\"></tcla-live-apps-case-summary>\n    <ng-content select=\"[customToolbarContent]\" fxFlex></ng-content>\n  </tc-tibco-cloud-menu-bar>\n  <div *ngIf=\"valid\" fxLayout=\"column\" fxFlex fxFill style=\"padding: 20px; overflow: hidden;\">\n    <div fxLayout=\"row\" fxLayoutAlign=\"start start\">\n      <tcla-live-apps-case-states fxFlex [sandboxId]=\"sandboxId\" [caseRef]=\"caseRef\" [appId]=\"appId\"></tcla-live-apps-case-states>\n    </div>\n    <div fxLayout=\"row\" fxLayoutAlign=\"end center\" class=\"tcs-actions-bar\">\n      <tcla-live-apps-case-actions [sandboxId]=\"sandboxId\" [typeId]=\"typeId\" [appId]=\"appId\" [caseRef]=\"caseRef\" [maxActions]=\"5\" (actionClicked)=\"handleActionSelection($event)\"></tcla-live-apps-case-actions>\n    </div>\n    <div fxLayout=\"row\" style=\"overflow: hidden; height: 100%\">\n      <div fxFlex fxLayoutGap=\"20px\" fxLayout.gt-md=\"row\" fxLayout.lt-lg=\"column\" ngStyle.lt-lg=\"overflow: auto\">\n        <div fxLayout=\"column\" fxFlex.gt-md=\"1 0 50\" fxFlex.lt-lg=\"none\">\n          <mat-tab-group id=\"dataTabGroup\" #dataTabGroup style=\"overflow: hidden; min-height: 49px; height: 100%;\" (selectedTabChange)=\"handleTabChange($event)\" [selectedIndex]=\"selected.value\">\n            <mat-tab label=\"Case Data\">\n              <ng-template matTabContent>\n                <tcla-live-apps-case-data class=\"live-apps-widget\" fxFill [formConfig]=\"formConfig\" [caseRef]=\"caseRef\" [sandboxId]=\"sandboxId\" [uiAppId]=\"uiAppId\" [appId]=\"appId\" [typeId]=\"typeId\" [layout]=\"layout\" [showHeader]=\"false\" [customFormDefs]=\"customFormDefs\" [formsFramework]=\"formsFramework\" (refreshEvent)=\"refresh()\"></tcla-live-apps-case-data>\n              </ng-template>\n            </mat-tab>\n            <mat-tab *ngFor=\"let tab of formTabs\" [label]=\"tab.type === 'actionTab' ? 'actionTab' : 'wiTab'\">\n                <ng-template mat-tab-label>\n                  <span>{{tab.title}}</span>\n                  <mat-icon fxLayoutAlign=\"end start\" class=\"tcs-cancel-action-button\" [svgIcon]=\"'tcs-close-icon'\" (click)=\"handleTabCancel(tab)\"></mat-icon>\n                </ng-template>\n                <!--tcla-live-apps-legacy-form *ngIf=\"tab.type === 'wiTab'\" class=\"live-apps-widget\" [workitemId]=\"tab.workitemId\" (workitemComplete)=\"handleWorkitemComplete($event)\" fxFill></tcla-live-apps-legacy-form-->\n                <tcla-live-apps-workitem *ngIf=\"tab.type === 'wiTab'\" class=\"live-apps-widget\" [sandboxId]=\"sandboxId\" [appId]=\"appId\" [formConfig]=\"formConfig\" [workitemId]=\"tab.workitemId\" [workitemName]=\"tab.workitemName\" (workitemComplete)=\"handleWorkitemComplete($event)\"></tcla-live-apps-workitem>\n            </mat-tab>\n          </mat-tab-group>\n          <!-- Using a hidden tab here to workaround the fact that web components seems to disappear on tab change-->\n          <div *ngIf=\"selectedTab\" [hidden]=\"!actionVisible\" style=\"overflow: auto; height: 100%\">\n            <tcla-live-apps-case-action [customFormDefs]=\"customFormDefs\" [formConfig]=\"formConfig\" [legacyActions]=\"legacyActions\" [process]=\"selectedTab.action\" [caseRef]=\"caseRef\" [typeId]=\"typeId\" [applicationId]=\"appId\" [sandboxId]=\"sandboxId\" [formsFramework]=\"formsFramework\" (caseChanged)=\"handleActionCompleted(selectedTab)\"></tcla-live-apps-case-action>\n          </div>\n        </div>\n        <div fxLayout=\"column\" fxFlex.gt-md=\"1 1 50\" fxFlex.lt-lg=\"none\" ngStyle.lt-lg=\"min-height: 500px\" fxLayoutGap=\"20px\" style=\"overflow: hidden;\" *ngIf=\"showAudit || showNotes || showDocuments || showStates || tabsFromNgContent.length > 0\">\n          <mat-tab-group #contextTabGroup style=\"overflow: hidden; height: 100%\">\n            <ng-content></ng-content>\n            <mat-tab #contextTabs label=\"Workitems\" *ngIf=\"legacyWorkitems && showWorkitems\">\n              <ng-template matTabContent>\n                <tcla-live-apps-workitems [caseRef]=\"caseRef\" [uiAppId]=\"uiAppId\" [displayType]=\"'miniCard'\" [sandboxId]=\"sandboxId\" [showHeader]=\"true\" (clickCase)=\"handleClickWorkitem($event)\"></tcla-live-apps-workitems>\n              </ng-template>\n            </mat-tab>\n            <mat-tab #contextTabs label=\"Notes\" *ngIf=\"showNotes\">\n              <ng-template matTabContent>\n                <tcla-live-apps-notes class=\"live-apps-widget\" [relatedItemType]=\"'CASE_APP'\" [relatedItemId]=\"caseRef\" [userId]=\"userId\"></tcla-live-apps-notes>\n              </ng-template>\n            </mat-tab>\n            <mat-tab #contextTabs label=\"Documents\" *ngIf=\"showDocuments\">\n              <ng-template matTabContent>\n                <tcla-live-apps-documents class=\"live-apps-widget\" [sandboxId]=\"sandboxId\" [folderId]=\"caseRef\" [folderType]=\"'caseFolders'\"></tcla-live-apps-documents>\n              </ng-template>\n            </mat-tab>\n            <mat-tab #contextTabs label=\"States\" *ngIf=\"showStates\">\n              <ng-template matTabContent>\n                <tcla-live-apps-case-state-audit [caseRef]=\"caseRef\" [sandboxId]=\"sandboxId\" [appId]=\"appId\"></tcla-live-apps-case-state-audit>\n              </ng-template>\n            </mat-tab>\n            <mat-tab #contextTabs label=\"Audit\" *ngIf=\"showAudit\">\n              <ng-template matTabContent>\n                <tcla-live-apps-case-audit [sandboxId]=\"sandboxId\" [caseRef]=\"caseRef\"></tcla-live-apps-case-audit>\n              </ng-template>\n            </mat-tab>\n          </mat-tab-group>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport {CaseType} from '../../models/liveappsdata';\nimport {CaseCardConfig} from '../../models/tc-case-card-config';\n\n\n/**\n * Manages liveapps settings for Config page\n *\n *@example <tcla-live-apps-app-configuration-widget></tcla-live-apps-app-configuration-widget>\n */\n@Component({\n  selector: 'tcla-live-apps-app-configuration-widget',\n  templateUrl: './live-apps-app-configuration-widget.component.html',\n  styleUrls: ['./live-apps-app-configuration-widget.component.css']\n})\n\n\nexport class LiveAppsAppConfigurationWidgetComponent implements OnInit {\n  /**\n   * The list of LA Application IDs you want to handle\n   */\n  @Input() appIds: string[];\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * The organisation folder to store/retrieve documents\n   */\n  @Input() folderId: string;\n\n  /**\n   * ~event configChanged : Configuration values changed\n   * ~payload CaseCardConfig : CaseCardConfig object when configuration is changed (so called can do a save with data)\n   */\n  @Output() configChanged: EventEmitter<CaseCardConfig> = new EventEmitter<CaseCardConfig>();\n\n  /**\n   * ~event appSelected : Case Type selected\n   * ~payload CaseType : CaseType object of app selected\n   */\n  @Output() appSelected: EventEmitter<CaseType> = new EventEmitter<CaseType>();\n\n  public selectedAppConfig: CaseType;\n\n  constructor() { }\n\n  handleConfigAppSelection = (application: CaseType) => {\n    // handle selection of app to config\n    this.selectedAppConfig = application;\n    this.appSelected.emit(application);\n  }\n\n  handleConfigChanged = (caseCardConfig: CaseCardConfig) => {\n    this.configChanged.emit(caseCardConfig);\n  }\n\n  ngOnInit() {\n  }\n\n}\n","<div fxFill style=\"margin: 0px 20px 20px 20px\" fxLayout=\"column\">\n  <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n    <span>Configure Live App Summary Cards for:</span>\n    <tcla-live-apps-applications style=\"margin-left: 5px; margin-top: -1px\" [sandboxId]=\"sandboxId\" [appIds]=\"appIds\" [selectFirstApp]=\"true\" (selection)=\"handleConfigAppSelection($event)\"></tcla-live-apps-applications>\n  </div>\n  <div fxLayout=\"column\" fxFlex style=\"overflow: auto\">\n    <tcla-live-apps-application-configuration *ngIf=\"selectedAppConfig\" [sandboxId]=\"sandboxId\" [uiAppId]=\"uiAppId\" [appId]=\"selectedAppConfig.applicationId\" [folderId]=\"folderId\" [appTypeLabel]=\"selectedAppConfig.label\" (configChanged)=\"handleConfigChanged($event)\"></tcla-live-apps-application-configuration>\n  </div>\n</div>\n","import {Component, EventEmitter, Input, OnChanges, OnInit, Output} from '@angular/core';\nimport {CaseType, ProcessId} from '../../models/liveappsdata';\nimport {LaProcessSelection} from '../../models/tc-case-processes';\nimport {CustomFormDefs} from '@tibco-tcstk/tc-forms-lib';\n\n/**\n * Wraps case creators component (high level component)\n *\n *@example <tcla-live-apps-case-creator-widget></tcla-live-apps-case-creator-widget>\n */\n@Component({\n  selector: 'tcla-live-apps-case-creator-widget',\n  templateUrl: './live-apps-case-creator-widget.component.html',\n  styleUrls: ['./live-apps-case-creator-widget.component.css']\n})\nexport class LiveAppsCaseCreatorWidgetComponent implements OnInit {\n  /**\n   * CaseType model for the case type you want to run a case creator for (normally comes from an application selector component)\n   */\n  @Input() application: CaseType;\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * override the initial data for a case creator\n   */\n  @Input() initialData: any;\n\n  /**\n   * Custom Form configuration file\n   */\n  @Input() customFormDefs: CustomFormDefs;\n\n\n  /**\n   * ~event caseCreated : Case Creator started (process started)\n   * ~payload ProcessId : ProcessId object output on case creation (details of process started)\n   */\n  @Output() caseCreated: EventEmitter<ProcessId> = new EventEmitter<ProcessId>();\n  constructor() { }\n\n  // handle case created\n  public handleCaseCreation = (processId: ProcessId) => {\n    this.caseCreated.emit(processId);\n  }\n\n  ngOnInit(): void {\n  }\n\n}\n","<div>\n  <div fxLayout=\"row\" fxLayout=\"start stretch\">\n    <span style=\"width: 185px\">Select Case Creator: </span>\n    <tcla-live-apps-creators fxFlex [sandboxId]=\"sandboxId\" [applicationId]=\"application.id\" [typeId]=\"application.id\" (caseCreated)=\"handleCaseCreation($event)\"></tcla-live-apps-creators>\n  </div>\n</div>\n","import {Deserializable} from '@tibco-tcstk/tc-core-lib';\nimport {CaseType} from './liveappsdata';\nimport {CustomFormDefs} from '@tibco-tcstk/tc-forms-lib';\nimport {FormConfig} from './tc-liveapps-config';\n\nexport class CaseCreatorSelectionContext {\n  constructor(public application: CaseType,\n              public initialData: any,\n              public sandboxId: number,\n              public customFormDefs: CustomFormDefs,\n              public legacyCreators: boolean,\n              public formsFramework: string,\n              public formConfig: FormConfig,\n              public autoClose?: boolean,\n              public headerText?: string\n  ) {}\n}\n\n","import {Component, Inject, Input, OnInit} from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\nimport {CaseCreatorSelectionContext} from '../../models/tc-case-creator';\nimport {CaseRoute, CaseType, ProcessId} from '../../models/liveappsdata';\nimport {CustomFormDefs} from '@tibco-tcstk/tc-forms-lib';\nimport {FormConfig} from '../../models/tc-liveapps-config';\n\n/**\n * Dialog used on home screen to allow case creation (wraps other components)\n *\n *@example <tcla-live-apps-creator-dialog></tcla-live-apps-creator-dialog>\n */\n@Component({\n  selector: 'tcla-live-apps-creator-dialog',\n  templateUrl: 'live-apps-creator-dialog.component.html',\n  styleUrls: ['live-apps-creator-dialog.component.css']\n})\nexport class LiveAppsCreatorDialogComponent {\n\n  public application: CaseType;\n  public sandboxId: number;\n  public initialData: any;\n  public createdCase: ProcessId;\n  public customFormDefs: CustomFormDefs;\n  public legacyCreators: boolean;\n  public formsFramework: string;\n  public formConfig: FormConfig;\n  public autoClose: boolean;\n  public headerText: string;\n\n  constructor(\n    public dialogRef: MatDialogRef<LiveAppsCreatorDialogComponent>,\n    @Inject(MAT_DIALOG_DATA) public data: CaseCreatorSelectionContext) {\n    this.application = data.application;\n    this.sandboxId = data.sandboxId;\n    this.initialData = data.initialData;\n    this.customFormDefs = data.customFormDefs;\n    this.legacyCreators = data.legacyCreators;\n    this.formsFramework = data.formsFramework;\n    this.formConfig = data.formConfig;\n    this.autoClose = data.autoClose;\n    if (data.headerText) {\n      this.headerText = data.headerText;\n    } else {\n      this.headerText = 'Create New ' + this.application.applicationName;\n    }\n  }\n\n  public handleCaseCreated = (createdCase: ProcessId) => {\n    this.createdCase = createdCase;\n    if (!this.createdCase.caseIdentifier && !this.createdCase.caseReference) {\n      // legacy process form (no case reference available)\n    } else if (this.createdCase.caseReference === '-1') {\n      // legacy process cancelled\n      this.dialogRef.close();\n    }\n    if (this.autoClose) {\n      this.dialogRef.close(true);\n    }\n  }\n\n  openCase = () => {\n    const caseRoute = new CaseRoute().deserialize(\n      { caseRef: this.createdCase.caseReference, appId: this.application.applicationId, typeId: this.application.id });\n    this.dialogRef.close(caseRoute);\n  }\n\n  closeDialog = () => {\n    this.dialogRef.close();\n  }\n\n}\n\n","<div class=\"tcs-dialog-outer-div\">\n  <mat-toolbar class=\"tcs-case-creation-dialog-toolbar\">\n    <div fxLayout=\"row\" fxLayoutAlign=\"space-between center\" fxFlex>\n      <span class=\"tcs-case-creation-dialog-toolbar-text\">{{headerText}}</span>\n    </div>\n    <mat-icon fxLayout=\"column\" fxLayoutAlign=\"start end\" class=\"tcs-case-creation-dialog-icons\" [svgIcon]=\"'tcs-close-icon'\" (click)=\"closeDialog()\"></mat-icon>\n  </mat-toolbar>\n  <div mat-dialog-content class=\"tcs-case-creation-dialog\" fxLayout=\"column\">\n    <div *ngIf=\"!createdCase\" class=\"tcs-case-creation-dialog-details\">\n      <tcla-live-apps-creators [sandboxId]=\"sandboxId\" [applicationId]=\"application.applicationId\"\n                               [typeId]=\"application.id\" [dataOverride]=\"initialData\"\n                               [customFormDefs]=\"customFormDefs\"\n                               [formsFramework]=\"formsFramework\"\n                               [legacyCreators]=\"legacyCreators\"\n                               [formConfig]=\"formConfig\"\n                               (caseCreated)=\"handleCaseCreated($event)\"></tcla-live-apps-creators>\n    </div>\n    <div *ngIf=\"createdCase\" class=\"tcs-case-created-confirmation-details\" fxLayout=\"row\" fxLayoutAlign=\"center start\">\n      <span class=\"tcs-case-created-confirmation-text\">New {{application.applicationName}}\n        case successfully submitted</span>\n      </div>\n  </div>\n  <!--div class=\"tcs-spacer\"></div-->\n  <mat-dialog-actions *ngIf=\"createdCase\" class=\"tcs-dialog-actions\" style=\"height: 100%\" fxLayout=\"row\" fxLayoutAlign=\"end end\">\n    <button *ngIf=\"createdCase.caseReference && !autoClose\" mat-button mat-flat-button color=\"primary\" (click)=\"openCase()\">Open Case</button>\n    <button mat-button (click)=\"closeDialog()\">Close</button>\n  </mat-dialog-actions>\n</div>\n","import {Deserializable} from '@tibco-tcstk/tc-core-lib';\n\nexport class CaseTypeReportRecordInfo implements Deserializable {\n  id: string;\n  label: string;\n  name: string;\n  color: string;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class CaseTypeReportRecord implements Deserializable {\n  activeStateCaseCount: number;\n  applicationId: string;\n  terminalStateCaseCount: number;\n  incTerminal: boolean;\n  caseTypeInfo: CaseTypeReportRecordInfo;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class CaseTypesReport implements Deserializable {\n  caseTypes: CaseTypeReportRecord[];\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class CaseTypeStateReportStateInfo implements Deserializable {\n  id: string;\n  label: string;\n  value: string;\n  color: string;\n  isTerminal: boolean;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class CaseTypeStateReportRecord implements  Deserializable {\n  caseCount: number;\n  stateInfo: CaseTypeStateReportStateInfo;\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n\nexport class CaseTypeStateReport implements Deserializable {\n  caseStates: CaseTypeStateReportRecord[];\n  deserialize(input: any) {\n    Object.assign(this, input);\n    return this;\n  }\n}\n","import { Injectable } from '@angular/core';\nimport {HttpClient, HttpHeaders} from '@angular/common/http';\nimport {forkJoin, Observable} from 'rxjs';\nimport {flatMap, map, tap} from 'rxjs/operators';\nimport {CaseTypeReportRecord, CaseTypesReport, CaseTypeStateReport} from '../models/tc-live-apps-reporting';\nimport {TcCaseCardConfigService} from './tc-case-card-config.service';\nimport {StateColorMap, StateColorMapRec} from '../models/tc-case-card-config';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TcLiveAppsReportingService {\n\n  constructor(private http: HttpClient, private caseConfigService: TcCaseCardConfigService) { }\n\n  public parseCaseTypesReport(report: CaseTypesReport, uiAppId: string): Observable<CaseTypesReport> {\n    // add state colors for the report entries\n    const caseStateColorMaps$: Observable<StateColorMap>[] = [];\n    report.caseTypes.forEach((caseType) => {\n      caseStateColorMaps$.push(this.caseConfigService.getStateColorInfo(caseType.applicationId, uiAppId).pipe(\n        map(stateColMap => {\n          return stateColMap;\n        })\n      ));\n    });\n    return forkJoin(caseStateColorMaps$).pipe(\n      map(resultArr => {\n        for (let x = 0; x < report.caseTypes.length; x++) {\n          report.caseTypes[x].caseTypeInfo.color = resultArr[x].caseTypeColor ? resultArr[x].caseTypeColor : undefined;\n        }\n        return report;\n      })\n    );\n  }\n\n  public parseCaseStateReport(report: CaseTypeStateReport, applicationId: string, uiAppId: string): Observable<CaseTypeStateReport> {\n    // add state colors for the report entries\n    return this.caseConfigService.getStateColorInfo(applicationId, uiAppId).pipe(\n      map(stateColorInfo => {\n        report.caseStates.forEach(caseState => {\n          let stateRecord: StateColorMapRec;\n          if (stateColorInfo && stateColorInfo.stateColorRecs) {\n             stateRecord = stateColorInfo.stateColorRecs.find(stateRec => {\n              return stateRec.state === caseState.stateInfo.value;\n            });\n          }\n          caseState.stateInfo.color = (stateRecord && stateRecord.color) ? stateRecord.color : undefined;\n        });\n        return report;\n      })\n    );\n  }\n\n  public getCaseTypesReport(sandboxId: number, appIds: string[], uiAppId: string): Observable<CaseTypesReport> {\n    const url = '/case/reports/v1/caseTypesReport?$sandbox=' + sandboxId;\n    return this.http.get(url).pipe(\n      tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n      flatMap(response => {\n        const originalResponse = new CaseTypesReport().deserialize(response);\n        function includeCaseType(element: CaseTypeReportRecord, index, array ) {\n          return (appIds.indexOf(element.applicationId) !== -1);\n        }\n        const filteredResponse = new CaseTypesReport();\n        if (appIds.length > 0) {\n          filteredResponse.caseTypes = originalResponse.caseTypes.filter(includeCaseType);\n        } else {\n          filteredResponse.caseTypes = originalResponse.caseTypes;\n        }\n        return this.parseCaseTypesReport(filteredResponse, uiAppId);\n      })\n    );\n  }\n\n  public getCaseTypeStateReport(sandboxId: number, appId: string, typeId: string, incTerminal: boolean, uiAppId: string): Observable<CaseTypeStateReport> {\n    const url = '/case/reports/v1/caseStatesReport?$sandbox=' + sandboxId\n      + '&$filter=applicationId eq ' + appId\n      + ' and typeId eq ' + typeId\n      + ' and includeTerminalStates eq ' + String(incTerminal).toUpperCase();\n    return this.http.get(url).pipe(\n      tap( val => sessionStorage.setItem('tcsTimestamp', Date.now().toString())),\n      flatMap(response => {\n        const caseTypeStateReport = new CaseTypeStateReport().deserialize(response);\n        return this.parseCaseStateReport(caseTypeStateReport, appId, uiAppId);\n      })\n    );\n  }\n\n}\n","import {AfterViewChecked, Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';\nimport {CaseTypeReportRecord, CaseTypesReport} from '../../models/tc-live-apps-reporting';\nimport {BaseChartDirective} from 'ng2-charts';\nimport {TcLiveAppsReportingService} from '../../services/tc-live-apps-reporting.service';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {take, takeUntil} from 'rxjs/operators';\nimport {DEFAULT_COLORS, DEFAULT_TYPE_COLOR} from '../../services/tc-case-card-config.service';\nimport { Chart, ChartConfiguration, ChartOptions, ChartType } from \"chart.js\";\n\n/**\n * Home page active cases widget sub component\n *\n *@example <tcla-live-apps-active-cases-report></tcla-live-apps-active-cases-report>\n */\n@Component({\n  selector: 'tcla-live-apps-active-cases-report',\n  templateUrl: './live-apps-active-cases-report.component.html',\n  styleUrls: ['./live-apps-active-cases-report.component.css']\n})\nexport class LiveAppsActiveCasesReportComponent extends LiveAppsComponent implements  OnInit, AfterViewChecked {\n\n  constructor(protected reportingService: TcLiveAppsReportingService) {\n    super();\n  }\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The list of LA Application IDs you want to handle\n   */\n  @Input() appIds: string[];\n\n  /**\n   * Whether to show the header bar in the widget - eg. favorites on home page (contains icon etc) - if off icons still appear without bar\n   */\n  @Input() showHeader: boolean;\n\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * Maximum rows to show in legend before it is hidden (otherwise would take whole widget)\n   */\n  public maxLegendItems: number = 8;\n  @Input('maxLegendItems') set MaxLegendItems(maxLegendItems: number) {\n    if (maxLegendItems){\n      this.maxLegendItems = maxLegendItems;\n    }\n  }\n\n  /**\n   * Whether to show percentages or raw case numbers on the doughnut chart\n   */\n  public showPercentages: boolean = false;\n  @Input('showPercentages') set ShowPercentages(showPercentages: boolean) {\n    if (showPercentages){\n      this.showPercentages = showPercentages;\n    }\n  }\n\n  /**\n   * ~event selectedCaseType : Case Type selected in vizualization\n   * ~payload CaseTypeReportRecord : CaseTypeReportRecord object selected from component\n   */\n  @Output() selectedCaseType: EventEmitter<CaseTypeReportRecord> = new EventEmitter<CaseTypeReportRecord>();\n\n  @ViewChild(BaseChartDirective, {static: false}) caseReportChart: BaseChartDirective;\n  @ViewChild('componentDiv', {static: false}) componentDiv: ElementRef;\n\n  public errorMessage: string;\n  public caseTypesReport: CaseTypesReport;\n  public totalActiveCaseCount: number;\n  public totalTerminatedCaseCount: number;\n  public renderChart = false;\n  public widgetWidth: number;\n  public widgetHeight: number;\n\n  public doughnutChartData: ChartConfiguration<'doughnut'>['data'];\n  public doughnutChartType: ChartType = 'doughnut';\n  public chartColors: any[] = [];\n  public defaultColors: string[] = DEFAULT_COLORS.slice().reverse();\n\n  public legendData: any;\n\n  private getCaseCount = () => {\n    return this.totalActiveCaseCount;\n  }\n\n  public doughnutChartOptions: ChartOptions<'doughnut'> = {\n    responsive: true,\n    maintainAspectRatio: false,\n    layout: {\n      padding: {\n        left: 0,\n        right: 0,\n        top: 10,\n        bottom: 10\n      }\n    },\n    onClick: (event, active) => { event.native.stopPropagation(); this.chartClicked(active) },\n    plugins: {\n      legend: {\n        position: 'left'\n      },\n      datalabels: {\n        anchor: 'end',\n        backgroundColor: function(context): string {\n          return context?.dataset?.backgroundColor[context.dataIndex];\n        },\n        borderColor: 'white',\n        borderRadius: 25,\n        borderWidth: 2,\n        color: 'white',\n        display: function(context) {\n          const dataset = context.dataset;\n          const value = dataset.data[context.dataIndex];\n          return value > 0;\n        },\n        font: {\n          weight: 'bold'\n        },\n        formatter: (value, ctx) => {\n          const datasets = ctx.chart.data.datasets;\n          if (datasets.indexOf(ctx.dataset) === datasets.length - 1) {\n            if (this.showPercentages) {\n              // @ts-ignore\n              const sum = datasets[0].data.reduce((a, b) => a + b, 0);\n              const percentage = Math.round((value / sum) * 100) + '%';\n              return percentage;\n            } else {\n              return value;\n            }\n          } else {\n            return 0;\n          }\n        }\n      }\n    }\n  };\n\n  private initReportDataToChart = (reportData: CaseTypesReport) => {\n    this.doughnutChartData = {\n      labels: [],\n      datasets: []\n    };\n    this.totalActiveCaseCount = 0;\n    const activeCasesArray: any[] = [];\n    const labels: string[] = [];\n    const colorArray: string[] = [];\n    // remove any taken colors from the defaultColors\n    // we have to do this before parsing the record to avoid getting same colors\n    reportData.caseTypes.forEach(ct => {\n      // remove color from defaults\n      if (ct.caseTypeInfo.color) {\n        this.defaultColors = this.defaultColors.filter(item => item !== ct.caseTypeInfo.color);\n      }\n    });\n    // parse record\n    reportData.caseTypes.forEach(caseType => {\n      activeCasesArray.push(caseType.activeStateCaseCount);\n      this.totalActiveCaseCount = this.totalActiveCaseCount + caseType.activeStateCaseCount;\n      this.totalTerminatedCaseCount = this.totalTerminatedCaseCount + caseType.terminalStateCaseCount;\n      labels.push(caseType.caseTypeInfo.label);\n      // we will re-color anything that has the default color\n      let col: string;\n      if (caseType.caseTypeInfo.color && caseType.caseTypeInfo.color !== DEFAULT_TYPE_COLOR) {\n        // use the set color\n        col = caseType.caseTypeInfo.color;\n      } else {\n        // try and get a color from the palette\n        const palCol = this.defaultColors.pop();\n        if (palCol) {\n          col = palCol;\n        } else {\n          // if no more in palette use a random color!\n          const i = Math.random() * 0xffffff;\n          const p = parseInt(i.toString(), 0);\n          col = '#' + p.toString(16);\n        }\n      }\n      colorArray.push(col);\n    });\n    // showing more than 8 in the legend will take up too much space\n    // this.doughnutChartOptions..legend.display = labels.length <= 8;\n    this.doughnutChartData.datasets.push({ data: activeCasesArray, backgroundColor: colorArray });\n    this.doughnutChartData.labels = labels;\n    this.chartColors.push( { backgroundColor: colorArray});\n    this.renderChart = true;\n  }\n\n  public refresh = () => {\n    this.reportingService.getCaseTypesReport(this.sandboxId, this.appIds, this.uiAppId).pipe(\n      take(1),\n      takeUntil(this._destroyed$)\n    )\n      .subscribe(\n        report => {\n          this.caseTypesReport = report;\n          this.initReportDataToChart(report);\n          return report;\n          }, error => { this.errorMessage = 'Error retrieving case types report: ' + error.error.errorMsg; }\n      );\n  }\n\n  // events\n  // public chartClicked({ event, active }: { event: { chart: Chart, native: MouseEvent }, active: any }): void {\n  public chartClicked(active): void {\n    if (active.length > 0) {\n      const selectedType = this.caseTypesReport.caseTypes[active[0].element.$context.dataIndex];\n      this.selectedCaseType.emit(selectedType);\n    }\n  }\n\n  public chartHovered({ event, active }: { event: MouseEvent, active: {}[] }): void {\n    // console.log(event, active);\n  }\n\n  ngAfterViewChecked() {\n    if (this.componentDiv && this.caseReportChart && this.componentDiv.nativeElement.offsetWidth) {\n      if (this.widgetWidth !== this.componentDiv.nativeElement.offsetWidth || this.widgetHeight !== this.componentDiv.nativeElement.offsetHeight) {\n        this.widgetWidth = this.componentDiv.nativeElement.offsetWidth;\n        this.widgetHeight = this.componentDiv.nativeElement.offsetHeight;\n        this.caseReportChart.chart.resize();\n      }\n    }\n  }\n\n  ngOnInit() {\n    this.refresh();\n  }\n\n}\n","<div #componentDiv fxLayout=\"column\" fxFlex style=\"overflow: auto;\">\n  <div *ngIf=\"renderChart\" style=\"height:100%; width:100%; padding: 20px\" class=\"relative\">\n    <canvas #caseReportChart baseChart\n            [data]=\"doughnutChartData\"\n            [type]=\"doughnutChartType\"\n            [options]=\"doughnutChartOptions\"\n    >\n    </canvas>\n  </div>\n</div>\n","import {\n  AfterViewChecked,\n  Component,\n  ElementRef,\n  EventEmitter,\n  Input,\n  OnChanges,\n  OnInit,\n  Output,\n  SimpleChanges,\n  ViewChild\n} from '@angular/core';\nimport {Chart, ChartConfiguration, ChartOptions, ChartType} from 'chart.js';\nimport {BaseChartDirective} from 'ng2-charts';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {TcLiveAppsReportingService} from '../../services/tc-live-apps-reporting.service';\nimport {CaseTypeStateReport, CaseTypeStateReportStateInfo} from '../../models/tc-live-apps-reporting';\nimport {take, takeUntil} from 'rxjs/operators';\nimport {DEFAULT_COLORS, DEFAULT_TYPE_COLOR} from '../../services/tc-case-card-config.service';\n\n\n/**\n * Home page active cases widget sub component\n *\n *@example <tcla-live-apps-active-cases-for-type-report></tcla-live-apps-active-cases-for-type-report>\n */\n@Component({\n  selector: 'tcla-live-apps-active-cases-for-type-report',\n  templateUrl: './live-apps-active-cases-for-type-report.component.html',\n  styleUrls: ['./live-apps-active-cases-for-type-report.component.css']\n})\nexport class LiveAppsActiveCasesForTypeReportComponent extends LiveAppsComponent implements OnInit, OnChanges, AfterViewChecked {\n\n\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The LA Application Id\n   */\n  @Input() appId: string;\n\n  /**\n   * The LA Application Type Id (generally 1)\n   */\n  @Input() typeId: string;\n\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * Maximum rows to show in legend before it is hidden (otherwise would take whole widget)\n   */\n  public maxLegendItems: number = 8;\n  @Input('maxLegendItems') set MaxLegendItems(maxLegendItems: number) {\n    if (maxLegendItems){\n      this.maxLegendItems = maxLegendItems;\n    }\n  }\n\n  /**\n   * Whether to show percentages or raw case numbers on the doughnut chart\n   */\n  public showPercentages: boolean = false;\n  @Input('showPercentages') set ShowPercentages(showPercentages: boolean) {\n    if (showPercentages){\n      this.showPercentages = showPercentages;\n    }\n  }\n\n  /**\n   * ~event selectedCaseTypeState : Case Type state selected in vizualization\n   * ~payload CaseTypeStateReportStateInfo : CaseTypeStateReportStateInfo object selected from component (to drive caller to display something different (drill down))\n   */\n  @Output() selectedCaseTypeState: EventEmitter<CaseTypeStateReportStateInfo> = new EventEmitter<CaseTypeStateReportStateInfo>();\n\n  @ViewChild(BaseChartDirective, {static: false}) caseTypeStateReportChart: BaseChartDirective;\n  @ViewChild('componentDiv', {static: false}) componentDiv: ElementRef;\n\n  public errorMessage: string;\n  public caseTypeStateReport: CaseTypeStateReport;\n  public renderChart = false;\n\n  public doughnutChartData: ChartConfiguration<'doughnut'>['data'];\n  public doughnutChartType: ChartType = 'doughnut';\n  public chartColors: any[] = [];\n  public defaultColors: string[] = DEFAULT_COLORS.slice().reverse();\n  public widgetWidth: number;\n  public widgetHeight: number;\n\n  public legendData: any;\n  public totalActiveCaseCount: number;\n\n  private getCaseCount = () => {\n    return this.totalActiveCaseCount;\n  }\n\n  public doughnutChartOptions: ChartOptions<'doughnut'> = {\n    responsive: true,\n    maintainAspectRatio: false,\n    layout: {\n      padding: {\n        left: 0,\n        right: 0,\n        top: 10,\n        bottom: 10\n      }\n    },\n    onClick: (event, active) => { event.native.stopPropagation(); this.chartClicked(active) },\n    plugins: {\n      legend: {\n        position: 'left'\n      },\n      datalabels: {\n        anchor: 'end',\n        backgroundColor: function(context): string {\n          return context?.dataset?.backgroundColor[context.dataIndex];\n        },\n        borderColor: 'white',\n        borderRadius: 25,\n        borderWidth: 2,\n        color: 'white',\n        display: function(context) {\n          const dataset = context.dataset;\n          const value = dataset.data[context.dataIndex];\n          return value > 0;\n        },\n        font: {\n          weight: 'bold'\n        },\n        formatter: (value, ctx) => {\n\n          const datasets = ctx.chart.data.datasets;\n\n          if (datasets.indexOf(ctx.dataset) === datasets.length - 1) {\n            if (this.showPercentages) {\n              //@ts-ignore\n              const sum = datasets[0].data.reduce((a, b) => a + b, 0);\n              const percentage = Math.round((value / sum) * 100) + '%';\n              return percentage;\n            } else {\n              return value;\n            }\n          } else {\n            return 0;\n          }\n        }\n      }\n\n    }\n  };\n\n  constructor(protected reportingService: TcLiveAppsReportingService) {\n    super();\n  }\n\n  private initReportDataToChart = (reportData: CaseTypeStateReport, status: string) => {\n    this.doughnutChartData = {\n      labels: [],\n      datasets: []\n    };\n    this.totalActiveCaseCount = 0;\n    const casesByStateArray: number[] = [];\n    const labels: string[] = [];\n    const colorArray: string[] = [];\n    // remove any taken colors from the defaultColors\n    // we have to do this before parsing the record to avoid getting same colors\n    reportData.caseStates.forEach(cs => {\n      // remove color from defaults\n      if (cs.stateInfo.color) {\n        this.defaultColors = this.defaultColors.filter(item => item !== cs.stateInfo.color);\n      }\n    });\n    // parse record\n    reportData.caseStates.forEach(caseState => {\n        this.totalActiveCaseCount = this.totalActiveCaseCount + caseState.caseCount;\n        casesByStateArray.push(caseState.caseCount);\n        labels.push(caseState.stateInfo.label);\n      // we will re-color anything that has the default color\n      let col: string;\n      if (caseState.stateInfo.color && caseState.stateInfo.color !== DEFAULT_TYPE_COLOR) {\n        // use the set color\n        col = caseState.stateInfo.color;\n      } else {\n        // try and get a color from the palette\n        const palCol = this.defaultColors.pop();\n        if (palCol) {\n          col = palCol;\n        } else {\n          // if no more in palette use a random color!\n          const i = Math.random() * 0xffffff;\n          const p = parseInt(i.toString(), 0);\n          col = '#' + p.toString(16);\n        }\n      }\n      colorArray.push(col);\n    });\n    this.doughnutChartData.datasets.push({ data: casesByStateArray, backgroundColor: colorArray });\n    this.doughnutChartData.labels = labels;\n    this.chartColors.push( { backgroundColor: colorArray});\n    // showing more than 8 in the legend will take up too much space\n    this.doughnutChartOptions.plugins.legend.display = labels.length <= 8;\n    this.renderChart = true;\n  }\n\n  public refresh = () => {\n    this.reportingService.getCaseTypeStateReport(this.sandboxId, this.appId, this.typeId, false, this.uiAppId).pipe(\n      take(1),\n      takeUntil(this._destroyed$)\n    )\n      .subscribe(\n        report => {\n          this.caseTypeStateReport = report;\n          this.initReportDataToChart(report, status);\n          return report;\n        }, error => { this.errorMessage = 'Error retrieving case types report: ' + error.error.errorMsg; }\n      );\n  }\n\n  // events\n  // public chartClicked({ event, active }: { event: { chart: Chart, native: MouseEvent }, active: any }): void {\n  public chartClicked(active) {\n    if (active.length > 0) {\n        this.selectedCaseTypeState.emit(this.caseTypeStateReport.caseStates[active[0].element.$context.dataIndex].stateInfo);\n    }\n  }\n\n  public chartHovered({ event, active }: { event: MouseEvent, active: {}[] }): void {\n    // console.log(event, active);\n  }\n\n  ngAfterViewChecked() {\n    if (this.componentDiv && this.caseTypeStateReport && this.componentDiv.nativeElement.offsetWidth) {\n      if (this.widgetWidth !== this.componentDiv.nativeElement.offsetWidth || this.widgetHeight !== this.componentDiv.nativeElement.offsetHeight) {\n        this.widgetWidth = this.componentDiv.nativeElement.offsetWidth;\n        this.widgetHeight = this.componentDiv.nativeElement.offsetHeight;\n        this.caseTypeStateReportChart.chart.resize();\n      }\n    }\n  }\n\n  ngOnInit() {\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    if (changes.appId && (changes.firstChange || (changes.appId.currentValue !== changes.appId.previousValue))) {\n      this.refresh();\n    }\n  }\n\n}\n","<div #componentDiv fxLayout=\"column\" fxFlex style=\"overflow: auto\">\n  <div *ngIf=\"renderChart\" style=\"height:100%; width:100%; padding: 20px\" class=\"relative\">\n    <canvas #caseReportChart baseChart\n            [data]=\"doughnutChartData\"\n            [options]=\"doughnutChartOptions\"\n            [type]=\"doughnutChartType\"\n    >\n    </canvas>\n  </div>\n</div>\n","import {Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';\nimport {CaseTypeReportRecord, CaseTypesReport, CaseTypeStateReportStateInfo} from '../../models/tc-live-apps-reporting';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {LiveAppsActiveCasesReportComponent} from '../live-apps-active-cases-report/live-apps-active-cases-report.component';\nimport {LiveAppsActiveCasesForTypeReportComponent} from '../live-apps-active-cases-for-type-report/live-apps-active-cases-for-type-report.component';\nimport { Chart } from \"chart.js\";\nimport ChartDataLabels from 'chartjs-plugin-datalabels';\n\n\n/**\n * Home page active cases widget main component\n *\n * ![alt-text](../live-apps-active-cases-widget.png \"Image\")\n *\n *@example <tcla-live-apps-active-cases-widget></tcla-live-apps-active-cases-widget>\n */\n\n@Component({\n  selector: 'tcla-live-apps-active-cases-widget',\n  templateUrl: './live-apps-active-cases-widget.component.html',\n  styleUrls: ['./live-apps-active-cases-widget.component.css']\n})\nexport class LiveAppsActiveCasesWidgetComponent extends LiveAppsComponent {\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The list of LA Application IDs you want to handle\n   */\n  @Input() appIds: string[];\n\n  /**\n   * Whether to show the header bar in the widget - eg. favorites on home page (contains icon etc) - if off icons still appear without bar\n   */\n  @Input() showHeader: boolean;\n\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * Optionally a different widget Title\n   */\n  @Input() widgetTitle = 'Active Cases';\n\n  /**\n   * Maximum rows to show in legend before it is hidden (otherwise would take whole widget)\n   */\n  public maxLegendItems: number = 8;\n  @Input('maxLegendItems') set MaxLegendItems(maxLegendItems: number) {\n    if (maxLegendItems){\n      this.maxLegendItems = maxLegendItems;\n    }\n  }\n\n  /**\n   * Whether to show percentages or raw case numbers on the doughnut chart\n   */\n  public showPercentages: boolean = false;\n  @Input('showPercentages') set ShowPercentages(showPercentages: boolean) {\n    if (showPercentages){\n      this.showPercentages = showPercentages;\n    }\n  }\n\n  /**\n   * ~event selectedCaseType : Case Type selected in vizualization\n   * ~payload CaseTypeReportRecord : CaseTypeReportRecord object selected from component\n   */\n  @Output() selectedCaseType: EventEmitter<CaseTypeReportRecord> = new EventEmitter<CaseTypeReportRecord>();\n\n  /**\n   * ~event selectedCaseTypeState : Case Type state selected in vizualization\n   * ~payload CaseTypeStateReportStateInfo : CaseTypeStateReportStateInfo object selected from component (to drive caller to display something different (drill down))\n   */\n  @Output() selectedCaseTypeState: EventEmitter<CaseTypeStateReportStateInfo> = new EventEmitter<CaseTypeStateReportStateInfo>();\n\n\n  @ViewChild(LiveAppsActiveCasesReportComponent, {static: false}) activeCasesComp: LiveAppsActiveCasesReportComponent;\n  @ViewChild(LiveAppsActiveCasesForTypeReportComponent, {static: false}) activeCaseTypeComp: LiveAppsActiveCasesForTypeReportComponent;\n\n  constructor() {\n    super();\n    Chart.register(ChartDataLabels);\n  }\n\n  public selectedCaseTypeReport: CaseTypeReportRecord;\n\n  public handleCaseTypeSelected = (selected: CaseTypeReportRecord) => {\n    this.selectedCaseTypeReport = selected;\n    this.selectedCaseType.emit(selected);\n  }\n\n  public handleCaseTypeStateSelected = (selectedState: CaseTypeStateReportStateInfo) => {\n    this.selectedCaseTypeState.emit(selectedState);\n  }\n\n  public clearSelectedCaseType = () => {\n    this.selectedCaseTypeReport = undefined;\n  }\n\n  public refresh = () => {\n    if (this.activeCasesComp) {\n      this.activeCasesComp.refresh();\n    }\n    if (this.activeCaseTypeComp) {\n      this.activeCaseTypeComp.refresh();\n    }\n  }\n\n}\n","<div class=\"tcs-active-case-widget-pane\" fxFill fxLayout=\"column\">\n  <div *ngIf=\"showHeader\" class=\"tcs-active-case-widget-header\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n    <div fxLayoutAlign=\"start center\">\n      <mat-icon class=\"tcs-icon tcs-active-case-widget-icon\" svgIcon=\"ic-active-case-widget-icon\"></mat-icon>\n      <div class=\"tcs-active-case-widget-header-text\">{{widgetTitle}}</div>\n    </div>\n    <div fxLayoutGap=\"10px\">\n      <div fxFlex fxLayout=\"row\" fxLayoutAlign=\"start center\">\n        <div class=\"tcs-type-filter-text\" *ngIf=\"selectedCaseTypeReport\" fxLayout=\"row\">\n          [\n          <div class=\"tcs-type-filter-text-highlight\">{{selectedCaseTypeReport.caseTypeInfo.label}}</div>\n          ]\n        </div>\n      </div>\n      <mat-icon *ngIf=\"selectedCaseTypeReport\" (click)=\"clearSelectedCaseType()\" class=\"tcs-icon tcs-icon-active tcs-clear-selected-case-type-icon\" svgIcon=\"tcs-clear-icon\" matTooltip=\"Clear Selected Case Type\" matTooltipPosition=\"left\" matTooltipShowDelay=\"1000\"></mat-icon>\n    </div>\n  </div>\n  <div *ngIf=\"!showHeader\" fxLayout=\"row\" fxLayoutAlign=\"end center\">\n  </div>\n  <div style=\"overflow: hidden;\">\n    <tcla-live-apps-active-cases-report *ngIf=\"!selectedCaseTypeReport\" fxFlex [maxLegendItems]=\"maxLegendItems\" [sandboxId]=\"sandboxId\" [appIds]=\"appIds\" [showPercentages]=\"showPercentages\" [uiAppId]=\"uiAppId\" (selectedCaseType)=\"handleCaseTypeSelected($event)\"></tcla-live-apps-active-cases-report>\n    <tcla-live-apps-active-cases-for-type-report *ngIf=\"selectedCaseTypeReport\" fxFlex [maxLegendItems]=\"maxLegendItems\" [sandboxId]=\"sandboxId\" [typeId]=\"selectedCaseTypeReport.caseTypeInfo.id\" [appId]=\"selectedCaseTypeReport.applicationId\" [showPercentages]=\"showPercentages\" [uiAppId]=\"uiAppId\" (selectedCaseTypeState)=\"handleCaseTypeStateSelected($event)\"></tcla-live-apps-active-cases-for-type-report>\n  </div>\n</div>\n","import {Component, Input, OnInit} from '@angular/core';\nimport {LiveAppsApplicationsComponent} from '../live-apps-applications/live-apps-applications.component';\nimport {CaseType} from '../../models/liveappsdata';\n\n\n/**\n * Special rendering of LiveAppsApplicationsComponent\n *\n * ![alt-text](../live-apps-application-create-button.png \"Image\")\n *\n *@example <tcla-live-apps-application-create-button></tcla-live-apps-application-create-button>\n */\n@Component({\n  selector: 'tcla-live-apps-application-create-button',\n  templateUrl: './live-apps-application-create-button.component.html',\n  styleUrls: ['./live-apps-application-create-button.component.css']\n})\nexport class LiveAppsApplicationCreateButtonComponent extends LiveAppsApplicationsComponent {\n\n  public createLabel: string = 'Create Case';\n  @Input('createLabel') set CreateLabel(createLabel: string) {\n    if (createLabel){\n      this.createLabel = createLabel;\n    }\n  }\n\n  public handleCreatorAppSelection = (application: CaseType) => {\n    this.selection.emit(application);\n  }\n\n  public handleCreateCaseClick = () => {\n    // console.log('Select Case: ' + this.applications.casetypes.length);\n    if (this.applications.casetypes.length === 1) {\n      // Open Case Directly\n      // console.log('Opening Case Directly...');\n      this.handleCreatorAppSelection(this.applications.casetypes[0]);\n    }\n  }\n}\n","<button mat-button [matMenuTriggerFor]=\"creatorApplicationMenu\" (click)=\"handleCreateCaseClick()\">\n  <mat-icon [svgIcon]=\"'tcs-case-start-icon'\"></mat-icon>\n  <span class=\"tcs-case-create-button-text\">{{createLabel}}</span>\n</button>\n<mat-menu #creatorApplicationMenu=\"matMenu\">\n  <button mat-menu-item *ngFor=\"let application of applications.casetypes\" (click)=\"handleCreatorAppSelection(application)\">{{application.applicationName}}</button>\n</mat-menu>\n","import {Component, EventEmitter, Inject, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild} from '@angular/core';\nimport {CaseRoute, CaseType} from '../../models/liveappsdata';\nimport {ToolbarButton, TcButtonsHelperService, RouteAction} from '@tibco-tcstk/tc-core-lib';\nimport {LiveAppsFavoriteCasesComponent} from '../live-apps-favorite-cases/live-apps-favorite-cases.component';\nimport {LiveAppsRecentCasesComponent} from '../live-apps-recent-cases/live-apps-recent-cases.component';\nimport {LiveAppsSearchWidgetComponent} from '../live-apps-search-widget/live-apps-search-widget.component';\nimport { MatDialog } from '@angular/material/dialog';\nimport {LiveAppsCreatorDialogComponent} from '../live-apps-creator-dialog/live-apps-creator-dialog.component';\nimport {CaseCreatorSelectionContext} from '../../models/tc-case-creator';\nimport {LiveAppsNotesComponent} from '../live-apps-notes/live-apps-notes.component';\nimport {LiveAppsDocumentsComponent} from '../live-apps-documents/live-apps-documents.component';\nimport {TcRolesService} from '../../services/tc-roles-service.ts.service';\nimport {Roles, RouteAccessControlConfigurationElement} from '../../models/tc-groups-data';\nimport {LiveAppsActiveCasesWidgetComponent} from '../live-apps-active-cases-widget/live-apps-active-cases-widget.component';\nimport {CaseTypeReportRecord, CaseTypeStateReportStateInfo} from '../../models/tc-live-apps-reporting';\nimport {CustomFormDefs} from '@tibco-tcstk/tc-forms-lib';\nimport {LiveAppsWorkitemsComponent} from '../live-apps-workitems/live-apps-workitems.component';\nimport {FormConfig} from '../../models/tc-liveapps-config';\n\n\n/**\n * High level component to allow home page view of system\n *\n * ![alt-text](../live-apps-home-cockpit.png \"Documents Component Image\")\n *\n *@example <tcla-live-apps-home-cockpit></tcla-live-apps-home-cockpit>\n */\n@Component({\n  selector: 'tcla-live-apps-home-cockpit',\n  templateUrl: './live-apps-home-cockpit.component.html',\n  styleUrls: ['./live-apps-home-cockpit.component.css']\n})\nexport class LiveAppsHomeCockpitComponent implements OnChanges {\n  /**\n   * The Application ID of the UI (should ideally be unique as it is shared state key)\n   */\n  @Input() uiAppId: string;\n\n  /**\n   * The list of LA Application IDs you want to handle\n   */\n  @Input() appIds: string[];\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * The name of the logged user\n   */\n  @Input() userName: string;\n\n  /**\n   * The ID of the logged user\n   */\n  @Input() userId: string;\n\n  /**\n   * * Email address of the user (comes from resolver)\n   */\n  @Input() email: string;\n\n  /**\n   * page title comes from config resolver\n   */\n  @Input() title: string;\n\n  /**\n   * Roles - The users current roles\n   */\n  @Input() roles: Roles;\n\n  /**\n   * RouteAccessControlConfig - basically the config for access control\n   */\n  @Input() access: RouteAccessControlConfigurationElement;\n\n  /**\n   * Custom Form Layout Configuration\n   */\n  @Input() formConfig: FormConfig;\n\n  /**\n   * Label for Create Case Button\n   */\n  public createLabel: string = 'Create Case';\n  @Input('createLabel') set CreateLabel(createLabel: string) {\n    if (createLabel){\n      this.createLabel = createLabel;\n    }\n  }\n\n  /**\n   * Custom Form configuration file\n   */\n  @Input() customFormDefs: CustomFormDefs;\n\n  /**\n   * Enable legacy workitems\n   */\n  public legacyWorkitems: boolean = false;\n  @Input('legacyWorkitems') set LegacyWorkitems(legacyWorkitems: boolean) {\n    if (legacyWorkitems){\n      this.legacyWorkitems = legacyWorkitems;\n    }\n  }\n\n  /**\n   * Enable legacy creators\n   */\n  public legacyCreators: boolean = false;\n  @Input('legacyCreators') set LegacyCreators(legacyCreators: boolean) {\n    if (legacyCreators){\n      this.legacyCreators = legacyCreators;\n    }\n  }\n\n  /**\n   * Allow override of forms framework\n   * Options: bootstrap-4 or material-design\n   */\n  public formsFramework: string = 'material-design';\n  @Input('formsFramework') set FormsFramework(formsFramework: string) {\n    if (formsFramework){\n      this.formsFramework = formsFramework;\n    }\n  }\n\n  /**\n   * ~event routeAction : Component requests route to another page\n   * ~payload RouteAction : RouteAction object to tell caller to navigate somewhere\n   */\n  @Output() routeAction: EventEmitter<RouteAction> = new EventEmitter<RouteAction>();\n\n  @ViewChild(LiveAppsFavoriteCasesComponent, {static: false}) favoritesComponent: LiveAppsFavoriteCasesComponent;\n  @ViewChild(LiveAppsRecentCasesComponent, {static: false}) recentsComponent: LiveAppsRecentCasesComponent;\n  @ViewChild(LiveAppsSearchWidgetComponent, {static: false}) searchComponent: LiveAppsSearchWidgetComponent;\n  @ViewChild(LiveAppsNotesComponent, {static: false}) collaborationComponent: LiveAppsNotesComponent;\n  @ViewChild(LiveAppsDocumentsComponent, {static: false}) documentsComponent: LiveAppsDocumentsComponent;\n  @ViewChild(LiveAppsActiveCasesWidgetComponent, {static: false}) activeCasesComponent: LiveAppsActiveCasesWidgetComponent;\n  @ViewChild(LiveAppsWorkitemsComponent, {static: false}) workitemsComponent: LiveAppsWorkitemsComponent;\n\n  public toolbarButtons: ToolbarButton[] = [];\n  public burgerMenuButtons: ToolbarButton[] = [];\n  public caseStartButtonActive: boolean;\n  public selectedCaseTypeReportRecord: CaseTypeReportRecord;\n\n  incConfigButton = true;\n  incRefreshButton = true;\n  cockpitReady = false;\n\n  public clickCaseAction = (caseRoute: CaseRoute) => {\n    // case clicked - tell parent (will pass caseRef and appId)\n    this.routeAction.emit(new RouteAction('caseClicked', caseRoute));\n  }\n\n  constructor(protected buttonsHelper: TcButtonsHelperService, public dialog: MatDialog, protected rolesService: TcRolesService) { }\n\n  protected createToolbarButtons = (): ToolbarButton[] => {\n    const buttons = [];\n\n    // you can use the rolesService to either disable or hide the button as required - it returns true if the user has the roleId specified\n    // const configButton = this.buttonsHelper.createButton('config', 'tcs-capabilities', true, 'Config', true, this.rolesService.checkRole('Partner Portal Configurator', this.roles));\n    if (this.incConfigButton) {\n      const configButton = this.buttonsHelper.createButton('config', 'tcs-capabilities', true, 'Config', (this.access ? this.rolesService.checkButton('configure', this.access) : true), true);\n      buttons.push(configButton);\n    }\n    if (this.incRefreshButton) {\n      const refreshButton = this.buttonsHelper.createButton('refresh', 'tcs-refresh-icon', true, 'Refresh', (this.access ? this.rolesService.checkButton('refresh', this.access) : true), true);\n      buttons.push(refreshButton);\n    }\n    return buttons;\n  }\n\n  protected createBurgerMenuButtons = (): ToolbarButton[] => {\n    const button1 = this.buttonsHelper.createButton('button1', 'tcs-capabilities', true, 'Config', true, true, 'Button 1');\n    const button2 = this.buttonsHelper.createButton('button2', 'tcs-refresh-icon', true, 'Refresh', true, true, 'Button 2');\n    const buttons = [button1, button2];\n    return buttons;\n  }\n\n  public handleToolbarButtonEvent = (buttonId: string) => {\n    if (buttonId === 'config') {\n      this.routeAction.emit(new RouteAction('configClicked', null));\n    }\n    if (buttonId === 'refresh') {\n      this.refresh();\n    }\n  }\n\n  public handleCreatorAppSelection = (application: CaseType) => {\n    const EXAMPLE_INITIAL_DATA = {\n      PartnerRequest: {\n        Customer_v1: {\n          CustomerReference_v1: 'CST-1111',\n          Name_v1: 'Roger Willis',\n        },\n        RequestDescription_v1: 'Where is my order?',\n        RequestDetails_v1: {\n          OrderReference_v1: 'ORD-55333',\n          PartReference_v1: 'PRT-102020',\n        },\n        RequestType_v1: 'Packaging Supplies'\n      }\n    }\n    // this.openCreatorDialog(application, EXAMPLE_INITIAL_DATA, this.sandboxId);\n    this.openCreatorDialog(application, undefined, this.sandboxId, this.customFormDefs, this.legacyCreators, this.formsFramework, this.formConfig);\n  }\n\n  public handleReportCaseTypeSelection = (caseTypeReportRecord: CaseTypeReportRecord) => {\n    this.selectedCaseTypeReportRecord = caseTypeReportRecord;\n  }\n\n  public handleReportCaseTypeStateSelection = (state: CaseTypeStateReportStateInfo) => {\n    if (this.selectedCaseTypeReportRecord) {\n      this.searchComponent.searchCasesByState(Number(state.id), state.label, this.selectedCaseTypeReportRecord.applicationId, this.selectedCaseTypeReportRecord.caseTypeInfo.id, this.selectedCaseTypeReportRecord.caseTypeInfo.label + '|' + state.label );\n    }\n  }\n\n  openCreatorDialog = (application: CaseType, initialData, sandboxId, customFormDefs, legacyCreators, formsFramework, formConfig, autoClose?) => {\n    const dialogRef = this.dialog.open(LiveAppsCreatorDialogComponent, {\n      width: '60%',\n      height: '80%',\n      maxWidth: '100vw',\n      maxHeight: '100vh',\n      panelClass: 'tcs-style-dialog',\n      data: new CaseCreatorSelectionContext(application, initialData, sandboxId, customFormDefs, legacyCreators, formsFramework, formConfig, autoClose)\n    });\n\n    dialogRef.afterClosed().subscribe(result => {\n      if (result) {\n        this.routeAction.emit(new RouteAction('caseClicked', result));\n      }\n    });\n  }\n\n  public handleBurgerMenuClick = (id) => {\n    console.log('Burger menu clicked: ', id);\n  }\n\n  public refresh() {\n    if (this.favoritesComponent) {\n      this.favoritesComponent.refresh();\n    }\n    if (this.recentsComponent) {\n      this.recentsComponent.refresh();\n    }\n    if (this.searchComponent) {\n      this.searchComponent.refresh();\n    }\n    if (this.collaborationComponent) {\n      this.collaborationComponent.refresh();\n    }\n    if (this.documentsComponent) {\n      this.documentsComponent.refresh();\n    }\n    if (this.activeCasesComponent) {\n      this.activeCasesComponent.refresh();\n    }\n    if (this.workitemsComponent) {\n      this.workitemsComponent.refresh();\n    }\n  }\n\n  initialize() {\n    this.toolbarButtons = this.toolbarButtons.concat(this.createToolbarButtons());\n    // this.burgerMenuButtons = this.createBurgerMenuButtons();\n    this.caseStartButtonActive = this.access ? this.rolesService.checkButton('caseStart', this.access) : true;\n    this.cockpitReady = true;\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    if (this.appIds && this.sandboxId && this.uiAppId) {\n      this.initialize();\n    }\n  }\n\n\n\n}\n","<div fxLayout=\"column\" fxFlex *ngIf=\"cockpitReady\">\n  <div>\n    <tc-tibco-cloud-menu-bar [burgerMenuButtons]=\"burgerMenuButtons\" [toolbarButtons]=\"toolbarButtons\" [headerText]=\"title\"\n                             (toolbarButtonEvent)=\"handleToolbarButtonEvent($event)\" (burgerMenuButtonEvent)=\"handleBurgerMenuClick($event)\">\n      <div>\n        <ng-content select=\"[customToolbarContent]\" fxFlex></ng-content>\n        <tcla-live-apps-application-create-button *ngIf=\"caseStartButtonActive\"\n                                                  style=\"margin-right: 20px; margin-left: 20px\" [sandboxId]=\"sandboxId\"\n                                                  [createLabel]=\"createLabel\"\n                                                  [appIds]=\"appIds\"\n                                                  (selection)=\"handleCreatorAppSelection($event)\"></tcla-live-apps-application-create-button>\n      </div>\n    </tc-tibco-cloud-menu-bar>\n  </div>\n\n  <div class=\"tcs-home-content\"\n       style=\"padding-left: 20px; padding-right: 20px; margin-top: 10px; padding-bottom: 120px; height: calc(100% - 86px); display: block;\">\n    <div style=\"height: 100%;\">\n      <div class=\"searchCasesWidget\" style=\"min-height: 86px;\">\n        <tcla-live-apps-search-widget fxFlex [appIds]=\"appIds\" [sandboxId]=\"sandboxId\" [uiAppId]=\"uiAppId\"\n                                      (caseSelected)=\"clickCaseAction($event)\"></tcla-live-apps-search-widget>\n      </div>\n      <!--div style=\"background-color: red; height: 600px; width: 100%;\">TEST BOX</div-->\n\n      <!--div fxFlex=\"noshrink\" style=\"margin-bottom: 20px; overflow: auto; min-height: 400px\" fxLayoutGap=\"20px\" fxLayout=\"row\" fxLayout.lt-md=\"column\"-->\n      <div style=\"margin-bottom: 20px; overflow: hidden; height: 100%; min-height: 750px; padding-bottom: 10px;\" fxLayoutGap=\"20px\"\n           fxLayout=\"row\" fxLayout.lt-md=\"column\">\n        <div fxFlex.gt-sm=\"grow\" fxLayout=\"row\" style=\"\" [ngStyle.lt-md]=\"'min-height: 400px;'\">\n          <mat-tab-group fxFlex>\n            <mat-tab label=\"Recent Cases\">\n              <ng-template matTabContent>\n                <div class=\"recentCasesWidget\" fxFill>\n                  <tcla-live-apps-recent-cases class=\"padded-widget\" [showHeader]=\"true\" [sandboxId]=\"sandboxId\"\n                                               [uiAppId]=\"uiAppId\"\n                                               (clickCase)=\"clickCaseAction($event)\"></tcla-live-apps-recent-cases>\n                </div>\n              </ng-template>\n            </mat-tab>\n            <mat-tab label=\"Favorite Cases\">\n              <ng-template matTabContent>\n                <div class=\"favoriteCasesWidget\" fxFill>\n                  <tcla-live-apps-favorite-cases class=\"padded-widget\" [showHeader]=\"true\" [sandboxId]=\"sandboxId\"\n                                                 [uiAppId]=\"uiAppId\"\n                                                 (clickCase)=\"clickCaseAction($event)\"></tcla-live-apps-favorite-cases>\n                </div>\n              </ng-template>\n            </mat-tab>\n            <mat-tab *ngIf=\"legacyWorkitems\" label=\"Workitems\">\n              <ng-template matTabContent>\n                <div class=\"favoriteCasesWidget\" fxFill>\n                  <tcla-live-apps-workitems #componentDiv class=\"padded-widget\" [showHeader]=\"true\"\n                                            [sandboxId]=\"sandboxId\"\n                                            [uiAppId]=\"uiAppId\" [appIds]=\"appIds\"\n                                            (clickCase)=\"clickCaseAction($event)\"></tcla-live-apps-workitems>\n                </div>\n              </ng-template>\n            </mat-tab>\n          </mat-tab-group>\n        </div>\n\n        <div fxFlex.gt-sm=\"40\" fxLayout=\"column\" [ngStyle.lt-md]=\"'min-height: 400px'\">\n          <div style=\"padding-top: 48px; height: 350px;\">\n            <tcla-live-apps-active-cases-widget [sandboxId]=\"sandboxId\" [appIds]=\"appIds\" [showHeader]=\"true\"\n                                                [showPercentages]=\"true\" [uiAppId]=\"uiAppId\"\n                                                (selectedCaseTypeState)=\"handleReportCaseTypeStateSelection($event)\"\n                                                (selectedCaseType)=\"handleReportCaseTypeSelection($event)\"></tcla-live-apps-active-cases-widget>\n          </div>\n          <div fxFlex=\"noshrink\" style=\"height: 350px;\">\n            <mat-tab-group fxFlex>\n              <mat-tab label=\"Collaboration\">\n                <div fxFill class=\"collaborationWidget\">\n                  <tcla-live-apps-notes [userId]=\"userId\" [showHeader]=\"true\" [relatedItemId]=\"uiAppId\"\n                                        [relatedItemType]=\"'CASE_APP'\"></tcla-live-apps-notes>\n                </div>\n              </mat-tab>\n              <mat-tab label=\"Documents\">\n                <div fxFill class=\"documentWidget\">\n                  <tcla-live-apps-documents [showHeader]=\"true\" [sandboxId]=\"sandboxId\" [folderId]=\"uiAppId + '_Docs'\"\n                                            [folderType]=\"'orgFolders'\"\n                                            [folderDescription]=\"'Document Library'\"></tcla-live-apps-documents>\n                </div>\n              </mat-tab>\n            </mat-tab-group>\n          </div>\n        </div>\n      </div>\n\n    </div>\n  </div>\n</div>\n","import { Injectable } from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {flatMap, map} from 'rxjs/operators';\nimport {Location} from '@angular/common';\nimport {TcSharedStateService, TcCoreCommonFunctions, SharedStateContent, SharedStateEntry, SharedStateList} from '@tibco-tcstk/tc-core-lib';\nimport {LiveAppsConfig} from '../models/tc-liveapps-config';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TcLiveAppsConfigService {\n\n  constructor(private location: Location, private sharedStateService: TcSharedStateService) {\n  }\n\n  public createLiveAppsConfig(sandboxId: number, uiAppId: string, liveappsConfig: LiveAppsConfig) {\n    const ssName = uiAppId + '.liveapps.config.tibcolabs.client.context.PUBLIC';\n    const content: SharedStateContent = new SharedStateContent();\n    content.json = TcCoreCommonFunctions.escapeString(JSON.stringify(liveappsConfig));\n\n    return this.sharedStateService.createSharedState(ssName, 'PUBLIC', '', sandboxId, undefined, undefined, undefined, content)\n      .pipe(\n        map(value => value)\n      );\n  }\n\n  public getLiveAppsConfig(uiAppId: string, useCache: boolean, flushCache: boolean): Observable<LiveAppsConfig> {\n    // if useCache is false this will trigger the service to update the cached version with latest\n    const ssName = uiAppId + '.liveapps.config.tibcolabs.client.context.PUBLIC';\n\n    return this.sharedStateService.getSharedState(ssName, 'PUBLIC', useCache, flushCache)\n      .pipe(\n        map(value => {\n            if (value.sharedStateEntries.length > 0) {\n              const ssresult = new LiveAppsConfig().deserialize(JSON.parse(value.sharedStateEntries[0].content.json));\n              ssresult.id = value.sharedStateEntries[0].id;\n              return ssresult;\n            } else {\n              return undefined;\n            }\n          }\n        )\n      );\n  }\n\n  public updateLiveAppsConfig(sandboxId: number, uiAppId: string, liveappsConfig: LiveAppsConfig, id: string) {\n    const ssName = uiAppId + '.liveapps.config.tibcolabs.client.context.PUBLIC';\n    const content: SharedStateContent = new SharedStateContent();\n    content.json = TcCoreCommonFunctions.escapeString(JSON.stringify(liveappsConfig));\n    const entry: SharedStateEntry = new SharedStateEntry();\n    entry.content = content;\n    entry.sandboxId = sandboxId;\n    entry.name = ssName;\n    entry.type = 'PUBLIC';\n    entry.id = id;\n    const ssList: SharedStateList = new SharedStateList();\n    ssList.sharedStateEntries = [];\n    ssList.sharedStateEntries.push(entry);\n\n    return this.sharedStateService.updateSharedState(ssList.sharedStateEntries)\n      .pipe(\n        flatMap(value => {\n          // flush the cache and return the saved value\n          return this.getLiveAppsConfig(uiAppId, true, true);\n        })\n      );\n  }\n}\n\n","import {Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild} from '@angular/core';\nimport {CaseType} from '../../models/liveappsdata';\nimport {LiveAppsApplicationsComponent} from '../live-apps-applications/live-apps-applications.component';\nimport {map, take, takeUntil} from 'rxjs/operators';\nimport { MatSelectionList } from '@angular/material/list';\n\n\n/**\n * Special rendering of LiveAppsApplicationsComponent\n *\n *@example <tcla-live-apps-application-list></tcla-live-apps-application-list>\n */\n\n@Component({\n  selector: 'tcla-live-apps-application-list',\n  templateUrl: './live-apps-application-list.component.html',\n  styleUrls: ['./live-apps-application-list.component.css']\n})\nexport class LiveAppsApplicationListComponent extends LiveAppsApplicationsComponent implements OnInit, OnChanges {\n  @ViewChild (MatSelectionList, {static: false}) appSelectionList: MatSelectionList;\n\n  /**\n   * The app Ids selected (output)\n   */\n  @Input() selectedAppIds: string[] = [];\n\n  /**\n   * ~event appsSelected : Applications selected in component (CaseType objects)\n   * ~payload CaseType[] : Array of CaseType objects of what was selected\n   */\n  @Output() appsSelected: EventEmitter<CaseType[]> = new EventEmitter<CaseType[]>();\n\n  /**\n   * ~event appIdsSelected : Applications selected in component (appIds)\n   * ~payload string[] : selected App Ids from the application list (used on config)\n   */\n  @Output() appIdsSelected: EventEmitter<string[]> = new EventEmitter<string[]>();\n\n\n  public mySelectedOptions: CaseType[];\n\n  handleAppSelection = (selectionEvent: CaseType[]) => {\n    this.appsSelected.emit(selectionEvent);\n    const selIds = [];\n    selectionEvent.forEach((selected) => {\n      selIds.push(selected.applicationId);\n    });\n    this.appIdsSelected.emit(selIds);\n  }\n\n  handleSelectAll = () => {\n    this.mySelectedOptions = this.applications.casetypes;\n    this.appIdsSelected.emit(this.getAppIds(this.mySelectedOptions));\n    this.appsSelected.emit(this.applications.casetypes);\n  }\n\n  handleDeselectAll = () => {\n    this.mySelectedOptions = [];\n    this.appIdsSelected.emit([]);\n    this.appsSelected.emit([]);\n  }\n\n  private getAppIds = (casetypes: CaseType[]): string[] => {\n    const selIds = [];\n    casetypes.forEach((selected) => {\n      selIds.push(selected.applicationId);\n    });\n    return selIds;\n  }\n\n  public refresh = (bypassCache: boolean) => {\n    this.liveapps.getApplications(this.sandboxId, this.appIds, 100, bypassCache)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$),\n        map(applicationList => {\n          this.applications = applicationList;\n          // handle single app selection input\n          if (this.selectedApp && this.selectedApp.applicationId) {\n            this.selectedApp = applicationList.casetypes.find((casetype) => {\n              return casetype.applicationId === this.selectedApp.applicationId;\n            });\n            // this.selection.emit(this.selectedApp);\n          } else if (this.selectedAppIds && this.selectedAppIds.length > 0) {\n            // pre select any casetypes that were passed in the selectedAppIds input attribute\n            this.mySelectedOptions = this.applications.casetypes.filter(casetype => {\n              return (this.selectedAppIds.findIndex((ct) => {\n                return ct === casetype.applicationId;\n              }\n              ) !== -1);\n            });\n          }\n        })\n      )\n      .subscribe(null, error => { this.errorMessage = 'Error retrieving applications: ' + error.error.errorMsg; });\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    // only interested in initial selection - catching every change would create an infinite loop!\n    if (changes.selectedAppIds && (changes.selectedAppIds.firstChange)) {\n      this.refresh(false);\n    }\n  }\n\n\n  ngOnInit(): void {\n    // leave this blank so superclass ngOnInit not called\n  }\n}\n","<div fxFlex style=\"padding: 10px;\" fxLayout=\"column\">\n  <div fxLayout=\"row\" class=\"tcs-application-list-buttons\">\n    <button mat-button (click)=\"handleSelectAll()\">\n      <span>Select All</span>\n    </button>\n    <button mat-button (click)=\"handleDeselectAll()\">\n      <span>Deselect All</span>\n    </button>\n  </div>\n  <mat-selection-list class=\"tcs-application-list\" #selectedApps [(ngModel)]=\"mySelectedOptions\" (ngModelChange)=\"handleAppSelection($event)\"\n                      fxLayout=\"column\" fxLayout=\"row wrap\">\n    <mat-list-option class=\"tcs-application-option\" checkboxPosition=\"before\"\n                     *ngFor=\"let casetype of applications.casetypes\"\n                     [value]=\"casetype\">\n      <span>{{casetype.label}}</span>\n    </mat-list-option>\n  </mat-selection-list>\n</div>\n","import {Component, OnInit} from '@angular/core';\nimport {LiveAppsConfig} from '../../models/tc-liveapps-config';\nimport {ActivatedRoute} from '@angular/router';\nimport {GeneralConfig, Claim, Sandbox} from '@tibco-tcstk/tc-core-lib';\nimport {TcLiveAppsConfigService} from '../../services/tc-live-apps-config.service';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\n\n/**\n * Allow Selection of live apps applications (part of config)\n *\n * ![alt-text](../live-apps-settings.png \"\")\n *\n *@example <tcla-live-apps-settings></tcla-live-apps-settings>\n */\n@Component({\n  selector: 'tcla-live-apps-settings',\n  templateUrl: './live-apps-settings.component.html',\n  styleUrls: ['./live-apps-settings.component.css']\n})\nexport class LiveAppsSettingsComponent extends LiveAppsComponent implements OnInit {\n\n  LIVE_APPS_URL = '/apps/dt-app/index.html#/application-content/';\n\n  public sandboxId: number;\n  public selectedAppIds: string[];\n  public liveAppsConfig: LiveAppsConfig;\n  public generalConfig: GeneralConfig;\n  public claims: Claim;\n\n  constructor(protected route: ActivatedRoute, protected liveAppsConfigService: TcLiveAppsConfigService, protected snackBar: MatSnackBar) {\n    super();\n  }\n\n  protected getLiveAppsConfigService(): TcLiveAppsConfigService {\n    return this.liveAppsConfigService;\n  }\n\n  public handleAppIdSelection(appIds: string[]) {\n    console.log('Selected: ', appIds);\n    this.selectedAppIds = appIds;\n  }\n\n  public handleEditLiveAppClick = () => {\n    // window.open(this.LIVE_APPS_URL + applicationId);\n    // currently no public API to get the appId version for design time to populate the URL\n    window.open(this.LIVE_APPS_URL);\n  }\n\n  public ngOnInit() {\n    this.generalConfig = this.route.snapshot.data.laConfigHolder.generalConfig;\n    this.liveAppsConfig = this.route.snapshot.data.laConfigHolder.liveAppsConfig;\n    this.claims = this.route.snapshot.data.claims;\n    this.sandboxId = Number(this.claims.primaryProductionSandbox.id).valueOf();\n    this.selectedAppIds = this.liveAppsConfig.applicationIds;\n  }\n\n  public runSaveFunction = (): void => {\n    const liveAppsConfig = new LiveAppsConfig().deserialize({\n      applicationIds: this.selectedAppIds,\n      caseIconsFolderId: this.liveAppsConfig.caseIconsFolderId,\n      documentAppId: this.liveAppsConfig.documentAppId,\n      collaborationAppId: this.liveAppsConfig.documentAppId,\n      legacyCreators: this.liveAppsConfig.legacyCreators,\n      legacyActions: this.liveAppsConfig.legacyActions,\n      legacyWorkitems: this.liveAppsConfig.legacyWorkitems,\n      formsFramework: this.liveAppsConfig.formsFramework\n    });\n    this.liveAppsConfigService.updateLiveAppsConfig(this.sandboxId, this.generalConfig.uiAppId, liveAppsConfig, this.liveAppsConfig.id).subscribe(\n        result => {\n            this.snackBar.open('Live Apps App Selection Configuration settings saved', 'OK', {\n                duration: 3000\n            });\n        },\n        error => {\n            this.snackBar.open('Error saving Live Apps App Selection Configuration', 'OK', {\n                duration: 3000\n            });\n        }\n    );\n  }\n}\n\n","<div fxLayout=\"column\" class=\"tcs-live-apps-settings-pane\" fxFill>\n  <tc-tibco-cloud-widget-header style=\"height: 40px;\" [icon]=\"'tcs-capabilities'\" [headerText]=\"'Live Apps App Selection Configuration'\">\n</tc-tibco-cloud-widget-header>\n  <div fxFlex style=\"padding: 20px; height: 100%\" fxLayout=\"column\" fxFill>\n    <div fxLayout=\"row\" fxLayoutAlign=\"start start\" fxLayoutGap=\"5px\" style=\"height: 20px\">\n      <p>Choose the TIBCO Cloud Live Apps Applications to be used within this application:</p>\n      <mat-icon class=\"tcs-designer-link\" [svgIcon]=\"'tcs-application-edit'\" (click)=\"handleEditLiveAppClick()\" matTooltip=\"Open Live Apps Designer\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\"></mat-icon>\n    </div>\n    <tcla-live-apps-application-list class=\"tcs-app-selection-list-widget\" fxFlex=\"grow\" [sandboxId]=\"sandboxId\" [selectedAppIds]=\"selectedAppIds\" (appIdsSelected)=\"handleAppIdSelection($event)\"></tcla-live-apps-application-list>\n    <div fxFlex class=\"tcs-filler-panel\"></div>\n    <div fxLayout=\"column\" fxLayoutAlign=\"end end\" style=\"min-height: 50px\">\n      <button mat-raised-button color=\"primary\" (click)=\"runSaveFunction()\">Save</button>\n    </div>\n  </div>\n</div>\n","import { Component, OnInit } from '@angular/core';\nimport {LiveAppsSettingsComponent} from '../live-apps-settings/live-apps-settings.component';\nimport {CaseCardConfig} from '../../models/tc-case-card-config';\nimport { take, takeUntil} from 'rxjs/operators';\nimport {TcCaseCardConfigService} from '../../services/tc-case-card-config.service';\nimport {ActivatedRoute} from '@angular/router';\nimport {TcLiveAppsConfigService} from '../../services/tc-live-apps-config.service';\nimport {CaseType} from '../../models/liveappsdata';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\n\n/**\n * Configuration of summary cards\n *\n * ![alt-text](../live-apps-settings-summary-cards.png \"\")\n *\n *@example <tcla-live-apps-settings-summary-cards></tcla-live-apps-settings-summary-cards>\n */\n@Component({\n  selector: 'tcla-live-apps-settings-summary-cards',\n  templateUrl: './live-apps-settings-summary-cards.component.html',\n  styleUrls: ['./live-apps-settings-summary-cards.component.css']\n})\nexport class LiveAppsSettingsSummaryCardsComponent extends LiveAppsSettingsComponent {\n\n  public caseCardConfig: CaseCardConfig;\n  public selectedApp: CaseType;\n\n  constructor(protected caseCardConfigService: TcCaseCardConfigService, protected routeExt: ActivatedRoute, protected liveAppsConfigServiceExt: TcLiveAppsConfigService, protected snackBar: MatSnackBar) {\n    super(routeExt, liveAppsConfigServiceExt, snackBar);\n  }\n\n  public handleConfigChanged = (caseCardConfig: CaseCardConfig) => {\n    this.caseCardConfig = caseCardConfig;\n    console.log(caseCardConfig);\n  }\n\n  public handleAppSelection = (application: CaseType) => {\n    this.selectedApp = application;\n  }\n\n  public runSaveFunction = (): void => {\n    this.caseCardConfigService.updateCaseCardConfig(this.sandboxId, this.selectedApp.applicationId, this.generalConfig.uiAppId, this.caseCardConfig)\n      .pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      ).subscribe(\n          result => {\n              this.caseCardConfig = result;\n              this.snackBar.open('Summary cards settings saved', 'OK', {\n                  duration: 3000\n              });\n          },\n          error => {\n              this.snackBar.open('Error saving Summary Cards settings', 'OK', {\n                  duration: 3000\n              });\n              console.log('Unable to update case card config: ' + error.errorMsg);\n          }\n    );\n  }\n\n}\n","<div fxLayout=\"column\" class=\"tcs-live-apps-summary-cards-settings\" fxFill>\n  <tc-tibco-cloud-widget-header style=\"height: 40px;\" [icon]=\"'tcs-capabilities'\" [headerText]=\"'Live Apps Summary Card Configuration'\"></tc-tibco-cloud-widget-header>\n\n  <div style=\"padding: 20px 20px 20px 20px;\" fxLayout=\"column\" fxFlex>\n    <div class=\"tcs-card-config-widget-pane\" fxFlex fxLayout=\"column\" fxLayoutAlign=\"start stretch\">\n      <tcla-live-apps-app-configuration-widget fxFlex=\"grow\" [sandboxId]=\"sandboxId\" [appIds]=\"liveAppsConfig.applicationIds\" [uiAppId]=\"generalConfig.uiAppId\" [folderId]=\"liveAppsConfig.caseIconsFolderId\" (configChanged)=\"handleConfigChanged($event)\" (appSelected)=\"handleAppSelection($event)\"></tcla-live-apps-app-configuration-widget>\n    </div>\n    <div fxLayout=\"column\" fxLayoutAlign=\"end end\" style=\"min-height: 50px\">\n      <button mat-raised-button color=\"primary\" (click)=\"runSaveFunction()\" [disabled]=\"!caseCardConfig || !selectedApp\">Save</button>\n    </div>\n  </div>\n</div>\n","import {Component, OnInit} from '@angular/core';\nimport {LiveAppsConfig} from '../../models/tc-liveapps-config';\nimport {ActivatedRoute} from '@angular/router';\nimport {GeneralConfig, Claim, Sandbox} from '@tibco-tcstk/tc-core-lib';\nimport {TcLiveAppsConfigService} from '../../services/tc-live-apps-config.service';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {LiveAppsSettingsComponent} from '../live-apps-settings/live-apps-settings.component';\n\n/**\n * Allow Selection of live apps applications (part of config)\n *\n * ![alt-text](../live-apps-settings-recent-cases.png \"\")\n *\n *@example <tcla-live-apps-settings-recent-cases></tcla-live-apps-settings-recent-cases>\n */\n\n@Component({\n  selector: 'tcla-live-apps-settings-recent-cases',\n  templateUrl: './live-apps-settings-recent-cases.component.html',\n  styleUrls: ['./live-apps-settings-recent-cases.component.css']\n})\nexport class LiveAppsSettingsRecentCasesComponent extends LiveAppsSettingsComponent implements OnInit {\n\n  LIVE_APPS_URL = '/apps/dt-app/index.html#/application-content/';\n    \n  public excludeRecentIds: string[];\n\n  public handleExcludeRecentAppIdSelection(appIds: string[]) {\n    this.excludeRecentIds = appIds;\n  }\n\n  public ngOnInit() {\n    super.ngOnInit();\n    this.excludeRecentIds = this.liveAppsConfig.recentExcludedAppIds;\n  }\n\n  public runSaveFunction = (): void => {\n    const liveAppsConfig = new LiveAppsConfig().deserialize({\n      applicationIds: this.selectedAppIds,\n      recentExcludedAppIds: this.excludeRecentIds,\n      caseIconsFolderId: this.liveAppsConfig.caseIconsFolderId,\n      documentAppId: this.liveAppsConfig.documentAppId,\n      collaborationAppId: this.liveAppsConfig.documentAppId\n    });\n    // unable to use super.liveAppsConfigService\n    super.getLiveAppsConfigService().updateLiveAppsConfig(this.sandboxId, this.generalConfig.uiAppId, liveAppsConfig, this.liveAppsConfig.id).subscribe(\n        result => {\n            this.snackBar.open('Recent cases settings saved', 'OK', {\n                duration: 3000\n            });\n        },\n        error => {\n            this.snackBar.open('Error saving Recent cases settings', 'OK', {\n                duration: 3000\n            });\n        }\n    );\n  }\n}\n\n","<div fxLayout=\"column\" class=\"tcs-live-apps-settings-pane\" fxFill>\n  <tc-tibco-cloud-widget-header style=\"height: 40px;\" [icon]=\"'tcs-capabilities'\" [headerText]=\"'Live Apps Recent Cases Configuration'\">\n</tc-tibco-cloud-widget-header>\n  <div fxFlex style=\"padding: 20px;\" fxLayout=\"column\" fxFill>\n    <div fxLayout=\"row\" fxLayoutAlign=\"start start\" fxLayoutGap=\"5px\" style=\"height: 20px\">\n      <p>Select any TIBCO Cloud Live Apps Applications you wish to EXCLUDE from recent cases:</p>\n      <mat-icon class=\"tcs-designer-link\" [svgIcon]=\"'tcs-application-edit'\" (click)=\"handleEditLiveAppClick()\" matTooltip=\"Open Live Apps Designer\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\"></mat-icon>\n    </div>\n    <tcla-live-apps-application-list class=\"tcs-app-selection-list-widget\" fxFlex=\"grow\" [sandboxId]=\"sandboxId\" [selectedAppIds]=\"excludeRecentIds\" (appIdsSelected)=\"handleExcludeRecentAppIdSelection($event)\"></tcla-live-apps-application-list>\n    <div fxFlex class=\"tcs-filler-panel\"></div>\n    <div fxLayout=\"column\" fxLayoutAlign=\"end end\" style=\"min-height: 50px\">\n      <button mat-raised-button color=\"primary\" (click)=\"runSaveFunction()\">Save</button>\n    </div>\n  </div>\n</div>\n","import { Component, OnInit } from '@angular/core';\nimport { TibcoCloudSettingsGeneralComponent, RoleAttribute, TcGeneralConfigService, TibcoCloudNewElementComponent } from '@tibco-tcstk/tc-core-lib';\nimport { Groups, Roles } from '../../models/tc-groups-data';\nimport { ActivatedRoute } from '@angular/router';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { MatDialog } from '@angular/material/dialog';\n\n/**\n * Configuration of roles\n *\n * ![alt-text](../live-apps-settings-roles.png \"\")\n *\n *@example <tcla-live-apps-settings-roles></tcla-live-apps-settings-roles>\n */\n@Component({\n    selector: 'tcla-live-apps-settings-roles',\n    templateUrl: './live-apps-settings-roles.component.html',\n    styleUrls: ['./live-apps-settings-roles.component.css']\n})\nexport class LiveAppsSettingsRolesComponent extends TibcoCloudSettingsGeneralComponent implements OnInit {\n\n    public roles: Roles;\n    public groups: Groups;\n\n    public currentRole: RoleAttribute;\n\n    constructor(protected route: ActivatedRoute, protected generalConfigService: TcGeneralConfigService, protected snackBar: MatSnackBar, protected dialog: MatDialog) {\n        super(route, generalConfigService, snackBar);\n    }\n\n    ngOnInit() {\n        this.generalConfig = super.getRoute().snapshot.data.generalConfigHolder;\n        this.roles = super.getRoute().snapshot.data.allRoles;\n        this.groups = super.getRoute().snapshot.data.allGroups;\n        this.claims = super.getRoute().snapshot.data.claims;\n        this.sandboxId = Number(this.claims.primaryProductionSandbox.id).valueOf();\n    }\n\n    deleteRoleFunction = (): void => {\n        this.generalConfig.roles = this.generalConfig.roles.filter(element => element.id !== this.currentRole.id);\n        this.currentRole = undefined;\n    }\n\n    selectedRole = (role: RoleAttribute): void => {\n        this.currentRole = role;\n    }\n\n    createRoleFunction = (): void => {\n        const dialogRef = this.dialog.open(TibcoCloudNewElementComponent, {\n            panelClass: 'tcs-style-dialog',\n            data: { resourceType: 'Role' }\n\n        });\n\n        dialogRef.afterClosed().subscribe(result => {\n            if (result) {\n                const newRole = new RoleAttribute().deserialize({id: result.id, display: result.name, priority: 1 });\n                this.generalConfig.roles.push(newRole);\n            }\n        });\n    }\n}\n","<div fxLayout=\"column\" fxFill>\n    <tc-tibco-cloud-widget-header style=\"height: 40px;\" [icon]=\"'tcs-capabilities'\" [headerText]=\"'Role Configuration'\">\n    </tc-tibco-cloud-widget-header>\n    <div fxFlex style=\"padding: 20px; overflow: hidden\" fxLayout=\"column\">\n        <div style=\"overflow: auto;\">\n            <div fxLayout=\"column\" fxFlex>\n                <p>You can configure roles by here:</p>\n                <br>\n                <!-- Role specific -->\n                <mat-accordion>\n                    <mat-expansion-panel *ngFor=\"let role of generalConfig.roles\" (opened)=\"selectedRole(role)\">\n                        <mat-expansion-panel-header>\n                            <mat-panel-title>{{role.display}}</mat-panel-title>\n                        </mat-expansion-panel-header>\n                        <div fxLayout=\"column\">\n                            <div fxLayoutGap=\"10px\">\n                                <mat-form-field fxFlex=\"20\" style=\"min-width: 100px;\">\n                                    <input matInput placeholder=\"Id\" [(ngModel)]=\"role.id\" readonly>\n                                </mat-form-field>\n                                <mat-form-field fxFlex=\"40\" style=\"min-width: 400px;\">\n                                    <input matInput placeholder=\"Display Name\" [(ngModel)]=\"role.display\">\n                                </mat-form-field>\n                                <mat-form-field fxFlex=\"40\" style=\"min-width: 400px;\">\n                                    <mat-select [disableOptionCentering]=\"true\" placeholder=\"Live Apps Group\" [(value)]=\"role.group\" [disabled]=\"role.id === 'Administrator'\">\n                                        <mat-option *ngFor=\"let group of groups.groups\" [value]=\"group.name\">\n                                            <span matTooltip=\"{{group.description}}\" matTooltipShowDelay=\"1000\"\n                                                matTooltipPosition=\"below\">{{group.name}}</span>\n                                        </mat-option>\n                                    </mat-select>\n                                </mat-form-field>\n                            </div>\n                            <div fxLayoutGap=\"5px\">\n                                <mat-form-field fxFlex=\"20\">\n                                    <input matInput type=\"number\" min=\"0\" max=\"10\" placeholder=\"Priority\" [(ngModel)]=\"role.priority\">\n                                </mat-form-field>\n                            </div>\n                        </div>\n                    </mat-expansion-panel>\n                </mat-accordion>\n            </div>\n\n        </div>\n        <div fxFlex class=\"tcs-filler-panel\"></div>\n        <div fxLayout=\"row\" fxLayoutAlign=\"end end\" fxLayoutGap=\"10px\" style=\"min-height: 50px\">\n            <button mat-raised-button color=\"secondary\" [disabled]=\"!currentRole\"\n                (click)=\"deleteRoleFunction()\">Delete</button>\n            <button mat-raised-button color=\"secondary\" (click)=\"createRoleFunction()\">New</button>\n            <button mat-raised-button color=\"primary\" (click)=\"runSaveFunction()\">Save</button>\n        </div>\n    </div>\n</div>\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { RoleAttribute } from '@tibco-tcstk/tc-core-lib';\n\n/**\n * Switch roles\n *\n *@example <tcla-live-apps-role-switcher></tcla-live-apps-role-switcher>\n */\n\n@Component({\n    selector: 'tcla-live-apps-role-switcher',\n    templateUrl: './live-apps-role-switcher.component.html',\n    styleUrls: ['./live-apps-role-switcher.component.css']\n})\nexport class LiveAppsRoleSwitcherComponent implements OnInit {\n\n  /**\n   * Roles - The users current roles\n   */\n  @Input() roles: RoleAttribute[];\n\n  /**\n   * RoleAttribute - selected Role - check with MC\n   */\n  @Input() selectedRole: RoleAttribute;\n\n  /**\n   * ~event changeRoleEvent : Role selected\n   * ~payload RoleAttribute : RoleAttribute object emitted when role is c hanged by switcher\n   */\n  @Output() changeRoleEvent: EventEmitter<RoleAttribute> = new EventEmitter<RoleAttribute>();\n\n\n  constructor() { }\n\n    ngOnInit() {\n    }\n\n    public selectRole = (role: RoleAttribute) => {\n        this.changeRoleEvent.emit(role);\n    }\n\n    compareObjects = (o1: RoleAttribute, o2: RoleAttribute): boolean => {\n        return o1.id === o2.id;\n    }\n}\n","<div>\n    <mat-form-field>\n        <mat-label>Viewing as</mat-label>\n        <mat-select [(ngModel)]=\"selectedRole\" (selectionChange)=\"selectRole(selectedRole)\" [compareWith]=\"compareObjects\"> \n            <mat-option *ngFor=\"let role of roles\" [value]=\"role\">{{role.display}}</mat-option>\n        </mat-select>\n    </mat-form-field>\n</div>","import { Component, OnInit, Input, OnChanges, SimpleChanges, Output, EventEmitter } from '@angular/core';\nimport { LiveAppsService } from '../../services/live-apps.service';\nimport { map, takeUntil, take, tap } from 'rxjs/operators';\nimport { Process, CaseAction } from '../../models/liveappsdata';\nimport { LaProcessSelection } from '../../models/tc-case-processes';\nimport { LiveAppsCaseActionsComponent } from '../live-apps-case-actions/live-apps-case-actions.component';\n\n\n/**\n * Special (option list) rendering of LiveAppsCaseActionsComponent\n *\n *@example <tcla-live-apps-case-actions-list></tcla-live-apps-case-actions-list>\n */\n\n@Component({\n    selector: 'tcla-live-apps-case-actions-list',\n    templateUrl: './live-apps-case-actions-list.component.html',\n    styleUrls: ['./live-apps-case-actions-list.component.css']\n})\nexport class LiveAppsCaseActionsListComponent extends LiveAppsCaseActionsComponent implements OnInit, OnChanges {\n  /**\n   * Pre-select specified actionId\n   */\n  @Input() seletedActionId: string;\n\n  /**\n   * Use Form field rendering around the selection box\n   */\n  public formFieldRendering: boolean = false;\n  @Input('formFieldRendering') set FormFieldRendering(formFieldRendering: boolean) {\n    if (formFieldRendering){\n      this.formFieldRendering = formFieldRendering;\n    }\n  }\n\n  /**\n   * Label for the actions selector\n   */\n  public label: string = 'Case Actions';\n  @Input('label') set Label(label: string) {\n    if (label){\n      this.label = label;\n    }\n  }\n\n    caseActionList: Process[];\n    selectedAction: Process;\n\n    public refresh = () => {\n        // retrieve the schema for this case type so we can display case creators and case actions for this case type\n        this.liveapps.getCaseTypeSchema(this.sandboxId, this.appId, 100)\n        .subscribe(schema => {\n          // this.appSchema = schema;\n          schema.casetypes.forEach((casetype) => {\n              // the schema will contain definitions for both the 'case' and any defined types in that case.\n              // We want the schema for this 'case'.\n              if (casetype.applicationId === this.appId && casetype.id === this.typeId) {\n                if (casetype.jsonSchema !== undefined) {\n                  // this.caseType = casetype;\n                  this.caseActionList = casetype.actions ? casetype.actions : [];\n                  // if (this.caseActionList.length == 1) {\n                  //     this.selectProcess(this.caseActionList[0]);\n                  // }\n                } else {\n                  console.error('No schema returned for this case type: You may need to update/re-deploy the live apps application');\n                }\n              }\n            }\n          );\n        });\n    }\n\n    ngOnChanges(changes: SimpleChanges) {\n        if (changes.appId && (changes.appId.currentValue !== changes.appId.previousValue)) {\n            this.caseActionList = [];\n            this.refresh();\n        }\n    }\n\n    compareObjects = (o1: any, o2: any): boolean => {\n        return o1.id === this.seletedActionId;\n    }\n\n    public selectAction(action: CaseAction) {\n        this.caseProcessesService.getProcessDetails(this.caseRef, this.appId, this.typeId, this.sandboxId, action, null, 100).pipe(\n            take(1),\n            takeUntil(this._destroyed$),\n            tap(processDetails => {\n                if (!processDetails || !processDetails.process) {\n                    // This will be triggered when no form schema is available\n                    // Typically happens when:\n                    // 1) The form has elements that are not supported by the Live Apps API for form schemas such as participant selectors\n                    // 2) The Live Apps application is legacy and has no form schema at all, redeploying the live apps application would fix this.\n                    console.error('No schema available for this case type: The form may not be supported or you may need to update/re-deploy the live apps application');\n                }\n            }\n            )\n        )\n            .subscribe(processSchema => {\n              this.actionClicked.emit(processSchema);\n              return processSchema;\n            }, error => { this.errorMessage = 'Error retrieving case actions: ' + error.error.errorMsg; });\n    }\n}\n","<div *ngIf=\"!formFieldRendering\" fxFlex style=\"margin-left: 10px;\">\n    <mat-select class=\"tcs-action-selector-option\" [disableOptionCentering]=\"true\" [(ngModel)]=\"selectedAction\" [compareWith]=\"compareObjects\"\n        placeholder=\"{{label}}\" >\n        <mat-option *ngFor=\"let action of caseActionList\" [value]=\"action\" (click)=\"selectAction(action)\">\n            <span>{{action.name}}</span>\n        </mat-option>\n    </mat-select>\n</div>\n<div *ngIf=\"formFieldRendering\" fxFlex>\n  <mat-form-field style=\"width:100%\" class=\"tcs-action-selector-option-ff\">\n    <mat-label>{{label}}</mat-label>\n    <mat-select class=\"tcs-action-selector-option-formfield\" [disableOptionCentering]=\"true\" [(ngModel)]=\"selectedAction\" [compareWith]=\"compareObjects\"\n                placeholder=\"{{label}}\" >\n      <mat-option *ngFor=\"let action of caseActionList\" [value]=\"action\" (click)=\"selectAction(action)\">\n        <span>{{action.name}}</span>\n      </mat-option>\n    </mat-select>\n  </mat-form-field>\n</div>\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { LandingPageItemConfig, TcGeneralLandingPageService, ActionButtonConfig, RouteAction } from '@tibco-tcstk/tc-core-lib';\nimport { Router } from '@angular/router';\n\n/**\n * Landing page\n *\n * This component allows a configurable landing page on a per role basis\n *\n * @example <tcla-live-apps-landing-page></tcla-live-apps-landing-page>\n */\n@Component({\n    selector: 'tcla-live-apps-landing-page',\n    templateUrl: './live-apps-landing-page.component.html',\n    styleUrls: ['./live-apps-landing-page.component.css']\n})\nexport class LiveAppsLandingPageComponent implements OnInit {\n\n    @Input() uiAppId: string;\n    @Input() roleId: string;\n    @Output() getStartedEvent: EventEmitter<RouteAction> = new EventEmitter<RouteAction>();\n\n    public title: string;\n    public subtitle: string;\n    public backgroundImage: string;\n    public topMargin: string;\n    public highlights: LandingPageItemConfig[];\n    public actionButtons: ActionButtonConfig[];\n\n    public navigateURL: string;\n\n    constructor(\n        private router: Router,\n        private landingPageService: TcGeneralLandingPageService\n    ) { }\n\n    ngOnInit() {\n\n        this.landingPageService.getLandingPageForRole(this.roleId, this.uiAppId).subscribe(\n            landingPage => {\n                if (landingPage !== undefined) {\n                    this.title = landingPage.title;\n                    this.subtitle = landingPage.subtitle;\n                    this.backgroundImage = (landingPage.backgroundURL !== '' ? '/webresource/orgFolders/' + this.uiAppId + '/background/' + landingPage.backgroundURL : '');\n                    this.topMargin = landingPage.topMargin ? landingPage.topMargin + 'px' : '0px';\n                    this.highlights = new Array();\n                    this.highlights.push(new LandingPageItemConfig().deserialize({\n                        title: landingPage.highlights[0].title,\n                        content: landingPage.highlights[0].content,\n                        iconURL: landingPage.highlights[0].iconURL\n                    }));\n\n                    this.highlights.push(new LandingPageItemConfig().deserialize({\n                        title: landingPage.highlights[1].title,\n                        content: landingPage.highlights[1].content,\n                        iconURL: landingPage.highlights[1].iconURL\n                    }));\n\n                    this.highlights.push(new LandingPageItemConfig().deserialize({\n                        title: landingPage.highlights[2].title,\n                        content: landingPage.highlights[2].content,\n                        iconURL: landingPage.highlights[2].iconURL\n                    }));\n\n                    this.actionButtons = new Array();\n                    this.actionButtons.push(new ActionButtonConfig().deserialize({text: 'Get started', route: landingPage.homeRoute}));\n\n                    this.navigateURL = landingPage.homeRoute;\n                } else {\n                    this.router.navigate(['errorHandler/NO_LANDING/NO_LANDING']);\n                }\n            }\n        );\n    }\n\n    public getStartedClick = (route: RouteAction): void => {\n        this.getStartedEvent.emit(route);\n    }\n\n}\n","<tc-tibco-cloud-splash-screen fxFill\n    [title]=\"title\" \n    [subTitle]=\"subtitle\" \n    [backGroundImage]=\"backgroundImage\"\n    [topMargin]=\"topMargin\"\n    [highlights]=\"highlights\"\n    [actionButtons]=\"actionButtons\"\n    (getStartedEvent)=\"getStartedClick($event)\">\n</tc-tibco-cloud-splash-screen>","import { Injectable } from '@angular/core';\nimport { RouteAccessControlConfig } from '../models/tc-groups-data';\nimport { TcCoreCommonFunctions, TcSharedStateService, SharedStateContent, SharedStateEntry, SharedStateList } from '@tibco-tcstk/tc-core-lib';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable } from 'rxjs';\nimport {flatMap, map} from 'rxjs/operators';\nimport { Location } from '@angular/common';\n\n@Injectable({\n    providedIn: 'root'\n})\nexport class TcAccessControlService {\n\n    constructor(\n        private http: HttpClient,\n        private location: Location,\n        private sharedStateService: TcSharedStateService\n    ) { }\n\n    public createLAccessControlConfig(sandboxId: number, uiAppId: string, accessControlConfig: RouteAccessControlConfig) {\n        const ssName = uiAppId + '.accesscontrol.config.tibcolabs.client.context.PUBLIC';\n        const content: SharedStateContent = new SharedStateContent();\n        content.json = TcCoreCommonFunctions.escapeString(JSON.stringify(accessControlConfig));\n\n        return this.sharedStateService.createSharedState(ssName, 'PUBLIC', '', sandboxId, undefined, undefined, undefined, content)\n            .pipe(\n                map(value => value)\n            );\n    }\n\n    public getAccessControlConfig(uiAppId: string, useCache: boolean, flushCache: boolean): Observable<RouteAccessControlConfig> {\n        // if useCache is false this will trigger the service to update the cached version with latest\n        const ssName = uiAppId + '.accesscontrol.config.tibcolabs.client.context.PUBLIC';\n\n        return this.sharedStateService.getSharedState(ssName, 'PUBLIC', useCache, flushCache)\n            .pipe(\n                map(value => {\n                    if (value.sharedStateEntries.length > 0) {\n                        const ssresult = new RouteAccessControlConfig().deserialize(JSON.parse(value.sharedStateEntries[0].content.json));\n                        ssresult.id = value.sharedStateEntries[0].id;\n                        return ssresult;\n                    } else {\n                        return undefined;\n                    }\n                }\n                )\n            );\n    }\n\n    public updateAccessControlConfig(sandboxId: number, uiAppId: string, accessControlConfig: RouteAccessControlConfig, id: string) {\n        const ssName = uiAppId + '.accesscontrol.config.tibcolabs.client.context.PUBLIC';\n        const content: SharedStateContent = new SharedStateContent();\n        content.json = TcCoreCommonFunctions.escapeString(JSON.stringify(accessControlConfig));\n        const entry: SharedStateEntry = new SharedStateEntry();\n        entry.content = content;\n        entry.sandboxId = sandboxId;\n        entry.name = ssName;\n        entry.type = 'PUBLIC';\n        entry.id = id;\n        const ssList: SharedStateList = new SharedStateList();\n        ssList.sharedStateEntries = [];\n        ssList.sharedStateEntries.push(entry);\n\n        return this.sharedStateService.updateSharedState(ssList.sharedStateEntries)\n            .pipe(\n                flatMap(value => {\n                    // flush the cache and return value\n                    return this.getAccessControlConfig(uiAppId, true, true);\n                    // return new RouteAccessControlConfig().deserialize((JSON.parse(value.sharedStateEntries[0].content.json)));\n                })\n            );\n    }\n}\n\n","import { Injectable } from '@angular/core';\nimport { Resolve } from '@angular/router';\nimport { Observable, forkJoin, of } from 'rxjs';\nimport {\n    TcSharedStateService, TcGeneralConfigService, TcCoreCommonFunctions, UiAppIdConfig,\n} from '@tibco-tcstk/tc-core-lib';\nimport { map, switchMap, mergeMap, flatMap } from 'rxjs/operators';\nimport { RouteAccessControlConfig } from '../models/tc-groups-data';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Location } from '@angular/common';\nimport { RoleActiveResolver } from './role-active.resolver';\nimport { TcAccessControlService } from '../services/tc-access-control.service';\nimport { LiveAppsService } from '../services/live-apps.service';\nimport { TcRolesService } from '../services/tc-roles-service.ts.service';\n\n@Injectable()\nexport class AccessControlConfigurationResolver implements Resolve<Observable<RouteAccessControlConfig>> {\n\n    DEFAULT_CONFIG_URL = 'assets/config/routeAccessControl.json';\n    APP_ID_URL = TcCoreCommonFunctions.prepareUrlForStaticResource(this.location, 'assets/config/uiAppId.json');\n\n    private sandboxId: number;\n    public defaultAccessControlConfig: RouteAccessControlConfig;\n    private uiAppId: string;\n\n    constructor(\n        private location: Location,\n        private http: HttpClient,\n        private accessControlService: TcAccessControlService\n    ) { }\n\n    // can be used to load defaultAppConfig from a JSON config\n    private getDefaultAppConfig = () => {\n        return this.http.get(TcCoreCommonFunctions.prepareUrlForStaticResource(this.location, this.DEFAULT_CONFIG_URL), { withCredentials: true });\n    }\n\n    // loads uiAppId from json file in assets (appId.json)\n    private getAppId = (): Observable<UiAppIdConfig> => {\n        const headers = new HttpHeaders().set('cacheResponse', 'true');\n        return this.http.get(this.APP_ID_URL, { headers: headers, withCredentials: true }).pipe(\n            map(uiAppId => {\n                const uiAppIdConfig = new UiAppIdConfig().deserialize(uiAppId);\n                this.uiAppId = uiAppIdConfig.uiAppId;\n                return uiAppIdConfig;\n            }\n            )\n        );\n    }\n\n    resolve(): Observable<RouteAccessControlConfig> {\n        const accessConfig$ = this.getAppId().pipe(\n            switchMap(uiAppId => this.accessControlService.getAccessControlConfig(uiAppId.uiAppId, true, false)\n                .pipe(\n                    mergeMap(\n                        accessControlConfig => {\n                            if (accessControlConfig === undefined) {\n                                return this.getDefaultAppConfig().pipe(\n                                    flatMap(config => {\n                                        this.defaultAccessControlConfig = new RouteAccessControlConfig().deserialize(config);\n                                        this.defaultAccessControlConfig.uiAppId = this.uiAppId;\n                                        return this.accessControlService.createLAccessControlConfig(\n                                            this.sandboxId,\n                                            this.uiAppId,\n                                            this.defaultAccessControlConfig)\n                                            .pipe(\n                                                flatMap(\n                                                    result => {\n                                                        const newAppConfig = this.defaultAccessControlConfig;\n                                                        newAppConfig.id = result;\n                                                        return this.accessControlService.updateAccessControlConfig(\n                                                            this.sandboxId,\n                                                            this.uiAppId,\n                                                            newAppConfig,\n                                                            result).pipe(\n                                                                flatMap(\n                                                                    // trigger a read to flush the cache since we changed it\n                                                                    updatedConf => {\n                                                                        return this.accessControlService.getAccessControlConfig(this.uiAppId, true, true).pipe(\n                                                                            map(\n                                                                                cachedConfig => {\n                                                                                    return cachedConfig;\n                                                                                }\n                                                                            )\n                                                                        );\n\n                                                                    }\n                                                                )\n                                                            );\n                                                        // return newAppConfig;\n                                                    })\n                                            );\n                                    })\n                                );\n                            } else {\n                                return of(accessControlConfig);\n                            }\n                        }\n                    )\n                )\n            )\n        )\n        return accessConfig$;\n    }\n\n}\n","import {Injectable} from '@angular/core';\nimport {Resolve, Router} from '@angular/router';\nimport {forkJoin, Observable, of} from 'rxjs';\nimport {LiveAppsService} from '../services/live-apps.service';\nimport {Claim, GeneralConfigResolver, RoleAttribute, TcGeneralConfigService, TcSharedStateService} from '@tibco-tcstk/tc-core-lib';\nimport {flatMap, map, mergeMap, switchMap} from 'rxjs/operators';\nimport {Group, Groups, Roles} from '../models/tc-groups-data';\nimport {HttpClient} from '@angular/common/http';\nimport {TcCaseCardConfigService} from '../services/tc-case-card-config.service';\nimport {Location} from '@angular/common';\nimport {ClaimsResolver} from './claims.resolver';\nimport {group} from '@angular/animations';\nimport {TcAppDefinitionService} from '../services/tc-app-definition.service';\n\n@Injectable()\nexport class RolesResolver implements Resolve<Observable<Roles>> {\n\n  constructor(private sharedStateService: TcSharedStateService, private generalConfigService: TcGeneralConfigService, private http: HttpClient, private liveapps: LiveAppsService, private appDefinitionService: TcAppDefinitionService, private location: Location, private router: Router) {\n  }\n\n  resolve(): Observable<Roles> {\n\n    // we will need the general config to understand the roles definition\n    const generalConfigResolver = new GeneralConfigResolver(this.sharedStateService, this.generalConfigService, this.http, this.location, this.router);\n\n    // aim is to return an object that only contains roles where the user is a member of the matching group\n\n    const claims = this.appDefinitionService.claims;\n    const sandboxId = this.appDefinitionService.sandboxId;\n    generalConfigResolver.setSandbox(sandboxId);\n    const generalConfig$ = generalConfigResolver.resolve();\n    const groups$ = this.liveapps.getGroupMemberships(sandboxId, claims.id, 1000, true);\n    return forkJoin(generalConfig$, groups$).pipe(\n      map(([configData, groupData]) => {\n        return this.createRoles(groupData.groups, configData.roles);\n      }));\n  }\n\n  private createRoles = (groups: Group[], roles: RoleAttribute[]): Roles => {\n    const calcRoles: RoleAttribute[] = [];\n    roles.forEach(role => {\n      const targetGroup = groups.find(grp => {\n          return (grp.name === role.group);\n        }\n      );\n      if (targetGroup) {\n        calcRoles.push(role);\n      }\n    });\n    return new Roles().deserialize(new Roles().deserialize({roles: calcRoles}));\n  };\n}\n","import { Injectable } from '@angular/core';\nimport {Resolve, Router} from '@angular/router';\nimport { Observable, of } from 'rxjs';\nimport { LiveAppsService } from '../services/live-apps.service';\nimport { RoleAttribute, TcGeneralConfigService, TcSharedStateService } from '@tibco-tcstk/tc-core-lib';\nimport { map} from 'rxjs/operators';\nimport { HttpClient } from '@angular/common/http';\nimport { Location } from '@angular/common';\nimport { TcRolesService } from '../services/tc-roles-service.ts.service';\nimport {RolesResolver} from './roles.resolver';\nimport {TcAppDefinitionService} from '../services/tc-app-definition.service';\n\n@Injectable()\nexport class RoleActiveResolver implements Resolve<Observable<RoleAttribute>> {\n\n    constructor(\n        private rolesService: TcRolesService,\n        private liveAppsService: LiveAppsService,\n        private tcSharedStateService: TcSharedStateService,\n        private generalConfigService: TcGeneralConfigService,\n        private appDefinitionService: TcAppDefinitionService,\n        private httpClient: HttpClient,\n        private location: Location,\n        private router: Router) {\n    }\n\n    resolve(): Observable<RoleAttribute> {\n\n        const currentRole = this.rolesService.getCurrentRole();\n\n        if (currentRole === undefined) {\n          const roleResolver$ = new RolesResolver(this.tcSharedStateService, this.generalConfigService, this.httpClient, this.liveAppsService, this.appDefinitionService, this.location, this.router);\n          return roleResolver$.resolve().pipe(\n                map(roles => {\n                  const highestRole = roles.roles.reduce(function (prev, current) {\n                    return (prev.priority > current.priority) ? prev : current;\n                  });\n                  this.rolesService.setCurrentRole(highestRole);\n                  return highestRole;\n                })\n              );\n         } else {\n            return of(currentRole);\n        }\n    }\n}\n","import { Injectable } from '@angular/core';\nimport {Resolve, ActivatedRoute, Router} from '@angular/router';\nimport { Observable, forkJoin } from 'rxjs';\nimport { RouteAccessControlConfigurationElement } from '../models/tc-groups-data';\nimport { HttpClient } from '@angular/common/http';\nimport { Location } from '@angular/common';\nimport { TcAccessControlService } from '../services/tc-access-control.service';\nimport { AccessControlConfigurationResolver } from './accessControlConfiguration.resolver';\nimport { map } from 'rxjs/operators';\nimport { TcRolesService } from '../services/tc-roles-service.ts.service';\nimport { TcSharedStateService, TcGeneralConfigService } from '@tibco-tcstk/tc-core-lib';\nimport { LiveAppsService } from '../services/live-apps.service';\nimport { RoleActiveResolver } from './role-active.resolver';\nimport {TcAppDefinitionService} from '../services/tc-app-definition.service';\n\n@Injectable()\nexport class AccessResolver implements Resolve<Observable<RouteAccessControlConfigurationElement>> {\n\n    constructor(\n        private location: Location,\n        private http: HttpClient,\n        private accessControlService: TcAccessControlService,\n        private rolesService: TcRolesService,\n        private liveapps: LiveAppsService,\n        private appDefinitionService: TcAppDefinitionService,\n        private route: ActivatedRoute,\n        private sharedStateService: TcSharedStateService,\n        private generalConfigService: TcGeneralConfigService,\n        private router: Router\n    ) { }\n\n    resolve(): Observable<RouteAccessControlConfigurationElement> {\n\n        const accessControlConfiguration$ = new AccessControlConfigurationResolver(this.location, this.http, this.accessControlService).resolve();\n\n        // we will need the active user role\n        const activeRoleRes = new RoleActiveResolver(this.rolesService, this.liveapps, this.sharedStateService, this.generalConfigService, this.appDefinitionService, this.http, this.location, this.router);\n        const activeRole$ = activeRoleRes.resolve();\n\n        // run both in parallel then check access\n        const accessControl$ = forkJoin(accessControlConfiguration$, activeRole$).pipe(\n            map(([accessConfig, activeRole]) => {\n                return accessConfig.configuration.find(element => element.roleId === activeRole.id);\n            })\n        );\n\n        return accessControl$;\n    }\n\n}\n","// This guard is to check whether the user has appropriate role to access a route based on config settings\n\nimport { Injectable } from '@angular/core';\nimport {CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, ActivatedRoute, Router} from '@angular/router';\nimport { LiveAppsService } from '../services/live-apps.service';\nimport { HttpClient } from '@angular/common/http';\nimport { map } from 'rxjs/operators';\nimport { forkJoin, Observable } from 'rxjs';\nimport { TcCoreCommonFunctions, TcGeneralConfigService, TcSharedStateService } from '@tibco-tcstk/tc-core-lib';\nimport { Location } from '@angular/common';\nimport { TcRolesService } from '../services/tc-roles-service.ts.service';\nimport { TcAccessControlService } from '../services/tc-access-control.service';\nimport { AccessControlConfigurationResolver } from '../resolvers/accessControlConfiguration.resolver';\nimport { AccessResolver } from '../resolvers/access.resolver';\nimport {TcAppDefinitionService} from '../services/tc-app-definition.service';\n\n@Injectable()\nexport class RoleGuard implements CanActivate {\n\n    DEFAULT_CONFIG_URL = TcCoreCommonFunctions.prepareUrlForStaticResource(this.location, 'assets/config/routeAccessControl.json');\n\n    constructor(\n        private liveapps: LiveAppsService,\n        private rolesService: TcRolesService,\n        private http: HttpClient,\n        private location: Location,\n        private route: ActivatedRoute,\n        private sharedStateService: TcSharedStateService,\n        private generalConfigService: TcGeneralConfigService,\n        private accessControlService: TcAccessControlService,\n        private appDefinitionService: TcAppDefinitionService,\n        private router: Router\n    ) {}\n\n    canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {\n\n        let guardRoute = '';\n        route.pathFromRoot.map(element => {\n            if (element.url.length === 1) {\n                guardRoute += '/' + element.url[0];\n            }\n        })\n\n        // we will need the active user role\n        const activeResolver$ = new AccessResolver(this.location, this.http, this.accessControlService, this.rolesService, this.liveapps, this.appDefinitionService, this.route, this.sharedStateService, this.generalConfigService, this.router).resolve();\n\n        // access control configuration to check current URL is on allowedRoutes\n        const accessControlConfig$ = new AccessControlConfigurationResolver(this.location, this.http, this.accessControlService).resolve();\n\n        // run both in parallel then check access\n        return forkJoin(activeResolver$, accessControlConfig$).pipe(\n            map(([activeResolver, accessControlConfig]) => {\n\n                // if guardRoute is not in allowedRoutes then OK\n                if (accessControlConfig.allowedRoutes.indexOf(guardRoute) === -1) {\n                    return true;\n                }\n\n                // Check guardRoute in active user role routes\n                if (activeResolver.routes.indexOf(guardRoute) > -1){\n                    return true;\n                } else {\n                    return false;\n                }\n            })\n        );\n    }\n\n}\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { RouteAccessControlConfig, RouteAccessControlConfigurationElement, Roles } from '../../models/tc-groups-data';\nimport { TcAccessControlService } from '../../services/tc-access-control.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\n@Component({\n    selector: 'tcla-live-apps-settings-access-control',\n    templateUrl: './live-apps-settings-access-control.component.html',\n    styleUrls: ['./live-apps-settings-access-control.component.css']\n})\nexport class LiveAppsSettingsAccessControlComponent implements OnInit {\n    displayedColumns: string[] = [];\n    dataSource = [];\n\n    private accessControlConfiguration: RouteAccessControlConfig;\n     allRoles: Roles;\n\n    isGroup(index, item): boolean {\n        return item.isGroupBy;\n    }\n\n    constructor(\n        private route: ActivatedRoute,\n        private accessControlService: TcAccessControlService,\n        private snackBar: MatSnackBar\n    ) { }\n\n    ngOnInit() {\n        this.accessControlConfiguration = this.route.snapshot.data.accessControlConfigHolder;\n        this.allRoles = this.route.snapshot.data.allRoles;\n        this.generateTables();\n    }\n\n    runSaveFunction() {\n        this.accessControlConfiguration.configuration = [];\n        for (const role of this.allRoles.roles){\n            let userConfiguration = this.dataSource.filter(entry => entry[role.id]);\n            let routes = userConfiguration.filter(row => row.type === 'route').map(element => element.name);\n            let buttonIds = userConfiguration.filter(row => row.type === 'button').map(element => element.name);\n            this.accessControlConfiguration.configuration.push(\n                new RouteAccessControlConfigurationElement().deserialize({'roleId': role.id, routes: routes, buttonIds: buttonIds})\n            )\n        }\n\n        this.accessControlService.updateAccessControlConfig(Number(this.route.snapshot.data.claims.primaryProductionSandbox.id).valueOf(), this.accessControlConfiguration.uiAppId, this.accessControlConfiguration, this.accessControlConfiguration.id).subscribe(\n            result => {\n                this.snackBar.open('Access Control configuration saved', 'OK', {\n                    duration: 3000\n                });\n            },\n            error => {\n                this.snackBar.open('Error saving Access Control configuration saved', 'OK', {\n                    duration: 3000\n                });\n            }\n        );\n\n\n\n\n    }\n\n    private generateTables = (): void => {\n        this.displayedColumns = ['name']; \n        this.allRoles.roles.forEach(role => {\n            this.displayedColumns.push(role.id);\n        });\n\n        // Create in dataSource all rows with the appropriate order\n        this.dataSource.push({ initial: 'Routes', isGroupBy: true });\n        this.accessControlConfiguration.allowedRoutes.forEach(route => this.dataSource.push({name: route, type: 'route'}));\n        \n        this.dataSource.push({ initial: 'Buttons', isGroupBy: true });\n        this.accessControlConfiguration.allowedButtonIds.forEach(buttonId => this.dataSource.push({ name: buttonId, type: 'button' }));\n\n        // Update the dataSource with the previous configuration\n        this.accessControlConfiguration.configuration.forEach(configElement => {\n            // Routes\n            configElement.routes.forEach(configRoute => {\n                let row = this.dataSource.filter(entry => entry.name === configRoute)[0];\n                row[configElement.roleId] = true;\n            })\n\n            // ButtonsIds\n            configElement.buttonIds.forEach(configRoute => {\n                let row = this.dataSource.filter(entry => entry.name === configRoute)[0];\n                row[configElement.roleId] = true;\n            })\n        });\n\n    }\n\n    public isSelected = (row, role): boolean => {\n        return row[role];\n    }\n\n    public toggle = (row, role: string) => {\n        let dsRow = this.dataSource.filter(entry => entry.name === row.name)[0];\n\n        if (dsRow[role]) {\n            delete dsRow[role];\n        } else {\n            dsRow[role] = true;\n        }\n    }\n}\n","<div fxLayout=\"column\" fxFill>\n  <tc-tibco-cloud-widget-header style=\"height: 40px;\" [icon]=\"'tcs-capabilities'\"\n                                [headerText]=\"'Access Control Configuration'\">\n  </tc-tibco-cloud-widget-header>\n  <div fxFlex style=\"padding: 20px; overflow: hidden\" fxLayout=\"column\">\n    <div style=\"overflow: auto;\" fxFlex fxLayout=\"column\">\n      <div fxLayout=\"column\">\n        <p>You can configure roles by here:</p>\n        <br>\n        <table fxFlex mat-table [dataSource]=\"dataSource\" class=\"mat-elevation-z8\">\n\n          <!-- Name Column -->\n          <ng-container matColumnDef=\"name\">\n            <th mat-header-cell *matHeaderCellDef></th>\n            <td mat-cell *matCellDef=\"let element\"> {{element.name}} </td>\n          </ng-container>\n\n          <ng-container *ngFor=\"let role of allRoles.roles\" matColumnDef=\"{{role.id}}\">\n            <th mat-header-cell *matHeaderCellDef [ngClass]=\"'centered-cell'\">{{role.id}}</th>\n            <td mat-cell [ngClass]=\"'centered-cell'\" *matCellDef=\"let row\">\n              <!-- (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\" -->\n              <mat-checkbox [disabled]=\"(row.type === 'button' && row.name === 'configure') || (row.type === 'route' && row.name === '/starterApp/configuration') \"\n                            (click)=\"$event.stopPropagation()\" [checked]=\"isSelected(row, role.id)\"\n                            (change)=\"$event ? toggle(row, role.id) : null\"\n              ></mat-checkbox>\n            </td>\n          </ng-container>\n\n          <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n          <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n\n          <!-- Group header -->\n          <ng-container matColumnDef=\"groupHeader\">\n            <td colspan=\"999\" mat-cell *matCellDef=\"let groupBy\"><strong>{{groupBy.initial}}</strong></td>\n          </ng-container>\n\n          <tr mat-row *matRowDef=\"let row; columns: ['groupHeader']; when: isGroup\"></tr>\n\n        </table>\n      </div>\n      <div fxFlex class=\"tcs-filler-panel\"></div>\n      <div fxLayout=\"row\" fxLayoutAlign=\"end end\" fxLayoutGap=\"10px\" style=\"min-height: 50px\">\n        <button mat-raised-button color=\"primary\" (click)=\"runSaveFunction()\">Save</button>\n      </div>\n    </div>\n  </div>\n</div>\n","import {Component, OnInit} from '@angular/core';\nimport {LiveAppsConfig} from '../../models/tc-liveapps-config';\nimport {ActivatedRoute} from '@angular/router';\nimport {GeneralConfig, Claim, Sandbox} from '@tibco-tcstk/tc-core-lib';\nimport {TcLiveAppsConfigService} from '../../services/tc-live-apps-config.service';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\n\n/**\n * Configuration of forms\n *\n * ![alt-text](../live-apps-settings-forms.png \"\")\n *\n *@example <tcla-live-apps-settings-forms></tcla-live-apps-settings-forms>\n */\n@Component({\n  selector: 'tcla-live-apps-settings-forms',\n  templateUrl: './live-apps-settings-forms.component.html',\n  styleUrls: ['./live-apps-settings-forms.component.css']\n})\nexport class LiveAppsSettingsFormsComponent extends LiveAppsComponent implements OnInit {\n\n  public sandboxId: number;\n  public selectedAppIds: string[];\n  public liveAppsConfig: LiveAppsConfig;\n  public generalConfig: GeneralConfig;\n  public claims: Claim;\n\n  constructor(protected route: ActivatedRoute, protected liveAppsConfigService: TcLiveAppsConfigService, protected snackBar: MatSnackBar) {\n    super();\n  }\n\n  protected getLiveAppsConfigService(): TcLiveAppsConfigService {\n    return this.liveAppsConfigService;\n  }\n\n  public handleAppIdSelection(appIds: string[]) {\n    console.log('Selected: ', appIds);\n    this.selectedAppIds = appIds;\n  }\n\n  public ngOnInit() {\n    this.generalConfig = this.route.snapshot.data.laConfigHolder.generalConfig;\n    this.liveAppsConfig = this.route.snapshot.data.laConfigHolder.liveAppsConfig;\n    this.claims = this.route.snapshot.data.claims;\n    this.sandboxId = Number(this.claims.primaryProductionSandbox.id).valueOf();\n    this.selectedAppIds = this.liveAppsConfig.applicationIds;\n  }\n\n  public runSaveFunction = (): void => {\n    const liveAppsConfig = new LiveAppsConfig().deserialize({\n      applicationIds: this.selectedAppIds,\n      caseIconsFolderId: this.liveAppsConfig.caseIconsFolderId,\n      documentAppId: this.liveAppsConfig.documentAppId,\n      collaborationAppId: this.liveAppsConfig.documentAppId,\n      legacyCreators: this.liveAppsConfig.legacyCreators,\n      legacyActions: this.liveAppsConfig.legacyActions,\n      legacyWorkitems: this.liveAppsConfig.legacyWorkitems,\n      formsFramework: this.liveAppsConfig.formsFramework\n    });\n    this.liveAppsConfigService.updateLiveAppsConfig(this.sandboxId, this.generalConfig.uiAppId, liveAppsConfig, this.liveAppsConfig.id).subscribe(\n      result => {\n        this.snackBar.open('Live Apps form configuration settings saved', 'OK', {\n          duration: 3000\n        });\n      },\n      error => {\n        this.snackBar.open('Error saving forms configuration', 'OK', {\n          duration: 3000\n        });\n      }\n    );\n  }\n}\n","<div fxLayout=\"column\" class=\"tcs-live-apps-settings-pane\" fxFill>\n  <tc-tibco-cloud-widget-header style=\"height: 40px;\" [icon]=\"'tcs-capabilities'\" [headerText]=\"'Live Apps Form Configuration'\">\n  </tc-tibco-cloud-widget-header>\n  <div fxFlex style=\"padding: 20px;\" fxLayout=\"column\">\n    <div fxLayout=\"row\" fxLayoutAlign=\"start start\" fxLayoutGap=\"5px\" style=\"height: 20px\">\n      <p class=\"tcs-settings-text\">Select framework for generated forms (only applies when NOT using legacy or custom forms):</p>\n    </div>\n    <div fxLayout=\"column\" style=\"padding: 10px;\">\n      <mat-radio-group [(ngModel)]=\"liveAppsConfig.formsFramework\" fxLayout=\"column\">\n        <mat-radio-button class=\"tcs-radio-label-content\" value=\"material-design\">Material Design</mat-radio-button>\n        <mat-radio-button class=\"tcs-radio-label-content\" value=\"bootstrap-4\">Bootstrap 4</mat-radio-button>\n      </mat-radio-group>\n    </div>\n    <div fxLayout=\"row\" fxLayoutAlign=\"start start\" fxLayoutGap=\"5px\" style=\"height: 20px\">\n      <p class=\"tcs-settings-text\">Select whether to use Live Apps Case Manager Forms for this application:</p>\n    </div>\n    <div fxLayout=\"column\" style=\"padding: 10px;\">\n      <div>\n        <p class=\"tcs-settings-text\">Use Live Apps generated forms for:</p>\n      </div>\n      <mat-checkbox [(ngModel)]=\"liveAppsConfig.legacyCreators\">\n        <mat-label class=\"tcs-checkbox-label\">Creators</mat-label>\n      </mat-checkbox>\n      <mat-checkbox [(ngModel)]=\"liveAppsConfig.legacyActions\">\n        <mat-label class=\"tcs-checkbox-label\">Actions</mat-label>\n      </mat-checkbox>\n      <mat-checkbox [(ngModel)]=\"liveAppsConfig.legacyWorkitems\">\n        <mat-label class=\"tcs-checkbox-label\">Workitems</mat-label>\n      </mat-checkbox>\n    </div>\n    <div fxFlex class=\"tcs-filler-panel\"></div>\n    <div fxLayout=\"column\" fxLayoutAlign=\"end end\" style=\"min-height: 50px\">\n      <button mat-raised-button color=\"primary\" (click)=\"runSaveFunction()\">Save</button>\n    </div>\n  </div>\n</div>\n","import { Deserializable } from '@tibco-tcstk/tc-core-lib';\n\n/* models used by landing page config */\nexport class ActionButtonConfig {\n    public text: string;\n    public route: string;\n    deserialize(input: any) {\n        Object.assign(this, input);\n        return this;\n    }\n}\n\nexport class LandingPageItemConfig {\n    public title: string;\n    public content: string;\n    public iconURL: string;\n    deserialize(input: any) {\n        Object.assign(this, input);\n        return this;\n    }\n}\n\nexport class LandingPageConfig {\n    public key: string;\n    public description: string;\n    public title: string;\n    public subtitle: string;\n    public backgroundURL: string;\n    public topMargin: number;\n    public homeRoute: string;\n    public highlights: LandingPageItemConfig[];\n    public actionButton: ActionButtonConfig[];\n    roles: string[];\n    deserialize(input: any) {\n        Object.assign(this, input);\n        return this;\n    }\n}\n\nexport class GeneralLandingPageConfig implements Deserializable {\n    id: string;\n    version: string;\n    uiAppId: string;\n    landingPage: LandingPageConfig[];\n    deserialize(input: any) {\n        Object.assign(this, input);\n        return this;\n    }\n}\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { RoleAttribute, TibcoCloudNewElementComponent, TibcoCloudUploadDialogComponent } from '@tibco-tcstk/tc-core-lib';\nimport { TcDocumentService } from '../../services/tc-document.service';\nimport { LandingPageConfig, LandingPageItemConfig } from '../../models/tc-live-apps-landing-page-config';\n\n/**\n * Configuration page home\n *\n *@example <tcla-live-apps-setting-landing></tcla-live-apps-setting-landing>\n */\n@Component({\n    selector: 'tcla-live-apps-settings-landing',\n    templateUrl: './live-apps-settings-landing.component.html',\n    styleUrls: ['./live-apps-settings-landing.component.css']\n})\nexport class LiveAppsSettingsLandingComponent implements OnInit {\n\n    @Input() sandboxId: number;\n    @Input() uiAppId: string;\n    @Input() landingPages: LandingPageConfig[];\n    @Input() allRoles: RoleAttribute[];\n    public allowCreation: boolean = true;\n    @Input('allowCreation') set AllowCreation(allowCreation: boolean) {\n      if (allowCreation!=undefined){\n        this.allowCreation = allowCreation;\n      }\n    }\n  \n    @Output() handleSave: EventEmitter<void> = new EventEmitter();\n\n    public selectedWelcomePage: LandingPageConfig;\n    public selectedRole: RoleAttribute[];\n\n    constructor(\n        private dialog: MatDialog,\n        private documentsService: TcDocumentService\n    ) { }\n\n    /**\n    * @ignore\n    */\n    ngOnInit() {\n        // If there is only one landing page selects it automatically\n        if (this.landingPages.length == 1) {\n            this.selectedWelcomePage = this.landingPages[0];\n        }\n    }\n\n    /**\n     * Save Button\n     */\n    runSave(){\n        this.handleSave.emit();\n    }\n\n    /**\n     * Delete Configuration\n     */\n    runDeleteConfiguration(){\n        const pages = this.landingPages;\n        pages.forEach(element => {\n            if (element == this.selectedWelcomePage){\n                const index = pages.indexOf(element, 0);\n                pages.splice(index, 1);\n                this.selectedWelcomePage = undefined;\n            }\n        });\n    }\n\n    /**\n     * New Configuration\n     */\n    runNewConfiguration = ():void => {\n\n        const dialogRef = this.dialog.open(TibcoCloudNewElementComponent, {\n            width: '50%',\n            height: '30%',\n            maxWidth: '100vw',\n            maxHeight: '100vh',\n            panelClass: 'tcs-style-dialog',\n            data: { resourceType: 'Landing Page' }\n        });\n\n        dialogRef.afterClosed().subscribe(result => {\n            if (result) {\n                const newElement = new LandingPageConfig().deserialize({\n                    key: result.id,\n                    description: result.name,\n                    highlights: [new LandingPageItemConfig(), new LandingPageItemConfig(), new LandingPageItemConfig()]\n                });\n\n                this.landingPages.push(newElement);\n                this.selectedWelcomePage = newElement;\n            }\n        });\n    }\n\n    /**\n     * Helper to Compare Objects\n     */\n    compareObjects = (o1: string, o2: string): boolean => {\n        return o1 === o2;\n    }\n\n    public openDialog(imageFormat: string, location: string, index?: number): void {\n\n        const dialogRef = this.dialog.open(TibcoCloudUploadDialogComponent, {\n            width: '500px',\n            data: { \n                title: 'Upload New ' + location + ' image',\n                allowedExtensions: imageFormat,\n                location: location,\n                index: index\n             }\n        });\n\n        dialogRef.componentInstance.fileevent.subscribe(($e) => {\n            this.uploadFile($e.file, location, index);\n        })\n\n        dialogRef.afterClosed().subscribe(result => {\n        });\n    }\n\n    public uploadFile(file: File, location: string, index?: number) {\n        if (file) {\n            switch (location) {\n                case 'background':\n                    this.selectedWelcomePage.backgroundURL = file.name;\n                    break;\n                case 'hightlight':\n                    this.selectedWelcomePage.highlights[index].iconURL = file.name;\n                    break;\n                default:\n                    break;\n            }\n            \n            this.documentsService.uploadDocument('orgFolders', this.uiAppId, this.sandboxId, file, location + '%2F' + file.name, '')\n                .subscribe(\n                    val => {\n                        console.log(\"*********** DONE\")\n                    },\n                    error => { console.log('error', error.errorMsg) }); //); this.errorMessage = 'Error uploading state icon: ' +\n        }\n    }\n}\n","<div fxLayout=\"column\" fxFill>\n    <tc-tibco-cloud-widget-header style=\"height: 40px;\" [icon]=\"'tcs-capabilities'\"\n        [headerText]=\"'Landing Page Configuration'\"></tc-tibco-cloud-widget-header>\n    <div fxFlex style=\"padding: 20px; overflow: hidden\" fxLayout=\"column\">\n        <div style=\"overflow: auto;\">\n            <div fxLayout=\"column\" fxFlex>\n                <p>You can manage the configuration for the landing pages here.</p>\n                <br>\n                <mat-form-field>\n                    <mat-label>Welcome Page Configuration</mat-label>\n                    <mat-select [(value)]=\"selectedWelcomePage\">\n                        <mat-option *ngFor=\"let landingPage of landingPages\" [value]=\"landingPage\">\n                            {{landingPage.key}}-{{landingPage.description}}\n                        </mat-option>\n                    </mat-select>\n                </mat-form-field>\n\n                <div *ngIf=\"selectedWelcomePage\">\n                    <div fxLayoutGap=\"10px\">\n                        <mat-form-field fxFlex=\"50\">\n                            <input matInput placeholder=\"Title\" [(ngModel)]=\"selectedWelcomePage.title\">\n                        </mat-form-field>\n                        <mat-form-field fxFlex=\"50\">\n                            <input matInput placeholder=\"Subtitle\" [(ngModel)]=\"selectedWelcomePage.subtitle\">\n                        </mat-form-field>\n                    </div>\n                    <div fxLayoutGap=\"10px\">\n                        <div fxFlex=\"50\">\n                            <mat-form-field fxFlex>\n                                <input matInput placeholder=\"Background URL\" [(ngModel)]=\"selectedWelcomePage.backgroundURL\">\n                            </mat-form-field>\n                            <mat-icon (click)=\"openDialog('.jpeg,.png', 'background')\"\n                                class=\"tcs-icon tcs-icon-active tcs-document-edit-buttons tcs-document-upload-icon\"\n                                matTooltip=\"Upload Document\"\n                                matTooltipPosition=\"left\" matTooltipShowDelay=\"1000\" svgIcon=\"tcs-document-upload\"></mat-icon>\n                        </div>\n                        <mat-form-field fxFlex=\"50\">\n                            <input matInput placeholder=\"Margin above highlight panel (px)\" type=\"number\" min=\"0\" [(ngModel)]=\"selectedWelcomePage.topMargin\">\n                        </mat-form-field>\n                    </div>\n                    <div fxLayoutGap=\"10px\">\n                        <mat-form-field fxFlex=\"50\">\n                            <mat-label>Used in roles</mat-label>\n                            <mat-select [(ngModel)]=\"selectedWelcomePage.roles\" [compareWith]=\"compareObjects\" multiple>\n                                <mat-option *ngFor=\"let role of allRoles\" [value]=\"role.id\">{{role.display}}</mat-option>\n                            </mat-select>\n                        </mat-form-field>\n                        <mat-form-field fxFlex=\"50\">\n                            <input matInput placeholder=\"Home route\" [(ngModel)]=\"selectedWelcomePage.homeRoute\">\n                        </mat-form-field>\n                    </div>\n                    <div>Hightlights</div>\n                    <div *ngFor=\"let highlight of selectedWelcomePage.highlights; let i = index\" fxLayoutGap=\"10px\">\n                        <div fxFlex=\"15\">\n                            <mat-form-field fxFlex=\"80\">\n                                <input matInput placeholder=\"Icon URL\" [(ngModel)]=\"highlight.iconURL\">\n                            </mat-form-field>\n                            <mat-icon fxFlex=\"20\" (click)=\"openDialog('.svg', 'hightlight', i)\"\n                                class=\"tcs-icon tcs-icon-active tcs-document-edit-buttons tcs-document-upload-icon\" matTooltip=\"Upload Document\"\n                                matTooltipPosition=\"left\" matTooltipShowDelay=\"1000\" svgIcon=\"tcs-document-upload\"></mat-icon>\n                        </div>\n                        <mat-form-field fxFlex=\"30\">\n                            <input matInput placeholder=\"Title\" [(ngModel)]=\"highlight.title\">\n                        </mat-form-field>\n                        <mat-form-field fxFlex=\"55\">\n                            <textarea matInput placeholder=\"Subtitle\" [(ngModel)]=\"highlight.content\" cdkAutosizeMinRows=\"3\" cdkAutosizeMaxRows=\"3\"></textarea>\n                        </mat-form-field>\n                    </div>\n                </div>\n            </div>\n        </div>\n        <div fxFlex class=\"tcs-filler-panel\"></div>\n        <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"end end\" style=\"min-height: 50px\">\n            <button mat-raised-button color=\"secundary\" *ngIf=\"allowCreation\" (click)=\"runDeleteConfiguration()\">Delete</button>\n            <button mat-raised-button color=\"secundary\" *ngIf=\"allowCreation\" (click)=\"runNewConfiguration()\">New</button>\n            <button mat-raised-button color=\"primary\" (click)=\"runSave()\">Save</button>\n        </div>\n    </div>\n</div>","import { Injectable } from '@angular/core';\nimport {ActivatedRouteSnapshot, Resolve} from '@angular/router';\nimport { Observable, of } from 'rxjs';\nimport {TcCoreCommonFunctions, UiAppConfig, UiAppIdConfig} from '@tibco-tcstk/tc-core-lib';\nimport {flatMap, map, mergeMap, switchMap} from 'rxjs/operators';\nimport {TcSharedStateService} from '@tibco-tcstk/tc-core-lib';\nimport {HttpClient, HttpHeaders} from '@angular/common/http';\nimport {TcLiveAppsConfigService} from '../services/tc-live-apps-config.service';\nimport {LiveAppsConfig} from '../models/tc-liveapps-config';\nimport {TcCaseCardConfigService} from '../services/tc-case-card-config.service';\nimport {Location} from '@angular/common';\n\n@Injectable()\nexport class LiveAppsConfigResolver implements Resolve<Observable<LiveAppsConfig>> {\n\n  DEFAULT_CONFIG_URL = TcCoreCommonFunctions.prepareUrlForStaticResource(this.location, 'assets/config/liveAppsConfig.json');\n  APP_ID_URL = TcCoreCommonFunctions.prepareUrlForStaticResource(this.location, 'assets/config/uiAppId.json');\n\n  private sandboxId: number;\n  public defaultAppConfig: LiveAppsConfig;\n  private uiAppId: string;\n\n  constructor(private tcSharedState: TcSharedStateService, private liveAppsConfigService: TcLiveAppsConfigService, private caseCardConfigService: TcCaseCardConfigService, private http: HttpClient, private location: Location) {}\n  // note appConfigResolver will need sandboxId to create app config state record.\n  // So we expect this to have been set by caller (done by tc-liveapps-lib/laConfigResolver).\n\n  public setSandbox = (sandboxId: number) => {\n    this.sandboxId = sandboxId;\n  }\n\n  // can be used to load defaultAppConfig from a JSON config\n  private getDefaultAppConfig = () => {\n    return this.http.get(this.DEFAULT_CONFIG_URL, { withCredentials: true });\n  }\n\n  // loads uiAppId from json file in assets (appId.json)\n  private getAppId = (): Observable<UiAppIdConfig> => {\n    const headers = new HttpHeaders().set('cacheResponse', 'true');\n    return this.http.get(this.APP_ID_URL, { headers: headers, withCredentials: true }).pipe(\n      map(uiAppId => {\n          const uiAppIdConfig = new UiAppIdConfig().deserialize(uiAppId);\n          this.uiAppId = uiAppIdConfig.uiAppId;\n          return uiAppIdConfig;\n        }\n      )\n    );\n  }\n\n  private triggerCardConfigFetch = (liveAppsConfig: LiveAppsConfig) => {\n    // optimization: I want to avoid reading the card config when we display a large list of cards in the calling app\n    // therefore we can trigger of a read of the card configs for each app in the config to ensure they are cached by\n    // http interceptor\n    const laConfig = new LiveAppsConfig().deserialize(liveAppsConfig);\n    laConfig.applicationIds.forEach(appId => {\n      this.caseCardConfigService.getCardConfig(this.uiAppId, appId, true, false).subscribe();\n    });\n  }\n\n  resolve(routeSnapshot: ActivatedRouteSnapshot): Observable<LiveAppsConfig> {\n    const appConfig = this.getAppId().pipe(\n      switchMap(uiAppId => this.liveAppsConfigService.getLiveAppsConfig(uiAppId.uiAppId, true, false)\n        .pipe(\n          mergeMap(\n            liveAppsConfig => {\n              if (liveAppsConfig === undefined) {\n                return this.getDefaultAppConfig().pipe(\n                  flatMap(config => {\n                    this.defaultAppConfig = new LiveAppsConfig().deserialize(config);\n                    this.defaultAppConfig.caseIconsFolderId = this.uiAppId + '_Icons';\n                    return this.liveAppsConfigService.createLiveAppsConfig(\n                      this.sandboxId,\n                      uiAppId.uiAppId,\n                      this.defaultAppConfig)\n                      .pipe(\n                        flatMap(\n                          result => {\n                            const newAppConfig = this.defaultAppConfig;\n                            newAppConfig.id = result;\n                            this.triggerCardConfigFetch(newAppConfig);\n                            return this.liveAppsConfigService.updateLiveAppsConfig(\n                              this.sandboxId,\n                              uiAppId.uiAppId,\n                              newAppConfig,\n                              result).pipe(\n                              // trigger a read to flush the cache since we changed it\n                              flatMap(updatedConf => {\n                                return this.liveAppsConfigService.getLiveAppsConfig(this.uiAppId, true, true);\n                              }\n                              )\n                            );\n                          })\n                      );\n                  })\n                );\n              } else {\n                this.triggerCardConfigFetch(liveAppsConfig);\n                return of(liveAppsConfig);\n              }\n            }\n          )\n        )\n      )\n    )\n    return appConfig;\n  }\n\n}\n","import {Injectable} from '@angular/core';\nimport {Resolve} from '@angular/router';\nimport {Observable, of} from 'rxjs';\nimport {LiveAppsService} from '../services/live-apps.service';\nimport {Groups} from '../models/tc-groups-data';\nimport {TcAppDefinitionService} from '../services/tc-app-definition.service';\n\n@Injectable()\nexport class GroupsResolver implements Resolve<Observable<Groups>> {\n\n  constructor(public liveapps: LiveAppsService, private appDefinitionService: TcAppDefinitionService) {\n  }\n\n  resolve(): Observable<Groups> {\n    const claims = this.appDefinitionService.claims;\n    return of(new Groups().deserialize( { groups: this.appDefinitionService.usersGroups }));\n  }\n}\n","import {Component, EventEmitter, OnInit, Output} from '@angular/core';\nimport {AccessResolver} from '../../resolvers/access.resolver';\nimport {CaseType} from '../../models/liveappsdata';\nimport {ClaimsResolver} from '../../resolvers/claims.resolver';\nimport {Groups} from '../../models/tc-groups-data';\nimport {GroupsResolver} from '../../resolvers/groups.resolver';\nimport {LiveAppsConfig} from '../../models/tc-liveapps-config';\nimport {LiveAppsConfigResolver} from '../../resolvers/liveapps-config.resolver';\nimport {Roles} from '../../models/tc-groups-data';\nimport {RolesResolver} from '../../resolvers/roles.resolver';\nimport {RouteAccessControlConfigurationElement} from '../../models/tc-groups-data';\nimport {CustomFormDefs, FormResolver} from '@tibco-tcstk/tc-forms-lib';\nimport {forkJoin} from 'rxjs';\nimport {Claim, GeneralConfig, GeneralConfigResolver, RouteAction} from '@tibco-tcstk/tc-core-lib';\n\n@Component({\n  selector: 'tcla-live-apps-home-cockpit-standalone',\n  templateUrl: './live-apps-home-cockpit-standalone.component.html',\n  styleUrls: ['./live-apps-home-cockpit-standalone.component.css']\n})\nexport class LiveAppsHomeCockpitStandaloneComponent implements OnInit {\n\n  /**\n   * ~event routeAction : Component requests route to another page\n   * ~payload RouteAction : RouteAction object to tell caller to navigate somewhere\n   */\n  @Output() routeAction: EventEmitter<RouteAction> = new EventEmitter<RouteAction>();\n\n  constructor(protected claimsResolver: ClaimsResolver, protected appConfigResolver: GeneralConfigResolver, protected liveAppsConfigResolver: LiveAppsConfigResolver, protected groupsResolver: GroupsResolver, protected rolesResolver: RolesResolver, protected accessResolver: AccessResolver, protected customFormsResolver: FormResolver) { }\n\n  public generalConfig: GeneralConfig;\n  public liveAppsConfig: LiveAppsConfig;\n  private claims: Claim;\n  public sandboxId: number;\n  public selectedAppConfig: CaseType;\n  public userName: string;\n  public userId: string;\n  public email: string;\n  public groups: Groups;\n  public roles: Roles;\n  public access: RouteAccessControlConfigurationElement;\n  public customFormDefs: CustomFormDefs;\n  public welcomeMessage: string;\n  public ready = false;\n\n  public handleRouteAction = (routeAction: RouteAction) => {\n    this.routeAction.emit(routeAction);\n  }\n\n  ngOnInit() {\n    const resolversArray = [];\n    resolversArray.push(this.claimsResolver.resolve());\n    resolversArray.push(this.appConfigResolver.resolve());\n    resolversArray.push(this.liveAppsConfigResolver.resolve(undefined));\n    resolversArray.push(this.groupsResolver.resolve());\n    resolversArray.push(this.rolesResolver.resolve());\n    resolversArray.push(this.accessResolver.resolve());\n    resolversArray.push(this.customFormsResolver.resolve());\n\n    const resolvers$ = forkJoin(resolversArray).subscribe(\n      next => {\n        this.claims = new Claim().deserialize(next[0]);\n        this.generalConfig = new GeneralConfig().deserialize(next[1]);\n        this.liveAppsConfig = new LiveAppsConfig().deserialize(next[2]);\n        this.groups = new Groups().deserialize(next[3]);\n        this.roles = new Roles().deserialize(next[4]);\n        this.access = new RouteAccessControlConfigurationElement().deserialize(next[5]);\n        this.customFormDefs = new CustomFormDefs().deserialize(next[6]);\n        this.sandboxId = Number(this.claims.primaryProductionSandbox.id);\n        this.userName = this.claims.firstName + ' ' + this.claims.lastName;\n        this.email = this.claims.email;\n        this.userId = this.claims.id;\n        this.welcomeMessage = this.generalConfig.welcomeMessage ? this.generalConfig.welcomeMessage : 'Welcome to Case Manager';\n        this.ready = true;\n      }\n    );\n  }\n\n}\n","<tcla-live-apps-home-cockpit *ngIf=\"ready\" fxFlex [uiAppId]=\"generalConfig.uiAppId\" [legacyCreators]=\"liveAppsConfig.legacyCreators\" [legacyWorkitems]=\"liveAppsConfig.legacyWorkitems\" [sandboxId]=\"sandboxId\" [appIds]=\"liveAppsConfig.applicationIds\" [userId]=\"userId\" [userName]=\"userName\" [email]=\"email\" [title]=\"welcomeMessage\" [roles]=\"roles\" [access]=\"access\" [customFormDefs]=\"customFormDefs\" [formsFramework]=\"liveAppsConfig.formsFramework\" (routeAction)=\"handleRouteAction($event)\">\n</tcla-live-apps-home-cockpit>\n","import {Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges} from '@angular/core';\nimport {Claim, GeneralConfig, GeneralConfigResolver, RouteAction, Sandbox} from '@tibco-tcstk/tc-core-lib';\nimport {AccessResolver} from '../../resolvers/access.resolver';\nimport {ClaimsResolver} from '../../resolvers/claims.resolver';\nimport {Groups} from '../../models/tc-groups-data';\nimport {GroupsResolver} from '../../resolvers/groups.resolver';\nimport {LiveAppsConfig} from '../../models/tc-liveapps-config';\nimport {LiveAppsConfigResolver} from '../../resolvers/liveapps-config.resolver';\nimport {Roles} from '../../models/tc-groups-data';\nimport {RolesResolver} from '../../resolvers/roles.resolver';\nimport {RouteAccessControlConfigurationElement} from '../../models/tc-groups-data';\nimport {CustomFormDefs, FormResolver} from '@tibco-tcstk/tc-forms-lib';\nimport {forkJoin} from 'rxjs';\n\n@Component({\n  selector: 'tcla-live-apps-case-cockpit-standalone',\n  templateUrl: './live-apps-case-cockpit-standalone.component.html',\n  styleUrls: ['./live-apps-case-cockpit-standalone.component.css']\n})\nexport class LiveAppsCaseCockpitStandaloneComponent implements OnChanges {\n\n  /**\n   * The LA Application Id\n   */\n  @Input() appId: string;\n\n  /**\n   * The LA Application Type Id (generally 1)\n   */\n  @Input() typeId: string;\n\n  /**\n   * The case reference\n   */\n  @Input() caseRef: string;\n\n  /**\n   * The workitem Id\n   */\n  @Input() workitemId: number;\n\n  /**\n   * ~event routeAction : Component requests route to another page\n   * ~payload RouteAction : RouteAction object to tell caller to navigate somewhere\n   */\n  @Output() routeAction: EventEmitter<RouteAction> = new EventEmitter<RouteAction>();\n\n  constructor(protected claimsResolver: ClaimsResolver, protected appConfigResolver: GeneralConfigResolver, protected liveAppsConfigResolver: LiveAppsConfigResolver, protected groupsResolver: GroupsResolver, protected rolesResolver: RolesResolver, protected accessResolver: AccessResolver, protected customFormsResolver: FormResolver) { }\n  public generalConfig: GeneralConfig;\n  public liveAppsConfig: LiveAppsConfig;\n  public exclRecentAppIds: string[];\n  public claims: Claim;\n  public sandbox: Sandbox;\n  public groups: Groups;\n  public roles: Roles;\n  public access: RouteAccessControlConfigurationElement;\n  public customFormDefs: CustomFormDefs;\n  public sandboxId: number;\n  public ready = false;\n\n  public handleRouteAction = (routeAction: RouteAction) => {\n    this.routeAction.emit(routeAction);\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    if (this.caseRef && this.appId && this.typeId) {\n      const resolversArray = [];\n      resolversArray.push(this.claimsResolver.resolve());\n      resolversArray.push(this.appConfigResolver.resolve());\n      resolversArray.push(this.liveAppsConfigResolver.resolve(undefined));\n      resolversArray.push(this.groupsResolver.resolve());\n      resolversArray.push(this.rolesResolver.resolve());\n      resolversArray.push(this.accessResolver.resolve());\n      resolversArray.push(this.customFormsResolver.resolve());\n\n      const resolvers$ = forkJoin(resolversArray).subscribe(\n        next => {\n          this.claims = new Claim().deserialize(next[0]);\n          this.generalConfig = new GeneralConfig().deserialize(next[1]);\n          this.liveAppsConfig = new LiveAppsConfig().deserialize(next[2]);\n          this.groups = new Groups().deserialize(next[3]);\n          this.roles = new Roles().deserialize(next[4]);\n          this.access = new RouteAccessControlConfigurationElement().deserialize(next[5]);\n          this.customFormDefs = new CustomFormDefs().deserialize(next[6]);\n          this.sandboxId = Number(this.claims.primaryProductionSandbox.id);\n          this.ready = true;\n        }\n      );\n    }\n  }\n\n}\n","<tcla-live-apps-case-cockpit *ngIf=\"ready\" fxFill [typeId]=\"typeId\" [appId]=\"appId\" [uiAppId]=\"generalConfig.uiAppId\" [sandboxId]=\"sandboxId\" [caseRef]=\"caseRef\" [userId]=\"claims.id\" [formsFramework]=\"liveAppsConfig.formsFramework\" [exclRecentAppIds]=\"exclRecentAppIds\" [roles]=\"roles\" [access]=\"access\" [customFormDefs]=\"customFormDefs\" [legacyWorkitems]=\"liveAppsConfig.legacyWorkitems\" [legacyActions]=\"liveAppsConfig.legacyActions\" [workitemId]=\"workitemId\" (routeAction)=\"handleRouteAction($event)\"></tcla-live-apps-case-cockpit>\n","import {Component, EventEmitter, Input, Output, OnDestroy, SimpleChanges, OnChanges, OnInit} from '@angular/core';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport { Process, ProcessId} from '../../models/liveappsdata';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {take, takeUntil} from 'rxjs/operators';\nimport {TcCaseProcessesService} from '../../services/tc-case-processes.service';\nimport {TcCaseDataService} from '../../services/tc-case-data.service';\n\n/**\n * Handles rendering of case creator form.\n *\n *@example <tcla-live-apps-case-creator></tcla-live-apps-case-creator>\n */\n\n@Component({\n  selector: 'tcla-live-apps-creator-standalone',\n  templateUrl: './live-apps-creator-standalone.component.html',\n  styleUrls: ['./live-apps-creator-standalone.component.css']\n})\nexport class LiveAppsCreatorStandaloneComponent extends LiveAppsComponent implements OnChanges, OnInit {\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * LA application ID\n   */\n  @Input() applicationId: string;\n\n  /**\n   * The LA Application Type Id (generally 1)\n   */\n  @Input() typeId: string;\n\n  /**\n   * The process definition of the action or creator to execute\n   */\n  @Input() processName: string;\n\n  /**\n   * Data object that will be displayed on the form. Allows overriding over form data (eg. when selecting data in spotfire)\n   */\n  @Input() dataOverride: any;\n\n  /**\n   * Custom Form tag if using an external form app\n   */\n  @Input() customFormTag: string;\n\n  /**\n   * Custom Form Layout\n   */\n  @Input() layout: any[];\n\n  /**\n   * Enable legacy creators\n   */\n  public legacyCreators: boolean = false;\n  @Input('legacyCreators') set LegacyCreators(legacyCreators: boolean) {\n    if (legacyCreators){\n      this.legacyCreators = legacyCreators;\n    }\n  }\n\n  /**\n   * Allow override of forms framework\n   * Options: bootstrap-4 or material-design\n   */\n  public formsFramework: string = 'material-design';\n  @Input('formsFramework') set FormsFramework(formsFramework: string) {\n    if (formsFramework){\n      this.formsFramework = formsFramework;\n    }\n  }\n\n  /**\n   * ~event caseChanged : Case action started (process started)\n   * ~payload ProcessId : ProcessId object passed when a case has been updated or created by a process (action/creator)\n   */\n  @Output() caseCreated: EventEmitter<ProcessId> = new EventEmitter<ProcessId>();\n\n  data: any;\n  options: any;\n  process: Process;\n  isCustomForm = false;\n  customFormDefs: any;\n  useLegacy = false;\n\n  handleSubmit = (data, caseRef) => {\n    // if no_process_submit then no need to run process as this was done inside a custom form app\n    if (data !== 'NO_PROCESS_SUBMIT') {\n      // run the process\n      this.liveapps.runProcess(this.sandboxId, this.applicationId, this.process.id, caseRef, data)\n        .pipe(\n          take(1),\n          takeUntil(this._destroyed$)\n        )\n        .subscribe(response => {\n            if (response) {\n              if (!response.data.errorMsg) {\n                // parse data to object\n                response.data = JSON.parse(response.data);\n                // case created send back response including caseIdentifier if one is present\n                let caseIdentifier;\n                let caseReference;\n                if (response.caseIdentifier) {\n                  caseIdentifier = response.caseIdentifier;\n                }\n                if (response.caseReference) {\n                  caseReference = response.caseReference;\n                }\n                const processResponse = new ProcessId().deserialize({'caseIdentifier': caseIdentifier, 'caseReference': caseReference});\n                this.caseCreated.emit(processResponse);\n                this.process = undefined;\n                this.data = undefined;\n                this.layout = undefined;\n              } else {\n                console.error('Unable to run case creator');\n                console.error(response.data.errorMsg);\n              }\n            }\n          }, error => {\n            console.error('Unable to run case creator');\n            console.error(error);\n          }\n        );\n    } else {\n      const processResponse = new ProcessId().deserialize({'caseIdentifier': undefined, 'caseReference': undefined});\n      this.caseCreated.emit(processResponse);\n      this.process = undefined;\n      this.data = undefined;\n      this.layout = undefined;\n    }\n  }\n\n  handleLegacyProcessComplete = () => {\n    const processResponse = new ProcessId().deserialize({'caseIdentifier': undefined, 'caseReference': undefined});\n    this.caseCreated.emit(processResponse);\n  }\n\n  handleLegacyProcessCancelled = () => {\n    // -1 for caseReference means cancelled\n    const processResponse = new ProcessId().deserialize({'caseIdentifier': undefined, 'caseReference': '-1'});\n    this.caseCreated.emit(processResponse);\n  }\n\n  constructor(protected liveapps: LiveAppsService, protected processesService: TcCaseProcessesService, protected caseDataService: TcCaseDataService) {\n    super();\n  }\n\n  ngOnInit() {\n    this.options = {\n      defaultOptions: {\n        'appearance': 'legacy'\n      }\n    };\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    // initialize once data is available\n    if (this.applicationId && this.processName && this.typeId && this.sandboxId) {\n      if (this.legacyCreators) {\n        // use legacy creator iframe\n        this.useLegacy = this.legacyCreators;\n      }\n      // use rendered form\n      if (this.customFormTag) {\n        // use custom form\n        this.customFormDefs = { customForms: [this.customFormTag] };\n      }\n      // get schema\n      this.processesService.getProcess(this.sandboxId, this.applicationId, this.typeId, this.processName, 'creator').subscribe(\n        next => {\n          this.process = next;\n        },\n        error => {\n          console.error('Unable to get creator info');\n          console.error(error);\n        }\n      );\n    }\n  }\n\n}\n","<div fxFill>\n  <tcfrm-rendered-form *ngIf=\"process && !useLegacy\" style=\"overflow: auto;\" [formsFramework]=\"formsFramework\" [layout]=\"layout\" [customFormDefs]=customFormDefs [formRef]=\"process.formTag\" [appId]=\"applicationId\" [customFormDefs]=\"customFormDefs\" [schema]=\"process.jsonSchema\" [data]=\"data\" [options]=\"options\" (formSubmit)=\"handleSubmit($event, undefined)\"></tcfrm-rendered-form>\n  <tcla-live-apps-legacy-process *ngIf=\"process && useLegacy\" [process]=\"{ process: process }\" [type]=\"'creator'\" [applicationId]=\"applicationId\" [typeId]=\"typeId\" (processCancelled)=\"handleLegacyProcessCancelled()\" (processComplete)=\"handleLegacyProcessComplete()\" class=\"live-apps-widget\" fxFill></tcla-live-apps-legacy-process>\n</div>\n","import {Component, EventEmitter, Input, Output, OnDestroy, SimpleChanges, OnChanges, OnInit} from '@angular/core';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport {CaseCreator, CaseInfo, Process, ProcessId} from '../../models/liveappsdata';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {take, takeUntil} from 'rxjs/operators';\nimport {TcCaseProcessesService} from '../../services/tc-case-processes.service';\nimport {LiveAppsCreatorStandaloneComponent} from '../live-apps-creator-standalone/live-apps-creator-standalone.component';\nimport {forkJoin, throwError} from 'rxjs';\nimport {CaseInfoWithSchema} from '../../models/tc-case-data';\n\n/**\n * Handles rendering of case action.\n *\n *@example <tcla-live-apps-action-standalone></tcla-live-apps-action-standalone>\n */\n\n@Component({\n  selector: 'tcla-live-apps-action-standalone',\n  templateUrl: './live-apps-action-standalone.component.html',\n  styleUrls: ['./live-apps-action-standalone.component.css']\n})\nexport class LiveAppsActionStandaloneComponent extends LiveAppsCreatorStandaloneComponent implements OnChanges {\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * LA application ID\n   */\n  @Input() applicationId: string;\n\n  /**\n   * The LA Application Type Id (generally 1)\n   */\n  @Input() typeId: string;\n\n  /**\n   * The process definition of the action or creator to execute\n   */\n  @Input() processName: string;\n\n  /**\n   * The case reference on which to run the action\n   */\n  @Input() caseRef: string;\n\n\n  /**\n   * Data object that will be displayed on the form. Allows overriding over form data (eg. when selecting data in spotfire)\n   */\n  @Input() dataOverride: any;\n\n  /**\n   * Custom Form tag if using an external form app\n   */\n  @Input() customFormTag: string;\n\n  /**\n   * Custom Form Layout\n   */\n  @Input() layout: any[];\n\n  /**\n   * Enable legacy actions\n   */\n  public legacyActions: boolean = false;\n  @Input('legacyActions') set LegacyActions(legacyActions: boolean) {\n    if (legacyActions){\n      this.legacyActions = legacyActions;\n    }\n  }\n\n  /**\n   * Allow override of forms framework\n   * Options: bootstrap-4 or material-design\n   */\n  public formsFramework: string = 'material-design';\n  @Input('formsFramework') set FormsFramework(formsFramework: string) {\n    if (formsFramework){\n      this.formsFramework = formsFramework;\n    }\n  }\n\n  /**\n   * ~event caseChanged : Case action started (process started)\n   * ~payload ProcessId : ProcessId object passed when a case has been updated or created by a process (action/creator)\n   */\n  @Output() caseCreated: EventEmitter<ProcessId> = new EventEmitter<ProcessId>();\n\n  data: any;\n  options: any;\n  process: Process;\n  isCustomForm = false;\n  customFormDefs: any;\n  useLegacy = false;\n  caseState: string;\n\n  ngOnChanges(changes: SimpleChanges) {\n    // initialize once data is available\n    if (this.applicationId && this.processName && this.typeId && this.sandboxId && this.caseRef) {\n      if (this.legacyActions) {\n        // use legacy creator iframe\n        this.useLegacy = this.legacyActions;\n      }\n      // use rendered form\n      if (this.customFormTag) {\n        // use custom form\n        this.customFormDefs = { customForms: [this.customFormTag] };\n      }\n      // get process details and case data\n      const forkJoinArray = [];\n      const processDetails$ = this.processesService.getProcess(this.sandboxId, this.applicationId, this.typeId, this.processName, 'action').pipe(\n        take(1),\n        takeUntil(this._destroyed$)\n      );\n\n      /*.subscribe(\n        next => {\n          this.process = next;\n        },\n        error => {\n          console.error('Unable to get action info');\n          console.error(error);\n        }\n      );*/\n      forkJoinArray.push(processDetails$);\n      const caseData$ = this.caseDataService.getCaseWithSchema(this.caseRef, this.sandboxId, this.applicationId, this.typeId, undefined)\n        .pipe(\n          take(1),\n          takeUntil(this._destroyed$)\n        );\n      forkJoinArray.push(caseData$);\n\n      forkJoin(forkJoinArray).subscribe(\n        (result: any[])  => {\n          // handle results\n\n          // process details\n          if (result[0]) {\n            this.process = new Process().deserialize(result[0]);\n          } else {\n            console.error('Unable to get action info');\n            throwError('Unable to get action info');\n          }\n\n          // case data\n          if (result[1]) {\n            const caseDetails = new CaseInfoWithSchema().deserialize(result[1]);\n            if (caseDetails.caseInfo.metadata.applicationId === this.applicationId.toString()) {\n              const casedata = caseDetails.caseInfo.untaggedCasedataObj;\n              this.caseState = casedata.state;\n              // JS: use name rather than internalObjectName to handle appliction name change\n              const caseTypeName = caseDetails.name;\n              this.data = {\n                [caseTypeName]: casedata\n              };\n            } else {\n              console.error('The selected case is not the right case type for this action');\n            }\n          }\n\n        }\n      );\n    }\n  }\n\n}\n","<div fxFill>\n  <tcfrm-rendered-form *ngIf=\"process && !useLegacy\" style=\"overflow: auto;\" [formsFramework]=\"formsFramework\" [customFormDefs]=customFormDefs [layout]=\"layout\" [formRef]=\"process.formTag\" [appId]=\"applicationId\" [customFormDefs]=\"customFormDefs\" [schema]=\"process.jsonSchema\" [data]=\"data\" [caseRef]=\"caseRef\" [options]=\"options\" (formSubmit)=\"handleSubmit($event, caseRef)\"></tcfrm-rendered-form>\n  <tcla-live-apps-legacy-process *ngIf=\"process && useLegacy && caseRef\" [process]=\"{ process: process }\" [type]=\"'action'\" [applicationId]=\"applicationId\" [typeId]=\"typeId\" [caseRef]=\"caseRef\" [caseState]=\"caseState\" (processCancelled)=\"handleLegacyProcessCancelled()\" (processComplete)=\"handleLegacyProcessComplete()\" class=\"live-apps-widget\" fxFill></tcla-live-apps-legacy-process>\n</div>\n","import {Component, EventEmitter, Input, OnChanges, Output, SimpleChanges} from '@angular/core';\nimport {LaProcessSelection} from '../../models/tc-case-processes';\nimport {CaseType, CaseTypesList, JsonSchema, Process} from '../../models/liveappsdata';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {TcCaseProcessesService} from '../../services/tc-case-processes.service';\n\n\n@Component({\n  selector: 'tcla-live-apps-processes',\n  templateUrl: './live-apps-processes.component.html',\n  styleUrls: ['./live-apps-processes.component.css']\n})\nexport class LiveAppsProcessesComponent implements OnChanges {\n\n  /**\n   * The LA Application Id\n   */\n  @Input() appId: string;\n\n  /**\n   * The LA Application Type Id (generally 1)\n   */\n  @Input() typeId: string;\n\n  /**\n   * sandboxId - this comes from claims resolver\n   */\n  @Input() sandboxId: number;\n\n  /**\n   * includeCaseDataPage - include case data page as process selection\n   */\n  public includeCaseDataPage: boolean = false;\n  @Input('includeCaseDataPage') set IncludeCaseDataPage(includeCaseDataPage: boolean) {\n    if (includeCaseDataPage){\n      this.includeCaseDataPage = includeCaseDataPage;\n    }\n  }\n\n  /**\n   * ~event processClicked : Process selected\n   * ~payload LaProcessSelection : LaProcessSelection object output when a process is clicked\n   */\n  @Output() processClicked: EventEmitter<Process> = new EventEmitter<Process>();\n\n  caseType: CaseType;\n  processes: Process[];\n  selectedProcess: Process;\n\n  constructor(protected liveapps: LiveAppsService) { }\n\n  selectProcess = (process: Process) => {\n    this.processClicked.emit(process);\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    if (this.appId && this.typeId && this.sandboxId &&\n      (changes.appId.currentValue !== changes.appId.previousValue\n        || changes.typeId.currentValue !== changes.typeId.previousValue\n        || changes.sandboxId.currentValue !== changes.sandboxId.previousValue)) {\n      this.liveapps.getCaseTypeSchema(this.sandboxId, this.appId, 100).subscribe(\n        (next: CaseTypesList) => {\n          // should only get one main case type back as filtered for this appId\n          const caseTypes = next.casetypes.filter(ct => {\n            return ct.id === '1';\n          });\n          if (caseTypes && caseTypes.length > 0) {\n            this.caseType = caseTypes[0];\n            this.processes = [];\n            if (this.includeCaseDataPage) {\n              // Format of ref is <applicationName>.<applicationInternalName>.<processType>.<processName>\n              const cdProcess = new Process().deserialize(\n                {\n                  jsonSchema: this.caseType.jsonSchema,\n                  name: 'Data Page',\n                  id: 'casedata',\n                  formTag: this.caseType.applicationName + '.' + this.caseType.applicationInternalName + '.' + 'casedata.default',\n                  processType: 'casedata',\n                  unsupportedForm: false\n                }\n              );\n              this.processes.push(cdProcess);\n            }\n            if (this.caseType.creators) {\n              this.processes.push(...this.caseType.creators);\n            }\n            if (this.caseType.actions) {\n              this.processes.push(...this.caseType.actions);\n            }\n          } else {\n            console.error('No main case type returned for this application: ', next);\n          }\n        }\n      );\n    }\n  }\n\n}\n","<div style=\"margin-left: 10px\" fxFlex>\n  <mat-form-field style=\"width:100%\">\n    <mat-label>Process</mat-label>\n    <mat-select (selectionChange)=\"selectProcess($event.value)\">\n      <mat-option *ngFor=\"let process of processes\" [value]=\"process\">\n        {{process.name}} ({{process.processType}})\n      </mat-option>\n    </mat-select>\n  </mat-form-field>\n\n</div>\n\n","import {Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild} from '@angular/core';\nimport {CaseType, JsonSchema, Process} from '../../models/liveappsdata';\nimport {TcCaseProcessesService} from '../../services/tc-case-processes.service';\nimport {MatExpansionPanel} from '@angular/material/expansion';\nimport {FormConfig, ProcessFormConfig} from '../../models/tc-liveapps-config';\nimport {TcCoreCommonFunctions} from '@tibco-tcstk/tc-core-lib';\nimport {RenderedFormComponent} from '@tibco-tcstk/tc-forms-lib';\nimport {TcFormConfigService} from '../../services/tc-form-config.service';\nimport {parse} from 'ts-node';\n\n@Component({\n  selector: 'tcla-live-apps-form-preview',\n  templateUrl: './live-apps-form-preview.component.html',\n  styleUrls: ['./live-apps-form-preview.component.css']\n})\nexport class LiveAppsFormPreviewComponent implements OnChanges {\n\n  @Input() schema: any = {};\n  @Input() options: any[];\n  @Input() appIds: string[];\n  @Input() sandbox: string;\n  @Input() formConfig: FormConfig;\n  public formsFramework = 'material-design';\n  @Input('formsFramework') set FormsFramework(formsFramework) {\n    if (formsFramework){\n      this.formsFramework = formsFramework;\n    }\n  }\n\n  /**\n   * ~event saveFormConfiguration : save form config\n   * ~payload any : forms config object\n   */\n  @Output() formConfigUpdate: EventEmitter<FormConfig> = new EventEmitter<FormConfig>();\n\n  @ViewChild('dataPanel', {static: false}) dataPanel: MatExpansionPanel;\n  @ViewChild(RenderedFormComponent, {static: false}) renderedFormComponent: RenderedFormComponent;\n\n  layout: any[];\n  formSchemaJSON: string;\n  formDataJSON: string;\n  autoLayout: any[];\n  initialLayout: any[];\n  layoutString: string;\n  layoutChangeString: string;\n  data: any;\n  aceEditorOptions: any = {\n    maxLines: 1000,\n    printMargin: false,\n    showGutter: true,\n    autoScrollEditorIntoView: true\n  };\n  selectedProcessFormConfig: ProcessFormConfig;\n  selectedApp: CaseType;\n  selectedProcess: Process;\n\n  constructor(private processService: TcCaseProcessesService) { }\n\n  getProcessFormConfig = (formTag: string): ProcessFormConfig => {\n    let pfc;\n    if (this.formConfig && this.formConfig.processFormConfigs) {\n      pfc = this.formConfig.processFormConfigs.filter(fc => {\n        return fc.formTag === formTag;\n      });\n    }\n    return (pfc && pfc.length > 0) ? pfc[0] : undefined;\n  }\n\n  setProcessFormConfig = (formTag: string, layout?: any, data?: string) => {\n    if (!this.formConfig) {\n      this.formConfig = new FormConfig();\n    }\n    if (!this.formConfig.processFormConfigs) {\n      this.formConfig.processFormConfigs = [];\n    }\n      let updatedConfig = false;\n      this.formConfig.processFormConfigs.forEach(fc => {\n        if (fc.formTag === formTag) {\n          if (layout === 'RESET') {\n            fc.layout = undefined;\n          } else if (layout) {\n            fc.layout = layout;\n          }\n          if (data === 'RESET') {\n            fc.data = undefined;\n          } else if (data) {\n            fc.data = data;\n          }\n          if (!fc.data && !fc.layout) {\n            // no point keeping the config if there is no value\n            this.formConfig.processFormConfigs = this.formConfig.processFormConfigs.filter(fck => fck.formTag !== fc.formTag);\n          }\n          updatedConfig = true;\n        }\n      });\n      if (!updatedConfig) {\n        if (data || layout) {\n          const newConfig = new ProcessFormConfig().deserialize(\n            {\n              formTag,\n              processId: this.selectedProcess.id,\n              processType: this.selectedProcess.processType,\n              layout: (layout === 'RESET' ? undefined : layout),\n              data: (data === 'RESET' ? undefined : data),\n            }\n          );\n          this.formConfig.processFormConfigs.push(newConfig);\n        }\n      }\n  }\n\n  parseLayoutString = (layoutString: string): any => {\n    let newFormObject: any = null;\n    // tslint:disable-next-line:no-eval\n    eval('newFormObject = ' + layoutString);\n    return newFormObject;\n  }\n\n  updateLayout = (newLayout: string) => {\n    // if (this.layout !== newLayout) {\n      this.layout = this.parseLayoutString(newLayout);\n      this.layoutChangeString = newLayout;\n      this.renderedFormComponent.updateLayout(newLayout);\n      this.setProcessFormConfig(this.selectedProcess.formTag, this.layoutChangeString);\n    // }\n  }\n\n  updateDataJSON = (newDataJSON) => {\n    this.data = JSON.parse(newDataJSON);\n    this.setProcessFormConfig(this.selectedProcess.formTag, undefined, newDataJSON);\n  }\n\n  handleAppSelection = (app: CaseType) => {\n    this.selectedProcess = undefined;\n    this.selectedApp = app;\n    this.layout = undefined;\n    this.data = undefined;\n    this.formDataJSON = undefined;\n    this.schema = undefined;\n  }\n\n  handleProcessSelection = (process: Process) => {\n    this.selectedProcessFormConfig = undefined;\n    this.selectedProcess = undefined;\n    this.layout = undefined;\n    this.layoutString = undefined;\n    this.data = undefined;\n    this.formDataJSON = undefined;\n    this.schema = undefined;\n    const processFormConfig = this.getProcessFormConfig(process.formTag);\n    this.selectedProcessFormConfig = processFormConfig;\n    if (processFormConfig && processFormConfig.layout) {\n\n      this.layout = this.parseLayoutString(processFormConfig.layout);\n      this.layoutChangeString = processFormConfig.layout;\n      this.layoutString = processFormConfig.layout;\n      // this.renderedFormComponent.updateLayout(processFormConfig.layout);\n      this.initialLayout = this.layout;\n    } else {\n      this.layout = undefined;\n    }\n    if (processFormConfig && processFormConfig.data) {\n      this.data = JSON.parse(processFormConfig.data);\n    } else {\n      this.data = undefined;\n    }\n    this.formDataJSON = JSON.stringify(this.data, null, 2);\n    const tmpSchema = process.jsonSchema ? process.jsonSchema : this.createDefaultSchema(this.selectedApp);\n    if (tmpSchema && tmpSchema.$schema) {\n      delete tmpSchema.$schema;\n    }\n    this.schema = tmpSchema;\n    this.formSchemaJSON = JSON.stringify(tmpSchema, null, 2);\n    this.selectedProcess = process;\n    if (this.layoutString && this.renderedFormComponent) {\n      this.renderedFormComponent.updateLayout(this.layoutString);\n    }\n  }\n\n  createDefaultSchema = (app: CaseType): JsonSchema => {\n    const newSchema = new JsonSchema().deserialize({ type: 'object', 'properties': [ ] });\n    const topLevelType = {};\n    topLevelType[app.name] = {};\n    newSchema.properties.push(topLevelType);\n    return newSchema;\n  }\n\n  handleRenderedLayout = (layout: any) => {\n    if (!this.autoLayout) {\n      this.autoLayout = layout;\n    }\n  }\n\n  useAutoLayout = () => {\n    this.layout = this.autoLayout;\n    this.layoutString = TcCoreCommonFunctions.formLayoutToJson(this.autoLayout);\n    this.updateLayout(this.layoutString);\n  }\n\n  useBasicLayout = () => {\n    this.layout = [ { type: 'help',\n      helpvalue: '<span>Please fill in this form!</span>' }, '*' ];\n    this.layoutString = TcCoreCommonFunctions.formLayoutToJson(this.layout);\n    this.updateLayout(this.layoutString);\n  }\n\n  useNewLayout = () => {\n    this.layout = [ { type: 'help',\n      helpvalue: '<span>Please fill in this form!</span>' } ];\n    this.layoutString = TcCoreCommonFunctions.formLayoutToJson(this.layout);\n    this.updateLayout(this.layoutString);\n  }\n\n  useExampleLayout = () => {\n    this.layout = JSON.parse('[\\n' +\n      '  {\\n' +\n      '    \"type\": \"help\",\\n' +\n      '    \"helpvalue\": \"<span>Please fill in this form!</span>\"\\n' +\n      '  },\\n' +\n      '  {\\n' +\n      '    \"key\": \"Expenses.ClaimantName\",\\n' +\n      '    \"type\": \"select\",\\n' +\n      '    \"titleMap\": [\\n' +\n      '      { \"value\": \"John Smith\", \"name\": \"John Smith\" },\\n' +\n      '      { \"value\": \"Justine Rogers\", \"name\": \"Justin Rogers\" },\\n' +\n      '      { \"value\": \"James West\", \"name\": \"James West\"}\\n' +\n      '    ]\\n' +\n      '  },\\n' +\n      '  {\\n' +\n      '      \"type\": \"conditional\",\\n' +\n      '      \"condition\": \"model.Expenses.ClaimantName\",\\n' +\n      '      \"items\": [\\n' +\n      '          {\\n' +\n      '              \"key\": \"Expenses.DepartmentCode\",\\n' +\n      '                \"type\": \"text\"\\n' +\n      '          }\\n' +\n      '        ]\\n' +\n      '  }\\n' +\n      ']');\n    this.layoutString = TcCoreCommonFunctions.formLayoutToJson(this.layout);\n    this.updateLayout(this.layoutString);\n  }\n\n  dropLayout = () => {\n    this.layout = undefined;\n    this.layoutString = undefined;\n    this.setProcessFormConfig(this.selectedProcess.formTag, 'RESET');\n  }\n\n  dropData = () => {\n    this.formDataJSON = undefined;\n    this.data = undefined;\n    this.setProcessFormConfig(this.selectedProcess.formTag, undefined, 'RESET');\n  }\n\n  saveSampleData = (sampleData: any) => {\n    if (sampleData !== undefined && JSON.stringify(sampleData) !== '{}') {\n      this.formDataJSON = JSON.stringify(sampleData, null, 2);\n      this.data = sampleData;\n      this.dataPanel.open();\n      this.setProcessFormConfig(this.selectedProcess.formTag, undefined, this.formDataJSON);\n    }\n  }\n\n  handleSaveFormConfig = () => {\n    this.formConfigUpdate.emit(this.formConfig);\n  }\n\n  openLayoutDocsTab = () => {\n    window.open('https://github.com/json-schema-form/angular-schema-form/blob/master/docs/index.md#form-definitions');\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    if (!this.formsFramework) {\n      this.formsFramework = 'material-design';\n    }\n    if (this.schema) {\n      this.formSchemaJSON = JSON.stringify(this.schema, null, 2);\n    }\n  }\n}\n","<div fxFill fxLayout=\"row\" *ngIf=\"formConfig\">\n  <div fxFlex class=\"tcs-form-config-pane\">\n    <div class=\"tcs-form-config-header\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n      <div fxLayoutAlign=\"start center\">\n        <!--mat-icon svgIcon=\"tcs-config-icon\"></mat-icon-->\n        <div class=\"tcs-form-config-header-text\">Form Preview</div>\n      </div>\n    </div>\n    <div class=\"tcs-form-config-content\" *ngIf=\"!selectedProcessFormConfig || !selectedProcessFormConfig?.externalForm; else customFormWarning\">\n      <tcfrm-rendered-form *ngIf=\"selectedProcess\" [schema]=\"schema\" [layout]=\"initialLayout\" [data]=\"data\" [options]=\"options\"\n                           [formsFramework]=\"formsFramework\" (formSubmit)=\"saveSampleData($event)\"\n                           (renderedLayout)=\"handleRenderedLayout($event)\"></tcfrm-rendered-form>\n    </div>\n    <ng-template #customFormWarning>\n      <div class=\"tcs-form-config-content\">This form is configured as a custom form in the custom form registry</div>\n    </ng-template>\n  </div>\n  <div fxFlex fxLayout=\"column\">\n    <div fxFlex class=\"tcs-form-config-pane\" fxLayout=\"column\">\n      <div class=\"tcs-form-config-header\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\n        <div fxLayoutAlign=\"start center\">\n          <!--mat-icon svgIcon=\"tcs-config-icon\"></mat-icon-->\n          <div class=\"tcs-form-config-header-text\">Form Configuration</div>\n        </div>\n      </div>\n      <div class=\"tcs-form-config-content\">\n        <div fxLayout=\"row\">\n          <tcla-live-apps-applications fxFlex [formFieldRendering]=\"true\" [sandboxId]=\"sandbox\" [appIds]=\"appIds\"\n                                       (selection)=\"handleAppSelection($event)\"></tcla-live-apps-applications>\n          <tcla-live-apps-processes fxFlex [sandboxId]=\"sandbox\" [appId]=\"selectedApp?.applicationId\"\n                                    [typeId]=\"selectedApp?.id\" [includeCaseDataPage]=\"true\"\n                                    (processClicked)=\"handleProcessSelection($event)\"></tcla-live-apps-processes>\n        </div>\n\n        <mat-accordion>\n          <mat-expansion-panel [disabled]=\"!selectedProcess || selectedProcessFormConfig?.externalForm\">\n            <mat-expansion-panel-header>\n              <mat-panel-title>Schema</mat-panel-title>\n            </mat-expansion-panel-header>\n            <div>This is the input schema (form) generated by Live Apps for the selected process. A form is auto\n              generated based on this schema. You cannot edit this schema directly but changing the form in Live Apps\n              Designer will change this schema.\n            </div>\n            <div *ngIf=\"formSchemaJSON\"\n                 ace-editor\n                 [text]=\"formSchemaJSON\"\n                 [options]=\"aceEditorOptions\"\n                 [readOnly]=\"true\"\n                 [autoUpdateContent]=\"true\"\n                 style=\"width:100%; overflow: auto; border: 1px solid black;\">\n              (loading form schema...)\n            </div>\n          </mat-expansion-panel>\n          <mat-expansion-panel [disabled]=\"!selectedProcess || selectedProcessFormConfig?.externalForm\">\n            <mat-expansion-panel-header>\n              <mat-panel-title>Layout</mat-panel-title>\n            </mat-expansion-panel-header>\n            <div *ngIf=\"!layoutString\">\n              <span>You can&nbsp;</span>\n              <span class=\"tcs-clickable\" (click)=\"useAutoLayout()\">edit</span>\n              <span>&nbsp;the generated layout or&nbsp;</span>\n              <span class=\"tcs-clickable\" (click)=\"useBasicLayout()\">append</span>\n              <span>&nbsp;the automatic layout&nbsp;</span>\n              <span>&nbsp;or create a &nbsp;</span>\n              <span class=\"tcs-clickable\" (click)=\"useNewLayout()\">new</span>\n              <span>&nbsp;custom layout or start with an&nbsp;</span>\n              <span class=\"tcs-clickable\" (click)=\"useExampleLayout()\">example</span>\n              <span>&nbsp;layout</span>\n            </div>\n            <div *ngIf=\"layoutString\">\n              <span>Layout uses JSON schema form layout options - refer to 'Form Definitions'&nbsp;</span><span\n              class=\"tcs-clickable\" (click)=\"openLayoutDocsTab()\">here</span><span>&nbsp;for layout options</span>\n              <div *ngIf=\"selectedProcess && selectedProcess.processType === 'casedata'\"><br><span>Note: Case Data forms are rendered read-only and buttons will not be displayed</span>\n              </div>\n            </div>\n            <div *ngIf=\"layoutString\" fxLayoutAlign=\"row\">\n              <div\n                ace-editor\n                [text]=\"layoutString\"\n                [options]=\"aceEditorOptions\"\n                [readOnly]=\"false\"\n                [autoUpdateContent]=\"true\"\n                (textChanged)=\"updateLayout($event)\"\n                style=\"width:100%; overflow: auto; border: 1px solid black;\">\n                (loading form layout...)\n              </div>\n              <mat-icon svgIcon=\"tcs-close-icon\" (click)=\"dropLayout()\" matTooltip=\"Clear layout\"\n                        matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\"></mat-icon>\n            </div>\n          </mat-expansion-panel>\n          <mat-expansion-panel #dataPanel [disabled]=\"!selectedProcess || selectedProcessFormConfig?.externalForm\">\n            <mat-expansion-panel-header>\n              <mat-panel-title>Data</mat-panel-title>\n            </mat-expansion-panel-header>\n            <div *ngIf=\"!formDataJSON\">You can create a sample data set by using the preview form and clicking submit\n            </div>\n            <div *ngIf=\"formDataJSON\">Edits to this data will be displayed in the preview</div>\n            <div *ngIf=\"formDataJSON\" fxLayoutAlign=\"row\">\n              <div\n                ace-editor\n                [text]=\"formDataJSON\"\n                [options]=\"aceEditorOptions\"\n                [readOnly]=\"false\"\n                [autoUpdateContent]=\"true\"\n                (textChanged)=\"updateDataJSON($event)\"\n                style=\"width:100%; overflow: auto; border: 1px solid black;\">\n              </div>\n              <mat-icon svgIcon=\"tcs-close-icon\" (click)=\"dropData()\" matTooltip=\"Clear data\" matTooltipShowDelay=\"1000\"\n                        matTooltipPosition=\"below\"></mat-icon>\n            </div>\n          </mat-expansion-panel>\n        </mat-accordion>\n      </div>\n    </div>\n    <div class=\"tcs-form-config-pane\" fxLayout=\"column\" *ngIf=\"formConfig && formConfig.processFormConfigs\">\n      <div class=\"tcs-form-config-content\" fxLayout=\"row\">\n        <span>Custom Form Config for {{formConfig.processFormConfigs.length}} {{formConfig.processFormConfigs.length === 1 ? 'process' : 'processes'}}</span>\n        <div fxFlex fxLayout=\"column\" fxLayoutAlign=\"end end\" style=\"margin-right: 20px;\">\n          <button mat-raised-button color=\"primary\" (click)=\"handleSaveFormConfig()\"\n                  matTooltip=\"Save form configuration {{formConfig.processFormConfigs | json}}\" matTooltipShowDelay=\"1000\" matTooltipPosition=\"below\">Save Form\n            Configuration\n          </button>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n","import {Component, OnInit} from '@angular/core';\nimport {FormConfig, LiveAppsConfig} from '../../models/tc-liveapps-config';\nimport {ActivatedRoute} from '@angular/router';\nimport {GeneralConfig, Claim} from '@tibco-tcstk/tc-core-lib';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {TcFormConfigService} from '../../services/tc-form-config.service';\n\n\n/**\n * Configuration of forms\n *\n * ![alt-text](../live-apps-settings-forms.png \"\")\n *\n *@example <tcla-live-apps-settings-forms></tcla-live-apps-settings-forms>\n */\n@Component({\n  selector: 'tcla-live-apps-settings-form-layout',\n  templateUrl: './live-apps-settings-form-layout.component.html',\n  styleUrls: ['./live-apps-settings-form-layout.component.css']\n})\nexport class LiveAppsSettingsFormLayoutComponent extends LiveAppsComponent implements OnInit {\n\n  public sandboxId: number;\n  public liveAppsConfig: LiveAppsConfig;\n  public generalConfig: GeneralConfig;\n  public formConfig: FormConfig;\n  public claims: Claim;\n\n  constructor(protected route: ActivatedRoute, protected formConfigService: TcFormConfigService, protected snackBar: MatSnackBar) {\n    super();\n  }\n\n  public formConfigChange(formConfig: FormConfig) {\n    this.formConfig = formConfig;\n    this.runSaveFunction();\n  }\n\n  public ngOnInit() {\n    this.generalConfig = this.route.snapshot.data.laConfigHolder.generalConfig;\n    this.liveAppsConfig = this.route.snapshot.data.laConfigHolder.liveAppsConfig;\n    this.formConfig = this.route.snapshot.data.formConfig;\n    this.claims = this.route.snapshot.data.claims;\n    this.sandboxId = Number(this.claims.primaryProductionSandbox.id).valueOf();\n  }\n\n  public runSaveFunction = (): void => {\n    this.formConfigService.updateFormConfig(this.sandboxId, this.generalConfig.uiAppId, this.formConfig, this.formConfig.id).subscribe(\n      result => {\n        this.snackBar.open('Live Apps form layout configuration settings saved', 'OK', {\n          duration: 3000\n        });\n      },\n      error => {\n        this.snackBar.open('Error saving form layout configuration', 'OK', {\n          duration: 3000\n        });\n      }\n    );\n  }\n}\n","<div fxLayout=\"column\" class=\"tcs-live-apps-settings-pane\" fxFill>\n  <tc-tibco-cloud-widget-header style=\"height: 40px;\" [icon]=\"'tcs-capabilities'\" [headerText]=\"'Live Apps Form Configuration'\">\n  </tc-tibco-cloud-widget-header>\n  <div fxFlex style=\"padding: 20px; overflow: hidden\" fxLayout=\"column\">\n    <tcla-live-apps-form-preview style=\"max-height: 100%; height: 100%;\" [sandbox]=\"sandboxId\" [appIds]=\"liveAppsConfig.applicationIds\" [formsFramework]=\"liveAppsConfig.formsFramework\" [formConfig]=\"formConfig\" (formConfigUpdate)=\"formConfigChange($event)\"></tcla-live-apps-form-preview>\n  </div>\n</div>\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n  selector: 'tcla-live-apps-form',\n  templateUrl: './live-apps-form.component.html',\n  styleUrls: ['./live-apps-form.component.css']\n})\nexport class LiveAppsFormComponent {\n\n  constructor() { }\n\n}\n","<p>live-apps-form works!</p>\n","import {Component, OnInit} from '@angular/core';\nimport {FormConfig, FormRef, LiveAppsConfig, ProcessFormConfig} from '../../models/tc-liveapps-config';\nimport {ActivatedRoute} from '@angular/router';\nimport {GeneralConfig, Claim, Sandbox, TibcoCloudNewElementComponent, RoleAttribute} from '@tibco-tcstk/tc-core-lib';\nimport {LiveAppsComponent} from '../live-apps-component/live-apps-component.component';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {TcFormConfigService} from '../../services/tc-form-config.service';\n\n/**\n * Configuration of forms\n *\n * ![alt-text](../live-apps-settings-forms.png \"\")\n *\n *@example <tcla-live-apps-settings-forms></tcla-live-apps-settings-forms>\n */\n@Component({\n  selector: 'tcla-live-apps-settings-forms',\n  templateUrl: './live-apps-settings-custom-forms.component.html',\n  styleUrls: ['./live-apps-settings-custom-forms.component.css']\n})\nexport class LiveAppsSettingsCustomFormsComponent extends LiveAppsComponent implements OnInit {\n\n  public sandboxId: number;\n  public liveAppsConfig: LiveAppsConfig;\n  public generalConfig: GeneralConfig;\n  public formConfig: FormConfig;\n  public claims: Claim;\n  public newRef: FormRef = new FormRef();\n\n  constructor(protected route: ActivatedRoute, protected formConfigService: TcFormConfigService, protected snackBar: MatSnackBar) {\n    super();\n  }\n\n  public formConfigChange(formConfig: FormConfig) {\n    this.formConfig = formConfig;\n    this.runSaveFunction();\n  }\n\n  public ngOnInit() {\n    this.generalConfig = this.route.snapshot.data.laConfigHolder.generalConfig;\n    this.liveAppsConfig = this.route.snapshot.data.laConfigHolder.liveAppsConfig;\n    this.formConfig = this.route.snapshot.data.formConfig;\n    this.claims = this.route.snapshot.data.claims;\n    this.sandboxId = Number(this.claims.primaryProductionSandbox.id).valueOf();\n  }\n\n  public addRefFunction = (): void => {\n    this.formConfig = TcFormConfigService.setCustomFormTag(this.newRef, this.formConfig);\n    this.newRef = new FormRef();\n  }\n\n  deleteRefFunction = (config: ProcessFormConfig): void => {\n    this.formConfig = TcFormConfigService.unsetCustomFormTag(config.formTag, this.formConfig);\n  }\n\n  public runSaveFunction = (): void => {\n    this.formConfigService.updateFormConfig(this.sandboxId, this.generalConfig.uiAppId, this.formConfig, this.formConfig.id).subscribe(\n      result => {\n        this.snackBar.open('Live Apps form layout configuration settings saved', 'OK', {\n          duration: 3000\n        });\n      },\n      error => {\n        this.snackBar.open('Error saving form layout configuration', 'OK', {\n          duration: 3000\n        });\n      }\n    );\n  }\n\n}\n","<div fxLayout=\"column\" class=\"tcs-live-apps-settings-pane\" fxFill>\n  <tc-tibco-cloud-widget-header style=\"height: 40px;\" [icon]=\"'tcs-capabilities'\" [headerText]=\"'Live Apps Custom Form Configuration'\">\n  </tc-tibco-cloud-widget-header>\n  <div fxFlex style=\"padding: 20px;\" fxLayout=\"column\">\n    <div fxLayout=\"row\" fxLayoutAlign=\"start start\" fxLayoutGap=\"5px\" style=\"height: 20px\">\n      <p class=\"tcs-settings-text\">Register formTags as custom forms:</p>\n    </div>\n    <div fxLayout=\"column\" style=\"padding: 10px;\">\n      <div *ngFor=\"let tag of formConfig.processFormConfigs\">\n        <div class=\"existing-ref\" *ngIf=\"tag.externalForm\">\n          <div>{{tag.formTag}}</div>\n          <mat-icon (click)=\"deleteRefFunction(tag)\" svgIcon=\"tcs-close-icon\"></mat-icon>\n        </div>\n      </div>\n      <div class=\"new-ref\">\n        <!-- Format of ref is <applicationName>.<applicationInternalName>.<processType>.<processName> -->\n        <mat-form-field>\n          <input matInput placeholder=\"applicationName\" [(ngModel)]=\"newRef.applicationName\">\n        </mat-form-field>\n        <div>.</div>\n        <mat-form-field>\n          <input matInput placeholder=\"applicationInternalName\" [(ngModel)]=\"newRef.applicationInternalName\">\n        </mat-form-field>\n        <div>.</div>\n        <mat-form-field>\n          <mat-select [(ngModel)]=\"newRef.processType\" placeholder=\"processType\">\n            <mat-option value=\"creator\">creator</mat-option>\n            <mat-option value=\"action\">action</mat-option>\n            <mat-option value=\"casedata\">casedata</mat-option>\n            <mat-option value=\"workitem\">workitem</mat-option>\n          </mat-select>\n        </mat-form-field>\n        <div>.</div>\n        <mat-form-field>\n          <input matInput [placeholder]=\"(newRef.processType && newRef.processType) === 'workitem' ? 'activity name' : 'process name'\" [(ngModel)]=\"newRef.processName\">\n        </mat-form-field>\n        <button mat-raised-button\n                [disabled]=\"!newRef ||\n                !newRef.applicationName ||\n                !newRef.applicationInternalName ||\n                !newRef.processType ||\n                !newRef.processName\" class=\"add-ref-button\" color=\"secondary\"\n                (click)=\"addRefFunction()\">Add</button>\n      </div>\n    </div>\n    <div fxFlex class=\"tcs-filler-panel\"></div>\n    <div fxLayout=\"row\" fxLayoutAlign=\"end end\" fxLayoutGap=\"10px\" style=\"min-height: 50px\">\n      <button mat-raised-button color=\"primary\" (click)=\"runSaveFunction()\">Save</button>\n    </div>\n  </div>\n</div>\n\n","import {Component, EventEmitter, Input, Output} from '@angular/core';\nimport {LiveAppsService} from '../../services/live-apps.service';\nimport {TcAppDefinitionService} from '../../services/tc-app-definition.service';\nimport {CredentialsService} from '../../services/credentials.service';\n\n@Component({\n  selector: 'tcla-live-apps-login-oauth',\n  templateUrl: './live-apps-login-oauth.component.html',\n  styleUrls: ['./live-apps-login-oauth.component.css']\n})\nexport class LiveAppsLoginOauthComponent {\n\n  @Input() appName: string;\n  @Output() loggedIn: EventEmitter<undefined> = new EventEmitter<undefined>();\n  /**\n   * Output useOauth event\n   */\n  @Output() createOauthKey = new EventEmitter();\n  /**\n   * Output signUp event\n   */\n  @Output() signUp = new EventEmitter();\n\n  /**\n   * Output changeLogin event\n   */\n  @Output() changeLogin = new EventEmitter();\n\n  constructor(private liveAppsService: LiveAppsService, protected appDefinitionService: TcAppDefinitionService, protected credentialsService: CredentialsService) { }\n\n  accessKey: string;\n  error: string;\n  loading = false;\n\n  handleChange(event) {\n    this.accessKey = event.detail.value;\n  }\n\n  handleChangeLogin() {\n    this.changeLogin.emit();\n  }\n\n  handleCreate() {\n    this.createOauthKey.emit();\n  }\n\n  handleSignUp() {\n    this.signUp.emit();\n  }\n\n  handleAuthorize() {\n    this.loading = true;\n    this.error = undefined;\n    this.liveAppsService.checkAuth(this.accessKey)\n      .then(\n        response => {\n          console.log(response);\n          // save auth\n          this.credentialsService.setKey(this.accessKey);\n            console.log('Credentials Saved');\n            this.appDefinitionService.refresh().toPromise().then(\n                  ok => {\n                    this.credentialsService.setMode('oauth');\n                    this.loggedIn.emit();\n                  }\n                );\n              }\n            )\n      .catch(\n        error => {\n          console.error('Unable to check authorization: ', error);\n          this.loading = false;\n          this.error = 'Invalid activation key';\n        }\n      );\n  }\n\n  handleReturn() {\n    this.changeLogin.emit();\n  }\n\n}\n","<div class=\"login-container\">\n  <div class=\"login-screen\">\n    <div class=\"login-container-box\">\n      <div class=\"login-box\">\n        <div class=\"login-inner-box\">\n          <div class=\"welcome-text\">Welcome to</div>\n          <div class=\"welcome-content\">\n            <mat-icon svgIcon=\"ic-tibco-logo\" class=\"tibco-logo\"></mat-icon>\n            <div class=\"app-text\">{{appName}}</div>\n          </div>\n          <div class=\"login-fields\">\n            <mat-form-field>\n              <input matInput type=\"password\" placeholder=\"Authorization key\" [(ngModel)]=\"accessKey\" name=\"authorizationKey\" required>\n              <mat-hint align=\"start\">Paste your authorization key to get started</mat-hint>\n            </mat-form-field>\n          </div>\n          <div class=\"sign-in-section\">\n            <button style=\"width: 144px;\" type=\"submit\" mat-raised-button color=\"primary\" (click)=\"handleAuthorize()\" [disabled]=\"!this.accessKey || this.loading\">Login</button>\n          </div>\n          <mat-spinner *ngIf=\"loading\" class=\"spinner\" diameter=\"40\"></mat-spinner>\n          <div *ngIf=\"error\" class=\"error-text\">{{error}}</div>\n          <div class=\"sign-up-section\">\n            <div class=\"sign-up-text\">\n              <span>No oauth key? </span>\n              <a (click)=\"handleCreate()\">Create oauth key</a>\n              <span> or </span>\n              <a (click)=\"handleReturn()\">Return to login</a>\n              <br>\n              <span>Don’t have an account? </span><a (click)=\"handleSignUp()\">Sign up</a>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class=\"copyright-text\">\n      <span>Copyright © 2021 TIBCO Software Inc. All Rights Reserved.</span>\n    </div>\n  </div>\n</div>\n","// This guard will redirect to login screen when not authenticated against live apps.\n// It is really just for dev as when on Tibco Cloud - Tibco cloud handles expiry/login redirection.\n// Also when using oauth this isnt relevant as the oauth token obtained handled from outside the app.\n\n// session is detected if API called in last 30 mins (checks local sessionTimestamp)\n// alternative way to achieve this would be to make an API call - eg) live apps claims call\n\n// NOTE: assumes the login route is /login\n\nimport {Inject, Injectable} from '@angular/core';\nimport { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport {TcCoreConfigService} from '@tibco-tcstk/tc-core-lib';\nimport {CredentialsService} from '../services/credentials.service';\nimport {TcAppDefinitionService} from '../services/tc-app-definition.service';\n\n@Injectable()\nexport class AuthGuard implements CanActivate {\n  private TIBCO_CLOUD_DOMAIN = 'cloud.tibco.com';\n  private TIBCO_TEST_DOMAIN = 'tenant-integration.tcie.pro';\n  private TIBCO_DEV_DOMAIN = 'emea.tibco.com';\n\n  constructor(private router: Router, private coreConfigService: TcCoreConfigService, protected credentialsService: CredentialsService, protected appDefinitionService: TcAppDefinitionService) {\n  }\n\n  redirectLogin(state: RouterStateSnapshot): boolean {\n    this.router.navigate(['/login'], {queryParams: {returnUrl: state.url}});\n    return false;\n  }\n\n  canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\n    // check if we are hosted on tibco.cloud.com\n    if (this.credentialsService.isCloud()) {\n      // delegate handling login/auth to Tibco Cloud since WRP resources are protected anyway\n      return true;\n    }\n    if (this.credentialsService.isOauth()) {\n      // oauth mode\n      if (this.appDefinitionService.claims) {\n        return true;\n      } else {\n        // something wrong - invalid oauth key?\n        console.warn('Auth guard| Oauth configured but no claims available in appDefinitionService');\n        return this.redirectLogin(state);\n      }\n    }\n    if (this.credentialsService.isCookies()) {\n      // cookies mode\n      if (this.appDefinitionService.claims) {\n        return true;\n      } else {\n        // assume no cookies - redirect to login\n        console.warn('Auth guard| cookies mode but no claims - redirecting to login');\n        return this.redirectLogin(state);\n      }\n    }\n    // fallback - refuse access\n    console.warn('Auth guard| fallback - redirecting to login');\n    return this.redirectLogin(state);\n\n    /*const host = window.location.hostname.split('.');\n    const hostDomain = host[host.length - 3] + '.' + host[host.length - 2] + '.' + host[host.length - 1];\n    if (hostDomain === this.TIBCO_CLOUD_DOMAIN || hostDomain === this.TIBCO_TEST_DOMAIN || hostDomain === this.TIBCO_DEV_DOMAIN || (this.appDefinitionService && this.appDefinitionService.claims)) {\n      // delegate handling login/auth to Tibco Cloud since WRP resources are protected anyway\n      return true;\n    } else if (this.coreConfigService.getConfig().oAuthLocalStorageKey && this.coreConfigService.getConfig().oAuthLocalStorageKey !== '') {\n      // dont use this when oauth enabled\n      if (!this.credentialsService.authorized) {\n        return this.credentialsService.isAuth().then(\n          ok => {\n            if (ok) {\n              return true;\n            } else {\n              this.router.navigate(['/login'], {queryParams: {returnUrl: state.url}});\n              return false;\n            }\n          },\n          error => {\n            this.router.navigate(['/login'], {queryParams: {returnUrl: state.url}});\n            return false;\n          }\n        );\n      } else {\n        return true;\n      }\n    } else {\n      // use the sessionTimestamp to decide whether to redirect to login (30 mins expiry of token if no API call)\n      const tcsTimestamp = sessionStorage.getItem('tcsTimestamp');\n      if (tcsTimestamp && Number(tcsTimestamp) > (Number(Date.now()) - (30 * 60000))) {\n        // logged in and api called made in last 30 mins so should be OK\n        return true;\n      } else {\n        // not logged in so redirect to login page\n        console.warn(Date.now());\n        console.warn('Token expired - redirect to login: ', tcsTimestamp);\n        this.router.navigate(['/login'], {queryParams: {returnUrl: state.url}});\n      }\n    }*/\n  }\n}\n","import {InjectionToken} from '@angular/core';\n\nexport interface TcLiveappsConfiguration {\n  defer: Boolean;\n}\n\nexport class TcLiveappsConfig implements TcLiveappsConfiguration {\n  defer: Boolean;\n  constructor(\n    defer: Boolean) {\n    this.defer = defer;\n  }\n}\n\nexport const TcLiveappsConfigurationService = new InjectionToken<TcLiveappsConfiguration>('TcLiveappsConfiguration');\n","import {Inject, Injectable} from '@angular/core';\nimport { TcLiveappsConfiguration, TcLiveappsConfigurationService, TcLiveappsConfig } from '../models/tcLiveappsConfig';\n\n\n@Injectable()\nexport class TcLiveappsConfigService {\n  private config: TcLiveappsConfiguration;\n  constructor(@Inject(TcLiveappsConfigurationService) private conf: TcLiveappsConfiguration) {\n    if (conf) {\n      this.config = conf;\n    } else {\n      if (conf) {\n        this.config = new TcLiveappsConfig(conf.defer);\n      } else {\n        this.config = new TcLiveappsConfig(false);\n      }\n    }\n  }\n\n  public getConfig = (): TcLiveappsConfiguration => {\n    return this.config;\n  }\n\n  public setConfig = (conf: TcLiveappsConfiguration) => {\n    this.config = conf;\n  }\n}\n","import {APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA, Inject, ModuleWithProviders, NgModule} from '@angular/core';\nimport { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatCardModule} from '@angular/material/card';\nimport {MatCheckboxModule} from '@angular/material/checkbox';\nimport {MatDialogModule} from '@angular/material/dialog';\nimport {MatExpansionModule} from '@angular/material/expansion';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MatIconModule, MatIconRegistry} from '@angular/material/icon';\nimport {MatInputModule} from '@angular/material/input';\nimport {MatListModule} from '@angular/material/list';\nimport {MatMenuModule} from '@angular/material/menu';\nimport {MatProgressBarModule} from '@angular/material/progress-bar';\nimport {MatProgressSpinnerModule} from '@angular/material/progress-spinner';\nimport {MatRadioModule} from '@angular/material/radio';\nimport {MatSelectModule} from '@angular/material/select';\nimport {MatSlideToggleModule} from '@angular/material/slide-toggle';\nimport {MatSnackBarModule} from '@angular/material/snack-bar';\nimport {MatTableModule} from '@angular/material/table';\nimport {MatTabsModule} from '@angular/material/tabs';\nimport {MatToolbarModule} from '@angular/material/toolbar';\nimport {MatTooltipModule} from '@angular/material/tooltip';\nimport {CdkScrollableModule} from '@angular/cdk/scrolling';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { ColorPickerModule } from 'ngx-color-picker';\nimport { CachingInterceptor, DurationSincePipe } from '@tibco-tcstk/tc-core-lib';\nimport { RequestCacheService } from '@tibco-tcstk/tc-core-lib';\nimport { LiveAppsCaseSearchComponent } from './components/live-apps-case-search/live-apps-case-search.component';\nimport { LiveAppsCaseListComponent } from './components/live-apps-case-list/live-apps-case-list.component';\nimport { LiveAppsCaseSummaryComponent } from './components/live-apps-case-summary/live-apps-case-summary.component';\nimport { LiveAppsStateIconComponent } from './components/live-apps-state-icon/live-apps-state-icon.component';\nimport { LiveAppsApplicationsComponent } from './components/live-apps-applications/live-apps-applications.component';\nimport { LiveAppsNotesComponent } from './components/live-apps-notes/live-apps-notes.component';\nimport {\n  LiveAppsDocumentsComponent,\n  LiveAppsDocumentUploadDialogComponent, LiveAppsDocumentViewerDialogComponent\n} from './components/live-apps-documents/live-apps-documents.component';\nimport { LiveAppsCaseStatesComponent } from './components/live-apps-case-states/live-apps-case-states.component';\nimport {\n    LiveAppsApplicationConfigurationComponent,\n    LiveAppsStateIconUploadDialogComponent\n} from './components/live-apps-application-configuration/live-apps-application-configuration.component';\nimport { LiveAppsFavoriteCasesComponent } from './components/live-apps-favorite-cases/live-apps-favorite-cases.component';\nimport { LiveAppsCaseAuditComponent } from './components/live-apps-case-audit/live-apps-case-audit.component';\nimport { LiveAppsCaseDataComponent } from './components/live-apps-case-data/live-apps-case-data.component';\nimport { LiveAppsCaseActionsComponent } from './components/live-apps-case-actions/live-apps-case-actions.component';\nimport { LiveAppsRecentCasesComponent } from './components/live-apps-recent-cases/live-apps-recent-cases.component';\nimport { LiveAppsCaseStateAuditComponent } from './components/live-apps-case-state-audit/live-apps-case-state-audit.component';\nimport { LiveAppsNotesEditorComponent } from './components/live-apps-notes-editor/live-apps-notes-editor.component';\nimport { LiveAppsService } from './services/live-apps.service';\nimport { LiveAppsLoginComponent } from './components/live-apps-login/live-apps-login.component';\nimport { LiveAppsSearchWidgetComponent } from './components/live-apps-search-widget/live-apps-search-widget.component';\nimport { LiveAppsComponent } from './components/live-apps-component/live-apps-component.component';\nimport { MockingInterceptor } from '@tibco-tcstk/tc-core-lib';\nimport { LiveAppsCaseCreatorComponent } from './components/live-apps-case-creator/live-apps-case-creator.component';\nimport { LiveAppsCreatorSelectorComponent } from './components/live-apps-creator-selector/live-apps-creator-selector.component';\nimport { LiveAppsCreatorsComponent } from './components/live-apps-creators/live-apps-creators.component';\nimport { LiveAppsCaseActionComponent } from './components/live-apps-case-action/live-apps-case-action.component';\nimport { LiveAppsActionsComponent } from './components/live-apps-actions/live-apps-actions.component';\nimport { TcCoreLibModule } from '@tibco-tcstk/tc-core-lib';\nimport { TcFormsLibModule } from '@tibco-tcstk/tc-forms-lib';\nimport { CaseGuard } from './guards/case.guard';\nimport { TcCaseDataService } from './services/tc-case-data.service';\nimport { LiveAppsCaseDataDisplayComponent } from './components/live-apps-case-data-display/live-apps-case-data-display.component';\nimport { LiveAppsCaseCockpitComponent } from './components/live-apps-case-cockpit/live-apps-case-cockpit.component';\nimport { TcCaseProcessesService } from './services/tc-case-processes.service';\nimport { LiveAppsMilestoneComponent } from './components/live-apps-milestone/live-apps-milestone.component';\nimport { TcDocumentService } from './services/tc-document.service';\nimport { LiveAppsAppConfigurationWidgetComponent } from './components/live-apps-app-configuration-widget/live-apps-app-configuration-widget.component';\nimport { LiveAppsCaseCreatorWidgetComponent } from './components/live-apps-case-creator-widget/live-apps-case-creator-widget.component';\nimport { LiveAppsHomeCockpitComponent } from './components/live-apps-home-cockpit/live-apps-home-cockpit.component';\nimport { TcLiveAppsConfigService } from './services/tc-live-apps-config.service';\nimport { LiveAppsApplicationListComponent } from './components/live-apps-application-list/live-apps-application-list.component';\nimport { LiveAppsApplicationCreateButtonComponent } from './components/live-apps-application-create-button/live-apps-application-create-button.component';\nimport { LiveAppsCreatorDialogComponent } from './components/live-apps-creator-dialog/live-apps-creator-dialog.component';\nimport { LiveAppsSettingsComponent } from './components/live-apps-settings/live-apps-settings.component';\nimport { LiveAppsSettingsSummaryCardsComponent } from './components/live-apps-settings-summary-cards/live-apps-settings-summary-cards.component';\nimport { LiveAppsSettingsRecentCasesComponent } from './components/live-apps-settings-recent-cases/live-apps-settings-recent-cases.component';\nimport { LiveAppsSettingsRolesComponent } from './components/live-apps-settings-roles/live-apps-settings-roles.component';\nimport { TcRolesService } from './services/tc-roles-service.ts.service';\nimport { LiveAppsRoleSwitcherComponent } from './components/live-apps-role-switcher/live-apps-role-switcher.component';\nimport {LiveAppsCaseCreatorsComponent} from './components/live-apps-case-creators/live-apps-case-creators.component';\nimport {ParseAuditMessagePipe} from './pipes/audit.pipe';\nimport {LiveAppsCaseActionsListComponent} from './components/live-apps-case-actions-list/live-apps-case-actions-list.component';\nimport { LiveAppsDocumentViewerComponent } from './components/live-apps-document-viewer/live-apps-document-viewer.component';\nimport { LiveAppsLandingPageComponent } from './components/live-apps-landing-page/live-apps-landing-page.component';\nimport {NgChartsModule} from 'ng2-charts';\nimport {TcLiveAppsReportingService} from './services/tc-live-apps-reporting.service';\nimport {CommonModule, Location} from '@angular/common';\nimport {RoleGuard} from './guards/role.guard';\nimport { LiveAppsActiveCasesWidgetComponent } from './components/live-apps-active-cases-widget/live-apps-active-cases-widget.component';\nimport { LiveAppsActiveCasesReportComponent } from './components/live-apps-active-cases-report/live-apps-active-cases-report.component';\nimport { LiveAppsActiveCasesForTypeReportComponent } from './components/live-apps-active-cases-for-type-report/live-apps-active-cases-for-type-report.component';\nimport { LiveAppsSettingsAccessControlComponent } from './components/live-apps-settings-access-control/live-apps-settings-access-control.component';\nimport {LiveAppsLegacyFormComponent} from './components/live-apps-legacy-form/live-apps-legacy-form.component';\nimport {LiveAppsWorkitemsComponent} from './components/live-apps-workitems/live-apps-workitems.component';\nimport {LiveAppsLegacyProcessComponent} from './components/live-apps-legacy-process/live-apps-legacy-process.component';\nimport {LiveAppsSettingsFormsComponent} from './components/live-apps-settings-forms/live-apps-settings-forms.component';\nimport { LiveAppsSettingsLandingComponent } from './components/live-apps-settings-landing/live-apps-settings-landing.component';\nimport { LiveAppsHomeCockpitStandaloneComponent } from './components/live-apps-home-cockpit-standalone/live-apps-home-cockpit-standalone.component';\nimport { LiveAppsCaseCockpitStandaloneComponent } from './components/live-apps-case-cockpit-standalone/live-apps-case-cockpit-standalone.component';\nimport { LiveAppsCreatorStandaloneComponent } from './components/live-apps-creator-standalone/live-apps-creator-standalone.component';\nimport {LiveAppsActionStandaloneComponent} from './components/live-apps-action-standalone/live-apps-action-standalone.component';\nimport {SessionRefreshService} from '@tibco-tcstk/tc-core-lib';\nimport { LiveAppsProcessesComponent } from './components/live-apps-processes/live-apps-processes.component';\nimport { LiveAppsFormPreviewComponent } from './components/live-apps-form-preview/live-apps-form-preview.component';\nimport {LiveAppsSettingsFormLayoutComponent} from './components/live-apps-settings-form-layout/live-apps-settings-form-layout.component';\nimport {TcAppDefinitionService} from './services/tc-app-definition.service';\nimport { LiveAppsFormComponent } from './components/live-apps-form/live-apps-form.component';\nimport { LiveAppsWorkitemComponent } from './components/live-apps-workitem/live-apps-workitem.component';\nimport { LiveAppsFormWcComponent } from './components/live-apps-form-wc/live-apps-form-wc.component';\nimport {LiveAppsSettingsCustomFormsComponent} from './components/live-apps-settings-custom-forms/live-apps-settings-custom-forms.component';\nimport { LiveAppsLoginOauthComponent } from './components/live-apps-login-oauth/live-apps-login-oauth.component';\nimport {AuthGuard} from './guards/auth.guard';\nimport { TcLiveappsConfiguration, TcLiveappsConfigurationService } from './models/tcLiveappsConfig';\nimport { TcLiveappsConfigService } from './services/tc-liveapps-config-service';\n\nexport const TIBCO_CLOUD_DOMAIN = 'cloud.tibco.com';\nexport const TIBCO_TEST_DOMAIN = 'tenant-integration.tcie.pro';\nexport const TIBCO_DEV_DOMAIN = 'emea.tibco.com';\n\n// @dynamic\nexport function initAppDefinitionService(appDefinitionService: TcAppDefinitionService, tcLiveappsConfig: TcLiveappsConfigService) {\n  const loader = () => {\n      if (tcLiveappsConfig?.getConfig().defer) {\n        return true;\n      } else {\n        return appDefinitionService.refresh().toPromise();\n      }\n\n  }\n  return loader;\n}\n\n@NgModule({\n    declarations: [\n        LiveAppsLoginComponent,\n        LiveAppsApplicationsComponent,\n        LiveAppsCaseDataComponent,\n        LiveAppsCaseStatesComponent,\n        LiveAppsCaseActionsComponent,\n        LiveAppsCaseAuditComponent,\n        LiveAppsCaseStateAuditComponent,\n        LiveAppsRecentCasesComponent,\n        LiveAppsFavoriteCasesComponent,\n        LiveAppsDocumentsComponent,\n        LiveAppsNotesComponent,\n        LiveAppsNotesEditorComponent,\n        LiveAppsDocumentUploadDialogComponent,\n        LiveAppsDocumentViewerDialogComponent,\n        LiveAppsCaseSummaryComponent,\n        LiveAppsStateIconComponent,\n        LiveAppsApplicationConfigurationComponent,\n        LiveAppsStateIconUploadDialogComponent,\n        LiveAppsCaseListComponent,\n        LiveAppsCaseSearchComponent,\n        LiveAppsSearchWidgetComponent,\n        LiveAppsComponent,\n        LiveAppsCaseCreatorComponent,\n        LiveAppsCreatorSelectorComponent,\n        LiveAppsCreatorsComponent,\n        LiveAppsCaseActionComponent,\n        LiveAppsActionsComponent,\n        LiveAppsCaseDataDisplayComponent,\n        LiveAppsCaseCockpitComponent,\n        LiveAppsMilestoneComponent,\n        LiveAppsAppConfigurationWidgetComponent,\n        LiveAppsCaseCreatorWidgetComponent,\n        LiveAppsHomeCockpitComponent,\n        LiveAppsApplicationListComponent,\n        LiveAppsApplicationCreateButtonComponent,\n        LiveAppsCreatorDialogComponent,\n        LiveAppsSettingsComponent,\n        LiveAppsSettingsSummaryCardsComponent,\n        LiveAppsSettingsRecentCasesComponent,\n        LiveAppsSettingsRolesComponent,\n        LiveAppsRoleSwitcherComponent,\n        LiveAppsCaseCreatorsComponent,\n        ParseAuditMessagePipe,\n        LiveAppsCaseActionsListComponent,\n        LiveAppsDocumentViewerComponent,\n        LiveAppsLandingPageComponent,\n        LiveAppsActiveCasesWidgetComponent,\n        LiveAppsActiveCasesReportComponent,\n        LiveAppsActiveCasesForTypeReportComponent,\n        LiveAppsSettingsAccessControlComponent,\n        LiveAppsLegacyFormComponent,\n        LiveAppsLegacyProcessComponent,\n        LiveAppsSettingsFormsComponent,\n        LiveAppsWorkitemsComponent,\n        LiveAppsSettingsLandingComponent,\n        LiveAppsHomeCockpitStandaloneComponent,\n        LiveAppsCaseCockpitStandaloneComponent,\n        LiveAppsCreatorStandaloneComponent,\n        LiveAppsActionStandaloneComponent,\n        LiveAppsProcessesComponent,\n        LiveAppsFormPreviewComponent,\n        LiveAppsSettingsFormLayoutComponent,\n        LiveAppsFormComponent,\n        LiveAppsWorkitemComponent,\n        LiveAppsFormWcComponent,\n        LiveAppsSettingsCustomFormsComponent,\n        LiveAppsLoginOauthComponent\n    ],\n  imports: [\n    TcCoreLibModule,\n    TcFormsLibModule,\n    HttpClientModule,\n    CommonModule,\n    MatButtonModule,\n    MatCardModule,\n    MatCheckboxModule,\n    MatListModule,\n    MatFormFieldModule,\n    MatInputModule,\n    MatIconModule,\n    MatSelectModule,\n    MatDialogModule,\n    MatMenuModule,\n    MatCardModule,\n    MatTooltipModule,\n    MatTabsModule,\n    MatToolbarModule,\n    MatExpansionModule,\n    MatSnackBarModule,\n    MatProgressSpinnerModule,\n    CdkScrollableModule,\n    MatSlideToggleModule,\n    MatProgressBarModule,\n    MatTableModule,\n    MatRadioModule,\n    FormsModule,\n    FlexLayoutModule,\n    ColorPickerModule,\n    ScrollingModule,\n    ReactiveFormsModule,\n    NgChartsModule\n  ],\n  exports: [\n    LiveAppsLoginComponent,\n    LiveAppsApplicationsComponent,\n    LiveAppsCaseDataComponent,\n    LiveAppsCaseStatesComponent,\n    LiveAppsCaseActionsComponent,\n    LiveAppsCaseAuditComponent,\n    LiveAppsCaseStateAuditComponent,\n    LiveAppsRecentCasesComponent,\n    LiveAppsFavoriteCasesComponent,\n    LiveAppsDocumentsComponent,\n    LiveAppsNotesComponent,\n    LiveAppsNotesEditorComponent,\n    LiveAppsDocumentUploadDialogComponent,\n    LiveAppsDocumentViewerDialogComponent,\n    LiveAppsCaseSummaryComponent,\n    LiveAppsStateIconComponent,\n    LiveAppsApplicationConfigurationComponent,\n    LiveAppsStateIconUploadDialogComponent,\n    LiveAppsCaseListComponent,\n    LiveAppsCaseSearchComponent,\n    LiveAppsSearchWidgetComponent,\n    LiveAppsComponent,\n    LiveAppsCreatorSelectorComponent,\n    LiveAppsCaseCreatorComponent,\n    LiveAppsCreatorsComponent,\n    LiveAppsCaseActionComponent,\n    LiveAppsActionsComponent,\n    LiveAppsCaseDataDisplayComponent,\n    LiveAppsCaseCockpitComponent,\n    LiveAppsAppConfigurationWidgetComponent,\n    LiveAppsCaseCreatorWidgetComponent,\n    LiveAppsHomeCockpitComponent,\n    LiveAppsApplicationListComponent,\n    LiveAppsApplicationCreateButtonComponent,\n    LiveAppsCreatorDialogComponent,\n    LiveAppsSettingsComponent,\n    LiveAppsSettingsSummaryCardsComponent,\n    LiveAppsSettingsRolesComponent,\n    LiveAppsSettingsLandingComponent,\n    LiveAppsRoleSwitcherComponent,\n    LiveAppsCaseCreatorsComponent,\n    ParseAuditMessagePipe,\n    LiveAppsCaseActionsListComponent,\n    LiveAppsDocumentViewerComponent,\n    LiveAppsLandingPageComponent,\n    LiveAppsActiveCasesWidgetComponent,\n    LiveAppsActiveCasesReportComponent,\n    LiveAppsActiveCasesForTypeReportComponent,\n    LiveAppsLegacyFormComponent,\n    LiveAppsLegacyProcessComponent,\n    LiveAppsSettingsFormsComponent,\n    LiveAppsWorkitemsComponent,\n    LiveAppsHomeCockpitStandaloneComponent,\n    LiveAppsCaseCockpitStandaloneComponent,\n    LiveAppsCreatorStandaloneComponent,\n    LiveAppsActionStandaloneComponent,\n    LiveAppsProcessesComponent,\n    LiveAppsFormPreviewComponent,\n    LiveAppsSettingsFormLayoutComponent,\n    LiveAppsWorkitemComponent,\n    LiveAppsFormComponent,\n    LiveAppsFormWcComponent,\n    LiveAppsSettingsCustomFormsComponent,\n    LiveAppsLoginOauthComponent\n  ],\n    entryComponents: [LiveAppsStateIconUploadDialogComponent, LiveAppsDocumentUploadDialogComponent, LiveAppsDocumentViewerDialogComponent, LiveAppsCreatorDialogComponent],\n    providers: [\n        RequestCacheService,\n        TcAppDefinitionService,\n        { provide: APP_INITIALIZER, useFactory: initAppDefinitionService, deps: [TcAppDefinitionService, TcLiveappsConfigService], multi: true },\n        CaseGuard,\n        RoleGuard,\n        AuthGuard,\n        DurationSincePipe,\n        { provide: HTTP_INTERCEPTORS, useClass: CachingInterceptor, multi: true }\n        // { provide: HTTP_INTERCEPTORS, useClass: MockingInterceptor, multi: true }\n    ],\n  schemas: [CUSTOM_ELEMENTS_SCHEMA]\n})\nexport class TcLiveappsLibModule {\n    static forRoot(config?: TcLiveappsConfiguration): ModuleWithProviders<TcLiveappsLibModule> {\n        return {\n            ngModule: TcLiveappsLibModule,\n            providers: [TcLiveappsConfigService, { provide: TcLiveappsConfigurationService, useValue: config ? config : undefined }, LiveAppsService, TcCaseDataService, TcCaseProcessesService, TcDocumentService, TcLiveAppsConfigService, TcRolesService, TcLiveAppsReportingService]\n        };\n    }\n  constructor(private matIconRegistry: MatIconRegistry, private domSanitizer: DomSanitizer, private location: Location, private sessionRefreshService: SessionRefreshService) {\n      this.matIconRegistry.addSvgIconLiteral(\n      'ic-cloud-logo',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n' +\n        '<svg width=\"219px\" height=\"40px\" viewBox=\"0 0 219 40\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <title>A093F186-5C42-423C-9AA6-2792EB365783</title>\\n' +\n        '    <g id=\"Tablet-UI\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <g id=\"CR-login\" transform=\"translate(-35.000000, -11.000000)\" fill=\"#FFFFFF\">\\n' +\n        '            <g id=\"Group\" transform=\"translate(35.000000, 11.000000)\">\\n' +\n        '                <path d=\"M29.8769822,9.47420378 L29.0204136,11.7783982 L28.6369768,11.7783982 L27.7754054,9.46955823 L27.7439585,11.8209229 L27.3701702,11.8209229 L27.4641533,9 L27.9733774,9 L28.8395944,11.3188458 L29.7008085,9 L30.2014562,9 L30.2918658,11.8209229 L29.9059275,11.8209229 L29.8769822,9.47420378 Z M26.0115245,9.36092375 L26.0115245,11.8209229 L25.6352347,11.8209229 L25.6352347,9.36092375 L24.6482333,9.36092375 L24.6482333,9 L26.9985259,9 L26.9985259,9.36092375 L26.0115245,9.36092375 Z M8.68039487,26.605932 L17.6870505,26.605932 L22.1864475,18.809979 L17.6870505,11.0065216 L8.68039487,11.0065216 L4.18064055,18.809979 L8.68039487,26.605932 Z M23.225622,30.0143387 L28.8127931,30.0143387 L31.6044133,25.1779604 L28.8127931,20.3369366 L23.225622,20.3369366 L20.4343592,25.1779604 L23.225622,30.0143387 Z M1.32898557,27.7819717 L3.98981552,27.7819717 L5.31915844,25.4788493 L3.98981552,23.1735829 L1.32898557,23.1735829 L1.77635684e-14,25.4788493 L1.32898557,27.7819717 Z M199.601197,14.8337428 L199.601197,26.393666 L202.952785,26.393666 C206.523071,26.393666 208.854782,23.9897708 208.854782,20.6621253 L208.854782,20.6138831 C208.854782,17.2865949 206.523071,14.8337428 202.952785,14.8337428 L199.601197,14.8337428 Z M196.614106,12.1132354 L202.952785,12.1132354 C208.295886,12.1132354 211.987314,15.780721 211.987314,20.5652834 L211.987314,20.6138831 C211.987314,25.3980882 208.295886,29.1141734 202.952785,29.1141734 L196.614106,29.1141734 L196.614106,12.1132354 Z M177.961853,21.9010587 L177.961853,12.1132354 L180.948944,12.1132354 L180.948944,21.7795596 C180.948944,24.936749 182.576317,26.6127217 185.24751,26.6127217 C187.89476,26.6127217 189.522133,25.0339483 189.522133,21.9010587 L189.522133,12.1132354 L192.509581,12.1132354 L192.509581,21.7552597 C192.509581,26.8310627 189.643632,29.3814714 185.199267,29.3814714 C180.778845,29.3814714 177.961853,26.8310627 177.961853,21.9010587 L177.961853,21.9010587 Z M171.476661,20.6621253 L171.476661,20.6138831 C171.476661,17.3105374 169.072408,14.5664448 165.69652,14.5664448 C162.320633,14.5664448 159.96498,17.2622951 159.96498,20.5652834 L159.96498,20.6138831 C159.96498,23.9168714 162.369232,26.6366641 165.74512,26.6366641 C169.12065,26.6366641 171.476661,23.965471 171.476661,20.6621253 L171.476661,20.6621253 Z M156.83209,20.6621253 L156.83209,20.6138831 C156.83209,15.8293206 160.523518,11.8219949 165.74512,11.8219949 C170.966722,11.8219949 174.609908,15.780721 174.609908,20.5652834 L174.609908,20.6138831 C174.609908,25.3980882 170.918122,29.4054139 165.69652,29.4054139 C160.474918,29.4054139 156.83209,25.4466878 156.83209,20.6621253 L156.83209,20.6621253 Z M143.522937,12.1132354 L146.510028,12.1132354 L146.510028,26.393666 L155.447715,26.393666 L155.447715,29.1141734 L143.522937,29.1141734 L143.522937,12.1132354 Z M124.846384,20.6621253 L124.846384,20.6138831 C124.846384,15.780721 128.464913,11.8219949 133.613615,11.8219949 C136.746862,11.8219949 138.640818,12.9151293 140.268191,14.4692455 L138.349578,16.6794568 C136.989503,15.4165811 135.532229,14.5664448 133.589673,14.5664448 C130.359584,14.5664448 127.979274,17.2379953 127.979274,20.5652834 L127.979274,20.6138831 C127.979274,23.9411712 130.334927,26.6366641 133.589673,26.6366641 C135.678027,26.6366641 137.01416,25.8111851 138.471077,24.45111 L140.38969,26.393666 C138.616876,28.2397373 136.673963,29.4054139 133.492116,29.4054139 C128.537812,29.4054139 124.846384,25.5438871 124.846384,20.6621253 L124.846384,20.6621253 Z M111.561174,20.6621253 L111.561174,20.6138831 C111.561174,17.3105374 109.156921,14.5664448 105.781034,14.5664448 C102.405146,14.5664448 100.049493,17.2622951 100.049493,20.5652834 L100.049493,20.6138831 C100.049493,23.9168714 102.453745,26.6366641 105.829633,26.6366641 C109.205164,26.6366641 111.561174,23.965471 111.561174,20.6621253 L111.561174,20.6621253 Z M96.9166034,20.6621253 L96.9166034,20.6138831 C96.9166034,15.8293206 100.608031,11.8219949 105.829633,11.8219949 C111.051235,11.8219949 114.694421,15.780721 114.694421,20.5652834 L114.694421,20.6138831 C114.694421,25.3980882 111.002635,29.4054139 105.781034,29.4054139 C100.559432,29.4054139 96.9166034,25.4466878 96.9166034,20.6621253 L96.9166034,20.6621253 Z M79.4782686,20.6621253 L79.4782686,20.6138831 C79.4782686,15.780721 83.0967972,11.8219949 88.2454996,11.8219949 C91.3787466,11.8219949 93.2727029,12.9151293 94.9000759,14.4692455 L92.9814625,16.6794568 C91.6213874,15.4165811 90.1641131,14.5664448 88.2215572,14.5664448 C84.9914683,14.5664448 82.6111583,17.2379953 82.6111583,20.5652834 L82.6111583,20.6138831 C82.6111583,23.9411712 84.9668111,26.6366641 88.2215572,26.6366641 C90.309912,26.6366641 91.6460446,25.8111851 93.1029615,24.45111 L95.021575,26.393666 C93.2487604,28.2397373 91.3058471,29.4054139 88.1240005,29.4054139 C83.1696967,29.4054139 79.4782686,25.5438871 79.4782686,20.6621253 L79.4782686,20.6621253 Z M70.3708402,21.8038594 L65.6348774,21.8038594 L65.6348774,26.4669228 L70.5891812,26.4669228 C72.6292938,26.4669228 73.8682271,25.6653862 73.8682271,24.1352124 L73.8682271,24.0866128 C73.8682271,22.6539956 72.7264931,21.8038594 70.3708402,21.8038594 L70.3708402,21.8038594 Z M72.9205342,16.922455 C72.9205342,15.5863224 71.852057,14.7608433 69.9334435,14.7608433 L65.6348774,14.7608433 L65.6348774,19.2781078 L69.7151025,19.2781078 C71.633716,19.2781078 72.9205342,18.5251709 72.9205342,16.9706973 L72.9205342,16.922455 Z M62.6960289,12.1132354 L70.3222406,12.1132354 C72.2647965,12.1132354 73.7953276,12.6478313 74.7666056,13.6191093 C75.5195426,14.3724036 75.9079823,15.295082 75.9079823,16.4364587 L75.9079823,16.4850583 C75.9079823,18.5251709 74.7423058,19.6179479 73.47943,20.2736856 C75.470943,20.9540805 76.8553178,22.0950998 76.8553178,24.4025104 L76.8553178,24.45111 C76.8553178,27.4868004 74.3535087,29.1141734 70.5648814,29.1141734 L62.6960289,29.1141734 L62.6960289,12.1132354 Z M55.1677313,29.1138161 L58.154822,29.1138161 L58.154822,12.1132354 L55.1677313,12.1132354 L55.1677313,29.1138161 Z M43.4366373,14.8823424 L38.0452941,14.8823424 L38.0452941,12.1132354 L51.8397284,12.1132354 L51.8397284,14.8823424 L46.4480279,14.8823424 L46.4480279,29.1141734 L43.4366373,29.1141734 L43.4366373,14.8823424 Z M217.830348,9.47420378 L216.973779,11.7783982 L216.590343,11.7783982 L215.728771,9.46955823 L215.697324,11.8209229 L215.323536,11.8209229 L215.417519,9 L215.926743,9 L216.79296,11.3188458 L217.654174,9 L218.154822,9 L218.245232,11.8209229 L217.859293,11.8209229 L217.830348,9.47420378 Z M213.96489,9.36092375 L213.96489,11.8209229 L213.588601,11.8209229 L213.588601,9.36092375 L212.601599,9.36092375 L212.601599,9 L214.951892,9 L214.951892,9.36092375 L213.96489,9.36092375 Z\" id=\"Foundations/branding-asset/gnh-white/cloud\"></path>\\n' +\n        '            </g>\\n' +\n        '        </g>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n      );\n      this.matIconRegistry.addSvgIconLiteral(\n      'ic-tibco-logo',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" width=\"122px\" height=\"32px\" viewBox=\"0 0 122 32\" style=\"enable-background:new 0 0 122 32;\" xml:space=\"preserve\">\\n' +\n        '<style type=\"text/css\">\\n' +\n        '\\t.st0{fill:#1774E5;}\\n' +\n        '</style>\\n' +\n        '    <g>\\n' +\n        '\\t<path class=\"st0\" d=\"M13.6,7.1v24.5H9.8V7.1H0V3.5h23.4v3.6L13.6,7.1z\"></path>\\n' +\n        '        <path class=\"st0\" d=\"M27.9,31.5v-28h3.8v28H27.9z\"></path>\\n' +\n        '        <path class=\"st0\" d=\"M58.3,23.6c0,4.7-3.2,7.9-10.5,7.9h-9.5v-28h9.3c6.8,0,9.8,3.1,9.8,7.5c0,2.9-1.6,4.9-4.8,6.1\\n' +\n        '\\t\\tC56.3,18,58.3,20.4,58.3,23.6L58.3,23.6z M47.9,6.9h-5.7v8.7h5.2c4,0,6.2-1.8,6.2-4.5S51.6,6.9,47.9,6.9z M47.6,19.2h-5.5V28h6.1\\n' +\n        '\\t\\tc4.1,0,6.2-1.5,6.2-4.4C54.5,20.4,51.6,19.2,47.6,19.2L47.6,19.2z\"></path>\\n' +\n        '        <path class=\"st0\" d=\"M83.1,8.6C81,7,78.4,6.1,75.5,6.1c-0.1,0-0.1,0-0.1,0h0c-6.1,0-10.2,4.3-10.2,11.1s4.1,11.4,10.2,11.4\\n' +\n        '\\t\\tc3-0.1,5.8-1.1,8-2.8l0,0l0.6,3.8c-2.5,1.4-5.4,2.3-8.6,2.3h0c-8.2,0-14-5.7-14-14.6c0-9,5.9-14.7,14-14.7c0,0,0,0,0,0\\n' +\n        '\\t\\tc3.2,0,6.3,0.9,8.9,2.3l-0.1,0L83.1,8.6z\"></path>\\n' +\n        '        <path class=\"st0\" d=\"M107.5,4.8c-0.5-0.2-0.8-0.5-1.3-0.7c-3.7,7-10.3,15.4-19.1,20.1c0.5,1.2,1.2,2.2,2,3.1l0,0\\n' +\n        '\\t\\tc7.8-5.9,14-13.4,18.2-22.2C107.3,5.1,107.5,4.8,107.5,4.8z\"></path>\\n' +\n        '        <path class=\"st0\" d=\"M105.8,4c-1.7-0.8-3.8-1.3-5.9-1.3c-0.1,0-0.1,0-0.2,0h0c-8.3,0-14,6.3-14,14.7c0,0.1,0,0.2,0,0.3\\n' +\n        '\\t\\tc0,1.3,0.2,2.6,0.5,3.9l0-0.1C94.5,18,102,10.4,105.8,4L105.8,4z\"></path>\\n' +\n        '        <path class=\"st0\" d=\"M107.7,5c-3.7,9.7-9.3,17.9-16.3,24.6l0,0c2.2,1.5,4.9,2.4,7.9,2.4c0.1,0,0.3,0,0.4,0h0\\n' +\n        '\\t\\tc8.3,0.1,14.1-6.3,14.1-14.7C113.8,11.8,111.5,7.4,107.7,5L107.7,5z\"></path>\\n' +\n        '        <path class=\"st0\" d=\"M113.8,4.1L113.8,4.1c0-2,1.6-3.6,3.6-3.7h0c0,0,0,0,0.1,0c1.9,0,3.5,1.5,3.5,3.4v0V4c0,2-1.6,3.6-3.6,3.7h0\\n' +\n        '\\t\\tc0,0,0,0-0.1,0c-1.9,0-3.5-1.5-3.5-3.4v0L113.8,4.1z M120.6,4.1L120.6,4.1C120.6,4,120.6,4,120.6,4.1c0-1.8-1.4-3.2-3.1-3.2h0\\n' +\n        '\\t\\tc-0.1,0-0.1,0-0.2,0c0,0,0,0,0,0c-1.8,0-3.2,1.4-3.2,3.2v0c0,1.7,1.5,3.2,3.2,3.2S120.5,5.8,120.6,4.1L120.6,4.1L120.6,4.1z\\n' +\n        '\\t\\t M116,2.1h1.6c0.8,0,1.4,0.3,1.4,1.1c0,0,0,0,0,0.1c0,0.5-0.3,0.9-0.8,1.1l0,0l1,1.4h-0.8l-0.9-1.3h-0.8v1.3H116L116,2.1L116,2.1z\\n' +\n        '\\t\\t M117.6,4c0.5,0,0.8-0.2,0.8-0.6s-0.2-0.6-0.8-0.6h-0.9V4L117.6,4z\"></path>\\n' +\n        '</g>\\n' +\n        '</svg>\\n')\n      );\n      this.matIconRegistry.addSvgIconLiteral(\n      'ic-no-cases-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\" viewBox=\"0 0 48 48\">\\n' +\n        '    <g fill=\"none\" fill-rule=\"nonzero\">\\n' +\n        '        <circle cx=\"24\" cy=\"24\" r=\"24\" fill=\"#F4F4F4\"/>\\n' +\n        '        <path fill=\"#B6B6B6\" d=\"M30.936 13.835h7.553c.835 0 1.511.676 1.511 1.51V36.49A1.51 1.51 0 0 1 38.49 38H17.34a1.51 1.51 0 0 1-1.51-1.51V15.345c0-.834.676-1.51 1.51-1.51h7.553v-.023l-8.397-2.25a1.51 1.51 0 0 0-1.85 1.069L9.563 31.596a1.51 1.51 0 0 0 1.068 1.85l3.717.995a.755.755 0 1 1-.391 1.459l-3.717-.996a3.02 3.02 0 0 1-2.136-3.7l5.083-18.964a3.021 3.021 0 0 1 3.7-2.136l8.395 2.249a3.021 3.021 0 0 1 5.654 1.482zm-.404 1.51a3.02 3.02 0 0 1-5.234 0H18.85a1.51 1.51 0 0 0-1.51 1.51V34.98c0 .834.675 1.51 1.51 1.51h18.128a1.51 1.51 0 0 0 1.51-1.51V16.855a1.51 1.51 0 0 0-1.51-1.51h-6.447zm-2.617 0a1.51 1.51 0 1 0 0-3.02 1.51 1.51 0 0 0 0 3.02zm-7.554 4.531h13.596a.755.755 0 1 1 0 1.51H20.361a.755.755 0 1 1 0-1.51zm0 3.02h13.596a.755.755 0 1 1 0 1.511H20.361a.755.755 0 1 1 0-1.51zm0 2.962h6.043a.755.755 0 1 1 0 1.51h-6.043a.755.755 0 1 1 0-1.51z\"/>\\n' +\n        '    </g>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'ic-no-tasks-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\" viewBox=\"0 0 48 48\">\\n' +\n        '    <g fill=\"none\" fill-rule=\"nonzero\">\\n' +\n        '        <circle cx=\"24\" cy=\"24\" r=\"24\" fill=\"#F4F4F4\"/>\\n' +\n        '        <path fill=\"#B6B6B6\" d=\"M40 16.652v16.023a2.662 2.662 0 0 1-2.667 2.658H10.667A2.667 2.667 0 0 1 8 32.654l.123-16.007c0-.04.004-.078.01-.115V15a3 3 0 0 1 3-3H37a3 3 0 0 1 3 3v1.652zm-1.333 0H9.457v.005l-.124 16.008a1.331 1.331 0 0 0 1.323 1.339h26.677c.737 0 1.334-.595 1.334-1.33V16.653zM36.3 29.81c.226.225.366.537.366.88 0 .689-.56 1.246-1.25 1.246-.345 0-.658-.139-.884-.364L30.87 27.92a4.982 4.982 0 0 1-2.536.694c-2.762 0-5-2.231-5-4.984s2.238-4.985 5-4.985c2.76 0 5 2.232 5 4.985 0 .924-.257 1.786-.696 2.528L36.3 29.81zm-7.967-9.918a3.744 3.744 0 0 0-3.75 3.738 3.744 3.744 0 0 0 3.75 3.738 3.744 3.744 0 0 0 3.75-3.738 3.744 3.744 0 0 0-3.75-3.738zm-16.336 2.076h9.338a.665.665 0 0 1 0 1.33h-9.338a.665.665 0 0 1 0-1.33zm0 2.658h6.671a.665.665 0 0 1 0 1.33H12a.665.665 0 0 1 0-1.33z\"/>\\n' +\n        '    </g>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'ic-no-docs-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\" viewBox=\"0 0 48 48\">\\n' +\n        '    <g fill=\"none\" fill-rule=\"nonzero\">\\n' +\n        '        <circle cx=\"24\" cy=\"24\" r=\"24\" fill=\"#F4F4F4\"/>\\n' +\n        '        <path fill=\"#B6B6B6\" d=\"M36.315 12.568c.737-.01 1.342.555 1.352 1.261v.648c0 .354-.299.64-.667.64a.654.654 0 0 1-.667-.64v-.63l-14.335.185a.678.678 0 0 1-.527-.237l-1.722-2.041a1.356 1.356 0 0 0-1.036-.475H11v3.199c0 .353-.316.64-.685.64a.638.638 0 0 1-.648-.64v-3.199c0-.706.597-1.279 1.333-1.279h7.713c.804 0 1.566.349 2.072.949l1.519 1.8 14.011-.181zM10 15.61h28c1.105 0 2 .86 2 1.92v18.55c0 1.06-.895 1.919-2 1.919H10c-1.105 0-2-.86-2-1.919v-18.55c0-1.06.895-1.92 2-1.92zm0 1.28a.654.654 0 0 0-.667.64v18.55c0 .353.299.64.667.64h28a.654.654 0 0 0 .667-.64v-18.55a.654.654 0 0 0-.667-.64H10zm2.333 3.984a.654.654 0 0 1-.666-.64c0-.353.298-.64.666-.64h12c.369 0 .667.287.667.64 0 .353-.298.64-.667.64h-12zm0 2.718a.654.654 0 0 1-.666-.64c0-.353.298-.64.666-.64h10c.369 0 .667.287.667.64 0 .354-.298.64-.667.64h-10z\"/>\\n' +\n        '    </g>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'ic-no-notes-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\" viewBox=\"0 0 48 48\">\\n' +\n        '    <g fill=\"none\" fill-rule=\"nonzero\">\\n' +\n        '        <circle cx=\"24\" cy=\"24\" r=\"24\" fill=\"#F4F4F4\"/>\\n' +\n        '        <path fill=\"#B6B6B6\" d=\"M10.517 31.347v-3.918H9.079c-.596 0-1.079-.439-1.079-.98 0-.541.483-.98 1.079-.98h1.438v-4.571H9.079c-.596 0-1.079-.439-1.079-.98 0-.54.483-.98 1.079-.98h1.438v-3.983H9.079c-.596 0-1.079-.438-1.079-.98 0-.54.483-.98 1.079-.98h1.438v-2.383C10.517 9.17 11.805 8 13.393 8h21.573c1.589 0 2.877 1.17 2.877 2.612V35.43c0 1.442-1.288 2.612-2.877 2.612H13.393c-1.588 0-2.876-1.17-2.876-2.612v-2.123H9.079c-.596 0-1.079-.438-1.079-.98 0-.54.483-.98 1.079-.98h1.438zm1.438 0h.72c.595 0 1.078.439 1.078.98 0 .54-.483.98-1.079.98h-.719v2.122c0 .72.644 1.306 1.438 1.306h21.573c.795 0 1.438-.585 1.438-1.306V10.612c0-.721-.643-1.306-1.438-1.306H13.393c-.794 0-1.438.585-1.438 1.306v2.384h.72c.595 0 1.078.438 1.078.98 0 .54-.483.98-1.079.98h-.719v3.983h.72c.595 0 1.078.438 1.078.98 0 .54-.483.979-1.079.979h-.719v4.571h.72c.595 0 1.078.439 1.078.98 0 .541-.483.98-1.079.98h-.719v3.918zM16.277 40c-.398 0-.72-.292-.72-.653 0-.36.322-.653.72-.653h19.408c1.589 0 2.877-1.17 2.877-2.612V11.467c0-.36.322-.653.719-.653.397 0 .719.292.719.653v24.615C40 38.246 38.068 40 35.685 40H16.277zm3.871-26.595h6.518c.45 0 .815.331.815.74 0 .408-.365.74-.815.74h-6.518c-.45 0-.815-.332-.815-.74 0-.409.365-.74.815-.74zm.48 3.333h10.355c.715 0 1.294.331 1.294.74 0 .408-.58.74-1.294.74H20.628c-.715 0-1.295-.332-1.295-.74 0-.409.58-.74 1.295-.74zm0 3.334h10.355c.715 0 1.294.33 1.294.74 0 .408-.58.739-1.294.739H20.628c-.715 0-1.295-.331-1.295-.74 0-.408.58-.74 1.295-.74z\"/>\\n' +\n        '    </g>\\n' +\n        '</svg>\\n')\n    );\n\n    this.matIconRegistry.addSvgIconLiteral(\n      'ic-active-case-widget-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path  class=\"svg-content\" fill=\"#727272\" d=\"M11 2v20c-5.07-.5-9-4.79-9-10s3.93-9.5 9-10zm2.03 0v8.99H22c-.47-4.74-4.24-8.52-8.97-8.99zm0 11.01V22c4.74-.47 8.5-4.25 8.97-8.99h-8.97z\"/></svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-collaboration-reply',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><g class=\"svg-content\" fill=\"none\" fill-rule=\"evenodd\"><g mask=\"url(#b)\"><mask id=\"b\" fill=\"#fff\">       <path d=\"M4 14.027C4 11.298 6.192 9.07 8.876 9.07h7.357l-2.141-2.159a1.15 1.15 0 0 1 0-1.588 1.105 1.105 0 0 1 1.563 0l4.026 4.092a1.15 1.15 0 0 1 0 1.589l-4.026 4.092a1.07 1.07 0 0 1-.782.329 1.07 1.07 0 0 1-.781-.329 1.15 1.15 0 0 1 0-1.588l2.14-2.176H8.877c-1.461 0-2.667 1.209-2.667 2.711 0 1.485 1.189 2.711 2.667 2.711.612 0 1.104.5 1.104 1.123 0 .621-.492 1.122-1.104 1.122C6.192 18.983 4 16.772 4 14.027z\"/></mask><path d=\"M0 0h24v24H0z\" fill=\"black\"/></g></g></svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-collaboration-delete',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '  <path class=\"svg-content\" d=\"M17.188 19.158c0 .54-.42.978-.938.978s-.938-.438-.938-.978v-8.8c0-.54.42-.977.938-.977.517 0 .938.438.938.978v8.799zm-3.75 0c0 .54-.42.978-.938.978s-.938-.438-.938-.978v-8.8c0-.54.42-.977.938-.977s.938.438.938.978v8.799zm-3.75 0c0 .54-.42.978-.938.978s-.938-.438-.938-.978v-8.8c0-.54.42-.977.938-.977s.938.438.938.978v8.799zM5.938 7.335v12.743c0 1.08.839 1.922 1.875 1.922h9.375c1.035 0 1.875-.842 1.875-1.922V7.335H5.938zm10.312-3.38h-7.5C8.75 2.875 9.59 2 10.625 2h3.75c1.036 0 1.875.875 1.875 1.955zm2.813 1.956H5.938C5.42 5.91 5 5.473 5 4.933s.42-.978.938-.978h13.125c.517 0 .937.438.937.978s-.42.978-.938.978\"/>\\n' +\n        '  <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-application-edit',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z\"/></svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-collaboration-edit',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '  <path class=\"svg-content\"\\n' +\n        '    d=\"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z\"/>\\n' +\n        '  <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-collaboration-send',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '  <path class=\"svg-content\" fill=\"#727272\" d=\"M1 12C1 5.925 5.924 1 12 1c6.075 0 11 4.924 11 11 0 6.075-4.924 11-11 11-6.075 0-11-4.924-11-11zm17.33.03L7.77 7.98v3.15l7.542.9-7.543.9v3.15l10.56-4.05z\"/>\\n' +\n        '  <path fill=\"none\" d=\"M0 0h24v24H0z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-collaboration-subscribed',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" focusable=\"false\">\\n' +\n        '  <defs>\\n' +\n        '    <rect id=\"path-1\" x=\"0\" y=\"0\" width=\"355\" height=\"950\"></rect>\\n' +\n        '    <filter x=\"-3.7%\" y=\"-1.2%\" width=\"107.3%\" height=\"102.7%\" filterUnits=\"objectBoundingBox\" id=\"filter-2\">\\n' +\n        '      <feOffset dx=\"0\" dy=\"2\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\"></feOffset>\\n' +\n        '      <feGaussianBlur stdDeviation=\"4\" in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\"></feGaussianBlur>\\n' +\n        '      <feColorMatrix values=\"0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.5 0\" type=\"matrix\" in=\"shadowBlurOuter1\"></feColorMatrix>\\n' +\n        '    </filter>\\n' +\n        '    <path d=\"M7.02092272,9.64382773 L10.429694,12.9694583 C10.2893638,12.9895851 10.1458982,13 10,13 C8.34314575,13 7,11.6568542 7,10 C7,9.87948409 7.0071063,9.76062794 7.02092272,9.64382773 Z M12.9979012,9.88673222 C12.9388301,8.29534999 11.6402099,7.02078376 10.0392586,7.00025162 L12.9979019,9.88673289 Z M5.39239715,8.05502229 C5.13971651,8.65288074 5,9.3101241 5,10 C5,12.7614237 7.23857625,15 10,15 C10.7336604,15 11.4304146,14.8419859 12.0580864,14.5581338 L13.8229037,16.2799067 C12.6354037,16.7451582 11.3468341,17 10,17 C5.45454545,17 1.57272727,14.0973333 -7.10542736e-15,10 C0.642490676,8.32615705 1.67034243,6.85169041 2.97137252,5.69304704 L5.39239715,8.05502229 Z M8.2947756,5.29831698 L6.53943522,3.58578978 C7.62510828,3.20602952 8.78900189,3 10,3 C14.5454545,3 18.4272727,5.90266667 20,10 C19.4004851,11.5618806 18.4654382,12.9501651 17.2860026,14.0702457 L14.742345,11.5886286 C14.9094634,11.089535 15,10.5553405 15,10 C15,7.23857625 12.7614237,5 10,5 C9.40117224,5 8.82693188,5.10527121 8.2947756,5.29831698 Z M0.292893219,1.70710678 C-0.0976310729,1.31658249 -0.0976310729,0.683417511 0.292893219,0.292893219 C0.683417511,-0.0976310729 1.31658249,-0.0976310729 1.70710678,0.292893219 L19.7071068,18.2928932 C20.0976311,18.6834175 20.0976311,19.3165825 19.7071068,19.7071068 C19.3165825,20.0976311 18.6834175,20.0976311 18.2928932,19.7071068 L0.292893219,1.70710678 Z\" id=\"path-3\"></path>\\n' +\n        '  </defs>\\n' +\n        '  <g id=\"Pages/Desktop\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '    <g id=\"Reporting-Dashboard/Page/Dashboard-comments/1440-01\" transform=\"translate(-1360.000000, -154.000000)\">\\n' +\n        '      <rect fill=\"#F4F4F4\" x=\"0\" y=\"0\" width=\"1440\" height=\"1072\"></rect>\\n' +\n        '      <g id=\"Group-5\">\\n' +\n        '        <rect id=\"Mask\" fill=\"#D8D8D8\" opacity=\"0\" x=\"1\" y=\"0\" width=\"1438\" height=\"1072\"></rect>\\n' +\n        '        <g id=\"modal/header/tabs\">\\n' +\n        '          <g transform=\"translate(25.000000, 163.000000)\"></g>\\n' +\n        '        </g>\\n' +\n        '      </g>\\n' +\n        '      <rect id=\"Rectangle-2\" stroke=\"#232323\" x=\"0.5\" y=\"0.5\" width=\"1439\" height=\"1071\"></rect>\\n' +\n        '      <g id=\"cmpt/comments\" transform=\"translate(1085.000000, 122.000000)\">\\n' +\n        '        <g id=\"Rectangle\">\\n' +\n        '          <use fill=\"black\" fill-opacity=\"1\" filter=\"url(#filter-2)\" xlink:href=\"#path-1\"></use>\\n' +\n        '          <use fill=\"#FFFFFF\" fill-rule=\"evenodd\" xlink:href=\"#path-1\"></use>\\n' +\n        '        </g>\\n' +\n        '        <g id=\"cmpt/card/little-card-04\" transform=\"translate(0.000000, 16.000000)\">\\n' +\n        '          <g id=\"Group\">\\n' +\n        '            <g id=\"comments-header\" transform=\"translate(16.000000, 0.000000)\">\\n' +\n        '              <g id=\"toggle/off\" transform=\"translate(259.000000, 16.000000)\">\\n' +\n        '                <g id=\"icon/eye/off\" transform=\"translate(2.000000, 2.000000)\">\\n' +\n        '                  <mask id=\"mask-4\" fill=\"white\">\\n' +\n        '                    <use xlink:href=\"#path-3\"></use>\\n' +\n        '                  </mask>\\n' +\n        '                  <use id=\"Mask\" fill=\"#000000\" fill-rule=\"nonzero\" xlink:href=\"#path-3\"></use>\\n' +\n        '                  <g id=\"color/gray/dark\" mask=\"url(#mask-4)\" class=\"svg-content\" fill=\"#727272\">\\n' +\n        '                    <g transform=\"translate(-2.000000, -2.000000)\" id=\"blue\">\\n' +\n        '                      <rect x=\"0\" y=\"0\" width=\"24\" height=\"24\"></rect>\\n' +\n        '                    </g>\\n' +\n        '                  </g>\\n' +\n        '                </g>\\n' +\n        '              </g>\\n' +\n        '            </g>\\n' +\n        '          </g>\\n' +\n        '        </g>\\n' +\n        '      </g>\\n' +\n        '    </g>\\n' +\n        '  </g>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-collaboration-unsubscribed',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '  <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\\n' +\n        '  <path class=\"svg-content\" fill=\"#727272\"\\n' +\n        '        d=\"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-collaboration-feed',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"22\" height=\"18\" viewBox=\"0 0 22 18\">\\n' +\n        '    <path class=\"svg-content\" fill=\"#727272\" fill-rule=\"evenodd\" d=\"M13.377 15c-1.268 2-2.06 3-2.377 3-.316 0-1.109-1-2.377-3H2.5A2.5 2.5 0 0 1 0 12.5v-10A2.5 2.5 0 0 1 2.5 0h17A2.5 2.5 0 0 1 22 2.5v10a2.5 2.5 0 0 1-2.5 2.5h-6.123zM4.5 3a.5.5 0 0 0 0 1h13a.5.5 0 1 0 0-1h-13zm-2 4a.5.5 0 1 0 0 1h17a.5.5 0 1 0 0-1h-17zm2 4a.5.5 0 1 0 0 1h13a.5.5 0 1 0 0-1h-13z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-document-library',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\">\\n' +\n        '    <path class=\"svg-content\" fill=\"#727272\" d=\"M7.683 2.481H14a2 2 0 0 1 2 2v7.852a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4.481c0-.247.045-.484.127-.703A1.996 1.996 0 0 1 0 3.074V3a2 2 0 0 1 2-2h3.43a2 2 0 0 1 1.44.612c.304.316.575.606.813.87zm-5.98 9.63a.37.37 0 1 0 0 .74h12.593a.37.37 0 1 0 0-.74H1.704z\"/>\\n' +\n        '    <path d=\"M0 0h16v16H0z\" fill=\"none\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-document-action',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '  <path class=\"svg-content\" fill=\"#727272\" fill-rule=\"evenodd\" d=\"M10 4.91a2 2 0 1 1 4 0 2 2 0 0 1-4 0zm0 7a2 2 0 1 1 4 0 2 2 0 0 1-4 0zm0 7a2 2 0 1 1 4 0 2 2 0 0 1-4 0z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-document-upload',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '  <path class=\"svg-content\" fill=\"#727272\" d=\"M17.313 17.6a.932.932 0 0 1-.938-.927c0-.512.42-.927.938-.927 1.553 0 2.813-1.246 2.813-2.783a2.758 2.758 0 0 0-1.15-2.238 2.687 2.687 0 0 0-.453-.27 2.728 2.728 0 0 0-.175-.076l-.079-.029a2.834 2.834 0 0 0-.162-.054l-.11-.028c-.048-.012-.095-.024-.144-.034-.05-.009-.102-.016-.153-.023-.037-.005-.074-.012-.112-.015a2.937 2.937 0 0 0-.275-.014c-.03 0-.058.004-.087.005a5.234 5.234 0 0 0-.107-.468c-.01-.038-.025-.073-.036-.11a5.286 5.286 0 0 0-.113-.344c-.013-.034-.029-.066-.043-.1a4.76 4.76 0 0 0-.148-.337c-.012-.027-.028-.053-.04-.079A5.312 5.312 0 0 0 12 5.854 5.312 5.312 0 0 0 7.26 8.75c-.012.026-.027.052-.04.079-.054.11-.102.222-.148.337-.014.034-.03.066-.043.1a5.282 5.282 0 0 0-.113.344c-.011.037-.025.072-.036.11a5.404 5.404 0 0 0-.107.468c-.029-.001-.057-.005-.086-.005-.094 0-.185.005-.276.014-.038.003-.074.01-.111.015a3.802 3.802 0 0 0-.154.023c-.048.01-.096.022-.143.034-.037.01-.075.018-.11.028a2.947 2.947 0 0 0-.163.054l-.08.03a2.728 2.728 0 0 0-.44.22c-.065.04-.127.08-.188.125-.004.003-.009.006-.012.01a2.757 2.757 0 0 0-1.136 2.229c0 1.536 1.259 2.782 2.813 2.782.518 0 .937.415.937.927s-.42.927-.937.927C4.098 17.6 2 15.525 2 12.963 2 10.876 3.397 9.11 5.316 8.53A7.172 7.172 0 0 1 12 4a7.17 7.17 0 0 1 6.684 4.53c1.92.58 3.316 2.346 3.316 4.433 0 2.562-2.098 4.637-4.687 4.637m-8.822-2.166l2.812-3.09.003.002a.934.934 0 0 1 1.389 0l.002-.003 2.813 3.091-.003.003a.91.91 0 0 1 .243.617.936.936 0 1 1-1.632.618l-.002.003-1.178-1.294v4.692c0 .512-.42.927-.938.927a.933.933 0 0 1-.938-.927V15.38l-1.178 1.294-.002-.002a.937.937 0 0 1-1.632-.619c0-.238.094-.453.243-.617l-.002-.003\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-document-zip',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '    <path class=\"svg-content\" fill=\"#B6B6B6\" fill-rule=\"evenodd\" d=\"M15 0H3C1.343 0 0 1.264 0 2.824v18.352C0 22.736 1.343 24 3 24h18c1.657 0 3-1.264 3-2.824V8.471L15 0zm0 8.47V1.413l7.62 7.059H15zM9.6 1.2H12v1.2H9.6V1.2zm0 2.4H12v1.2H9.6V3.6zm0 2.4H12v1.2H9.6V6zm0 2.4H12v1.2H9.6V8.4zm0 2.4H12V12H9.6v-1.2zm0 2.4H12V18H9.6v-4.8z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-document-image',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '    <path class=\"svg-content\" fill=\"#B6B6B6\" fill-rule=\"evenodd\" d=\"M24 20.273V21.5a2.5 2.5 0 0 1-2.5 2.5h-3.046a.751.751 0 0 0-.096-.163l-4.063-5.283 4.651-4.154L24 20.273zm0-2.3l-4.415-5.13a.75.75 0 0 0-1.068-.071l-5.14 4.59-6.642-8.636a.75.75 0 0 0-1.181-.01L0 15.696V2.5A2.5 2.5 0 0 1 2.5 0h19A2.5 2.5 0 0 1 24 2.5v15.473zM16.592 24H2.5A2.5 2.5 0 0 1 0 21.5v-3.394L6.13 10.4 16.593 24zm-2.59-14.25a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-1.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-document-doc',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '    <path class=\"svg-content\" fill=\"#B6B6B6\" fill-rule=\"evenodd\" d=\"M15 0H3C1.343 0 0 1.264 0 2.824v18.352C0 22.736 1.343 24 3 24h18c1.657 0 3-1.264 3-2.824V8.471L15 0zM3.6 9.882h6.212c.429 0 .776.316.776.706 0 .39-.347.706-.776.706H3.6c-.429 0-.776-.316-.776-.706 0-.39.347-.706.776-.706zm13.306 9.883H3.565c-.41 0-.741-.316-.741-.706 0-.39.331-.706.74-.706h13.342c.41 0 .741.316.741.706 0 .39-.332.706-.741.706zm0-4.236H3.565c-.41 0-.741-.316-.741-.705 0-.39.331-.706.74-.706h13.342c.41 0 .741.316.741.706 0 .39-.332.705-.741.705zm-2.082-7.058V1.41l7.764 7.06h-7.764z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-summary-details-button',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '  <path fill=\"none\" d=\"M0 0h24v24H0z\"/>\\n' +\n        '  <path class=\"svg-content\" fill=\"#0081cb\" d=\"M17.24 12.703l-9.449 9.005c-.41.39-1.074.39-1.484 0a.969.969 0 0 1 0-1.415l8.725-8.313-8.683-8.273a.969.969 0 0 1 0-1.414c.41-.39 1.075-.39 1.484 0l9.407 8.963a1 1 0 0 1 0 1.447z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-favorites-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\">\\n' +\n        '  <path class=\"svg-content\" fill=\"#727272\"\\n' +\n        '        d=\"M8 12.708l-4.225 2.221a.5.5 0 0 1-.726-.527l.807-4.705L.438 6.365a.5.5 0 0 1 .277-.853l4.724-.686L7.552.546a.5.5 0 0 1 .896 0l2.113 4.28 4.724.686a.5.5 0 0 1 .277.853l-3.418 3.332.807 4.705a.5.5 0 0 1-.726.527L8 12.708z\"/>\\n' +\n        '  <path d=\"M0 0h16v16H0z\" fill=\"none\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-config-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '  <path class=\"svg-content\" fill=\"#727272\" d=\"M21.91 13.12a9.346 9.346 0 0 0 0-1.1 9.508 9.508 0 0 0 0-1.12 32.759 32.759 0 0 0-2.213-.307 7.42 7.42 0 0 0-1.306-3.087c.454-.578.998-1.264 1.342-1.805a9.436 9.436 0 0 0-.743-.849 9.453 9.453 0 0 0-.852-.74c-.49.343-1.18.867-1.814 1.336a7.49 7.49 0 0 0-3.028-1.246c0-.74-.181-1.588-.308-2.202h-2.176a32.34 32.34 0 0 0-.309 2.202 7.488 7.488 0 0 0-3.1 1.354c-.58-.45-1.27-.992-1.814-1.336-.298.23-.583.477-.852.74-.254.253-.49.524-.762.85l1.36 1.804a7.4 7.4 0 0 0-1.106 2.961c-.743 0-1.596.18-2.212.307a9.274 9.274 0 0 0 0 1.12 9.094 9.094 0 0 0 0 1.1c.616.109 1.487.235 2.212.307a7.402 7.402 0 0 0 1.251 3.015L4.12 18.23c.272.324.508.595.762.848s.526.487.852.758l1.814-1.354a7.471 7.471 0 0 0 3.028 1.246c0 .74.181 1.589.308 2.202a9.107 9.107 0 0 0 2.249 0c.109-.613.235-1.48.308-2.202a7.47 7.47 0 0 0 3.028-1.3l1.814 1.354c.326-.27.598-.505.852-.758.265-.268.513-.551.743-.849-.344-.487-.87-1.173-1.341-1.805a7.42 7.42 0 0 0 1.25-3.015c.744 0 1.596-.18 2.213-.307m-10.064 3.304a4.35 4.35 0 0 1-1.705-.343 4.451 4.451 0 0 1-2.339-2.31 4.477 4.477 0 0 1 0-3.413 4.451 4.451 0 0 1 2.34-2.31 4.534 4.534 0 0 1 3.427 0 4.451 4.451 0 0 1 2.32 2.31 4.477 4.477 0 0 1 0 3.412 4.451 4.451 0 0 1-2.32 2.311 4.387 4.387 0 0 1-1.723.343\"/>\\n' +\n        '  <path fill=\"none\" d=\"M0 0h24v24H0z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-case-start-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '    <path class=\"svg-content\" fill=\"#0081CB\" id=\"a\" d=\"M12 4c-4.416 0-8 3.584-8 8s3.584 8 8 8 8-3.584 8-8-3.584-8-8-8m3.2 8.801h-2.4V15.2a.8.8 0 1 1-1.6 0v-2.399H8.8a.8.8 0 0 1 0-1.601h2.4V8.801a.8.8 0 1 1 1.6 0V11.2h2.4a.8.8 0 0 1 0 1.601\"/>\\n' +\n        '    <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-refresh-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '    <path class=\"svg-content\" fill=\"#727272\" d=\"M20.157 9.468H16.5a.843.843 0 1 1 0-1.686h1.467A7.295 7.295 0 0 0 12 4.688 7.312 7.312 0 1 0 19.313 12 .843.843 0 1 1 21 12a9 9 0 0 1-9 9 9 9 0 0 1-9-9 9 9 0 0 1 9-9 8.98 8.98 0 0 1 7.313 3.766V5.25a.843.843 0 1 1 1.687 0v3.375a.843.843 0 0 1-.843.843\"/>\\n' +\n        '    <path fill=\"none\" d=\"M0 0h24v24H0z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-recent-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\">\\n' +\n        '  <path class=\"svg-content\" fill=\"#727272\" id=\"a\" d=\"M8.727 8.727H5.818a.727.727 0 1 1 0-1.454H8V5.09a.727.727 0 1 1 1.455 0V8a.727.727 0 0 1-.728.727zm-.242 5.755a6.46 6.46 0 0 0 2.23-.575l.753 1.304c-.912.44-1.92.711-2.983.775v-1.504zm-1.455-.054v1.514A8.001 8.001 0 0 1 8 0a7.982 7.982 0 0 1 6.5 3.347V2A.75.75 0 1 1 16 2v3a.75.75 0 0 1-.75.75H12a.75.75 0 1 1 0-1.5h1.304A6.484 6.484 0 0 0 8 1.5a6.5 6.5 0 0 0-.97 12.928zm4.93-1.273a6.536 6.536 0 0 0 1.513-1.647l1.3.75a8.043 8.043 0 0 1-2.057 2.205l-.756-1.308zm2.158-2.954A6.488 6.488 0 0 0 14.5 8 .75.75 0 1 1 16 8c0 1.046-.2 2.045-.566 2.96l-1.316-.76z\"/>\\n' +\n        '  <path fill=\"none\" d=\"M0 0h16v16H0z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-clear-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '  <path class=\"svg-content\" fill=\"#727272\"\\n' +\n        '    d=\"M19.81 14.99l1.19-.92-1.43-1.43-1.19.92 1.43 1.43zm-.45-4.72L21 9l-9-7-2.91 2.27 7.87 7.88 2.4-1.88zM3.27 1L2 2.27l4.22 4.22L3 9l1.63 1.27L12 16l2.1-1.63 1.43 1.43L12 18.54l-7.37-5.73L3 14.07l9 7 4.95-3.85L20.73 21 22 19.73 3.27 1z\"/>\\n' +\n        '    <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-customization-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '  <path class=\"svg-content\" fill=\"#727272\" d=\"M21.91 13.12a9.346 9.346 0 0 0 0-1.1 9.508 9.508 0 0 0 0-1.12 32.759 32.759 0 0 0-2.213-.307 7.42 7.42 0 0 0-1.306-3.087c.454-.578.998-1.264 1.342-1.805a9.436 9.436 0 0 0-.743-.849 9.453 9.453 0 0 0-.852-.74c-.49.343-1.18.867-1.814 1.336a7.49 7.49 0 0 0-3.028-1.246c0-.74-.181-1.588-.308-2.202h-2.176a32.34 32.34 0 0 0-.309 2.202 7.488 7.488 0 0 0-3.1 1.354c-.58-.45-1.27-.992-1.814-1.336-.298.23-.583.477-.852.74-.254.253-.49.524-.762.85l1.36 1.804a7.4 7.4 0 0 0-1.106 2.961c-.743 0-1.596.18-2.212.307a9.274 9.274 0 0 0 0 1.12 9.094 9.094 0 0 0 0 1.1c.616.109 1.487.235 2.212.307a7.402 7.402 0 0 0 1.251 3.015L4.12 18.23c.272.324.508.595.762.848s.526.487.852.758l1.814-1.354a7.471 7.471 0 0 0 3.028 1.246c0 .74.181 1.589.308 2.202a9.107 9.107 0 0 0 2.249 0c.109-.613.235-1.48.308-2.202a7.47 7.47 0 0 0 3.028-1.3l1.814 1.354c.326-.27.598-.505.852-.758.265-.268.513-.551.743-.849-.344-.487-.87-1.173-1.341-1.805a7.42 7.42 0 0 0 1.25-3.015c.744 0 1.596-.18 2.213-.307m-10.064 3.304a4.35 4.35 0 0 1-1.705-.343 4.451 4.451 0 0 1-2.339-2.31 4.477 4.477 0 0 1 0-3.413 4.451 4.451 0 0 1 2.34-2.31 4.534 4.534 0 0 1 3.427 0 4.451 4.451 0 0 1 2.32 2.31 4.477 4.477 0 0 1 0 3.412 4.451 4.451 0 0 1-2.32 2.311 4.387 4.387 0 0 1-1.723.343\"/>\\n' +\n        '  <path fill=\"none\" d=\"M0 0h24v24H0z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-caselist-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 48 48\">\\n' +\n        '  <path class=\"svg-content\" fill=\"#727272\" fill-rule=\"evenodd\" d=\"M42 42H6c-1.103 0-2-.898-2-2V26.61c4.43 2.623 10.208 3.96 15.729 4.422v1.504c0 1.326.948 2.4 2.118 2.4h4.764c1.17 0 2.118-1.074 2.118-2.4V31.04c6.16-.503 11.505-2.008 15.271-4.264v13.223c0 1.103-.897 2-2 2zM6 15.995h36c1.103 0 2 .898 2 2v3.583c-2.798 2.727-8.447 4.664-15.271 5.268v-1.511c0-1.326-.948-2.4-2.117-2.4h-4.765c-1.17 0-2.118 1.074-2.118 2.4v1.51c-6.651-.6-12.41-2.518-15.729-5.348v-3.501c0-1.103.897-2 2-2zm10.655-8.89c0-.063.023-.098.016-.106l14.944-.011s.04.033.04.117v4.89h-15v-4.89zM42 11.996h-6.345v-4.89C35.655 4.842 33.861 3 31.657 3H16.653c-2.204 0-3.998 1.842-3.998 4.106v4.89H6c-3.308 0-6 2.692-6 6V40c0 3.31 2.692 6 6 6h36c3.309 0 6-2.69 6-6V17.997c0-3.31-2.691-6.001-6-6.001z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-search-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '  <path class=\"svg-content\" fill=\"#727272\" d=\"M21.451 18.8a1.874 1.874 0 1 1-2.652 2.651l-5.495-5.495A7.455 7.455 0 0 1 9.5 17 7.5 7.5 0 1 1 17 9.5c0 1.39-.385 2.688-1.044 3.804l5.495 5.496zM9.5 3.876a5.625 5.625 0 1 0 0 11.25 5.625 5.625 0 0 0 0-11.25z\"/>\\n' +\n        '  <path fill=\"none\" d=\"M0 0h24v24H0z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-case-data-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"48\" height=\"48\" viewBox=\"0 0 48 48\">\\n' +\n        '    <path class=\"svg-content\" fill=\"#727272\" fill-rule=\"evenodd\" d=\"M42 42H6c-1.103 0-2-.898-2-2V26.61c4.43 2.623 10.208 3.96 15.729 4.422v1.504c0 1.326.948 2.4 2.118 2.4h4.764c1.17 0 2.118-1.074 2.118-2.4V31.04c6.16-.503 11.505-2.008 15.271-4.264v13.223c0 1.103-.897 2-2 2zM6 15.995h36c1.103 0 2 .898 2 2v3.583c-2.798 2.727-8.447 4.664-15.271 5.268v-1.511c0-1.326-.948-2.4-2.117-2.4h-4.765c-1.17 0-2.118 1.074-2.118 2.4v1.51c-6.651-.6-12.41-2.518-15.729-5.348v-3.501c0-1.103.897-2 2-2zm10.655-8.89c0-.063.023-.098.016-.106l14.944-.011s.04.033.04.117v4.89h-15v-4.89zM42 11.996h-6.345v-4.89C35.655 4.842 33.861 3 31.657 3H16.653c-2.204 0-3.998 1.842-3.998 4.106v4.89H6c-3.308 0-6 2.692-6 6V40c0 3.31 2.692 6 6 6h36c3.309 0 6-2.69 6-6V17.997c0-3.31-2.691-6.001-6-6.001z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-close-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '  <path class=\"svg-content\" fill=\"#727272\" d=\"M21.483 5.012L14.495 12l6.988 6.987a1.766 1.766 0 0 1-2.495 2.495L12 14.495l-6.987 6.987a1.766 1.766 0 0 1-2.495-2.495L9.504 12 2.517 5.012a1.765 1.765 0 0 1 2.495-2.495L12 9.504l6.987-6.987a1.765 1.765 0 0 1 2.495 2.495\"/>\\n' +\n        '  <path fill=\"none\" d=\"M0 0h24v24H0z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-case-state-audit-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '  <path fill=\"none\" d=\"M0 0h24v24H0V0zm0 0h24v24H0V0z\"/>\\n' +\n        '  <path class=\"svg-content\" fill=\"#727272\" d=\"M16.59 7.58L10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-milestone-completed',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"36\" height=\"36\" viewBox=\"0 0 36 36\">\\n' +\n        '    <g fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <circle cx=\"18\" cy=\"18\" r=\"18\" fill=\"#062E79\"/>\\n' +\n        '        <path fill=\"#FFF\" d=\"M22.716 16.63l-5.16 5.09a.97.97 0 0 1-.685.28.972.972 0 0 1-.685-.28l-2.903-2.863a.943.943 0 0 1-.283-.675c0-.527.434-.954.967-.954.268 0 .51.106.685.28l2.22 2.188 4.476-4.416a.973.973 0 0 1 .685-.28c.533 0 .967.428.967.954a.945.945 0 0 1-.284.676z\"/>\\n' +\n        '    </g>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-milestone-completed-terminal',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"36\" height=\"36\" viewBox=\"0 0 36 36\">\\n' +\n        '    <g fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <circle cx=\"18\" cy=\"18\" r=\"16\" fill=\"#04BE5B\" stroke=\"#04BE5B\" stroke-width=\"4\"/>\\n' +\n        '        <path fill=\"#FFF\" d=\"M17.11 24.441c-.35.346-.833.559-1.368.559a1.943 1.943 0 0 1-1.37-.559l-5.805-5.728A1.886 1.886 0 0 1 8 17.363c0-1.054.867-1.908 1.935-1.908.534 0 1.018.214 1.37.56l4.437 4.377 8.954-8.832c.35-.345.835-.56 1.369-.56 1.068 0 1.935.855 1.935 1.909a1.89 1.89 0 0 1-.568 1.35L17.111 24.441z\"/>\\n' +\n        '    </g>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-milestone-inprogress',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"36\" height=\"36\" viewBox=\"0 0 36 36\">\\n' +\n        '    <circle cx=\"18\" cy=\"18\" r=\"17\" fill=\"none\" fill-rule=\"evenodd\" stroke=\"#0081CB\" stroke-width=\"2\"/>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-milestone-inprogress-terminal',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"36\" height=\"36\" viewBox=\"0 0 36 36\">\\n' +\n        '    <circle cx=\"18\" cy=\"18\" r=\"17\" fill=\"none\" fill-rule=\"evenodd\" stroke=\"#0081CB\" stroke-width=\"2\"/>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-milestone-pending',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"36\" height=\"36\" viewBox=\"0 0 36 36\">\\n' +\n        '    <circle cx=\"18\" cy=\"18\" r=\"17\" fill=\"#FFF\" fill-rule=\"evenodd\" stroke=\"#DEDEDE\" stroke-width=\"2\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-milestone-pending-terminal',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"36\" height=\"36\" viewBox=\"0 0 36 36\">\\n' +\n        '    <circle cx=\"18\" cy=\"18\" r=\"17\" fill=\"#FFF\" fill-rule=\"evenodd\" stroke=\"#DEDEDE\" stroke-width=\"2\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-mini-state-completed',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '    <g fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <circle cx=\"12\" cy=\"12\" r=\"12\" fill=\"#062E79\"/>\\n' +\n        '        <path fill=\"#FFF\" d=\"M15.144 11.086l-3.44 3.394a.648.648 0 0 1-.913 0l-1.935-1.909a.629.629 0 0 1-.19-.45.648.648 0 1 1 1.101-.45l1.48 1.46 2.985-2.944a.649.649 0 0 1 .456-.187c.356 0 .645.285.645.636a.63.63 0 0 1-.189.45z\"/>\\n' +\n        '    </g>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-mini-state-current',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '    <circle cx=\"12\" cy=\"12\" r=\"11\" fill=\"white\" fill-rule=\"evenodd\" stroke=\"#0081CB\" stroke-width=\"2\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-mini-state-terminal-completed',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '    <g fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"#04BE5B\" stroke=\"#04BE5B\" stroke-width=\"4\"/>\\n' +\n        '        <path fill=\"#FFF\" d=\"M11.407 16.294c-.233.23-.556.373-.912.373-.357 0-.68-.142-.913-.373l-3.87-3.818a1.257 1.257 0 0 1-.379-.9c0-.703.578-1.273 1.29-1.273.357 0 .68.143.913.374l2.959 2.918 5.969-5.888c.233-.23.556-.374.913-.374.712 0 1.29.57 1.29 1.273 0 .352-.145.67-.379.9l-6.881 6.788z\"/>\\n' +\n        '    </g>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-capabilities',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '  <path class=\"svg-content\" fill=\"#727272\" d=\"M20.063 19.5H19c-.815 0-1.5-.6-1.5-1.375V12.5h-2.566A7.501 7.501 0 0 1 0 11.5a7.5 7.5 0 0 1 15 0h2.5V5.875c0-.775.685-1.375 1.5-1.375h1.063a2 2 0 1 1 0 1H19c-.29 0-.5.184-.5.375V11.5h1.563a2 2 0 1 1 0 1H18.5v5.625c0 .191.21.375.5.375h1.063a2 2 0 1 1 0 1zm-8.67-10.717L9.5 10.685 7.65 10.35 7.319 8.5 9.214 6.6c-.426-.426-1.033-.62-1.483-.597-.452.023-1.418.278-2.166 1.073-.725.765-1.486 2.191-.812 3.775.08.19.171.442-.097.71-.133.132-.256.385-1.993 2.022-1.737 1.638.31 3.417 1.88 1.749 1.569-1.669 1.746-1.845 1.897-1.992.285-.279.54-.185.711-.098 1.194.618 2.894.081 3.776-.801.882-.883 1.043-1.735 1.07-2.17.027-.434-.124-1.007-.604-1.487z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-home',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z\" fill=\"#727272\"  class=\"svg-content\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-starters-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"45\" height=\"45\" viewBox=\"0 0 45 45\">\\n' +\n        '    <g fill=\"#0081CB\" fill-rule=\"evenodd\">\\n' +\n        '        <path d=\"M22.5 0C10.074 0 0 10.074 0 22.5S10.074 45 22.5 45 45 34.926 45 22.5 34.926 0 22.5 0zm0 1.534c11.56 0 20.966 9.405 20.966 20.966 0 11.56-9.405 20.966-20.966 20.966-11.56 0-20.966-9.405-20.966-20.966 0-11.56 9.405-20.966 20.966-20.966z\"></path>\\n' +\n        '        <path fill-rule=\"nonzero\" d=\"M28.274 23.103l-3.013 5.18h-6.025l-3.013-5.18 3.013-5.179h6.025l3.013 5.18zm-8.265 3.851h4.48l2.239-3.85-2.24-3.85h-4.48l-2.24 3.85 2.24 3.85zm-4.654-2.652l2.998 5.155-.808 1.622h.572v1.328h-1.405v-1.024l-.653-.32.777-1.557-2.254-3.875h-4.48l-1.1 1.891.135.315-1.227.53-.556-1.291.477-.198 1.498-2.576h6.026zm12.295-9.081l-.24-1.306 1.352-.228.225 1.31-1.337.224zm-11.074-2.685l-.795 1.142-1.104-.753.8-1.148 1.099.76zm6.65-3.347l-.184 1.316-1.387-.189.18-1.316 1.39.189zm-7.845 5.37l-.329 1.354-1.301-.311.328-1.353 1.302.31zm5.296-4.195l-1.36.314-.31-1.293 1.373-.317.297 1.296zm-2.252.7l-1.156.787-.758-1.095 1.156-.788.758 1.095zm9.444 1.26l-1.033.845-.895-1.057 1.018-.863.91 1.074zm-2.026-1.995l-.658 1.159-1.218-.674.644-1.164 1.232.68zm-12.13 6.937l-.026-.213.016-.002-.001-.015.216-.01 1.098-.13.08.66-.663.078.664-.07.095.717-.759.052-.67.03-.05-1.097zm18.019-3.383l-.205 1.313-1.382-.204.189-1.315 1.398.206zm5.932 8.467l-.222-1.37 1.32-.218.225 1.385-1.323.203zm-.91-3.067l-.318-.585 1.178-.631.355.655.306.591-1.191.607-.33-.637zm-2.297-4.316l-.6 1.189-1.257-.629.605-1.185 1.252.625zm-21.746 3.657l-1.27.58-.567-1.203 1.283-.587.554 1.21zm24-1.778l-.946.94-.994-.97.93-.956 1.01.986zM30.26 30.953l1.387-.229.22 1.31-1.387.23-.22-1.31zm-8.08 1.455v-1.33h1.406v1.33h-1.406zm2.734 0v-1.33h1.405v1.33h-1.405zm8.443-2.369l.588-.316.637 1.17-.66.352-.596.304-.611-1.182.642-.328zm4.319-6.562l1.325.187-.209 1.388-1.322-.204.206-1.371zm-.758 2.87l.22-.433 1.194.6-.63 1.243-.894-.444-.661.374-1.486-2.588h-4.477l-2.26 3.885.844 1.816-.608.279h.893v1.328h-1.406v-1.094l-.095.044-1.134-2.441 2.993-5.145h6.028l1.48 2.577zm-2.054 2.71l.978-.988.962.925-.994 1.001-.946-.939zM8.339 24.12l.024 1.387-1.338.031L7 24.135l1.339-.015zm.46 5.55l.946-.939.994.978-.939.948-1.002-.986zm1.762-9.838l-.96 1.019-.977-.908.96-1.018.977.907zm8.884 12.576v-1.33h1.406v1.33h-1.406zM9.028 21.764l-.5 1.293-1.254-.467.508-1.311 1.246.485zm2.088 9.772l.522-1.224 1.29.534-.508 1.229-1.304-.54zm2.857.862l.015-1.328 1.405.016-.015 1.329-1.405-.017z\"></path>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-spotfire-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n' +\n        '<svg width=\"48px\" height=\"48px\" viewBox=\"0 0 48 48\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 51.1 (57501) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>EBCCA156-217F-4BF2-B9AE-89A324E485CB</title>\\n' +\n        '    <desc>Created with sketchtool.</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '    <g id=\"Icons\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <g id=\"UI-Icons\" transform=\"translate(-1159.000000, -384.000000)\" fill=\"#062E79\" fill-rule=\"nonzero\">\\n' +\n        '            <g id=\"ic-spotfire\" transform=\"translate(1159.000000, 384.000000)\">\\n' +\n        '                <path d=\"M31.655908,37.8577116 C31.6187835,37.9325874 31.5686986,38.0002953 31.5079727,38.0576995 C30.0186764,39.0509358 28.3403185,39.725664 26.5781297,40.0395797 C25.9600776,40.1670374 25.331823,40.2386547 24.700951,40.2535668 C24.4690525,40.2655661 24.2351548,40.2735656 23.9992581,40.2735656 C23.7633613,40.2735656 23.5294636,40.2735656 23.2975651,40.2535668 C22.6666932,40.2386547 22.0384385,40.1670374 21.4203864,40.0395797 C19.6581976,39.725664 17.9798398,39.0509358 16.4905434,38.0576995 C16.4298491,38.0002673 16.3797686,37.9325654 16.3426081,37.8577116 L16.3426081,37.8757105 C16.3426081,38.0756985 16.3705959,38.5056725 16.4025819,39.1576331 C16.4112843,40.1848682 16.771857,41.1780523 17.4241349,41.971463 C17.7213044,42.3282281 18.0978654,42.6104129 18.5236538,42.7954132 L18.9394719,42.9814019 C19.1273897,43.0493978 19.3159738,43.1160604 19.5052244,43.1813898 C20.7873656,43.5886091 22.1242824,43.797012 23.4694898,43.7993525 L24.5370228,43.7993525 C25.8822302,43.797012 27.2191471,43.5886091 28.5012883,43.1813898 C28.6905388,43.1213935 28.879123,43.0547308 29.0670407,42.9814019 L29.4828588,42.7954132 C29.9086472,42.6104129 30.2852082,42.3282281 30.5823777,41.971463 C31.2346556,41.1780523 31.5952283,40.1848682 31.6039308,39.1576331 C31.6359168,38.5036726 31.6599063,38.0656991 31.6619054,37.8757105 L31.6619054,37.8577116 L31.655908,37.8577116 Z M28.0135017,45.1232725 C26.8981784,45.4558873 25.7408294,45.6262885 24.5770053,45.6292419 L23.4215108,45.6292419 C22.2576867,45.6262885 21.1003377,45.4558873 19.9850144,45.1232725 C19.9196684,45.1020458 19.8582213,45.0702975 19.803094,45.0292781 L19.803094,45.047277 L19.8250844,45.0912744 C20.3479711,46.870118 22.0111732,48.0669219 23.8633175,47.9970987 L24.1851767,47.9970987 C26.0235414,48.0511974 27.6666746,46.857011 28.1834273,45.0912744 L28.2054177,45.047277 L28.2054177,45.0292781 C28.1472452,45.0712842 28.082345,45.1030703 28.0135017,45.1232725 Z M39.440502,11.5493019 C38.2118114,8.22698136 35.6152604,5.59303051 32.3116211,4.31773901 C31.6784657,4.02511059 31.0242466,3.78043801 30.3544774,3.58578325 C28.4207231,3.04109155 26.4238709,2.7526457 24.4150761,2.72783511 L23.5854391,2.72783511 C21.5766444,2.7526457 19.5797922,3.04109155 17.6460378,3.58578325 C16.9762662,3.78043086 16.3220467,4.02510364 15.6888941,4.31773901 C12.3843501,5.59233242 9.78692567,8.22643056 8.55801413,11.5493019 C8.09229392,12.9677014 7.87914956,14.45689 7.92828965,15.9490359 C8.05342939,19.1784343 9.17030681,22.2908091 11.1268902,24.8624971 C11.4287581,25.3064703 11.7706085,25.758443 12.1724327,26.2444136 C12.5322753,26.6783874 12.8881196,27.0803631 13.2659542,27.5043375 L13.4658668,27.7383233 C13.629795,27.9383112 13.9556525,28.3202881 14.2955038,28.7982592 C14.8648102,29.6467696 15.2940987,30.5812968 15.5669475,31.5660919 C15.6332301,31.8081577 15.6852964,32.0538963 15.7228793,32.3020475 L15.7228793,33.4399787 C15.7228793,33.4519779 15.7228793,33.4739766 15.7228793,33.5039748 L15.7228793,33.5979691 C15.8655353,35.4784435 17.2354149,37.0372691 19.0814098,37.4197381 C19.3144881,37.5003865 19.5521331,37.5671659 19.7930984,37.619726 L19.8710643,37.6377249 C20.2309068,37.7437185 20.760675,37.8537119 20.760675,37.8537119 L20.7366855,37.8317132 L20.7166943,37.8137143 L20.7166943,37.801715 L20.6947039,37.801715 C20.5988668,37.6190578 20.526972,37.4248013 20.4807975,37.22375 L20.4807975,37.1977515 C20.456808,37.1097568 20.4368167,37.0277618 20.4208237,36.9617658 C20.3722617,36.7305623 20.3362249,36.4969023 20.312871,36.2618081 C20.2688902,35.8618323 20.2429016,35.40386 20.232906,34.8318945 C20.232906,34.6099079 20.232906,34.3739222 20.232906,34.1179377 L20.232906,32.9060109 C20.2556365,32.6124684 20.2556365,32.3176068 20.232906,32.0240643 C20.1500645,30.2470055 19.5588879,28.5311141 18.5296512,27.0803631 C18.3937107,26.8803752 18.30375,26.7623823 18.2917553,26.7463833 L18.2777614,26.7283844 C17.8119652,26.1124216 17.3181813,25.560455 16.8403903,25.0264872 C16.1838726,24.3220373 15.5760655,23.5736849 15.0211863,22.7866226 C13.4884627,20.8088263 12.6019693,18.4067104 12.4822971,15.9070385 C12.4212405,14.5715773 12.6681723,13.2399693 13.2039814,12.0152737 C14.1476214,10.1238325 15.7673659,8.65623324 17.7419958,7.90352226 L17.8019696,7.87552395 C18.2197025,7.68419657 18.6514373,7.52507644 19.0934045,7.39955272 C22.3062638,6.53033188 25.6922524,6.53033188 28.9051116,7.39955272 C29.3472483,7.5270227 29.7789869,7.68814998 30.1965465,7.88152359 L30.2585194,7.9095219 C32.2313608,8.66119746 33.8501851,10.1264683 34.7945348,12.0152737 C35.3323297,13.2360794 35.5826578,14.5641401 35.5262146,15.8970391 C35.4065424,18.396711 34.520049,20.7988269 32.9873255,22.7766232 C32.4324462,23.5636855 31.8246391,24.3120379 31.1681214,25.0164878 C30.6903305,25.5524554 30.1985457,26.1024222 29.7307503,26.718385 L29.7167565,26.7363839 C29.7047617,26.7523829 29.6148011,26.8683759 29.4788605,27.0703637 C28.4496238,28.5211147 27.8584473,30.2370061 27.7756058,32.0140649 C27.7528753,32.3076074 27.7528753,32.602469 27.7756058,32.8960115 L27.7756058,34.1079383 C27.7756058,34.3639228 27.7756058,34.5999086 27.7756058,34.8218951 C27.7656102,35.3938606 27.7396215,35.8598324 27.6956408,36.2518087 C27.6723023,36.4869049 27.6362653,36.7205657 27.587688,36.9517664 C27.571695,37.0177624 27.5517037,37.0997574 27.5277142,37.1877521 L27.5277142,37.2137506 C27.4815398,37.4148019 27.4096449,37.6090584 27.3138078,37.7917156 L27.2918175,37.7917156 L27.2918175,37.8037149 L27.2718262,37.8217138 L27.2478367,37.8437125 C27.2478367,37.8437125 27.7776049,37.7337191 28.1374475,37.6277255 L28.2154133,37.6097266 C28.4563787,37.5571665 28.6940236,37.4903872 28.927102,37.4097387 C30.7595312,37.0182197 32.1158115,35.4669029 32.2596439,33.5979691 L32.2596439,33.5139742 C32.2596439,33.483976 32.2596439,33.4639772 32.2596439,33.4499781 L32.2596439,32.3120468 C32.2972268,32.0638957 32.349293,31.8181571 32.4155756,31.5760913 C32.6884244,30.5912962 33.1177129,29.6567689 33.6870193,28.8082586 C34.0248715,28.3302875 34.3527281,27.9383112 34.5166563,27.7483227 L34.7165689,27.5143369 C35.0944036,27.0903625 35.4502479,26.6883868 35.8100904,26.254413 C36.2099155,25.7684424 36.553765,25.3164697 36.855633,24.8724965 C38.8122163,22.3008085 39.9290937,19.1884337 40.0542335,15.9590353 C40.1096642,14.4644973 39.901923,12.971852 39.440502,11.5493019 Z M5.01956232,29.4342208 L4.81964979,29.5202156 C2.99649784,30.24534 1.85508545,32.0706689 2.00088309,34.0279431 C1.99079072,34.2320879 2.0220709,34.436166 2.09284286,34.6279069 C2.17769818,34.5000153 2.28465758,34.3882751 2.40870466,34.2979268 C3.71962504,33.6820391 5.08489381,33.1892859 6.4869203,32.8260158 L6.56288706,32.7940177 C8.63845686,31.774723 9.76597305,29.4835152 9.30768612,27.2163549 C8.01974086,28.202048 6.56814236,28.9528311 5.01956232,29.4342208 Z M2.92247986,5.61166079 C4.42182385,6.21162453 6.9687095,6.77759032 7.33255031,7.411552 C7.76708764,5.27599244 6.62333345,3.13284827 4.6077425,2.30586062 L4.40782997,2.21986582 C2.85268539,1.74008838 1.39479082,0.988522387 0.101714043,0 C-0.357566659,2.26781936 0.770104541,4.56016384 2.8465131,5.57966273 L2.92247986,5.61166079 Z M43.1908611,29.5202156 L42.9909486,29.4342208 C41.4397007,28.9543066 39.9853373,28.2041706 38.6948282,27.2183547 C38.2336029,29.4832433 39.3558916,31.7746595 41.4276326,32.7980175 L41.5035993,32.8300155 C42.9056258,33.1932856 44.2708946,33.6860389 45.581815,34.3019266 C45.7121319,34.3925677 45.8246299,34.506464 45.9136698,34.6379063 C45.9844417,34.4461654 46.0157219,34.2420873 46.0056295,34.0379425 C46.1565658,32.078134 45.0161733,30.2477944 43.1908611,29.5202156 Z M47.8968021,0 C46.6035778,0.987814389 45.1456919,1.73869885 43.5906861,2.21786594 L43.3907736,2.30386074 C41.3708198,3.13157773 40.2261321,5.28067168 40.6659658,7.41955151 C41.0298066,6.77559044 43.5766923,6.21962404 45.0760363,5.61966031 L45.152003,5.58766224 C47.2317709,4.56734959 48.3600632,2.27045415 47.8968021,1.97774277e-15 Z\"></path>\\n' +\n        '            </g>\\n' +\n        '        </g>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-liveapps-sm-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"44\" height=\"44\" viewBox=\"0 0 44 44\">\\n' +\n        '    <path fill=\"#0081CB\" fill-rule=\"evenodd\" d=\"M11 25a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm2 3V14h-2.556l-5.657 5.464c-.785.785-.785 1.948 0 2.733l11.314 11.265c.777.778 2.043.761 2.828-.024L22.343 30H15a2 2 0 0 1-2-2zm10-12v-5.5l5.5 5.5H23zm-4 5h9v-2h-9v2zm0 4h6v-2h-6v2zm-2-4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm13-10l-6-6h-8c-1.11 0-2 .89-2 2v16a2 2 0 0 0 2 2h6.661L30 21.653V15zm4.831 11.494L26.333 35H23v-3.331l8.498-8.507 3.333 3.332zm4.694-.878c-.018.435-.471.889-.925 1.333l-3.671 3.68-1.262-1.262 3.778-3.769-.854-.853-1.262 1.253-3.333-3.334 3.413-3.404c.347-.347.925-.347 1.253 0l2.08 2.08c.347.329.347.907 0 1.253-.302.303-.595.596-.604.889-.027.285.276.578.56.854.427.444.844.844.827 1.28zM22 1.5c11.304 0 20.5 9.196 20.5 20.5S33.304 42.5 22 42.5 1.5 33.304 1.5 22 10.696 1.5 22 1.5zM22 0C9.869 0 0 9.869 0 22s9.869 22 22 22 22-9.869 22-22S34.131 0 22 0z\"></path>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-integration-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n' +\n        '<svg width=\"48px\" height=\"48px\" viewBox=\"0 0 48 48\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 51.1 (57501) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>327208F2-CA57-4974-A537-97E9D3200E7B</title>\\n' +\n        '    <desc>Created with sketchtool.</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '    <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <g id=\"ic-integration-md\" fill=\"#062E79\">\\n' +\n        '            <path d=\"M48.0993789,27.3367089 C48.0993789,24.9822785 47.4355072,22.7979747 46.1253002,20.8450633 C45.0896605,19.3012658 43.7769482,18.0582278 42.2107122,17.1362025 C42.1520911,13.5448101 40.7872712,10.4344304 38.1523271,7.88708861 C35.4833126,5.3078481 32.2240787,4 28.4648116,4 C25.6635238,4 23.0831925,4.76759494 20.7964679,6.28202532 C19.1580828,7.36556962 17.8238261,8.70582278 16.8097308,10.2810127 C15.8687867,9.88810127 14.8451718,9.68962025 13.7484058,9.68962025 C11.6059793,9.68962025 9.74663768,10.436962 8.22248861,11.9098734 C6.67278675,13.4081013 5.88666253,15.2481013 5.88666253,17.3792405 C5.88666253,18.0248101 5.96532505,18.6516456 6.121147,19.2562025 C4.69169358,19.92 3.44411594,20.8870886 2.39595031,22.1473418 C0.806165631,24.0592405 0,26.2835443 0,28.7589873 C0,31.6724051 1.0762236,34.1893671 3.19810766,36.24 C5.04141615,38.0217722 7.2429648,39.0298734 9.75315114,39.2475949 C10.1018716,41.9286076 12.3660497,44 15.1137267,44 L18.5307867,44 L18.5307867,30.5878481 L15.1137267,30.5878481 C12.4071346,30.5878481 10.1710145,32.598481 9.77118841,35.2207595 C8.29814493,35.0273418 7.03052588,34.4146835 5.92574327,33.3468354 C4.59649689,32.0622785 3.95016149,30.561519 3.95016149,28.7589873 C3.95016149,27.2313924 4.43015321,25.9113924 5.41719255,24.7240506 C6.4272795,23.5098734 7.67535818,22.7493671 9.23257557,22.3994937 C9.87189648,22.2551899 10.3994865,21.8 10.6404845,21.1827848 C10.8819834,20.5660759 10.8053251,19.8683544 10.4365631,19.32 C10.0327288,18.7210127 9.83682402,18.0860759 9.83682402,17.3792405 C9.83682402,16.3559494 10.1905549,15.5372152 10.9501242,14.8035443 C11.7362484,14.0435443 12.6250849,13.6896203 13.7484058,13.6896203 C14.7469689,13.6896203 15.5786874,13.9858228 16.2901573,14.5949367 C16.7671429,15.003038 17.4069648,15.1579747 18.0142195,15.0156962 C18.6219752,14.8718987 19.1275197,14.4455696 19.3765342,13.8663291 C20.1305921,12.1108861 21.3020124,10.7255696 22.9574327,9.62987342 C24.6143561,8.53316456 26.4155776,8 28.4648116,8 C31.2124886,8 33.4891925,8.90936709 35.4246915,10.7802532 C37.3341366,12.6263291 38.2625549,14.7848101 38.2625549,17.3792405 C38.2625549,17.4987342 38.2555404,17.7351899 38.221971,18.1848101 C38.1593416,19.0278481 38.6268075,19.8197468 39.3898841,20.163038 C40.8373747,20.8146835 41.9722195,21.7726582 42.8575487,23.0926582 C43.7268447,24.3883544 44.1492174,25.7762025 44.1492174,27.3367089 C44.1492174,29.5275949 43.360087,31.355443 41.7367329,32.924557 C40.7076066,33.9194937 39.5672505,34.5949367 38.2891097,34.9625316 C37.7870725,32.4663291 35.6035611,30.5878481 32.9856522,30.5878481 L29.5685921,30.5878481 L29.5685921,33.2202532 L25.153971,33.2202532 C24.5442112,33.2202532 24.0496894,33.7194937 24.0496894,34.3356962 L24.0496894,34.3397468 C24.0496894,34.955443 24.5442112,35.4551899 25.153971,35.4551899 L29.5685921,35.4551899 L29.5685921,38.8167089 L25.153971,38.8167089 C24.5442112,38.8167089 24.0496894,39.3164557 24.0496894,39.9321519 L24.0496894,39.9362025 C24.0496894,40.5524051 24.5442112,41.0516456 25.153971,41.0516456 L29.5685921,41.0516456 L29.5685921,44 L32.9856522,44 C35.802472,44 38.1147495,41.8248101 38.3722816,39.0460759 C40.6635155,38.5939241 42.706236,37.516962 44.4643685,35.8177215 C46.876352,33.4865823 48.0993789,30.6329114 48.0993789,27.3367089\" id=\"ic-integration-large\"></path>\\n' +\n        '        </g>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-info-icon',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z\" fill=\"green\"/></svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-chevron-right',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path class=\"svg-content\" fill=\"#727272\" d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-chevron-left',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path  class=\"svg-content\" fill=\"#727272\" d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>\\n')\n    );\n    // *JS*?\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-delete-sweep',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path class=\"svg-content\" fill=\"#727272\" d=\"M15 16h4v2h-4zm0-8h7v2h-7zm0 4h6v2h-6zM3 18c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V8H3v10zM14 5h-3l-1-1H6L5 5H2v2h12z\"/><path fill=\"none\" d=\"M0 0h24v24H0z\"/></svg>\\n')\n    );\n    // *JS*?\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-euro-symbol',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path class=\"svg-content\" fill=\"#727272\"  d=\"M15 18.5c-2.51 0-4.68-1.42-5.76-3.5H15v-2H8.58c-.05-.33-.08-.66-.08-1s.03-.67.08-1H15V9H9.24C10.32 6.92 12.5 5.5 15 5.5c1.61 0 3.09.59 4.23 1.57L21 5.3C19.41 3.87 17.3 3 15 3c-3.92 0-7.24 2.51-8.48 6H3v2h3.06c-.04.33-.06.66-.06 1 0 .34.02.67.06 1H3v2h3.52c1.24 3.49 4.56 6 8.48 6 2.31 0 4.41-.87 6-2.3l-1.78-1.77c-1.13.98-2.6 1.57-4.22 1.57z\"/><path fill=\"none\" d=\"M0 0h24v24H0z\"/></svg>\\n')\n    );\n// *JS*?\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-flash-on',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M7 2v11h3v9l7-12h-4l4-8z\"/></svg>')\n    );\n// *JS*?\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-incandescent',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path fill=\"#727272\"  class=\"svg-content\" d=\"M3.55 18.54l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8zM11 22.45h2V19.5h-2v2.95zM4 10.5H1v2h3v-2zm11-4.19V1.5H9v4.81C7.21 7.35 6 9.28 6 11.5c0 3.31 2.69 6 6 6s6-2.69 6-6c0-2.22-1.21-4.15-3-5.19zm5 4.19v2h3v-2h-3zm-2.76 7.66l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4z\"/></svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-cloud-download',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path class=\"svg-content\" fill=\"#727272\" d=\"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z\"/></svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-visibility',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path class=\"svg-content\" fill=\"#727272\" d=\"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z\"/></svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcs-pie-chart',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path  class=\"svg-content\" fill=\"#727272\" d=\"M11 2v20c-5.07-.5-9-4.79-9-10s3.93-9.5 9-10zm2.03 0v8.99H22c-.47-4.74-4.24-8.52-8.97-8.99zm0 11.01V22c4.74-.47 8.5-4.25 8.97-8.99h-8.97z\"/></svg>\\n')\n    );\n\n    /* audit icons */\n    this.matIconRegistry.addSvgIconLiteral(\n      'BP_AUTO_STARTED_INSTANCE',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 40 40\">\\n' +\n        '  <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(-4 -4)\">\\n' +\n        '    <polygon points=\"0 0 48 0 48 48 0 48\"/>\\n' +\n        '    <path fill=\"#0081CB\" fill-rule=\"nonzero\" d=\"M20,33 L32,24 L20,15 L20,33 Z M24,4 C12.96,4 4,12.96 4,24 C4,35.04 12.96,44 24,44 C35.04,44 44,35.04 44,24 C44,12.96 35.04,4 24,4 Z M24,40 C15.18,40 8,32.82 8,24 C8,15.18 15.18,8 24,8 C32.82,8 40,15.18 40,24 C40,32.82 32.82,40 24,40 Z\"/>\\n' +\n        '  </g>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'BP_DELAYED_AUTO_START_TIMER_EXPIRED',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        ' <g>\\n' +\n        '  <ellipse stroke=\"null\" ry=\"7.351296\" rx=\"7.524559\" id=\"svg_4\" cy=\"13.658373\" cx=\"12.074255\" stroke-opacity=\"null\" stroke-width=\"null\" fill=\"#0081cb\"/>\\n' +\n        '  <path id=\"svg_1\" fill=\"none\" d=\"m-12.870959,2.227668l24,0l0,24l-24,0l0,-24z\"/>\\n' +\n        '  <path fill=\"#0081cb\" id=\"svg_2\" d=\"m15.247519,1.792059l-6,0l0,2l6,0l0,-2zm-4,13l2,0l0,-6l-2,0l0,6zm8.03,-6.61l1.42,-1.42c-0.43,-0.51 -0.9,-0.99 -1.41,-1.41l-1.42,1.42c-1.55,-1.24 -3.5,-1.98 -5.62,-1.98c-4.97,0 -9,4.03 -9,9s4.02,9 9,9s9,-4.03 9,-9c0,-2.12 -0.74,-4.07 -1.97,-5.61zm-7.03,12.61c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7s7,3.13 7,7s-3.13,7 -7,7z\"/>\\n' +\n        '  <rect stroke-dasharray=\"2,2\" stroke=\"#ffffff\" id=\"svg_3\" height=\"6.088952\" width=\"2.079155\" y=\"6.653602\" x=\"11.18319\" stroke-width=\"0\" fill=\"#ffffff\"/>\\n' +\n        ' </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'BP_DELAYED_AUTO_STARTED_INSTANCE',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '    <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\\n' +\n        '    <path d=\"M15 1H9v2h6V1zm-4 13h2V8h-2v6zm8.03-6.61l1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM12 20c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z\" fill=\"#0081cb\" />\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'BP_DELAYED_AUTO_STARTED_INSTANCE_CANCELLED',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '    <path d=\"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z\" fill=\"none\"/>\\n' +\n        '    <path d=\"M19.04 4.55l-1.42 1.42C16.07 4.74 14.12 4 12 4c-1.83 0-3.53.55-4.95 1.48l1.46 1.46C9.53 6.35 10.73 6 12 6c3.87 0 7 3.13 7 7 0 1.27-.35 2.47-.94 3.49l1.45 1.45C20.45 16.53 21 14.83 21 13c0-2.12-.74-4.07-1.97-5.61l1.42-1.42-1.41-1.42zM15 1H9v2h6V1zm-4 8.44l2 2V8h-2v1.44zM3.02 4L1.75 5.27 4.5 8.03C3.55 9.45 3 11.16 3 13c0 4.97 4.02 9 9 9 1.84 0 3.55-.55 4.98-1.5l2.5 2.5 1.27-1.27-7.71-7.71L3.02 4zM12 20c-3.87 0-7-3.13-7-7 0-1.28.35-2.48.95-3.52l9.56 9.56c-1.03.61-2.23.96-3.51.96z\" fill=\"#0081cb\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'BP_DELAYED_AUTO_STARTED_INSTANCE_CANCELLED_DUE_TO_STATE_CHANGE',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\\n' +\n        '    <path d=\"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z\" fill=\"none\"/>\\n' +\n        '    <path d=\"M19.04 4.55l-1.42 1.42C16.07 4.74 14.12 4 12 4c-1.83 0-3.53.55-4.95 1.48l1.46 1.46C9.53 6.35 10.73 6 12 6c3.87 0 7 3.13 7 7 0 1.27-.35 2.47-.94 3.49l1.45 1.45C20.45 16.53 21 14.83 21 13c0-2.12-.74-4.07-1.97-5.61l1.42-1.42-1.41-1.42zM15 1H9v2h6V1zm-4 8.44l2 2V8h-2v1.44zM3.02 4L1.75 5.27 4.5 8.03C3.55 9.45 3 11.16 3 13c0 4.97 4.02 9 9 9 1.84 0 3.55-.55 4.98-1.5l2.5 2.5 1.27-1.27-7.71-7.71L3.02 4zM12 20c-3.87 0-7-3.13-7-7 0-1.28.35-2.48.95-3.52l9.56 9.56c-1.03.61-2.23.96-3.51.96z\" fill=\"#0081cb\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'BP_INSTANCE_COMPLETED',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"12px\" height=\"9px\" viewBox=\"0 0 12 9\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>6FF6D773-32D5-44FF-9BA8-ED1ACBAF56A8</title>\\n' +\n        '    <desc>Created with sketchtool.</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '    <g id=\"Case-Management-\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <g id=\"8.-Tibco-Case-Management---Detail-Page--collapsed\" transform=\"translate(-73.000000, -753.000000)\" fill=\"#58A400\">\\n' +\n        '            <g id=\"check\" transform=\"translate(68.000000, 745.000000)\">\\n' +\n        '                <path d=\"M16.8612947,9.80440476 L9.9853348,16.6789202 C9.80100552,16.8624718 9.50267875,16.8624718 9.31912723,16.6789202 L5.13766364,12.4706795 C4.95411212,12.2863502 4.95411212,11.9869123 5.13766364,11.8036941 L6.13675278,10.8053827 C6.32097095,10.6214979 6.61940883,10.6214979 6.80296035,10.8053827 L9.65578649,13.6770974 L15.1948869,8.13766364 C15.3784384,7.95411212 15.6767652,7.95411212 15.8617611,8.13766364 L16.8609614,9.13741943 C17.0462906,9.32141538 17.0462906,9.62085324 16.8612947,9.80440476\" id=\"Fill-1\"></path>\\n' +\n        '            </g>\\n' +\n        '        </g>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'BP_INSTANCE_CREATED',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"12px\" height=\"16px\" viewBox=\"0 0 12 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>DA1993B0-7B6B-42BA-814D-097AD18D0114</title>\\n' +\n        '    <desc>Created with sketchtool.</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '    <g id=\"Case-Management-\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <g id=\"8.-Tibco-Case-Management---Detail-Page--collapsed\" transform=\"translate(-75.000000, -366.000000)\">\\n' +\n        '            <g id=\"location\" transform=\"translate(69.000000, 362.000000)\">\\n' +\n        '                <g id=\"Group-3\" transform=\"translate(6.000000, 4.000000)\">\\n' +\n        '                    <g id=\"Page-1\">\\n' +\n        '                        <path d=\"M5.66894679,7.39006239 C4.65859817,7.39006239 3.83966239,6.57112661 3.83966239,5.56077798 C3.83966239,4.55057615 4.65859817,3.73164037 5.66894679,3.73164037 C6.67929541,3.73164037 7.49823119,4.55057615 7.49823119,5.56077798 C7.49823119,6.57112661 6.67929541,7.39006239 5.66894679,7.39006239 M9.53346055,1.69626422 L9.53346055,1.69626422 C7.36949725,-0.467699083 3.8608,-0.467699083 1.69654312,1.69626422 C-0.253401835,3.64620917 -0.472998165,7.3178422 1.18190092,9.52408073 L5.61492844,15.9264294 L10.0481028,9.52408073 C11.702855,7.3178422 11.4834055,3.64620917 9.53346055,1.69626422\" id=\"Fill-1\" fill=\"#0081CB\"></path>\\n' +\n        '                        <path d=\"M5.66894679,7.39006239 C4.65859817,7.39006239 3.83966239,6.57112661 3.83966239,5.56077798 C3.83966239,4.55057615 4.65859817,3.73164037 5.66894679,3.73164037 C6.67929541,3.73164037 7.49823119,4.55057615 7.49823119,5.56077798 C7.49823119,6.57112661 6.67929541,7.39006239 5.66894679,7.39006239 L5.66894679,7.39006239 Z M9.53346055,1.69626422 L9.53346055,1.69626422 C7.36949725,-0.467699083 3.8608,-0.467699083 1.69654312,1.69626422 C-0.253401835,3.64620917 -0.472998165,7.3178422 1.18190092,9.52408073 L5.61492844,15.9264294 L10.0481028,9.52408073 C11.702855,7.3178422 11.4834055,3.64620917 9.53346055,1.69626422 L9.53346055,1.69626422 Z\" id=\"Stroke-3\"></path>\\n' +\n        '                    </g>\\n' +\n        '                </g>\\n' +\n        '            </g>\\n' +\n        '        </g>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'BP_TASK_COMPLETED',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"12px\" height=\"9px\" viewBox=\"0 0 12 9\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>6FF6D773-32D5-44FF-9BA8-ED1ACBAF56A8</title>\\n' +\n        '    <desc>Created with sketchtool.</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '    <g id=\"Case-Management-\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <g id=\"8.-Tibco-Case-Management---Detail-Page--collapsed\" transform=\"translate(-73.000000, -753.000000)\" fill=\"#58A400\">\\n' +\n        '            <g id=\"check\" transform=\"translate(68.000000, 745.000000)\">\\n' +\n        '                <path d=\"M16.8612947,9.80440476 L9.9853348,16.6789202 C9.80100552,16.8624718 9.50267875,16.8624718 9.31912723,16.6789202 L5.13766364,12.4706795 C4.95411212,12.2863502 4.95411212,11.9869123 5.13766364,11.8036941 L6.13675278,10.8053827 C6.32097095,10.6214979 6.61940883,10.6214979 6.80296035,10.8053827 L9.65578649,13.6770974 L15.1948869,8.13766364 C15.3784384,7.95411212 15.6767652,7.95411212 15.8617611,8.13766364 L16.8609614,9.13741943 C17.0462906,9.32141538 17.0462906,9.62085324 16.8612947,9.80440476\" id=\"Fill-1\"></path>\\n' +\n        '            </g>\\n' +\n        '        </g>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'BP_TASK_CREATED',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"12px\" height=\"16px\" viewBox=\"0 0 12 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>DA1993B0-7B6B-42BA-814D-097AD18D0114</title>\\n' +\n        '    <desc>Created with sketchtool.</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '    <g id=\"Case-Management-\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <g id=\"8.-Tibco-Case-Management---Detail-Page--collapsed\" transform=\"translate(-75.000000, -366.000000)\">\\n' +\n        '            <g id=\"location\" transform=\"translate(69.000000, 362.000000)\">\\n' +\n        '                <g id=\"Group-3\" transform=\"translate(6.000000, 4.000000)\">\\n' +\n        '                    <g id=\"Page-1\">\\n' +\n        '                        <path d=\"M5.66894679,7.39006239 C4.65859817,7.39006239 3.83966239,6.57112661 3.83966239,5.56077798 C3.83966239,4.55057615 4.65859817,3.73164037 5.66894679,3.73164037 C6.67929541,3.73164037 7.49823119,4.55057615 7.49823119,5.56077798 C7.49823119,6.57112661 6.67929541,7.39006239 5.66894679,7.39006239 M9.53346055,1.69626422 L9.53346055,1.69626422 C7.36949725,-0.467699083 3.8608,-0.467699083 1.69654312,1.69626422 C-0.253401835,3.64620917 -0.472998165,7.3178422 1.18190092,9.52408073 L5.61492844,15.9264294 L10.0481028,9.52408073 C11.702855,7.3178422 11.4834055,3.64620917 9.53346055,1.69626422\" id=\"Fill-1\" fill=\"#0081CB\"></path>\\n' +\n        '                        <path d=\"M5.66894679,7.39006239 C4.65859817,7.39006239 3.83966239,6.57112661 3.83966239,5.56077798 C3.83966239,4.55057615 4.65859817,3.73164037 5.66894679,3.73164037 C6.67929541,3.73164037 7.49823119,4.55057615 7.49823119,5.56077798 C7.49823119,6.57112661 6.67929541,7.39006239 5.66894679,7.39006239 L5.66894679,7.39006239 Z M9.53346055,1.69626422 L9.53346055,1.69626422 C7.36949725,-0.467699083 3.8608,-0.467699083 1.69654312,1.69626422 C-0.253401835,3.64620917 -0.472998165,7.3178422 1.18190092,9.52408073 L5.61492844,15.9264294 L10.0481028,9.52408073 C11.702855,7.3178422 11.4834055,3.64620917 9.53346055,1.69626422 L9.53346055,1.69626422 Z\" id=\"Stroke-3\"></path>\\n' +\n        '                    </g>\\n' +\n        '                </g>\\n' +\n        '            </g>\\n' +\n        '        </g>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'Calculation Task',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"18px\" height=\"18px\" viewBox=\"0 0 16 22\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>icon-ic_calc_task</title>\\n' +\n        '    <desc>icon-ic_calc_task</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '\\n' +\n        '\\t<g id=\"icon-ic_calc_task\" fill=\"#0081CB\">\\n' +\n        '\\t\\t<title>icon-ic_calc_task</title>\\n' +\n        '\\t\\t<path class=\"path1\" d=\"M0,1.991155 C0,0.891470458 0.894513756,0 1.99406028,0 L14.0059397,0 C15.1072288,0 16,0.889673948 16,1.991155 L16,20.008845 C16,21.1085295 15.1054862,22 14.0059397,22 L1.99406028,22 C0.892771196,22 0,21.1103261 0,20.008845 L0,1.991155 Z M11.02,7.6 L11.02,10.8933333 L14.3133333,10.8933333 L14.3133333,7.6 L11.02,7.6 Z M6.46,7.6 L6.46,10.8933333 L9.75333333,10.8933333 L9.75333333,7.6 L6.46,7.6 Z M1.9,7.6 L1.9,10.8933333 L5.19333333,10.8933333 L5.19333333,7.6 L1.9,7.6 Z M11.02,12.16 L11.02,15.4533333 L14.3133333,15.4533333 L14.3133333,12.16 L11.02,12.16 Z M6.46,12.16 L6.46,15.4533333 L9.75333333,15.4533333 L9.75333333,12.16 L6.46,12.16 Z M1.9,12.16 L1.9,15.4533333 L5.19333333,15.4533333 L5.19333333,12.16 L1.9,12.16 Z M11.02,16.72 L11.02,20.0133333 L14.3133333,20.0133333 L14.3133333,16.72 L11.02,16.72 Z M6.46,16.72 L6.46,20.0133333 L9.75333333,20.0133333 L9.75333333,16.72 L6.46,16.72 Z M1.9,16.72 L1.9,20.0133333 L5.19333333,20.0133333 L5.19333333,16.72 L1.9,16.72 Z M1.90321615,1.92560547 L1.90321615,6.23227214 L14.4432161,6.23227214 L14.4432161,1.92560547 L1.90321615,1.92560547 Z\" id=\"Combined-Shape\"></path>\\n' +\n        '\\t</g>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'CM_CASE_CREATED',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"12px\" height=\"16px\" viewBox=\"0 0 12 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>DA1993B0-7B6B-42BA-814D-097AD18D0114</title>\\n' +\n        '    <desc>Created with sketchtool.</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '    <g id=\"Case-Management-\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <g id=\"8.-Tibco-Case-Management---Detail-Page--collapsed\" transform=\"translate(-75.000000, -366.000000)\">\\n' +\n        '            <g id=\"location\" transform=\"translate(69.000000, 362.000000)\">\\n' +\n        '                <g id=\"Group-3\" transform=\"translate(6.000000, 4.000000)\">\\n' +\n        '                    <g id=\"Page-1\">\\n' +\n        '                        <path d=\"M5.66894679,7.39006239 C4.65859817,7.39006239 3.83966239,6.57112661 3.83966239,5.56077798 C3.83966239,4.55057615 4.65859817,3.73164037 5.66894679,3.73164037 C6.67929541,3.73164037 7.49823119,4.55057615 7.49823119,5.56077798 C7.49823119,6.57112661 6.67929541,7.39006239 5.66894679,7.39006239 M9.53346055,1.69626422 L9.53346055,1.69626422 C7.36949725,-0.467699083 3.8608,-0.467699083 1.69654312,1.69626422 C-0.253401835,3.64620917 -0.472998165,7.3178422 1.18190092,9.52408073 L5.61492844,15.9264294 L10.0481028,9.52408073 C11.702855,7.3178422 11.4834055,3.64620917 9.53346055,1.69626422\" id=\"Fill-1\" fill=\"#0081CB\"></path>\\n' +\n        '                        <path d=\"M5.66894679,7.39006239 C4.65859817,7.39006239 3.83966239,6.57112661 3.83966239,5.56077798 C3.83966239,4.55057615 4.65859817,3.73164037 5.66894679,3.73164037 C6.67929541,3.73164037 7.49823119,4.55057615 7.49823119,5.56077798 C7.49823119,6.57112661 6.67929541,7.39006239 5.66894679,7.39006239 L5.66894679,7.39006239 Z M9.53346055,1.69626422 L9.53346055,1.69626422 C7.36949725,-0.467699083 3.8608,-0.467699083 1.69654312,1.69626422 C-0.253401835,3.64620917 -0.472998165,7.3178422 1.18190092,9.52408073 L5.61492844,15.9264294 L10.0481028,9.52408073 C11.702855,7.3178422 11.4834055,3.64620917 9.53346055,1.69626422 L9.53346055,1.69626422 Z\" id=\"Stroke-3\"></path>\\n' +\n        '                    </g>\\n' +\n        '                </g>\\n' +\n        '            </g>\\n' +\n        '        </g>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'CM_CASE_UPDATED',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"13px\" height=\"12px\" viewBox=\"0 0 13 12\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>FBF578C4-F30A-4646-A5DA-0753816A90AE</title>\\n' +\n        '    <desc>Created with sketchtool.</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '    <g id=\"Case-Management-\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <g id=\"8.-Tibco-Case-Management---Detail-Page--collapsed\" transform=\"translate(-75.000000, -424.000000)\" fill=\"#0081CB\">\\n' +\n        '            <g id=\"Edit-icon\" transform=\"translate(69.000000, 418.000000)\">\\n' +\n        '                <path d=\"M6.00682619,17.6598257 C5.96218426,17.8607372 6.14357915,18.0407641 6.34451344,17.9919042 L9.07799944,17.329138 L6.62636407,14.8761346 L6.00682619,17.6598257 Z M17.8128382,7.41103724 L16.7188829,6.31708196 C16.296107,5.89430601 15.6096062,5.89430601 15.1853939,6.31708196 L14.1374941,7.36498172 L16.5905203,9.81800788 L17.8128382,8.59568996 C18.1407444,8.26776101 18.1407444,7.73894338 17.8128382,7.41103724 L17.8128382,7.41103724 Z M13.4984397,8.0026454 L15.9514658,10.4556488 L9.74217924,16.6649354 L7.29054387,14.211932 L13.4984397,8.0026454 Z\" id=\"Fill-1\"></path>\\n' +\n        '            </g>\\n' +\n        '        </g>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'CM_CASE_UPDATED_STATE_CHANGED',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"14px\" height=\"12px\" viewBox=\"0 0 14 12\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>2E4A2B33-18E9-42A0-857D-D8F21B671B64</title>\\n' +\n        '    <desc>Created with sketchtool.</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '    <g id=\"Case-Management-\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <g id=\"8.-Tibco-Case-Management---Detail-Page--collapsed\" transform=\"translate(-75.000000, -643.000000)\" fill=\"#0081CB\">\\n' +\n        '            <g id=\"change\" transform=\"translate(69.000000, 636.000000)\">\\n' +\n        '                <g id=\"task-complete\" transform=\"translate(6.000000, 7.000000)\">\\n' +\n        '                    <g id=\"Capa_1\">\\n' +\n        '                        <g id=\"change-icon\">\\n' +\n        '                            <path d=\"M6.0006733,6.2048608 C6.22449716,5.67444886 6.41423864,5.25835227 6.56997443,4.95662216 C6.68676989,4.7327983 6.79635511,4.54420739 6.89855114,4.39090057 C7.00064489,4.23759375 7.12482955,4.08794318 7.27077273,3.94197443 C7.41689489,3.79595455 7.58469886,3.68634375 7.77459375,3.6134233 C7.96428409,3.54042614 8.1759375,3.50391477 8.40965625,3.50391477 L10.2782812,3.50391477 L10.2782812,4.90551136 C10.2782812,4.96876705 10.3013693,5.02355966 10.347571,5.0697358 C10.3937727,5.11598864 10.4485398,5.1390767 10.5117187,5.1390767 C10.5799602,5.1390767 10.6359545,5.11724148 10.6795227,5.07341761 L13.0155597,2.73753409 C13.0594858,2.69368466 13.0813466,2.63779261 13.0813466,2.56962784 C13.0813466,2.50146307 13.0594858,2.44554545 13.0155597,2.40154261 L10.6868864,0.07284375 C10.6286165,0.0242130682 10.5699886,0 10.5116932,0 C10.4434517,0 10.3876108,0.0218607955 10.3437102,0.0657102273 C10.300142,0.109508523 10.2782557,0.165426136 10.2782557,0.233565341 L10.2782557,1.63505966 L8.40963068,1.63505966 C8.078625,1.63505966 7.76720455,1.67530398 7.4751392,1.75558807 C7.18307386,1.83587216 6.9238892,1.93801705 6.69763636,2.06217614 C6.47130682,2.18628409 6.25234091,2.3529375 6.0406108,2.56223864 C5.82890625,2.7714375 5.64880398,2.97347727 5.50045739,3.16812784 C5.35205966,3.36272727 5.19627273,3.60603409 5.03327557,3.89807386 C4.87030398,4.1900625 4.73888352,4.44559091 4.63911648,4.66455682 C4.53932386,4.88357386 4.41889773,5.15367614 4.27778693,5.4748892 C4.05388636,6.0053267 3.86409375,6.42147443 3.70838352,6.72317898 C3.59161364,6.94700284 3.48202841,7.13564489 3.37990909,7.28892614 C3.27773864,7.44223295 3.15355398,7.59185795 3.00758523,7.7378267 C2.86156534,7.88394886 2.69365909,7.99348295 2.50386648,8.06648011 C2.314125,8.1394517 2.10236932,8.1760142 1.86880398,8.1760142 L0.233667614,8.1760142 C0.165502841,8.1760142 0.109508523,8.19772159 0.0657613636,8.24162216 C0.0220653409,8.28536932 0.000102272727,8.34121023 0.000102272727,8.40942614 L0.000102272727,9.81115057 C0.000102272727,9.87923864 0.0221420455,9.93523295 0.0659403409,9.97913352 C0.109764205,10.0229063 0.165784091,10.044767 0.233846591,10.044767 L1.86903409,10.044767 C2.20003977,10.044767 2.51143466,10.0045227 2.80347443,9.9241875 C3.09546307,9.84385227 3.3546733,9.74165625 3.58090057,9.61759943 C3.80725568,9.49344034 4.02622159,9.3267358 4.23792614,9.11743466 C4.44957955,8.9083125 4.62973295,8.70619602 4.77813068,8.51162216 C4.92647727,8.31692045 5.08223864,8.07366477 5.24528693,7.7817017 C5.40825852,7.4896108 5.53973011,7.23413352 5.63944602,7.01519318 C5.73913636,6.79617614 5.85953693,6.52615057 6.0006733,6.2048608\" id=\"Fill-1\"></path>\\n' +\n        '                            <path d=\"M0.233565341,3.50383807 L1.86875284,3.50383807 C2.08288636,3.50383807 2.28116761,3.53914773 2.46369886,3.60976705 C2.64623011,3.68038636 2.79951136,3.76550284 2.92359375,3.86532102 C3.0477017,3.9651392 3.17178409,4.10256818 3.29589205,4.2777358 C3.41997443,4.45300568 3.51853977,4.60756534 3.59153693,4.7413125 C3.66448295,4.8751875 3.75450852,5.05163352 3.86158807,5.27059943 C4.23639205,4.38975 4.5696733,3.72546307 4.8616875,3.27773864 C4.08303409,2.18278125 3.0853892,1.63521307 1.86872727,1.63521307 L0.233565341,1.63521307 C0.165400568,1.63521307 0.10940625,1.65707386 0.0656590909,1.7009233 C0.0219630682,1.74467045 0,1.80058807 0,1.86875284 L0,3.27034943 C0,3.33853977 0.0218607955,3.39438068 0.0656590909,3.43815341 C0.109508523,3.48200284 0.165502841,3.50383807 0.233565341,3.50383807\" id=\"Fill-3\"></path>\\n' +\n        '                            <path d=\"M10.6870653,6.61382386 C10.6286165,6.56519318 10.5701676,6.54103125 10.5117188,6.54103125 C10.4436563,6.54103125 10.3876364,6.56281534 10.3439148,6.6066392 C10.3001676,6.65038636 10.2783068,6.70638068 10.2783068,6.77444318 L10.2783068,8.17616761 L8.40950284,8.17616761 C8.19529261,8.17616761 7.99703693,8.14080682 7.81450568,8.07013636 C7.63197443,7.99959375 7.47866761,7.91447727 7.3546108,7.81463352 C7.23063068,7.71489205 7.10647159,7.5773608 6.9823892,7.40209091 C6.85823011,7.22689773 6.75961364,7.0723125 6.68664205,6.93841193 C6.61372159,6.80479261 6.52369602,6.62814205 6.41661648,6.40932955 C6.04191477,7.28526989 5.71103693,7.94955682 5.42385511,8.40219034 C5.55519886,8.59195739 5.69147727,8.76109091 5.83261364,8.90941193 C5.97369886,9.05780966 6.10757386,9.18800284 6.23408523,9.29999148 C6.36062216,9.4118267 6.5041875,9.50929261 6.66475568,9.59187784 C6.82540057,9.67464205 6.96646023,9.74395739 7.08824148,9.79997727 C7.21022727,9.85594602 7.36335511,9.90094602 7.54821307,9.93505398 C7.73309659,9.96900852 7.88883239,9.99473011 8.01536932,10.0115284 C8.14188068,10.0285057 8.31469602,10.0407528 8.5336875,10.0481165 C8.75260227,10.0554545 8.93025,10.0577301 9.066375,10.0554545 C9.20278125,10.053 9.39991193,10.050392 9.65786932,10.0481165 C9.9158267,10.0457386 10.1226733,10.0444347 10.2784347,10.0444347 L10.2784347,11.4460568 C10.2784347,11.5093125 10.3015227,11.5640795 10.3477244,11.6102812 C10.3939261,11.6565085 10.4486932,11.6795966 10.5118722,11.6795966 C10.5801136,11.6795966 10.636108,11.6577358 10.6796761,11.6139886 L13.0157131,9.27813068 C13.0594602,9.23420455 13.081321,9.1783892 13.081321,9.11014773 C13.081321,9.04198295 13.0594602,8.98606534 13.0155341,8.94234375 L10.6870653,6.61382386 Z\" id=\"Fill-5\"></path>\\n' +\n        '                        </g>\\n' +\n        '                    </g>\\n' +\n        '                </g>\\n' +\n        '            </g>\\n' +\n        '        </g>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'Email Task',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"10px\" height=\"12px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>icon-ic_email_task</title>\\n' +\n        '    <desc>icon-ic_email_task</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '\\n' +\n        '\\t<g id=\"icon-ic_email_task\" fill=\"#0081CB\">\\n' +\n        '\\t\\t<title>icon-ic_email_task</title>\\n' +\n        '\\t\\t<path class=\"path1\" d=\"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z\" ></path>\\n' +\n        '\\t</g>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'ERROR',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"4px\" height=\"13px\" viewBox=\"0 0 4 13\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>D5AA7459-8549-4B01-9408-40A6047FEBD2</title>\\n' +\n        '    <desc>Created with sketchtool.</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '    <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" font-size=\"16\" font-family=\"SourceSansPro-Black, Source Sans Pro\" font-weight=\"700\">\\n' +\n        '        <g id=\"horizontal-stepper\" transform=\"translate(-1017.000000, -46.000000)\">\\n' +\n        '            <g id=\"Group-2\">\\n' +\n        '                <g transform=\"translate(180.000000, 0.000000)\">\\n' +\n        '                    <g id=\"error\" transform=\"translate(820.000000, 10.000000)\">\\n' +\n        '                        <text id=\"!\">\\n' +\n        '                            <tspan x=\"16\" y=\"48\" fill=\"#E60000\">!</tspan>\\n' +\n        '                            <tspan x=\"21.76\" y=\"48\" fill=\"#FEFCFC\"> </tspan>\\n' +\n        '                        </text>\\n' +\n        '                    </g>\\n' +\n        '                </g>\\n' +\n        '            </g>\\n' +\n        '        </g>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'TCI Task',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>icon-ic_tci_service_task</title>\\n' +\n        '    <desc>icon-ic_tci_service_task</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '\\n' +\n        '\\t<g id=\"icon-ic_tci_service_task\" fill=\"#0081CB\">\\n' +\n        '\\t\\t<title>icon-ic_tci_service_task</title>\\n' +\n        '\\t\\t<path class=\"path1\"\\n' +\n        '\\t\\t\\t  d=\"M19.6,2.4H2.4c-1,0-1.9,0.9-1.9,1.9v13.4c0,1,0.9,1.9,1.9,1.9h17.2c1,0,1.9-0.9,1.9-1.9V4.3C21.5,3.3,20.6,2.4,19.6,2.4z M7.2,15.8v3.8H5.3v-3.8H2.4L6.2,12l3.8,3.8H7.2z M11,10H2.4V8.1H11V10z M11,6.2H2.4V4.3H11V6.2zM15.9,18.6L12,14.8h2.9V11h1.9v3.8h2.9L15.9,18.6z\"></path>\\n' +\n        '\\t</g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'User Task',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"32px\" height=\"32px\" viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>icon-ic_person</title>\\n' +\n        '    <desc>icon-ic_person</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '\\n' +\n        '\\t<g id=\"icon-ic_person\" fill=\"#0081CB\">\\n' +\n        '\\t\\t<title>ic_person</title>\\n' +\n        '\\t\\t<path class=\"path1\"\\n' +\n        '\\t\\t\\t  d=\"M16 16c2.947 0 5.333-2.387 5.333-5.333s-2.387-5.333-5.333-5.333-5.333 2.387-5.333 5.333 2.387 5.333 5.333 5.333zM16 18.667c-3.56 0-10.667 1.787-10.667 5.333v2.667h21.333v-2.667c0-3.547-7.107-5.333-10.667-5.333z\"></path>\\n' +\n        '\\t</g>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'WR_FOLDER_ARTIFACT_CREATED',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"12px\" height=\"16px\" viewBox=\"0 0 12 16\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>DA1993B0-7B6B-42BA-814D-097AD18D0114</title>\\n' +\n        '    <desc>Created with sketchtool.</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '    <g id=\"Case-Management-\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <g id=\"8.-Tibco-Case-Management---Detail-Page--collapsed\" transform=\"translate(-75.000000, -366.000000)\">\\n' +\n        '            <g id=\"location\" transform=\"translate(69.000000, 362.000000)\">\\n' +\n        '                <g id=\"Group-3\" transform=\"translate(6.000000, 4.000000)\">\\n' +\n        '                    <g id=\"Page-1\">\\n' +\n        '                        <path d=\"M5.66894679,7.39006239 C4.65859817,7.39006239 3.83966239,6.57112661 3.83966239,5.56077798 C3.83966239,4.55057615 4.65859817,3.73164037 5.66894679,3.73164037 C6.67929541,3.73164037 7.49823119,4.55057615 7.49823119,5.56077798 C7.49823119,6.57112661 6.67929541,7.39006239 5.66894679,7.39006239 M9.53346055,1.69626422 L9.53346055,1.69626422 C7.36949725,-0.467699083 3.8608,-0.467699083 1.69654312,1.69626422 C-0.253401835,3.64620917 -0.472998165,7.3178422 1.18190092,9.52408073 L5.61492844,15.9264294 L10.0481028,9.52408073 C11.702855,7.3178422 11.4834055,3.64620917 9.53346055,1.69626422\" id=\"Fill-1\" fill=\"#0081CB\"></path>\\n' +\n        '                        <path d=\"M5.66894679,7.39006239 C4.65859817,7.39006239 3.83966239,6.57112661 3.83966239,5.56077798 C3.83966239,4.55057615 4.65859817,3.73164037 5.66894679,3.73164037 C6.67929541,3.73164037 7.49823119,4.55057615 7.49823119,5.56077798 C7.49823119,6.57112661 6.67929541,7.39006239 5.66894679,7.39006239 L5.66894679,7.39006239 Z M9.53346055,1.69626422 L9.53346055,1.69626422 C7.36949725,-0.467699083 3.8608,-0.467699083 1.69654312,1.69626422 C-0.253401835,3.64620917 -0.472998165,7.3178422 1.18190092,9.52408073 L5.61492844,15.9264294 L10.0481028,9.52408073 C11.702855,7.3178422 11.4834055,3.64620917 9.53346055,1.69626422 L9.53346055,1.69626422 Z\" id=\"Stroke-3\"></path>\\n' +\n        '                    </g>\\n' +\n        '                </g>\\n' +\n        '            </g>\\n' +\n        '        </g>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'WR_FOLDER_ARTIFACT_DELETED',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"4px\" height=\"13px\" viewBox=\"0 0 4 13\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>D5AA7459-8549-4B01-9408-40A6047FEBD2</title>\\n' +\n        '    <desc>Created with sketchtool.</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '    <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" font-size=\"16\" font-family=\"SourceSansPro-Black, Source Sans Pro\" font-weight=\"700\">\\n' +\n        '        <g id=\"horizontal-stepper\" transform=\"translate(-1017.000000, -46.000000)\">\\n' +\n        '            <g id=\"Group-2\">\\n' +\n        '                <g transform=\"translate(180.000000, 0.000000)\">\\n' +\n        '                    <g id=\"error\" transform=\"translate(820.000000, 10.000000)\">\\n' +\n        '                        <text id=\"!\">\\n' +\n        '                            <tspan x=\"16\" y=\"48\" fill=\"#E60000\">!</tspan>\\n' +\n        '                            <tspan x=\"21.76\" y=\"48\" fill=\"#FEFCFC\"> </tspan>\\n' +\n        '                        </text>\\n' +\n        '                    </g>\\n' +\n        '                </g>\\n' +\n        '            </g>\\n' +\n        '        </g>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'WR_FOLDER_ARTIFACT_UPDATED',\n      this.domSanitizer.bypassSecurityTrustHtml('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n' +\n        '<svg width=\"13px\" height=\"12px\" viewBox=\"0 0 13 12\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\\n' +\n        '    <!-- Generator: sketchtool 39 (31667) - http://www.bohemiancoding.com/sketch -->\\n' +\n        '    <title>FBF578C4-F30A-4646-A5DA-0753816A90AE</title>\\n' +\n        '    <desc>Created with sketchtool.</desc>\\n' +\n        '    <defs></defs>\\n' +\n        '    <g id=\"Case-Management-\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\\n' +\n        '        <g id=\"8.-Tibco-Case-Management---Detail-Page--collapsed\" transform=\"translate(-75.000000, -424.000000)\" fill=\"#0081CB\">\\n' +\n        '            <g id=\"Edit-icon\" transform=\"translate(69.000000, 418.000000)\">\\n' +\n        '                <path d=\"M6.00682619,17.6598257 C5.96218426,17.8607372 6.14357915,18.0407641 6.34451344,17.9919042 L9.07799944,17.329138 L6.62636407,14.8761346 L6.00682619,17.6598257 Z M17.8128382,7.41103724 L16.7188829,6.31708196 C16.296107,5.89430601 15.6096062,5.89430601 15.1853939,6.31708196 L14.1374941,7.36498172 L16.5905203,9.81800788 L17.8128382,8.59568996 C18.1407444,8.26776101 18.1407444,7.73894338 17.8128382,7.41103724 L17.8128382,7.41103724 Z M13.4984397,8.0026454 L15.9514658,10.4556488 L9.74217924,16.6649354 L7.29054387,14.211932 L13.4984397,8.0026454 Z\" id=\"Fill-1\"></path>\\n' +\n        '            </g>\\n' +\n        '        </g>\\n' +\n        '    </g>\\n' +\n        '</svg>')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'AuditSafe Task',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"17\" height=\"20\" viewBox=\"0 0 17 20\">\\n' +\n        '  <path fill=\"#0081CB\" d=\"M8.18181818,20 C3.49090909,18.8545455 0,14.1363636 0,9.09090909 L0,0 C1.85406953,0.606060606 3.38118361,0.909090909 4.58134225,0.909090909 C5.7815009,0.909090909 6.98165954,0.606060606 8.18181818,3.67564428e-16 C9.12173722,0.606060606 10.3441345,0.909090909 11.8490099,0.909090909 C13.3538854,0.909090909 14.8587609,0.606060606 16.3636364,0 L16.3636364,9.09090909 C16.3636364,14.1363636 12.8727273,18.8545455 8.18181818,20 Z M8.18181818,18.1818182 C11.5909091,17.2727273 14.5454545,13.2181818 14.5454545,9.29090909 L14.5454545,2.09090909 L3.48421678,14.5663657 C3.9802662,15.2961162 4.61784565,15.9703577 5.39695512,16.5890903 C6.17606458,17.2078229 7.10435227,17.7387322 8.18181818,18.1818182 Z\"/>\\n' +\n        '</svg>\\n')\n    );\n    this.matIconRegistry.addSvgIconLiteral(\n      'round',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg fill=\"#000000\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\\n' +\n        '    <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\\n' +\n        '    <path d=\"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z\"/>\\n' +\n        '</svg>')\n    );\n    // *JS*?\n    this.matIconRegistry.addSvgIconLiteral(\n      'tcpd-database-blue',\n      this.domSanitizer.bypassSecurityTrustHtml('<svg id=\"ic-database\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 24 24\">\\n' +\n        '  <defs>\\n' +\n        '    <style>\\n' +\n        '      .cls-1 {\\n' +\n        '        fill: none;\\n' +\n        '        clip-rule: evenodd;\\n' +\n        '      }\\n' +\n        '\\n' +\n        '      .cls-2 {\\n' +\n        '        clip-path: url(#clip-path);\\n' +\n        '      }\\n' +\n        '\\n' +\n        '      .cls-3 {\\n' +\n        '        clip-path: url(#clip-path-2);\\n' +\n        '      }\\n' +\n        '\\n' +\n        '      .cls-4 {\\n' +\n        '        fill: #0081cb;\\n' +\n        '      }\\n' +\n        '    </style>\\n' +\n        '    <clipPath id=\"clip-path\">\\n' +\n        '      <path class=\"cls-1\" d=\"M-284,390.5h-12a2.49,2.49,0,0,1-1.76-.73,2.49,2.49,0,0,1-.73-1.76V376a2.49,2.49,0,0,1,.73-1.76,2.49,2.49,0,0,1,1.76-.73h12a2.49,2.49,0,0,1,1.76.73,2.49,2.49,0,0,1,.73,1.76v12a2.49,2.49,0,0,1-.73,1.76A2.49,2.49,0,0,1-284,390.5Z\"/>\\n' +\n        '    </clipPath>\\n' +\n        '    <clipPath id=\"clip-path-2\">\\n' +\n        '      <path class=\"cls-1\" d=\"M-298,376a2,2,0,0,1,2-2h12a2,2,0,0,1,2,2v12a2,2,0,0,1-2,2h-12a2,2,0,0,1-2-2Zm-10-12h36v36h-36Z\"/>\\n' +\n        '    </clipPath>\\n' +\n        '  </defs>\\n' +\n        '  <title>ic-database-blue</title>\\n' +\n        '  <g>\\n' +\n        '    <ellipse class=\"cls-4\" cx=\"12\" cy=\"5\" rx=\"9\" ry=\"3\"/>\\n' +\n        '    <path class=\"cls-4\" d=\"M12,10C7,10,3,8.66,3,7v5c0,1.66,4,3,9,3s9-1.34,9-3V7C21,8.66,17,10,12,10Z\"/>\\n' +\n        '    <path class=\"cls-4\" d=\"M12,17c-5,0-9-1.34-9-3v5c0,1.66,4,3,9,3s9-1.34,9-3V14C21,15.66,17,17,12,17Z\"/>\\n' +\n        '  </g>\\n' +\n        '</svg>\\n')\n    );\n  }\n}\n","export class AppConfig {\n    config: any;\n}\n","// this resolver wraps claims and appConfig resolvers because we need claims to get and set AppConfig to default values.\n// we actually cache the claims call using a HTTP interceptor to avoid making multiple REST calls\n// note: claims only changes on logout/login so no point making lots of calls to claims\n\nimport { Injectable } from '@angular/core';\nimport {ActivatedRouteSnapshot, Resolve, Router} from '@angular/router';\nimport {forkJoin, Observable, of} from 'rxjs';\nimport {GeneralConfigResolver, UiAppConfig, GeneralConfig, TcGeneralConfigService} from '@tibco-tcstk/tc-core-lib';\nimport {flatMap, map, mergeMap} from 'rxjs/operators';\nimport {TcSharedStateService} from '@tibco-tcstk/tc-core-lib';\nimport {Claim} from '@tibco-tcstk/tc-core-lib';\nimport {ClaimsResolver} from './claims.resolver';\nimport {LiveAppsService} from '../services/live-apps.service';\nimport {HttpClient} from '@angular/common/http';\nimport {TcDocumentService} from '../services/tc-document.service';\nimport {LiveAppsConfig, LiveAppsConfigHolder} from '../models/tc-liveapps-config';\nimport {LiveAppsConfigResolver} from './liveapps-config.resolver';\nimport {TcLiveAppsConfigService} from '../services/tc-live-apps-config.service';\nimport {TcCaseCardConfigService} from '../services/tc-case-card-config.service';\nimport {Location} from '@angular/common';\nimport {TcAppDefinitionService} from '../services/tc-app-definition.service';\n\n@Injectable()\nexport class LaConfigResolver implements Resolve<Observable<LiveAppsConfigHolder>> {\n\n  constructor(private sharedStateService: TcSharedStateService, private generalConfigService: TcGeneralConfigService, private liveAppsConfigService: TcLiveAppsConfigService, private documentService: TcDocumentService, private http: HttpClient, private liveAppsService: LiveAppsService, private caseCardConfigService: TcCaseCardConfigService, private appDefinitionService: TcAppDefinitionService, private location: Location, private router: Router) {}\n\n  resolve(routeSnapshot: ActivatedRouteSnapshot): Observable<LiveAppsConfigHolder> {\n    // we will return a holder object that contains both general config and live apps config\n\n    const generalConfigResolver = new GeneralConfigResolver(this.sharedStateService, this.generalConfigService, this.http, this.location, this.router);\n    const liveAppsConfigResolver = new LiveAppsConfigResolver(this.sharedStateService, this.liveAppsConfigService, this.caseCardConfigService, this.http, this.location);\n\n    const sandboxId = this.appDefinitionService.sandboxId;\n    generalConfigResolver.setSandbox(sandboxId);\n    liveAppsConfigResolver.setSandbox(sandboxId);\n\n    const generalConfig$ = generalConfigResolver.resolve();\n    const liveAppsConfig$ = liveAppsConfigResolver.resolve(routeSnapshot);\n    const forkJoinArray = [generalConfig$, liveAppsConfig$];\n    const calls$ = forkJoin(forkJoinArray).pipe(\n      map(resultArr => {\n        return new LiveAppsConfigHolder().deserialize({ generalConfig: resultArr[0], liveAppsConfig: resultArr[1] });\n      }));\n\n    const resolveResp$ = calls$.pipe(\n      flatMap(liveAppsConfigHolder => {\n        const topOrgFolder$ = this.documentService.initOrgFolder(liveAppsConfigHolder.generalConfig.uiAppId);\n        const iconsFolder$ = this.documentService.initOrgFolder(liveAppsConfigHolder.generalConfig.uiAppId + '_Icons');\n        const docsFolder$ = this.documentService.initOrgFolder(liveAppsConfigHolder.generalConfig.uiAppId + '_Docs');\n        const forkJoinArray2 = [topOrgFolder$, iconsFolder$, docsFolder$];\n        return forkJoin(forkJoinArray2).pipe(\n          map(\n            resultArr => {\n              return liveAppsConfigHolder;\n            }\n          )\n        );\n      })\n    )\n\n    return resolveResp$;\n  }\n\n}\n","import {Injectable} from '@angular/core';\nimport {Resolve} from '@angular/router';\nimport {Observable, of} from 'rxjs';\nimport {LiveAppsService} from '../services/live-apps.service';\nimport {Groups} from '../models/tc-groups-data';\nimport {TcAppDefinitionService} from '../services/tc-app-definition.service';\n\n@Injectable()\nexport class AllGroupsResolver implements Resolve<Observable<Groups>> {\n\n  constructor(private liveapps: LiveAppsService, private appDefinitionService: TcAppDefinitionService) {\n  }\n\n  resolve(): Observable<Groups> {\n    const claims = this.appDefinitionService.claims;\n    return of(new Groups().deserialize( { groups: this.appDefinitionService.groups }));\n  }\n}\n","import {Injectable} from '@angular/core';\nimport {ActivatedRouteSnapshot, Resolve, Router} from '@angular/router';\nimport {forkJoin, Observable, of} from 'rxjs';\nimport {LiveAppsService} from '../services/live-apps.service';\nimport {Claim, GeneralConfigResolver, RoleAttribute, TcGeneralConfigService, TcSharedStateService} from '@tibco-tcstk/tc-core-lib';\nimport {flatMap, map, mergeMap, switchMap, take} from 'rxjs/operators';\nimport {Group, Groups, Roles} from '../models/tc-groups-data';\nimport {HttpClient} from '@angular/common/http';\nimport {TcCaseCardConfigService} from '../services/tc-case-card-config.service';\nimport {Location} from '@angular/common';\nimport {ClaimsResolver} from './claims.resolver';\nimport {group} from '@angular/animations';\nimport {TcAppDefinitionService} from '../services/tc-app-definition.service';\n\n@Injectable()\nexport class AllRolesResolver implements Resolve<Observable<Roles>> {\n\n  constructor(private sharedStateService: TcSharedStateService, private generalConfigService: TcGeneralConfigService, private appDefinitionService: TcAppDefinitionService, private http: HttpClient, private liveapps: LiveAppsService, private location: Location, private router: Router) {\n  }\n\n  resolve(routeSnapshot: ActivatedRouteSnapshot): Observable<Roles> {\n    const sandboxId = this.appDefinitionService.sandboxId;\n\n    const generalConfigResolver = new GeneralConfigResolver(this.sharedStateService, this.generalConfigService, this.http, this.location, this.router);\n    generalConfigResolver.setSandbox(sandboxId);\n    return generalConfigResolver.resolve().pipe(\n      map(generalConfig => {\n        return new Roles().deserialize({roles: generalConfig.roles});\n      })\n    );\n  }\n}\n","import {Injectable} from '@angular/core';\nimport {Resolve, ActivatedRouteSnapshot} from '@angular/router';\nimport {forkJoin, Observable, of} from 'rxjs';\nimport {LiveAppsService} from '../services/live-apps.service';\nimport {Claim, GeneralConfigResolver, RoleAttribute, TcGeneralConfigService, TcSharedStateService} from '@tibco-tcstk/tc-core-lib';\nimport {flatMap, map, mergeMap, switchMap, take} from 'rxjs/operators';\nimport {HttpClient} from '@angular/common/http';\nimport {Location} from '@angular/common';\nimport {ClaimsResolver} from './claims.resolver';\nimport {CaseInfo} from '../models/liveappsdata';\nimport {TcAppDefinitionService} from '../services/tc-app-definition.service';\n\n@Injectable()\nexport class CaseDataResolver implements Resolve<Observable<CaseInfo>> {\n\n  constructor(private liveapps: LiveAppsService, private appDefinitionService: TcAppDefinitionService) {\n  }\n\n  resolve(routeSnapshot: ActivatedRouteSnapshot): Observable<CaseInfo> {\n\n    const sandboxId = this.appDefinitionService.sandboxId;\n    return this.liveapps.getCase(routeSnapshot.params.caseRef, Number(sandboxId), routeSnapshot.params.appId, routeSnapshot.params.typeId)\n      .pipe(\n        map(caseInfo => {\n          return caseInfo;\n        })\n      );\n  }\n}\n","import { Injectable } from '@angular/core';\nimport {ActivatedRouteSnapshot, Resolve} from '@angular/router';\nimport {Observable, of, throwError} from 'rxjs';\nimport {TcCoreCommonFunctions, UiAppConfig, UiAppIdConfig} from '@tibco-tcstk/tc-core-lib';\nimport {catchError, flatMap, map, mergeMap, switchMap} from 'rxjs/operators';\nimport {TcSharedStateService} from '@tibco-tcstk/tc-core-lib';\nimport {HttpClient, HttpHeaders} from '@angular/common/http';\nimport {FormConfig} from '../models/tc-liveapps-config';\nimport {TcFormConfigService} from '../services/tc-form-config.service';\nimport {Location} from '@angular/common';\n\n@Injectable()\nexport class FormConfigResolver implements Resolve<Observable<FormConfig>> {\n\n  DEFAULT_CONFIG_URL = TcCoreCommonFunctions.prepareUrlForStaticResource(this.location, 'assets/config/formConfig.json');\n  APP_ID_URL = TcCoreCommonFunctions.prepareUrlForStaticResource(this.location, 'assets/config/uiAppId.json');\n\n  private sandboxId: number;\n  public defaultFormConfig: FormConfig;\n  private uiAppId: string;\n\n  constructor(private tcSharedState: TcSharedStateService, private formConfigService: TcFormConfigService, private http: HttpClient, private location: Location) {}\n\n  // can be used to load defaultAppConfig from a JSON config\n  private getDefaultFormConfig = () => {\n    return this.http.get(this.DEFAULT_CONFIG_URL, { withCredentials: true }).pipe(\n      catchError(error => {\n        if (error) {\n          // use an empty config\n          return of(new FormConfig());\n        } else {\n          throwError(error);\n        }\n      }\n    ));\n  }\n\n  // loads uiAppId from json file in assets (appId.json)\n  private getAppId = (): Observable<UiAppIdConfig> => {\n    const headers = new HttpHeaders().set('cacheResponse', 'true');\n    return this.http.get(this.APP_ID_URL, { headers: headers, withCredentials: true }).pipe(\n      map(uiAppId => {\n          const uiAppIdConfig = new UiAppIdConfig().deserialize(uiAppId);\n          this.uiAppId = uiAppIdConfig.uiAppId;\n          return uiAppIdConfig;\n        }\n      )\n    );\n  }\n\n  resolve(routeSnapshot: ActivatedRouteSnapshot): Observable<FormConfig> {\n    const formConf$ = this.getAppId().pipe(\n      switchMap(uiAppId => this.formConfigService.getFormConfig(uiAppId.uiAppId, true, false)\n        .pipe(\n          mergeMap(\n            (formConfig: FormConfig) => {\n              if (formConfig === undefined) {\n                return this.getDefaultFormConfig().pipe(\n                  flatMap((config: FormConfig) => {\n                    this.defaultFormConfig = config;\n                    return this.formConfigService.createFormConfig(\n                      this.sandboxId,\n                      uiAppId.uiAppId,\n                      config)\n                      .pipe(\n                        map(\n                          (result: string) => {\n                            const newFormConfig = this.defaultFormConfig;\n                            newFormConfig.id = result;\n                            this.formConfigService.updateFormConfig(\n                              this.sandboxId,\n                              uiAppId.uiAppId,\n                              newFormConfig,\n                              result).subscribe(\n                              // trigger a read to flush the cache since we changed it\n                              updatedConf => {\n                                this.formConfigService.getFormConfig(this.uiAppId, true, true).subscribe();\n                              }\n                            );\n                            return newFormConfig;\n                          })\n                      );\n                  })\n                );\n              } else {\n                return of(formConfig);\n              }\n            }\n          )\n        )\n      )\n    )\n    return formConf$;\n  }\n\n}\n"]}